commit d8b6ed0443503cbd1b357f172950534df151dfea Author: Feten Dridi Date: Mon Dec 9 06:16:28 2024 +0100 Initial commit diff --git a/.vscode/config.json b/.vscode/config.json new file mode 100644 index 0000000..e69de29 diff --git a/.vscode/deploy.yml b/.vscode/deploy.yml new file mode 100644 index 0000000..c9d6460 --- /dev/null +++ b/.vscode/deploy.yml @@ -0,0 +1,3 @@ +- hosts: localhost + roles: + - docker-compose \ No newline at end of file diff --git a/.vscode/docker/backup.dockerfile b/.vscode/docker/backup.dockerfile new file mode 100644 index 0000000..80d895d --- /dev/null +++ b/.vscode/docker/backup.dockerfile @@ -0,0 +1,14 @@ +# Use the Alpine image as the base +FROM alpine:latest as backup_custom + +# Copy the entrypoint script into the container +COPY entrypoint_backup.sh /usr/local/bin/entrypoint_backup.sh + +# Switch to root user for setup +USER root + +# Make the entrypoint script executable +RUN chmod +x /usr/local/bin/entrypoint_backup.sh + +# Set the new entrypoint +ENTRYPOINT ["/usr/local/bin/entrypoint_backup.sh"] diff --git a/.vscode/docker/exporter.dockerfile b/.vscode/docker/exporter.dockerfile new file mode 100644 index 0000000..4d577ec --- /dev/null +++ b/.vscode/docker/exporter.dockerfile @@ -0,0 +1,27 @@ +# Use a Python slim image as base +FROM python:3.9-slim as exporter_custom + +# Set environment variables to avoid buffering +ENV PYTHONUNBUFFERED=1 + +# Create and set working directory +WORKDIR /app + +# Install required dependencies +RUN apt-get update && \ + apt-get install -y \ + libpq-dev && \ + pip install psycopg2-binary prometheus-client && \ + apt-get clean + +# Create a directory for logs +RUN mkdir /app/logs + +# Copy the Python script into the container +COPY pg_metrics_exporter.py /app/ + +# Set permissions for log directory (if required) +RUN chmod 755 /app/logs + +# Run the script and redirect logs to a file +CMD ["python", "/app/pg_metrics_exporter.py", ">", "/app/logs/exporter.log", "2>&1"] diff --git a/.vscode/docker/odoo.dockerfile b/.vscode/docker/odoo.dockerfile new file mode 100644 index 0000000..a50af7d --- /dev/null +++ b/.vscode/docker/odoo.dockerfile @@ -0,0 +1,13 @@ +# Use the existing Odoo image as the base +FROM odoo:latest as odoo-custom + +# Copy the entrypoint script into the container +COPY entrypoint_odoo.sh /usr/local/bin/entrypoint_odoo.sh + +USER root + +# Make the entrypoint script executable +RUN chmod +x /usr/local/bin/entrypoint_odoo.sh + +# Set the new entrypoint +ENTRYPOINT ["/usr/local/bin/entrypoint_odoo.sh"] diff --git a/.vscode/entrypoint_backup.sh b/.vscode/entrypoint_backup.sh new file mode 100644 index 0000000..6ee9b8f --- /dev/null +++ b/.vscode/entrypoint_backup.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# Install PostgreSQL client +apk add --no-cache postgresql-client + +# Wait until the PostgreSQL server is ready +until pg_isready -h admin -U admin; do + echo "Waiting for PostgreSQL..." + sleep 2 +done + diff --git a/.vscode/entrypoint_odoo.sh b/.vscode/entrypoint_odoo.sh new file mode 100644 index 0000000..4175206 --- /dev/null +++ b/.vscode/entrypoint_odoo.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +sleep 20 +odoo -i base diff --git a/.vscode/fluent.conf b/.vscode/fluent.conf new file mode 100644 index 0000000..53d1bb1 --- /dev/null +++ b/.vscode/fluent.conf @@ -0,0 +1,13 @@ + + @type tail + path "/var/log/odoo/odoo.log" + pos_file "/fluentd/logs/odoo.pos" + format none + tag "odoo.log" + + + + @type file + path "/fluentd/logs/collected-logs" + + diff --git a/.vscode/inventory/hosts b/.vscode/inventory/hosts new file mode 100644 index 0000000..55f2674 --- /dev/null +++ b/.vscode/inventory/hosts @@ -0,0 +1,2 @@ +[localhost] +localhost ansible_connection=local \ No newline at end of file diff --git a/.vscode/notes.txt b/.vscode/notes.txt new file mode 100644 index 0000000..04c45bc --- /dev/null +++ b/.vscode/notes.txt @@ -0,0 +1,3 @@ + docker-compose -f roles/docker-compose/files/docker-compose.yml up -d + + ansible-playbook -i hosts deploy.yml \ No newline at end of file diff --git a/.vscode/odoo.conf b/.vscode/odoo.conf new file mode 100644 index 0000000..c9b9d81 --- /dev/null +++ b/.vscode/odoo.conf @@ -0,0 +1,8 @@ +[options] +db_host = admin +db_port = 5432 +db_user = admin +db_password = admin +default_productivity_apps = True +db_name = admin +logfile = /var/log/odoo/odoo.log diff --git a/.vscode/pg_metrics_exporter.py b/.vscode/pg_metrics_exporter.py new file mode 100644 index 0000000..ea4e692 --- /dev/null +++ b/.vscode/pg_metrics_exporter.py @@ -0,0 +1,59 @@ +import psycopg2 +from prometheus_client import start_http_server, Gauge +import time + +# Configuration for database connection +DB_PARAMS = { + "host": "admin", + "database": "admin", + "user": "admin", + "password": "admin" +} + +# Prometheus metrics +QUERY_CALLS = Gauge('postgresql_query_calls', 'Number of calls for each query', ['query']) +QUERY_TOTAL_TIME = Gauge('postgresql_query_total_time_ms', 'Total execution time for each query in ms', ['query']) + +def fetch_metrics(): + try: + # Log connection attempt + print("Connecting to PostgreSQL database...") + + conn = psycopg2.connect(**DB_PARAMS) + cur = conn.cursor() + + # Execute query to get data + cur.execute(""" + SELECT query, calls, total_exec_time + FROM pg_stat_statements + ORDER BY total_exec_time DESC; + """) + + # Iterate through results and set Prometheus metrics + for row in cur: + query = row[0].replace("\\", "\\\\").replace('"', '\\"') # Escape special characters + calls = row[1] + total_time = row[2] * 1000 # Convert seconds to milliseconds + + QUERY_CALLS.labels(query=query).set(calls) + QUERY_TOTAL_TIME.labels(query=query).set(total_time) + + # Log the metrics being set + print(f"Metrics set for query: {query} | Calls: {calls} | Total execution time: {total_time} ms") + + cur.close() + conn.close() + except psycopg2.Error as e: + print(f"Error fetching data: {e}") + except Exception as e: + print(f"Unexpected error: {e}") + +if __name__ == '__main__': + # Start Prometheus HTTP server on port 8000 + start_http_server(8000) + print("Exporter running on http://localhost:8000/metrics") + + # Main loop to fetch metrics at regular intervals + while True: + fetch_metrics() + time.sleep(60) # Scrape every 60 seconds diff --git a/.vscode/prometheus.yml b/.vscode/prometheus.yml new file mode 100644 index 0000000..e69de29 diff --git a/.vscode/roles/docker-compose/files/docker-compose.yml b/.vscode/roles/docker-compose/files/docker-compose.yml new file mode 100644 index 0000000..29441a1 --- /dev/null +++ b/.vscode/roles/docker-compose/files/docker-compose.yml @@ -0,0 +1,109 @@ +version: "3.9" +services: + admin: + image: postgres:latest + environment: + POSTGRES_DB: admin + POSTGRES_USER: admin + POSTGRES_PASSWORD: admin + ports: + - "5432:5432" + volumes: + - postgres-data:/var/lib/postgresql/data + networks: + - testNetwork + + pgadmin: + image: dpage/pgadmin4:latest + environment: + PGADMIN_DEFAULT_EMAIL: admin@admin.com + PGADMIN_DEFAULT_PASSWORD: admin + ports: + - "5051:80" + networks: + - testNetwork + + prometheus_exporter: + image: exporter_custom + ports: + - "8000:8000" + networks: + - testNetwork + depends_on: + - admin + + odoo: + image: odoo_custom + environment: + HOST: admin + USER: admin + PASSWORD: admin + DATABASE: admin + ODOO_PASSWORD: admin + ports: + - "8069:8069" + volumes: + - ./odoo.conf:/etc/odoo/odoo.conf + - ./logs/odoo:/var/log/odoo + networks: + - testNetwork + depends_on: + - admin + + grafana: + image: grafana/grafana:latest + environment: + GF_SECURITY_ADMIN_PASSWORD: grafana_pwd + GF_DATASOURCES_PROMETHEUS_URL: http://prometheus:9090 + ports: + - "3000:3000" + networks: + - testNetwork + depends_on: + - prometheus + + prometheus: + image: prom/prometheus:latest + ports: + - "9090:9090" + volumes: + - prometheus-data:/prometheus + - ./prometheus.yml:/etc/prometheus/prometheus.yml + networks: + - testNetwork + + fluentd: + image: fluent/fluentd:v1.13-1 + ports: + - "24224:24224" + volumes: + - ./logs/odoo:/var/log/odoo + - ./fluent.conf:/fluentd/etc/fluent.conf + networks: + - testNetwork + depends_on: + - odoo + + + backup: + image: backup_custom + environment: + POSTGRES_HOST: admin + POSTGRES_DB: admin + POSTGRES_USER: admin + POSTGRES_PASSWORD: admin + volumes: + - backup-data:/backup + networks: + - testNetwork + depends_on: + - admin + +networks: + testNetwork: + driver: bridge + +volumes: + postgres-data: + prometheus-data: + backup-data: \ No newline at end of file diff --git a/.vscode/roles/docker-compose/tasks/main.yml b/.vscode/roles/docker-compose/tasks/main.yml new file mode 100644 index 0000000..d7b0515 --- /dev/null +++ b/.vscode/roles/docker-compose/tasks/main.yml @@ -0,0 +1,21 @@ +--- +- name: Ensure Docker Compose is installed + ansible.builtin.shell: | + curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + chmod +x /usr/local/bin/docker-compose + args: + executable: /bin/bash + become: yes + + +- name: Copy Docker Compose file + ansible.builtin.copy: + src: roles/docker-compose/files/docker-compose.yml + dest: /opt/docker-compose.yml + become: yes + + +- name: Run Docker Compose + ansible.builtin.command: + cmd: docker-compose up -d + chdir: /opt diff --git a/.vscode/roles/docker-compose/templates/environment.j2 b/.vscode/roles/docker-compose/templates/environment.j2 new file mode 100644 index 0000000..1757bba --- /dev/null +++ b/.vscode/roles/docker-compose/templates/environment.j2 @@ -0,0 +1,4 @@ +POSTGRES_PASSWORD={{ POSTGRES_PASSWORD }} +POSTGRES_USER={{ POSTGRES_USER }} +POSTGRES_DB={{ POSTGRES_DB }} +ODOO_PASSWORD={{ ODOO_PASSWORD }} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5d71af8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "ansible.python.interpreterPath": "/bin/python3" +} \ No newline at end of file diff --git a/myenv/bin/Activate.ps1 b/myenv/bin/Activate.ps1 new file mode 100644 index 0000000..b49d77b --- /dev/null +++ b/myenv/bin/Activate.ps1 @@ -0,0 +1,247 @@ +<# +.Synopsis +Activate a Python virtual environment for the current PowerShell session. + +.Description +Pushes the python executable for a virtual environment to the front of the +$Env:PATH environment variable and sets the prompt to signify that you are +in a Python virtual environment. Makes use of the command line switches as +well as the `pyvenv.cfg` file values present in the virtual environment. + +.Parameter VenvDir +Path to the directory that contains the virtual environment to activate. The +default value for this is the parent of the directory that the Activate.ps1 +script is located within. + +.Parameter Prompt +The prompt prefix to display when this virtual environment is activated. By +default, this prompt is the name of the virtual environment folder (VenvDir) +surrounded by parentheses and followed by a single space (ie. '(.venv) '). + +.Example +Activate.ps1 +Activates the Python virtual environment that contains the Activate.ps1 script. + +.Example +Activate.ps1 -Verbose +Activates the Python virtual environment that contains the Activate.ps1 script, +and shows extra information about the activation as it executes. + +.Example +Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv +Activates the Python virtual environment located in the specified location. + +.Example +Activate.ps1 -Prompt "MyPython" +Activates the Python virtual environment that contains the Activate.ps1 script, +and prefixes the current prompt with the specified string (surrounded in +parentheses) while the virtual environment is active. + +.Notes +On Windows, it may be required to enable this Activate.ps1 script by setting the +execution policy for the user. You can do this by issuing the following PowerShell +command: + +PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser + +For more information on Execution Policies: +https://go.microsoft.com/fwlink/?LinkID=135170 + +#> +Param( + [Parameter(Mandatory = $false)] + [String] + $VenvDir, + [Parameter(Mandatory = $false)] + [String] + $Prompt +) + +<# Function declarations --------------------------------------------------- #> + +<# +.Synopsis +Remove all shell session elements added by the Activate script, including the +addition of the virtual environment's Python executable from the beginning of +the PATH variable. + +.Parameter NonDestructive +If present, do not remove this function from the global namespace for the +session. + +#> +function global:deactivate ([switch]$NonDestructive) { + # Revert to original values + + # The prior prompt: + if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { + Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt + Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT + } + + # The prior PYTHONHOME: + if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { + Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME + Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME + } + + # The prior PATH: + if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { + Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH + Remove-Item -Path Env:_OLD_VIRTUAL_PATH + } + + # Just remove the VIRTUAL_ENV altogether: + if (Test-Path -Path Env:VIRTUAL_ENV) { + Remove-Item -Path env:VIRTUAL_ENV + } + + # Just remove VIRTUAL_ENV_PROMPT altogether. + if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { + Remove-Item -Path env:VIRTUAL_ENV_PROMPT + } + + # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: + if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { + Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force + } + + # Leave deactivate function in the global namespace if requested: + if (-not $NonDestructive) { + Remove-Item -Path function:deactivate + } +} + +<# +.Description +Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the +given folder, and returns them in a map. + +For each line in the pyvenv.cfg file, if that line can be parsed into exactly +two strings separated by `=` (with any amount of whitespace surrounding the =) +then it is considered a `key = value` line. The left hand string is the key, +the right hand is the value. + +If the value starts with a `'` or a `"` then the first and last character is +stripped from the value before being captured. + +.Parameter ConfigDir +Path to the directory that contains the `pyvenv.cfg` file. +#> +function Get-PyVenvConfig( + [String] + $ConfigDir +) { + Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" + + # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). + $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue + + # An empty map will be returned if no config file is found. + $pyvenvConfig = @{ } + + if ($pyvenvConfigPath) { + + Write-Verbose "File exists, parse `key = value` lines" + $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath + + $pyvenvConfigContent | ForEach-Object { + $keyval = $PSItem -split "\s*=\s*", 2 + if ($keyval[0] -and $keyval[1]) { + $val = $keyval[1] + + # Remove extraneous quotations around a string value. + if ("'""".Contains($val.Substring(0, 1))) { + $val = $val.Substring(1, $val.Length - 2) + } + + $pyvenvConfig[$keyval[0]] = $val + Write-Verbose "Adding Key: '$($keyval[0])'='$val'" + } + } + } + return $pyvenvConfig +} + + +<# Begin Activate script --------------------------------------------------- #> + +# Determine the containing directory of this script +$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition +$VenvExecDir = Get-Item -Path $VenvExecPath + +Write-Verbose "Activation script is located in path: '$VenvExecPath'" +Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" +Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" + +# Set values required in priority: CmdLine, ConfigFile, Default +# First, get the location of the virtual environment, it might not be +# VenvExecDir if specified on the command line. +if ($VenvDir) { + Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" +} +else { + Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." + $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") + Write-Verbose "VenvDir=$VenvDir" +} + +# Next, read the `pyvenv.cfg` file to determine any required value such +# as `prompt`. +$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir + +# Next, set the prompt from the command line, or the config file, or +# just use the name of the virtual environment folder. +if ($Prompt) { + Write-Verbose "Prompt specified as argument, using '$Prompt'" +} +else { + Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" + if ($pyvenvCfg -and $pyvenvCfg['prompt']) { + Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" + $Prompt = $pyvenvCfg['prompt']; + } + else { + Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)" + Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" + $Prompt = Split-Path -Path $venvDir -Leaf + } +} + +Write-Verbose "Prompt = '$Prompt'" +Write-Verbose "VenvDir='$VenvDir'" + +# Deactivate any currently active virtual environment, but leave the +# deactivate function in place. +deactivate -nondestructive + +# Now set the environment variable VIRTUAL_ENV, used by many tools to determine +# that there is an activated venv. +$env:VIRTUAL_ENV = $VenvDir + +if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { + + Write-Verbose "Setting prompt to '$Prompt'" + + # Set the prompt to include the env name + # Make sure _OLD_VIRTUAL_PROMPT is global + function global:_OLD_VIRTUAL_PROMPT { "" } + Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT + New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt + + function global:prompt { + Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " + _OLD_VIRTUAL_PROMPT + } + $env:VIRTUAL_ENV_PROMPT = $Prompt +} + +# Clear PYTHONHOME +if (Test-Path -Path Env:PYTHONHOME) { + Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME + Remove-Item -Path Env:PYTHONHOME +} + +# Add the venv to the PATH +Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH +$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" diff --git a/myenv/bin/activate b/myenv/bin/activate new file mode 100644 index 0000000..ee16d07 --- /dev/null +++ b/myenv/bin/activate @@ -0,0 +1,70 @@ +# This file must be used with "source bin/activate" *from bash* +# You cannot run it directly + +deactivate () { + # reset old environment variables + if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then + PATH="${_OLD_VIRTUAL_PATH:-}" + export PATH + unset _OLD_VIRTUAL_PATH + fi + if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then + PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" + export PYTHONHOME + unset _OLD_VIRTUAL_PYTHONHOME + fi + + # Call hash to forget past commands. Without forgetting + # past commands the $PATH changes we made may not be respected + hash -r 2> /dev/null + + if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then + PS1="${_OLD_VIRTUAL_PS1:-}" + export PS1 + unset _OLD_VIRTUAL_PS1 + fi + + unset VIRTUAL_ENV + unset VIRTUAL_ENV_PROMPT + if [ ! "${1:-}" = "nondestructive" ] ; then + # Self destruct! + unset -f deactivate + fi +} + +# unset irrelevant variables +deactivate nondestructive + +# on Windows, a path can contain colons and backslashes and has to be converted: +if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then + # transform D:\path\to\venv to /d/path/to/venv on MSYS + # and to /cygdrive/d/path/to/venv on Cygwin + export VIRTUAL_ENV=$(cygpath '/mnt/c/Users/Feten Dridi/Desktop/projetAnsible/myenv') +else + # use the path as-is + export VIRTUAL_ENV='/mnt/c/Users/Feten Dridi/Desktop/projetAnsible/myenv' +fi + +_OLD_VIRTUAL_PATH="$PATH" +PATH="$VIRTUAL_ENV/"bin":$PATH" +export PATH + +# unset PYTHONHOME if set +# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) +# could use `if (set -u; : $PYTHONHOME) ;` in bash +if [ -n "${PYTHONHOME:-}" ] ; then + _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" + unset PYTHONHOME +fi + +if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then + _OLD_VIRTUAL_PS1="${PS1:-}" + PS1='(myenv) '"${PS1:-}" + export PS1 + VIRTUAL_ENV_PROMPT='(myenv) ' + export VIRTUAL_ENV_PROMPT +fi + +# Call hash to forget past commands. Without forgetting +# past commands the $PATH changes we made may not be respected +hash -r 2> /dev/null diff --git a/myenv/bin/activate.csh b/myenv/bin/activate.csh new file mode 100644 index 0000000..719d0cf --- /dev/null +++ b/myenv/bin/activate.csh @@ -0,0 +1,27 @@ +# This file must be used with "source bin/activate.csh" *from csh*. +# You cannot run it directly. + +# Created by Davide Di Blasi . +# Ported to Python 3.3 venv by Andrew Svetlov + +alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' + +# Unset irrelevant variables. +deactivate nondestructive + +setenv VIRTUAL_ENV '/mnt/c/Users/Feten Dridi/Desktop/projetAnsible/myenv' + +set _OLD_VIRTUAL_PATH="$PATH" +setenv PATH "$VIRTUAL_ENV/"bin":$PATH" + + +set _OLD_VIRTUAL_PROMPT="$prompt" + +if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then + set prompt = '(myenv) '"$prompt" + setenv VIRTUAL_ENV_PROMPT '(myenv) ' +endif + +alias pydoc python -m pydoc + +rehash diff --git a/myenv/bin/activate.fish b/myenv/bin/activate.fish new file mode 100644 index 0000000..957667a --- /dev/null +++ b/myenv/bin/activate.fish @@ -0,0 +1,69 @@ +# This file must be used with "source /bin/activate.fish" *from fish* +# (https://fishshell.com/). You cannot run it directly. + +function deactivate -d "Exit virtual environment and return to normal shell environment" + # reset old environment variables + if test -n "$_OLD_VIRTUAL_PATH" + set -gx PATH $_OLD_VIRTUAL_PATH + set -e _OLD_VIRTUAL_PATH + end + if test -n "$_OLD_VIRTUAL_PYTHONHOME" + set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME + set -e _OLD_VIRTUAL_PYTHONHOME + end + + if test -n "$_OLD_FISH_PROMPT_OVERRIDE" + set -e _OLD_FISH_PROMPT_OVERRIDE + # prevents error when using nested fish instances (Issue #93858) + if functions -q _old_fish_prompt + functions -e fish_prompt + functions -c _old_fish_prompt fish_prompt + functions -e _old_fish_prompt + end + end + + set -e VIRTUAL_ENV + set -e VIRTUAL_ENV_PROMPT + if test "$argv[1]" != "nondestructive" + # Self-destruct! + functions -e deactivate + end +end + +# Unset irrelevant variables. +deactivate nondestructive + +set -gx VIRTUAL_ENV '/mnt/c/Users/Feten Dridi/Desktop/projetAnsible/myenv' + +set -gx _OLD_VIRTUAL_PATH $PATH +set -gx PATH "$VIRTUAL_ENV/"bin $PATH + +# Unset PYTHONHOME if set. +if set -q PYTHONHOME + set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME + set -e PYTHONHOME +end + +if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" + # fish uses a function instead of an env var to generate the prompt. + + # Save the current fish_prompt function as the function _old_fish_prompt. + functions -c fish_prompt _old_fish_prompt + + # With the original prompt function renamed, we can override with our own. + function fish_prompt + # Save the return status of the last command. + set -l old_status $status + + # Output the venv prompt; color taken from the blue of the Python logo. + printf "%s%s%s" (set_color 4B8BBE) '(myenv) ' (set_color normal) + + # Restore the return status of the previous command. + echo "exit $old_status" | . + # Output the original/"old" prompt. + _old_fish_prompt + end + + set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" + set -gx VIRTUAL_ENV_PROMPT '(myenv) ' +end diff --git a/myenv/bin/debugpy b/myenv/bin/debugpy new file mode 100644 index 0000000..9fcb23e --- /dev/null +++ b/myenv/bin/debugpy @@ -0,0 +1,10 @@ +#!/bin/sh +'''exec' "/mnt/c/Users/Feten Dridi/Desktop/projetAnsible/myenv/bin/python3" "$0" "$@" +' ''' +# -*- coding: utf-8 -*- +import re +import sys +from debugpy.server.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/myenv/bin/get_gprof b/myenv/bin/get_gprof new file mode 100644 index 0000000..f02ee1c --- /dev/null +++ b/myenv/bin/get_gprof @@ -0,0 +1,75 @@ +#!/mnt/c/Users/Feten Dridi/Desktop/projetAnsible/myenv/bin/python3 +# +# Author: Mike McKerns (mmckerns @caltech and @uqfoundation) +# Copyright (c) 2008-2016 California Institute of Technology. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. +# License: 3-clause BSD. The full license text is available at: +# - https://github.com/uqfoundation/dill/blob/master/LICENSE +''' +build profile graph for the given instance + +running: + $ get_gprof + +executes: + gprof2dot -f pstats .prof | dot -Tpng -o .call.png + +where: + are arguments for gprof2dot, such as "-n 5 -e 5" + is code to create the instance to profile + is the class of the instance (i.e. type(instance)) + +For example: + $ get_gprof -n 5 -e 1 "import numpy; numpy.array([1,2])" + +will create 'ndarray.call.png' with the profile graph for numpy.array([1,2]), +where '-n 5' eliminates nodes below 5% threshold, similarly '-e 1' eliminates +edges below 1% threshold +''' + +if __name__ == "__main__": + import sys + if len(sys.argv) < 2: + print ("Please provide an object instance (e.g. 'import math; math.pi')") + sys.exit() + # grab args for gprof2dot + args = sys.argv[1:-1] + args = ' '.join(args) + # last arg builds the object + obj = sys.argv[-1] + obj = obj.split(';') + # multi-line prep for generating an instance + for line in obj[:-1]: + exec(line) + # one-line generation of an instance + try: + obj = eval(obj[-1]) + except Exception: + print ("Error processing object instance") + sys.exit() + + # get object 'name' + objtype = type(obj) + name = getattr(objtype, '__name__', getattr(objtype, '__class__', objtype)) + + # profile dumping an object + import dill + import os + import cProfile + #name = os.path.splitext(os.path.basename(__file__))[0] + cProfile.run("dill.dumps(obj)", filename="%s.prof" % name) + msg = "gprof2dot -f pstats %s %s.prof | dot -Tpng -o %s.call.png" % (args, name, name) + try: + res = os.system(msg) + except Exception: + print ("Please verify install of 'gprof2dot' to view profile graphs") + if res: + print ("Please verify install of 'gprof2dot' to view profile graphs") + + # get stats + f_prof = "%s.prof" % name + import pstats + stats = pstats.Stats(f_prof, stream=sys.stdout) + stats.strip_dirs().sort_stats('cumtime') + stats.print_stats(20) #XXX: save to file instead of print top 20? + os.remove(f_prof) diff --git a/myenv/bin/get_objgraph b/myenv/bin/get_objgraph new file mode 100644 index 0000000..a3d9a34 --- /dev/null +++ b/myenv/bin/get_objgraph @@ -0,0 +1,54 @@ +#!/mnt/c/Users/Feten Dridi/Desktop/projetAnsible/myenv/bin/python3 +# +# Author: Mike McKerns (mmckerns @caltech and @uqfoundation) +# Copyright (c) 2008-2016 California Institute of Technology. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. +# License: 3-clause BSD. The full license text is available at: +# - https://github.com/uqfoundation/dill/blob/master/LICENSE +""" +display the reference paths for objects in ``dill.types`` or a .pkl file + +Notes: + the generated image is useful in showing the pointer references in + objects that are or can be pickled. Any object in ``dill.objects`` + listed in ``dill.load_types(picklable=True, unpicklable=True)`` works. + +Examples:: + + $ get_objgraph ArrayType + Image generated as ArrayType.png +""" + +import dill as pickle +#pickle.debug.trace(True) +#import pickle + +# get all objects for testing +from dill import load_types +load_types(pickleable=True,unpickleable=True) +from dill import objects + +if __name__ == "__main__": + import sys + if len(sys.argv) != 2: + print ("Please provide exactly one file or type name (e.g. 'IntType')") + msg = "\n" + for objtype in list(objects.keys())[:40]: + msg += objtype + ', ' + print (msg + "...") + else: + objtype = str(sys.argv[-1]) + try: + obj = objects[objtype] + except KeyError: + obj = pickle.load(open(objtype,'rb')) + import os + objtype = os.path.splitext(objtype)[0] + try: + import objgraph + objgraph.show_refs(obj, filename=objtype+'.png') + except ImportError: + print ("Please install 'objgraph' to view object graphs") + + +# EOF diff --git a/myenv/bin/pip b/myenv/bin/pip new file mode 100644 index 0000000..812fa1b --- /dev/null +++ b/myenv/bin/pip @@ -0,0 +1,10 @@ +#!/bin/sh +'''exec' "/mnt/c/Users/Feten Dridi/Desktop/projetAnsible/myenv/bin/python3" "$0" "$@" +' ''' +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/myenv/bin/pip3 b/myenv/bin/pip3 new file mode 100644 index 0000000..812fa1b --- /dev/null +++ b/myenv/bin/pip3 @@ -0,0 +1,10 @@ +#!/bin/sh +'''exec' "/mnt/c/Users/Feten Dridi/Desktop/projetAnsible/myenv/bin/python3" "$0" "$@" +' ''' +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/myenv/bin/pip3.12 b/myenv/bin/pip3.12 new file mode 100644 index 0000000..812fa1b --- /dev/null +++ b/myenv/bin/pip3.12 @@ -0,0 +1,10 @@ +#!/bin/sh +'''exec' "/mnt/c/Users/Feten Dridi/Desktop/projetAnsible/myenv/bin/python3" "$0" "$@" +' ''' +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/myenv/bin/pysemver b/myenv/bin/pysemver new file mode 100644 index 0000000..d0f4437 --- /dev/null +++ b/myenv/bin/pysemver @@ -0,0 +1,10 @@ +#!/bin/sh +'''exec' "/mnt/c/Users/Feten Dridi/Desktop/projetAnsible/myenv/bin/python3" "$0" "$@" +' ''' +# -*- coding: utf-8 -*- +import re +import sys +from semver import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/myenv/bin/python b/myenv/bin/python new file mode 120000 index 0000000..b8a0adb --- /dev/null +++ b/myenv/bin/python @@ -0,0 +1 @@ +python3 \ No newline at end of file diff --git a/myenv/bin/python3 b/myenv/bin/python3 new file mode 120000 index 0000000..ae65fda --- /dev/null +++ b/myenv/bin/python3 @@ -0,0 +1 @@ +/usr/bin/python3 \ No newline at end of file diff --git a/myenv/bin/python3.12 b/myenv/bin/python3.12 new file mode 120000 index 0000000..b8a0adb --- /dev/null +++ b/myenv/bin/python3.12 @@ -0,0 +1 @@ +python3 \ No newline at end of file diff --git a/myenv/bin/undill b/myenv/bin/undill new file mode 100644 index 0000000..566a408 --- /dev/null +++ b/myenv/bin/undill @@ -0,0 +1,22 @@ +#!/mnt/c/Users/Feten Dridi/Desktop/projetAnsible/myenv/bin/python3 +# +# Author: Mike McKerns (mmckerns @caltech and @uqfoundation) +# Copyright (c) 2008-2016 California Institute of Technology. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. +# License: 3-clause BSD. The full license text is available at: +# - https://github.com/uqfoundation/dill/blob/master/LICENSE +""" +unpickle the contents of a pickled object file + +Examples:: + + $ undill hello.pkl + ['hello', 'world'] +""" + +if __name__ == '__main__': + import sys + import dill + for file in sys.argv[1:]: + print (dill.load(open(file,'rb'))) + diff --git a/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/AUTHORS.md b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/AUTHORS.md new file mode 100644 index 0000000..ef00fc4 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/AUTHORS.md @@ -0,0 +1,11 @@ +Arpeggio - Parser interpreter based on PEG grammars + +Author: Igor R. Dejanović + + +# Contributors + +- Bug reports/ideas: https://github.com/textX/Arpeggio/issues?utf8=%E2%9C%93&q=is%3Aissue +- Code/docs contributions: + - https://github.com/textX/Arpeggio/graphs/contributors + - https://github.com/textX/Arpeggio/pulls?utf8=%E2%9C%93&q=is%3Apr+ diff --git a/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/INSTALLER b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/INSTALLER new file mode 100644 index 0000000..a1b589e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/LICENSE b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/LICENSE new file mode 100644 index 0000000..b4a0484 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/LICENSE @@ -0,0 +1,22 @@ +Arpeggio is released under the terms of the MIT License +------------------------------------------------------- + +Copyright (c) 2009-2019 Igor R. Dejanović + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/METADATA b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/METADATA new file mode 100644 index 0000000..3d9f5a6 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/METADATA @@ -0,0 +1,54 @@ +Metadata-Version: 2.1 +Name: Arpeggio +Version: 2.0.2 +Summary: Packrat parser interpreter +Home-page: https://github.com/textX/Arpeggio +Download-URL: +Author: Igor R. Dejanovic +Author-email: igor.dejanovic@gmail.com +License: MIT +Keywords: parser,PEG,packrat,library,interpreter +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: Intended Audience :: Information Technology +Classifier: Intended Audience :: Science/Research +Classifier: Topic :: Software Development :: Interpreters +Classifier: Topic :: Software Development :: Compilers +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Description-Content-Type: text/markdown +License-File: LICENSE +License-File: AUTHORS.md +Provides-Extra: dev +Requires-Dist: wheel ; extra == 'dev' +Requires-Dist: mkdocs ; extra == 'dev' +Requires-Dist: mike ; extra == 'dev' +Requires-Dist: twine ; extra == 'dev' +Provides-Extra: test +Requires-Dist: flake8 ; extra == 'test' +Requires-Dist: coverage ; extra == 'test' +Requires-Dist: coveralls ; extra == 'test' +Requires-Dist: pytest ; extra == 'test' + +![](https://raw.githubusercontent.com/textX/Arpeggio/master/art/arpeggio-logo.png) + +[![PyPI Version](https://img.shields.io/pypi/v/Arpeggio.svg)](https://pypi.python.org/pypi/Arpeggio) +![](https://img.shields.io/pypi/l/Arpeggio.svg) +[![Build status](https://github.com/textx/Arpeggio/actions/workflows/ci-linux-ubuntu.yml/badge.svg)](https://github.com/textx/Arpeggio/actions) +[![Coverage Status](https://coveralls.io/repos/github/textX/Arpeggio/badge.svg)](https://coveralls.io/github/textX/Arpeggio) +[![Documentation](https://img.shields.io/badge/docs-latest-green.svg)](http://textx.github.io/Arpeggio/latest/) + +Arpeggio is a recursive descent parser with memoization based on PEG grammars +(aka Packrat parser). + +Documentation with tutorials is available [here](http://textx.github.io/Arpeggio/). + +**Note:** for a higher level parsing/language tool (i.e., a nicer interface to +Arpeggio) see [textX](https://github.com/textX/textX). diff --git a/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/RECORD b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/RECORD new file mode 100644 index 0000000..f886df0 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/RECORD @@ -0,0 +1,103 @@ +Arpeggio-2.0.2.dist-info/AUTHORS.md,sha256=Qmm0ctdqOMSZLg-z_PnaBKAxGXuWqsD4l5q_WXJe7Ao,381 +Arpeggio-2.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +Arpeggio-2.0.2.dist-info/LICENSE,sha256=U-vbB6IMAKHb2WVqNp6Ldb-on9o0K1QTMY4LTgvpHys,1218 +Arpeggio-2.0.2.dist-info/METADATA,sha256=HqmT2lyKp5jZRa2zDre676_Ou1XtQLD3hdPnB7ghTAU,2445 +Arpeggio-2.0.2.dist-info/RECORD,, +Arpeggio-2.0.2.dist-info/WHEEL,sha256=a-zpFRIJzOq5QfuhBzbhiA1eHTzNCJn8OdRvhdNX0Rk,110 +Arpeggio-2.0.2.dist-info/top_level.txt,sha256=kdvFB1a87VHff27Uaeq70GZjKVS6HBV_keZDL20k8jE,9 +arpeggio/__init__.py,sha256=2GRZeypUO1OGiUuuJmusj6EmVnagwxLwyUFQf84Vnm0,64627 +arpeggio/__pycache__/__init__.cpython-312.pyc,, +arpeggio/__pycache__/cleanpeg.cpython-312.pyc,, +arpeggio/__pycache__/export.cpython-312.pyc,, +arpeggio/__pycache__/peg.cpython-312.pyc,, +arpeggio/__pycache__/utils.cpython-312.pyc,, +arpeggio/cleanpeg.py,sha256=Cg-aEXuIjKWhcbLLT__cpxCsjiPDChXOpeDIoT-KRGQ,2867 +arpeggio/export.py,sha256=WnznnPw7_CHpG4nWG7r19hcV-L_MQj35KV9XUQJxtq8,6689 +arpeggio/peg.py,sha256=VUVTwarDUxobeWQ7OOmox5WcBByhfm6qwHLPJCwXaBs,10659 +arpeggio/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +arpeggio/tests/__pycache__/__init__.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_decorator_combine.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_default_semantic_action.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_eolterm.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_error_reporting.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_examples.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_exporter.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_flags.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_parser_params.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_parser_resilience.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_parsing_expressions.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_pathologic_models.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_peg_parser.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_position.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_ptnode_navigation_expressions.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_python_parser.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_reduce_tree.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_semantic_action_results.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_separators.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_sequence_params.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_suppression.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_unicode.cpython-312.pyc,, +arpeggio/tests/__pycache__/test_visitor.cpython-312.pyc,, +arpeggio/tests/regressions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +arpeggio/tests/regressions/__pycache__/__init__.cpython-312.pyc,, +arpeggio/tests/regressions/__pycache__/test_direct_rule_call.cpython-312.pyc,, +arpeggio/tests/regressions/__pycache__/test_memoization.cpython-312.pyc,, +arpeggio/tests/regressions/issue_16/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +arpeggio/tests/regressions/issue_16/__pycache__/__init__.cpython-312.pyc,, +arpeggio/tests/regressions/issue_16/__pycache__/test_issue_16.cpython-312.pyc,, +arpeggio/tests/regressions/issue_16/test_issue_16.py,sha256=u1t8jPSOw0sr4-Yu6wLf8TTIfDzehXmvPas5dZBMtVs,2145 +arpeggio/tests/regressions/issue_20/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +arpeggio/tests/regressions/issue_20/__pycache__/__init__.cpython-312.pyc,, +arpeggio/tests/regressions/issue_20/__pycache__/test_issue_20.cpython-312.pyc,, +arpeggio/tests/regressions/issue_20/test_issue_20.py,sha256=s8Gn9Bcyxn-Rx63x1QK7ryV9G9howI2OHcc0MLDnSG0,828 +arpeggio/tests/regressions/issue_22/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +arpeggio/tests/regressions/issue_22/__pycache__/__init__.cpython-312.pyc,, +arpeggio/tests/regressions/issue_22/__pycache__/test_issue_22.cpython-312.pyc,, +arpeggio/tests/regressions/issue_22/grammar1.peg,sha256=iI7a6N9Ed3QcLdchLA_Nq18NstAGRVKPNLdmcNykars,849 +arpeggio/tests/regressions/issue_22/grammar2.peg,sha256=8SUzUN2bMp-taRZIW0j1adFa5PI-xd6Ud6aJvHvoMII,723 +arpeggio/tests/regressions/issue_22/test_issue_22.py,sha256=-NyBT8bcxq_wCmvKILLRuGvOzFdJm6gYXZwj2Jd28IY,550 +arpeggio/tests/regressions/issue_26/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +arpeggio/tests/regressions/issue_26/__pycache__/__init__.cpython-312.pyc,, +arpeggio/tests/regressions/issue_26/__pycache__/test_issue_26.cpython-312.pyc,, +arpeggio/tests/regressions/issue_26/test_issue_26.py,sha256=uguIaMdtzjQYqQ_Lge4OONEtOhCH4Og2x1ycBMCkuUo,407 +arpeggio/tests/regressions/issue_31/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +arpeggio/tests/regressions/issue_31/__pycache__/__init__.cpython-312.pyc,, +arpeggio/tests/regressions/issue_31/__pycache__/test_issue_31.cpython-312.pyc,, +arpeggio/tests/regressions/issue_31/test_issue_31.py,sha256=uRMHaMFNGVUOd6hh8xfQla1002ENwgiVJKtcZYl4Tk4,358 +arpeggio/tests/regressions/issue_32/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +arpeggio/tests/regressions/issue_32/__pycache__/__init__.cpython-312.pyc,, +arpeggio/tests/regressions/issue_32/__pycache__/test_issue_32.cpython-312.pyc,, +arpeggio/tests/regressions/issue_32/test_issue_32.py,sha256=U5vWwepRnfqiIHsr8sGGwyKIXf-WEhxb5NiFHNDB9Xc,8732 +arpeggio/tests/regressions/issue_43/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +arpeggio/tests/regressions/issue_43/__pycache__/__init__.cpython-312.pyc,, +arpeggio/tests/regressions/issue_43/__pycache__/test_issue43.cpython-312.pyc,, +arpeggio/tests/regressions/issue_43/test_issue43.py,sha256=iBkussTWmmNk8rsvEHoEbaBm_T_H1WpCa-YSoaRYTyM,562 +arpeggio/tests/regressions/issue_61/__pycache__/test_issue_61.cpython-312.pyc,, +arpeggio/tests/regressions/issue_61/test_issue_61.py,sha256=Jflo-G3EbbP5dgJKDcu5ZljH64IUWC0CgEH9jpInLkU,1341 +arpeggio/tests/regressions/issue_73/__pycache__/test_issue_73.cpython-312.pyc,, +arpeggio/tests/regressions/issue_73/test_issue_73.py,sha256=Kq244G_bVCroP37_t8nXMPPkKqDzHsiv8hhE-RWfD4g,966 +arpeggio/tests/regressions/test_direct_rule_call.py,sha256=Ndqhqn5ZK258MGFCEGRp_En8qnMjneHscgCF4xZ8_Rk,918 +arpeggio/tests/regressions/test_memoization.py,sha256=FUm_aw4zwlwXnvGTVFpx2FIYXmPRo0neq8VhPux_siI,1527 +arpeggio/tests/test_decorator_combine.py,sha256=lsxoWNHynJ1-osWEisosSI-2P-2JSWk7J5v22Me6Vp4,1365 +arpeggio/tests/test_default_semantic_action.py,sha256=2ReNg2oJp3mT9nzYo_7xQa0_OHhUQMrYfY-HNyWFJto,2074 +arpeggio/tests/test_eolterm.py,sha256=6fA-dPUhklwwQIQh3n9qKueyC3Ww9OR795x8RNVnE5k,1000 +arpeggio/tests/test_error_reporting.py,sha256=apTYLrI0L-DSPdqNHFV7Wtt0Ahm5egbO1TuqiEvq1I4,5938 +arpeggio/tests/test_examples.py,sha256=J524z_4smnswnwrukaxETiSXxch63s5hHI9PL4h51cc,1659 +arpeggio/tests/test_exporter.py,sha256=4-0V5tsQIRkHpQ43zwHulz2ML8EvcIwD1pzpDUXJJ44,1633 +arpeggio/tests/test_flags.py,sha256=v8oWzMtHzCGc1Pcc-XThpPokeSFkB9XYUB2nKRvgYgA,1968 +arpeggio/tests/test_parser_params.py,sha256=AuYk3R7LPMjTKtFLaC0mIhFndUNQQJsS4CeHq9wFxcU,2958 +arpeggio/tests/test_parser_resilience.py,sha256=63cVOwqnhp58Jk1_xniUZ-o3BfIICRndzB4MZ0sGar4,384 +arpeggio/tests/test_parsing_expressions.py,sha256=87aV7dqp59i3X83YalZHfRQN8lJmlmEYxKgLxy3WUPg,9336 +arpeggio/tests/test_pathologic_models.py,sha256=PxrDzY3_39b7G7fMywQBU9u2gwOHhy3st2cQWUjBbgs,1015 +arpeggio/tests/test_peg_parser.py,sha256=upISz7cMasuV58e-VKgUVNQUCGJZLEPuaaCz54JcP6I,3574 +arpeggio/tests/test_position.py,sha256=czNZNsADNpaqwv-7V-wPtsWHnzSmP_KtuGi7WJpEMmY,1522 +arpeggio/tests/test_ptnode_navigation_expressions.py,sha256=CB7eir5bXoEo3mzuHjJbrDoJTqxNykBNbGLoKB7qGEk,2342 +arpeggio/tests/test_python_parser.py,sha256=BrtRARU26K8pxjUQOdci_5GDcRIjvVo8VWtw47kW4h8,2100 +arpeggio/tests/test_reduce_tree.py,sha256=c9gd5qhqrhb2lhMT437n9OcVpecHjVTLMhOYXDYw0fU,1744 +arpeggio/tests/test_semantic_action_results.py,sha256=ZdnXLo8hJsnaNZ0NF5nOpVH5Yv1NKKhu_S1nm11ugcs,1713 +arpeggio/tests/test_separators.py,sha256=KVYVQGp9vwpjs88z9BdP0sbfN1Zk1tnG1NLIMOlP7rk,1482 +arpeggio/tests/test_sequence_params.py,sha256=NpaYme4TX586MFweO9lvLIPzEEVcxJZue52JN3ai3tA,2508 +arpeggio/tests/test_suppression.py,sha256=jt19AHlLUsy2kqLyh8HloSX03u9SV5ENmpSZO8mqPHI,1835 +arpeggio/tests/test_unicode.py,sha256=Z2oS8b_mGNh5VX0yRdCfVsdE-bHYjxa6zu3BJc8TYzw,751 +arpeggio/tests/test_visitor.py,sha256=TX7nl55N6XWFaTnr4JLeCJxbx9WkM3M8bWt993F-Rgs,1709 +arpeggio/utils.py,sha256=eb5yjVMI9ScTLcZ5IfAsiyF2dewV22KWpsfhW5j39kg,416 diff --git a/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/WHEEL b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/WHEEL new file mode 100644 index 0000000..f771c29 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/WHEEL @@ -0,0 +1,6 @@ +Wheel-Version: 1.0 +Generator: bdist_wheel (0.40.0) +Root-Is-Purelib: true +Tag: py2-none-any +Tag: py3-none-any + diff --git a/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/top_level.txt b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/top_level.txt new file mode 100644 index 0000000..e5f6165 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/Arpeggio-2.0.2.dist-info/top_level.txt @@ -0,0 +1 @@ +arpeggio diff --git a/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/INSTALLER b/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/INSTALLER new file mode 100644 index 0000000..a1b589e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/LICENSE b/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/LICENSE new file mode 100644 index 0000000..2f1b8e1 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2017-2021 Ingy döt Net +Copyright (c) 2006-2016 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/METADATA b/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/METADATA new file mode 100644 index 0000000..db029b7 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/METADATA @@ -0,0 +1,46 @@ +Metadata-Version: 2.1 +Name: PyYAML +Version: 6.0.2 +Summary: YAML parser and emitter for Python +Home-page: https://pyyaml.org/ +Download-URL: https://pypi.org/project/PyYAML/ +Author: Kirill Simonov +Author-email: xi@resolvent.net +License: MIT +Project-URL: Bug Tracker, https://github.com/yaml/pyyaml/issues +Project-URL: CI, https://github.com/yaml/pyyaml/actions +Project-URL: Documentation, https://pyyaml.org/wiki/PyYAMLDocumentation +Project-URL: Mailing lists, http://lists.sourceforge.net/lists/listinfo/yaml-core +Project-URL: Source Code, https://github.com/yaml/pyyaml +Platform: Any +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Cython +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Topic :: Text Processing :: Markup +Requires-Python: >=3.8 +License-File: LICENSE + +YAML is a data serialization format designed for human readability +and interaction with scripting languages. PyYAML is a YAML parser +and emitter for Python. + +PyYAML features a complete YAML 1.1 parser, Unicode support, pickle +support, capable extension API, and sensible error messages. PyYAML +supports standard YAML tags and provides Python-specific tags that +allow to represent an arbitrary Python object. + +PyYAML is applicable for a broad range of tasks from complex +configuration files to object serialization and persistence. diff --git a/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/RECORD b/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/RECORD new file mode 100644 index 0000000..f596c8e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/RECORD @@ -0,0 +1,43 @@ +PyYAML-6.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +PyYAML-6.0.2.dist-info/LICENSE,sha256=jTko-dxEkP1jVwfLiOsmvXZBAqcoKVQwfT5RZ6V36KQ,1101 +PyYAML-6.0.2.dist-info/METADATA,sha256=9-odFB5seu4pGPcEv7E8iyxNF51_uKnaNGjLAhz2lto,2060 +PyYAML-6.0.2.dist-info/RECORD,, +PyYAML-6.0.2.dist-info/WHEEL,sha256=1pP4yhrbipRtdbm4Rbg3aoTjzc7pDhpHKO0CEY24CNM,152 +PyYAML-6.0.2.dist-info/top_level.txt,sha256=rpj0IVMTisAjh_1vG3Ccf9v5jpCQwAz6cD1IVU5ZdhQ,11 +_yaml/__init__.py,sha256=04Ae_5osxahpJHa3XBZUAf4wi6XX32gR8D6X6p64GEA,1402 +_yaml/__pycache__/__init__.cpython-312.pyc,, +yaml/__init__.py,sha256=N35S01HMesFTe0aRRMWkPj0Pa8IEbHpE9FK7cr5Bdtw,12311 +yaml/__pycache__/__init__.cpython-312.pyc,, +yaml/__pycache__/composer.cpython-312.pyc,, +yaml/__pycache__/constructor.cpython-312.pyc,, +yaml/__pycache__/cyaml.cpython-312.pyc,, +yaml/__pycache__/dumper.cpython-312.pyc,, +yaml/__pycache__/emitter.cpython-312.pyc,, +yaml/__pycache__/error.cpython-312.pyc,, +yaml/__pycache__/events.cpython-312.pyc,, +yaml/__pycache__/loader.cpython-312.pyc,, +yaml/__pycache__/nodes.cpython-312.pyc,, +yaml/__pycache__/parser.cpython-312.pyc,, +yaml/__pycache__/reader.cpython-312.pyc,, +yaml/__pycache__/representer.cpython-312.pyc,, +yaml/__pycache__/resolver.cpython-312.pyc,, +yaml/__pycache__/scanner.cpython-312.pyc,, +yaml/__pycache__/serializer.cpython-312.pyc,, +yaml/__pycache__/tokens.cpython-312.pyc,, +yaml/_yaml.cpython-312-x86_64-linux-gnu.so,sha256=PJFgxnc0f5Dyde6WKmBm6fZWapawmWl7aBRruXjRA80,2481784 +yaml/composer.py,sha256=_Ko30Wr6eDWUeUpauUGT3Lcg9QPBnOPVlTnIMRGJ9FM,4883 +yaml/constructor.py,sha256=kNgkfaeLUkwQYY_Q6Ff1Tz2XVw_pG1xVE9Ak7z-viLA,28639 +yaml/cyaml.py,sha256=6ZrAG9fAYvdVe2FK_w0hmXoG7ZYsoYUwapG8CiC72H0,3851 +yaml/dumper.py,sha256=PLctZlYwZLp7XmeUdwRuv4nYOZ2UBnDIUy8-lKfLF-o,2837 +yaml/emitter.py,sha256=jghtaU7eFwg31bG0B7RZea_29Adi9CKmXq_QjgQpCkQ,43006 +yaml/error.py,sha256=Ah9z-toHJUbE9j-M8YpxgSRM5CgLCcwVzJgLLRF2Fxo,2533 +yaml/events.py,sha256=50_TksgQiE4up-lKo_V-nBy-tAIxkIPQxY5qDhKCeHw,2445 +yaml/loader.py,sha256=UVa-zIqmkFSCIYq_PgSGm4NSJttHY2Rf_zQ4_b1fHN0,2061 +yaml/nodes.py,sha256=gPKNj8pKCdh2d4gr3gIYINnPOaOxGhJAUiYhGRnPE84,1440 +yaml/parser.py,sha256=ilWp5vvgoHFGzvOZDItFoGjD6D42nhlZrZyjAwa0oJo,25495 +yaml/reader.py,sha256=0dmzirOiDG4Xo41RnuQS7K9rkY3xjHiVasfDMNTqCNw,6794 +yaml/representer.py,sha256=IuWP-cAW9sHKEnS0gCqSa894k1Bg4cgTxaDwIcbRQ-Y,14190 +yaml/resolver.py,sha256=9L-VYfm4mWHxUD1Vg4X7rjDRK_7VZd6b92wzq7Y2IKY,9004 +yaml/scanner.py,sha256=YEM3iLZSaQwXcQRg2l2R4MdT0zGP2F9eHkKGKnHyWQY,51279 +yaml/serializer.py,sha256=ChuFgmhU01hj4xgI8GaKv6vfM2Bujwa9i7d2FAHj7cA,4165 +yaml/tokens.py,sha256=lTQIzSVw8Mg9wv459-TjiOQe6wVziqaRlqX2_89rp54,2573 diff --git a/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/WHEEL b/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/WHEEL new file mode 100644 index 0000000..56616a8 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/WHEEL @@ -0,0 +1,6 @@ +Wheel-Version: 1.0 +Generator: bdist_wheel (0.44.0) +Root-Is-Purelib: false +Tag: cp312-cp312-manylinux_2_17_x86_64 +Tag: cp312-cp312-manylinux2014_x86_64 + diff --git a/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/top_level.txt b/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/top_level.txt new file mode 100644 index 0000000..e6475e9 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/top_level.txt @@ -0,0 +1,2 @@ +_yaml +yaml diff --git a/myenv/lib/python3.12/site-packages/__pycache__/semver.cpython-312.pyc b/myenv/lib/python3.12/site-packages/__pycache__/semver.cpython-312.pyc new file mode 100644 index 0000000..e6cfe90 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/__pycache__/semver.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/__pycache__/six.cpython-312.pyc b/myenv/lib/python3.12/site-packages/__pycache__/six.cpython-312.pyc new file mode 100644 index 0000000..ff883ba Binary files /dev/null and b/myenv/lib/python3.12/site-packages/__pycache__/six.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/_yaml/__init__.py b/myenv/lib/python3.12/site-packages/_yaml/__init__.py new file mode 100644 index 0000000..7baa8c4 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/_yaml/__init__.py @@ -0,0 +1,33 @@ +# This is a stub package designed to roughly emulate the _yaml +# extension module, which previously existed as a standalone module +# and has been moved into the `yaml` package namespace. +# It does not perfectly mimic its old counterpart, but should get +# close enough for anyone who's relying on it even when they shouldn't. +import yaml + +# in some circumstances, the yaml module we imoprted may be from a different version, so we need +# to tread carefully when poking at it here (it may not have the attributes we expect) +if not getattr(yaml, '__with_libyaml__', False): + from sys import version_info + + exc = ModuleNotFoundError if version_info >= (3, 6) else ImportError + raise exc("No module named '_yaml'") +else: + from yaml._yaml import * + import warnings + warnings.warn( + 'The _yaml extension module is now located at yaml._yaml' + ' and its location is subject to change. To use the' + ' LibYAML-based parser and emitter, import from `yaml`:' + ' `from yaml import CLoader as Loader, CDumper as Dumper`.', + DeprecationWarning + ) + del warnings + # Don't `del yaml` here because yaml is actually an existing + # namespace member of _yaml. + +__name__ = '_yaml' +# If the module is top-level (i.e. not a part of any specific package) +# then the attribute should be set to ''. +# https://docs.python.org/3.8/library/types.html +__package__ = '' diff --git a/myenv/lib/python3.12/site-packages/_yaml/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/_yaml/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..bb1865d Binary files /dev/null and b/myenv/lib/python3.12/site-packages/_yaml/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/__init__.py b/myenv/lib/python3.12/site-packages/arpeggio/__init__.py new file mode 100644 index 0000000..1ad5727 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/__init__.py @@ -0,0 +1,1924 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Name: arpeggio.py +# Purpose: PEG parser interpreter +# Author: Igor R. Dejanović +# Copyright: (c) 2009-2019 Igor R. Dejanović +# License: MIT License +# +# This is an implementation of packrat parser interpreter based on PEG +# grammars. Grammars are defined using Python language constructs or the PEG +# textual notation. +############################################################################### + +from __future__ import print_function, unicode_literals +import sys +from collections import OrderedDict +import codecs +import re +import bisect +from arpeggio.utils import isstr +import types + +__version__ = "2.0.2" + +if sys.version < '3': + text = unicode +else: + text = str + +DEFAULT_WS = '\t\n\r ' +NOMATCH_MARKER = 0 + + +class ArpeggioError(Exception): + """ + Base class for arpeggio errors. + """ + def __init__(self, message): + self.message = message + + def __str__(self): + return repr(self.message) + + +class GrammarError(ArpeggioError): + """ + Error raised during parser building phase used to indicate error in the + grammar definition. + """ + + +class SemanticError(ArpeggioError): + """ + Error raised during the phase of semantic analysis used to indicate + semantic error. + """ + + +class NoMatch(Exception): + """ + Exception raised by the Match classes during parsing to indicate that the + match is not successful. + + Args: + rules (list of ParsingExpression): Rules that are tried at the position + of the exception. + position (int): A position in the input stream where exception + occurred. + parser (Parser): An instance of a parser. + """ + def __init__(self, rules, position, parser): + self.rules = rules + self.position = position + self.parser = parser + + + def eval_attrs(self): + """ + Call this to evaluate `message`, `context`, `line` and `col`. Called by __str__. + """ + def rule_to_exp_str(rule): + if hasattr(rule, '_exp_str'): + # Rule may override expected report string + return rule._exp_str + elif rule.root: + return rule.rule_name + elif isinstance(rule, Match) and \ + not isinstance(rule, EndOfFile): + return "'{}'".format(rule.to_match.replace('\n', '\\n')) + else: + return rule.name + + if not self.rules: + self.message = "Not expected input" + else: + what_is_expected = OrderedDict.fromkeys( + ["{}".format(rule_to_exp_str(r)) for r in self.rules]) + what_str = " or ".join(what_is_expected) + self.message = "Expected {}".format(what_str) + + self.context = self.parser.context(position=self.position) + self.line, self.col = self.parser.pos_to_linecol(self.position) + + def __str__(self): + self.eval_attrs() + return "{} at position {}{} => '{}'."\ + .format(self.message, + "{}:".format(self.parser.file_name) + if self.parser.file_name else "", + (self.line, self.col), + self.context) + + def __unicode__(self): + return self.__str__() + + +def flatten(_iterable): + '''Flattening of python iterables.''' + result = [] + for e in _iterable: + if hasattr(e, "__iter__") and not type(e) in [text, NonTerminal]: + result.extend(flatten(e)) + else: + result.append(e) + return result + + +class DebugPrinter(object): + """ + Mixin class for adding debug print support. + + Attributes: + debug (bool): If true debugging messages will be printed. + _current_indent(int): Current indentation level for prints. + """ + + def __init__(self, **kwargs): + + self.debug = kwargs.pop("debug", False) + self.file = kwargs.pop("file", sys.stdout) + self._current_indent = 0 + + super(DebugPrinter, self).__init__(**kwargs) + + def dprint(self, message, indent_change=0): + """ + Handle debug message. Print to the stream specified by the 'file' + keyword argument at the current indentation level. Default stream is + stdout. + """ + if indent_change < 0: + self._current_indent += indent_change + + print(("%s%s" % (" " * self._current_indent, message)), + file=self.file) + + if indent_change > 0: + self._current_indent += indent_change + + +# --------------------------------------------------------- +# Parser Model (PEG Abstract Semantic Graph) elements + + +class ParsingExpression(object): + """ + An abstract class for all parsing expressions. + Represents the node of the Parser Model. + + Attributes: + elements: A list (or other python object) used as a staging structure + for python based grammar definition. Used in _from_python for + building nodes list of child parser expressions. + rule_name (str): The name of the parser rule if this is the root rule. + root (bool): Does this parser expression represents the + root of the parser rule? The root parser rule will create + non-terminal node of the parse tree during parsing. + nodes (list of ParsingExpression): A list of child parser expressions. + suppress (bool): If this is set to True than no ParseTreeNode will be + created for this ParsingExpression. Default False. + """ + + suppress = False + + def __init__(self, *elements, **kwargs): + + if len(elements) == 1: + elements = elements[0] + self.elements = elements + + self.rule_name = kwargs.get('rule_name', '') + self.root = kwargs.get('root', False) + + nodes = kwargs.get('nodes', []) + if not hasattr(nodes, '__iter__'): + nodes = [nodes] + self.nodes = nodes + + if 'suppress' in kwargs: + self.suppress = kwargs['suppress'] + + # Memoization. Every node cache the parsing results for the given input + # positions. + self._result_cache = {} # position -> parse tree at the position + + @property + def desc(self): + return "{}{}".format(self.name, "-" if self.suppress else "") + + @property + def name(self): + if self.root: + return "%s=%s" % (self.rule_name, self.__class__.__name__) + else: + return self.__class__.__name__ + + @property + def id(self): + if self.root: + return self.rule_name + else: + return id(self) + + def _clear_cache(self, processed=None): + """ + Clears memoization cache. Should be called on input change and end + of parsing. + + Args: + processed (set): Set of processed nodes to prevent infinite loops. + """ + + self._result_cache = {} + + if not processed: + processed = set() + + for node in self.nodes: + if node not in processed: + processed.add(node) + node._clear_cache(processed) + + def parse(self, parser): + + if parser.debug: + name = self.name + if name.startswith('__asgn'): + name = "{}[{}]".format(self.name, self._attr_name) + parser.dprint(">> Matching rule {}{} at position {} => {}" + .format(name, + " in {}".format(parser.in_rule) + if parser.in_rule else "", + parser.position, + parser.context()), 1) + + # Current position could change in recursive calls + # so save it. + c_pos = parser.position + + # Memoization. + # If this position is already parsed by this parser expression use + # the result + if parser.memoization: + try: + result, new_pos = self._result_cache[c_pos] + parser.position = new_pos + parser.cache_hits += 1 + if parser.debug: + parser.dprint( + "** Cache hit for [{}, {}] = '{}' : new_pos={}" + .format(name, c_pos, text(result), text(new_pos))) + parser.dprint( + "<<+ Matched rule {} at position {}" + .format(name, new_pos), -1) + + # If NoMatch is recorded at this position raise. + if result is NOMATCH_MARKER: + raise parser.nm + + # else return cached result + return result + + except KeyError: + parser.cache_misses += 1 + + # Remember last parsing expression and set this as + # the new last. + last_pexpression = parser.last_pexpression + parser.last_pexpression = self + + if self.rule_name: + # If we are entering root rule + # remember previous root rule name and set + # this one on the parser to be available for + # debugging messages + previous_root_rule_name = parser.in_rule + parser.in_rule = self.rule_name + + try: + result = self._parse(parser) + if self.suppress or (type(result) is list and + result and result[0] is None): + result = None + + except NoMatch: + parser.position = c_pos # Backtracking + # Memoize NoMatch at this position for this rule + if parser.memoization: + self._result_cache[c_pos] = (NOMATCH_MARKER, c_pos) + raise + + finally: + # Recover last parsing expression. + parser.last_pexpression = last_pexpression + + if parser.debug: + parser.dprint("<<{} rule {}{} at position {} => {}" + .format("- Not matched" + if parser.position is c_pos + else "+ Matched", + name, + " in {}".format(parser.in_rule) + if parser.in_rule else "", + parser.position, + parser.context()), -1) + + # If leaving root rule restore previous root rule name. + if self.rule_name: + parser.in_rule = previous_root_rule_name + + # For root rules flatten non-terminal/list + if self.root and result and not isinstance(result, Terminal): + if not isinstance(result, NonTerminal): + result = flatten(result) + + # Tree reduction will eliminate Non-terminal with single child. + if parser.reduce_tree and len(result) == 1: + result = result[0] + + # If the result is not parse tree node it must be a plain list + # so create a new NonTerminal. + if not isinstance(result, ParseTreeNode): + result = NonTerminal(self, result) + + # Result caching for use by memoization. + if parser.memoization: + self._result_cache[c_pos] = (result, parser.position) + + return result + + +class Sequence(ParsingExpression): + """ + Will match sequence of parser expressions in exact order they are defined. + """ + + def __init__(self, *elements, **kwargs): + super(Sequence, self).__init__(*elements, **kwargs) + self.ws = kwargs.pop('ws', None) + self.skipws = kwargs.pop('skipws', None) + + def _parse(self, parser): + results = [] + c_pos = parser.position + + if self.ws is not None: + old_ws = parser.ws + parser.ws = self.ws + + if self.skipws is not None: + old_skipws = parser.skipws + parser.skipws = self.skipws + + # Prefetching + append = results.append + + try: + for e in self.nodes: + result = e.parse(parser) + if result: + append(result) + + except NoMatch: + parser.position = c_pos # Backtracking + raise + + finally: + if self.ws is not None: + parser.ws = old_ws + if self.skipws is not None: + parser.skipws = old_skipws + + if results: + return results + + +class OrderedChoice(Sequence): + """ + Will match one of the parser expressions specified. Parser will try to + match expressions in the order they are defined. + """ + def _parse(self, parser): + result = None + match = False + c_pos = parser.position + + if self.ws is not None: + old_ws = parser.ws + parser.ws = self.ws + + if self.skipws is not None: + old_skipws = parser.skipws + parser.skipws = self.skipws + + try: + for e in self.nodes: + try: + result = e.parse(parser) + if result is not None: + match = True + result = [result] + break + except NoMatch: + parser.position = c_pos # Backtracking + finally: + if self.ws is not None: + parser.ws = old_ws + if self.skipws is not None: + parser.skipws = old_skipws + + if not match: + parser._nm_raise(self, c_pos, parser) + + return result + + +class Repetition(ParsingExpression): + """ + Base class for all repetition-like parser expressions (?,*,+) + Args: + eolterm(bool): Flag that indicates that end of line should + terminate repetition match. + """ + def __init__(self, *elements, **kwargs): + super(Repetition, self).__init__(*elements, **kwargs) + self.eolterm = kwargs.get('eolterm', False) + self.sep = kwargs.get('sep', None) + + +class Optional(Repetition): + """ + Optional will try to match parser expression specified and will not fail + in case match is not successful. + """ + def _parse(self, parser): + result = None + c_pos = parser.position + + try: + result = [self.nodes[0].parse(parser)] + except NoMatch: + parser.position = c_pos # Backtracking + + return result + + +class ZeroOrMore(Repetition): + """ + ZeroOrMore will try to match parser expression specified zero or more + times. It will never fail. + """ + def _parse(self, parser): + results = [] + + if self.eolterm: + # Remember current eolterm and set eolterm of + # this repetition + old_eolterm = parser.eolterm + parser.eolterm = self.eolterm + + # Prefetching + append = results.append + p = self.nodes[0].parse + sep = self.sep.parse if self.sep else None + result = None + + while True: + try: + c_pos = parser.position + if sep and result: + sep_result = sep(parser) + if sep_result: + append(sep_result) + result = p(parser) + if not result: + break + append(result) + except NoMatch: + parser.position = c_pos # Backtracking + break + + if self.eolterm: + # Restore previous eolterm + parser.eolterm = old_eolterm + + return results + + +class OneOrMore(Repetition): + """ + OneOrMore will try to match parser expression specified one or more times. + """ + def _parse(self, parser): + results = [] + first = True + + if self.eolterm: + # Remember current eolterm and set eolterm of + # this repetition + old_eolterm = parser.eolterm + parser.eolterm = self.eolterm + + # Prefetching + append = results.append + p = self.nodes[0].parse + sep = self.sep.parse if self.sep else None + result = None + + try: + while True: + try: + c_pos = parser.position + if sep and result: + sep_result = sep(parser) + if sep_result: + append(sep_result) + result = p(parser) + if not result: + break + append(result) + first = False + except NoMatch: + parser.position = c_pos # Backtracking + + if first: + raise + + break + finally: + if self.eolterm: + # Restore previous eolterm + parser.eolterm = old_eolterm + + return results + + +class UnorderedGroup(Repetition): + """ + Will try to match all of the parsing expression in any order. + """ + def _parse(self, parser): + results = [] + c_pos = parser.position + + if self.eolterm: + # Remember current eolterm and set eolterm of + # this repetition + old_eolterm = parser.eolterm + parser.eolterm = self.eolterm + + # Prefetching + append = results.append + nodes_to_try = list(self.nodes) + sep = self.sep.parse if self.sep else None + result = None + sep_result = None + first = True + + while nodes_to_try: + sep_exc = None + + # Separator + c_loc_pos_sep = parser.position + if sep and not first: + try: + sep_result = sep(parser) + except NoMatch as e: + parser.position = c_loc_pos_sep # Backtracking + + # This still might be valid if all remaining subexpressions + # are optional and none of them will match + sep_exc = e + + c_loc_pos = parser.position + match = True + all_optionals_fail = True + for e in list(nodes_to_try): + try: + result = e.parse(parser) + if result: + if sep_exc: + raise sep_exc + if sep_result: + append(sep_result) + first = False + match = True + all_optionals_fail = False + append(result) + nodes_to_try.remove(e) + break + + except NoMatch: + match = False + parser.position = c_loc_pos # local backtracking + + if not match or all_optionals_fail: + # If sep is matched backtrack it + parser.position = c_loc_pos_sep + break + + if self.eolterm: + # Restore previous eolterm + parser.eolterm = old_eolterm + + if not match: + # Unsuccessful match of the whole PE - full backtracking + parser.position = c_pos + parser._nm_raise(self, c_pos, parser) + + if results: + return results + + +class SyntaxPredicate(ParsingExpression): + """ + Base class for all syntax predicates (and, not, empty). + Predicates are parser expressions that will do the match but will not + consume any input. + """ + + +class And(SyntaxPredicate): + """ + This predicate will succeed if the specified expression matches current + input. + """ + def _parse(self, parser): + c_pos = parser.position + for e in self.nodes: + try: + e.parse(parser) + except NoMatch: + parser.position = c_pos + raise + parser.position = c_pos + + +class Not(SyntaxPredicate): + """ + This predicate will succeed if the specified expression doesn't match + current input. + """ + def _parse(self, parser): + c_pos = parser.position + old_in_not = parser.in_not + parser.in_not = True + try: + for e in self.nodes: + try: + e.parse(parser) + except NoMatch: + parser.position = c_pos + return + parser.position = c_pos + parser._nm_raise(self, c_pos, parser) + finally: + parser.in_not = old_in_not + + +class Empty(SyntaxPredicate): + """ + This predicate will always succeed without consuming input. + """ + def _parse(self, parser): + pass + + +class Decorator(ParsingExpression): + """ + Decorator are special kind of parsing expression used to mark + a containing pexpression and give it some special semantics. + For example, decorators are used to mark pexpression as lexical + rules (see :class:Lex). + """ + + +class Combine(Decorator): + """ + This decorator defines pexpression that represents a lexeme rule. + This rules will always return a Terminal parse tree node. + Whitespaces will be preserved. Comments will not be matched. + """ + def _parse(self, parser): + results = [] + + oldin_lex_rule = parser.in_lex_rule + parser.in_lex_rule = True + c_pos = parser.position + try: + for parser_model_node in self.nodes: + results.append(parser_model_node.parse(parser)) + + results = flatten(results) + + # Create terminal from result + return Terminal(self, c_pos, + "".join([x.flat_str() for x in results])) + except NoMatch: + parser.position = c_pos # Backtracking + raise + finally: + parser.in_lex_rule = oldin_lex_rule + + +class Match(ParsingExpression): + """ + Base class for all classes that will try to match something from the input. + """ + def __init__(self, rule_name, root=False, **kwargs): + super(Match, self).__init__(rule_name=rule_name, root=root, **kwargs) + + @property + def name(self): + if self.root: + return "%s=%s(%s)" % (self.rule_name, self.__class__.__name__, + self.to_match) + else: + return "%s(%s)" % (self.__class__.__name__, self.to_match) + + def _parse_comments(self, parser): + """Parse comments.""" + + try: + parser.in_parse_comments = True + if parser.comments_model: + try: + while True: + # TODO: Consumed whitespaces and comments should be + # attached to the first match ahead. + parser.comments.append( + parser.comments_model.parse(parser)) + if parser.skipws: + # Whitespace skipping + pos = parser.position + ws = parser.ws + i = parser.input + length = len(i) + while pos < length and i[pos] in ws: + pos += 1 + parser.position = pos + except NoMatch: + # NoMatch in comment matching is perfectly + # legal and no action should be taken. + pass + finally: + parser.in_parse_comments = False + + def parse(self, parser): + + if parser.skipws and not parser.in_lex_rule: + # Whitespace skipping + pos = parser.position + ws = parser.ws + i = parser.input + length = len(i) + while pos < length and i[pos] in ws: + pos += 1 + parser.position = pos + + if parser.debug: + parser.dprint( + "?? Try match rule {}{} at position {} => {}" + .format(self.name, + " in {}".format(parser.in_rule) + if parser.in_rule else "", + parser.position, + parser.context())) + + if parser.skipws and parser.position in parser.comment_positions: + # Skip comments if already parsed. + parser.position = parser.comment_positions[parser.position] + else: + if not parser.in_parse_comments and not parser.in_lex_rule: + comment_start = parser.position + self._parse_comments(parser) + parser.comment_positions[comment_start] = parser.position + + result = self._parse(parser) + if not self.suppress: + return result + + +class RegExMatch(Match): + ''' + This Match class will perform input matching based on Regular Expressions. + + Args: + to_match (regex string): A regular expression string to match. + It will be used to create regular expression using re.compile. + ignore_case(bool): If case insensitive match is needed. + Default is None to support propagation from global parser setting. + multiline(bool): allow regex to works on multiple lines + (re.DOTALL flag). Default is None to support propagation from + global parser setting. + str_repr(str): A string that is used to represent this regex. + re_flags: flags parameter for re.compile if neither ignore_case + or multiple are set. + + ''' + def __init__(self, to_match, rule_name='', root=False, ignore_case=None, + multiline=None, str_repr=None, re_flags=re.MULTILINE, + **kwargs): + super(RegExMatch, self).__init__(rule_name, root, **kwargs) + self.to_match_regex = to_match + self.ignore_case = ignore_case + self.multiline = multiline + self.explicit_flags = re_flags + + self.to_match = str_repr if str_repr is not None else to_match + + def compile(self): + flags = self.explicit_flags + if self.multiline is True: + flags |= re.DOTALL + if self.multiline is False and flags & re.DOTALL: + flags -= re.DOTALL + if self.ignore_case is True: + flags |= re.IGNORECASE + if self.ignore_case is False and flags & re.IGNORECASE: + flags -= re.IGNORECASE + self.regex = re.compile(self.to_match_regex, flags) + + def __str__(self): + return self.to_match + + def __unicode__(self): + return self.__str__() + + def _parse(self, parser): + c_pos = parser.position + m = self.regex.match(parser.input, c_pos) + if m: + matched = m.group() + if parser.debug: + parser.dprint( + "++ Match '%s' at %d => '%s'" % + (matched, c_pos, parser.context(len(matched)))) + parser.position += len(matched) + if matched: + return Terminal(self, c_pos, matched, extra_info=m) + else: + if parser.debug: + parser.dprint("-- NoMatch at {}".format(c_pos)) + parser._nm_raise(self, c_pos, parser) + + +class StrMatch(Match): + """ + This Match class will perform input matching by a string comparison. + + Args: + to_match (str): A string to match. + ignore_case(bool): If case insensitive match is needed. + Default is None to support propagation from global parser setting. + """ + def __init__(self, to_match, rule_name='', root=False, ignore_case=None, + **kwargs): + super(StrMatch, self).__init__(rule_name, root, **kwargs) + self.to_match = to_match + self.ignore_case = ignore_case + + def _parse(self, parser): + c_pos = parser.position + input_frag = parser.input[c_pos:c_pos+len(self.to_match)] + if self.ignore_case: + match = input_frag.lower() == self.to_match.lower() + else: + match = input_frag == self.to_match + if match: + if parser.debug: + parser.dprint( + "++ Match '{}' at {} => '{}'" + .format(self.to_match, c_pos, + parser.context(len(self.to_match)))) + parser.position += len(self.to_match) + + # If this match is inside sequence than mark for suppression + suppress = type(parser.last_pexpression) is Sequence + + return Terminal(self, c_pos, self.to_match, suppress=suppress) + else: + if parser.debug: + parser.dprint( + "-- No match '{}' at {} => '{}'" + .format(self.to_match, c_pos, + parser.context(len(self.to_match)))) + parser._nm_raise(self, c_pos, parser) + + def __str__(self): + return self.to_match + + def __unicode__(self): + return self.__str__() + + def __eq__(self, other): + return self.to_match == text(other) + + def __hash__(self): + return hash(self.to_match) + + + +# HACK: Kwd class is a bit hackish. Need to find a better way to +# introduce different classes of string tokens. +class Kwd(StrMatch): + """ + A specialization of StrMatch to specify keywords of the language. + """ + def __init__(self, to_match): + super(Kwd, self).__init__(to_match) + self.to_match = to_match + self.root = True + self.rule_name = 'keyword' + + +class EndOfFile(Match): + """ + The Match class that will succeed in case end of input is reached. + """ + def __init__(self): + super(EndOfFile, self).__init__("EOF") + + @property + def name(self): + return "EOF" + + def _parse(self, parser): + c_pos = parser.position + if len(parser.input) == c_pos: + return Terminal(EOF(), c_pos, '', suppress=True) + else: + if parser.debug: + parser.dprint("!! EOF not matched.") + parser._nm_raise(self, c_pos, parser) + + +def EOF(): + return EndOfFile() + +# --------------------------------------------------------- + + +# --------------------------------------------------- +# Parse Tree node classes + +class ParseTreeNode(object): + """ + Abstract base class representing node of the Parse Tree. + The node can be terminal(the leaf of the parse tree) or non-terminal. + + Attributes: + rule (ParsingExpression): The rule that created this node. + rule_name (str): The name of the rule that created this node if + root rule or empty string otherwise. + position (int): A position in the input stream where the match + occurred. + position_end (int, read-only): A position in the input stream where + the node ends. + This position is one char behind the last char contained in this + node. Thus, position_end - position = length of the node. + error (bool): Is this a false parse tree node created during error + recovery. + comments : A parse tree of comment(s) attached to this node. + """ + def __init__(self, rule, position, error): + assert rule + assert rule.rule_name is not None + self.rule = rule + self.rule_name = rule.rule_name + self.position = position + self.error = error + self.comments = None + + @property + def name(self): + return "%s [%s]" % (self.rule_name, self.position) + + @property + def position_end(self): + "Must be implemented in subclasses." + raise NotImplementedError + + def visit(self, visitor): + """ + Visitor pattern implementation. + + Args: + visitor(PTNodeVisitor): The visitor object. + """ + if visitor.debug: + visitor.dprint("Visiting {} type:{} str:{}" + .format(self.name, type(self).__name__, text(self))) + + children = SemanticActionResults() + if isinstance(self, NonTerminal): + for node in self: + child = node.visit(visitor) + # If visit returns None suppress that child node + if child is not None: + children.append_result(node.rule_name, child) + + visit_name = "visit_%s" % self.rule_name + if hasattr(visitor, visit_name): + # Call visit method. + result = getattr(visitor, visit_name)(self, children) + + # If there is a method with 'second' prefix save + # the result of visit for post-processing + if hasattr(visitor, "second_%s" % self.rule_name): + visitor.for_second_pass.append((self.rule_name, result)) + + return result + + elif visitor.defaults: + # If default actions are enabled + return visitor.visit__default__(self, children) + + def tree_str(self, indent=0): + return '{}{} [{}-{}]'.format(' ' * indent, self.rule.name, + self.position, self.position_end) + + +class Terminal(ParseTreeNode): + """ + Leaf node of the Parse Tree. Represents matched string. + + Attributes: + rule (ParsingExpression): The rule that created this terminal. + position (int): A position in the input stream where match occurred. + value (str): Matched string at the given position or missing token + name in the case of an error node. + suppress(bool): If True this terminal can be ignored in semantic + analysis. + extra_info(object): additional information (e.g. the re matcher + object) + """ + + __slots__ = ['rule', 'rule_name', 'position', 'error', 'comments', + 'value', 'suppress', 'extra_info'] + + def __init__(self, rule, position, value, error=False, suppress=False, + extra_info=None): + super(Terminal, self).__init__(rule, position, error) + self.value = value + self.suppress = suppress + self.extra_info = extra_info + + @property + def desc(self): + if self.value: + return "%s '%s' [%s]" % (self.rule_name, self.value, self.position) + else: + return "%s [%s]" % (self.rule_name, self.position) + + @property + def position_end(self): + return self.position + len(self.value) + + def flat_str(self): + return self.value + + def __str__(self): + return self.value + + def __unicode__(self): + return self.__str__() + + def __repr__(self): + return self.desc + + def tree_str(self, indent=0): + return '{}: {}'.format(super(Terminal, self).tree_str(indent), + self.value) + + def __eq__(self, other): + return text(self) == text(other) + + +class NonTerminal(ParseTreeNode, list): + """ + Non-leaf node of the Parse Tree. Represents language syntax construction. + At the same time used in ParseTreeNode navigation expressions. + See test_ptnode_navigation_expressions.py for examples of navigation + expressions. + + Attributes: + nodes (list of ParseTreeNode): Children parse tree nodes. + _filtered (bool): Is this NT a dynamically created filtered NT. + This is used internally. + + """ + + __slots__ = ['rule', 'rule_name', 'position', 'error', 'comments', + '_filtered', '_expr_cache'] + + def __init__(self, rule, nodes, error=False, _filtered=False): + + # Inherit position from the first child node + position = nodes[0].position if nodes else 0 + + super(NonTerminal, self).__init__(rule, position, error) + + self.extend(flatten([nodes])) + self._filtered = _filtered + + @property + def value(self): + """Terminal protocol.""" + return text(self) + + @property + def desc(self): + return self.name + + @property + def position_end(self): + return self[-1].position_end if self else self.position + + def flat_str(self): + """ + Return flatten string representation. + """ + return "".join([x.flat_str() for x in self]) + + def __str__(self): + return " | ".join([text(x) for x in self]) + + def __unicode__(self): + return self.__str__() + + def __repr__(self): + return "[ %s ]" % ", ".join([repr(x) for x in self]) + + def tree_str(self, indent=0): + return '{}\n{}'.format(super(NonTerminal, self).tree_str(indent), + '\n'.join([c.tree_str(indent + 1) + for c in self])) + + def __getattr__(self, rule_name): + """ + Find a child (non)terminal by the rule name. + + Args: + rule_name(str): The name of the rule that is referenced from + this node rule. + """ + # Prevent infinite recursion + if rule_name in ['_expr_cache', '_filtered', 'rule', 'rule_name', + 'position', 'append', 'extend']: + raise AttributeError + + try: + # First check the cache + if rule_name in self._expr_cache: + return self._expr_cache[rule_name] + except AttributeError: + # Navigation expression cache. Used for lookup by rule name. + self._expr_cache = {} + + # If result is not found in the cache collect all nodes + # with the given rule name and create new NonTerminal + # and cache it for later access. + nodes = [] + rule = None + for n in self: + if self._filtered: + # For filtered NT rule_name is a rule on + # each of its children + for m in n: + if m.rule_name == rule_name: + nodes.append(m) + rule = m.rule + else: + if n.rule_name == rule_name: + nodes.append(n) + rule = n.rule + + if rule is None: + # If rule is not found resort to default behavior + return self.__getattribute__(rule_name) + + result = NonTerminal(rule=rule, nodes=nodes, _filtered=True) + self._expr_cache[rule_name] = result + return result + + +# ---------------------------------------------------- +# Semantic Actions +# +class PTNodeVisitor(DebugPrinter): + """ + Base class for all parse tree visitors. + """ + def __init__(self, defaults=True, **kwargs): + """ + Args: + defaults(bool): If the default visit method should be applied in + case no method is defined. + """ + self.for_second_pass = [] + self.defaults = defaults + + super(PTNodeVisitor, self).__init__(**kwargs) + + def visit__default__(self, node, children): + """ + Called if no visit method is defined for the node. + + Args: + node(ParseTreeNode): + children(processed children ParseTreeNode-s): + """ + if isinstance(node, Terminal): + # Default for Terminal is to convert to string unless suppress flag + # is set in which case it is suppressed by setting to None. + retval = text(node) if not node.suppress else None + else: + retval = node + # Special case. If only one child exist return it. + if len(children) == 1: + retval = children[0] + else: + # If there is only one non-string child return + # that by default. This will support e.g. bracket + # removals. + last_non_str = None + for c in children: + if not isstr(c): + if last_non_str is None: + last_non_str = c + else: + # If there is multiple non-string objects + # by default convert non-terminal to string + if self.debug: + self.dprint("*** Warning: Multiple " + "non-string objects found in " + "default visit. Converting non-" + "terminal to a string.") + retval = text(node) + break + else: + # Return the only non-string child + retval = last_non_str + + return retval + + +def visit_parse_tree(parse_tree, visitor): + """ + Applies visitor to parse_tree and runs the second pass + afterwards. + + Args: + parse_tree(ParseTreeNode): + visitor(PTNodeVisitor): + """ + if not parse_tree: + raise Exception( + "Parse tree is empty. You did call parse(), didn't you?") + + if visitor.debug: + visitor.dprint("ASG: First pass") + + # Visit tree. + result = parse_tree.visit(visitor) + + # Second pass + if visitor.debug: + visitor.dprint("ASG: Second pass") + for sa_name, asg_node in visitor.for_second_pass: + getattr(visitor, "second_%s" % sa_name)(asg_node) + + return result + + +class SemanticAction(object): + """ + Semantic actions are executed during semantic analysis. They are in charge + of producing Abstract Semantic Graph (ASG) out of the parse tree. + Every non-terminal and terminal can have semantic action defined which will + be triggered during semantic analysis. + Semantic action triggering is separated in two passes. first_pass method is + required and the method called second_pass is optional and will be called + if exists after the first pass. Second pass can be used for forward + referencing, e.g. linking to the declaration registered in the first pass + stage. + """ + def first_pass(self, parser, node, nodes): + """ + Called in the first pass of tree walk. + This is the default implementation used if no semantic action is + defined. + """ + if isinstance(node, Terminal): + # Default for Terminal is to convert to string unless suppress flag + # is set in which case it is suppressed by setting to None. + retval = text(node) if not node.suppress else None + else: + retval = node + # Special case. If only one child exist return it. + if len(nodes) == 1: + retval = nodes[0] + else: + # If there is only one non-string child return + # that by default. This will support e.g. bracket + # removals. + last_non_str = None + for c in nodes: + if not isstr(c): + if last_non_str is None: + last_non_str = c + else: + # If there is multiple non-string objects + # by default convert non-terminal to string + if parser.debug: + parser.dprint( + "*** Warning: Multiple non-" + "string objects found in applying " + "default semantic action. Converting " + "non-terminal to string.") + retval = text(node) + break + else: + # Return the only non-string child + retval = last_non_str + + return retval + + +class SemanticActionResults(list): + """ + Used in visitor methods call to supply results of semantic analysis + of children parse tree nodes. + Enables dot access by the name of the rule similar to NonTerminal + tree navigation. + Enables index access as well as iteration. + """ + def __init__(self): + self.results = {} + + def append_result(self, name, result): + if name: + if name not in self.results: + self.results[name] = [] + self.results[name].append(result) + + self.append(result) + + def __getattr__(self, attr_name): + if attr_name == 'results': + raise AttributeError + + return self.results.get(attr_name, []) + + +# Common semantic actions +class SemanticActionSingleChild(SemanticAction): + def first_pass(self, parser, node, children): + return children[0] + + +class SemanticActionBodyWithBraces(SemanticAction): + def first_pass(self, parser, node, children): + return children[1:-1] + + +class SemanticActionToString(SemanticAction): + def first_pass(self, parser, node, children): + return text(node) + +# ---------------------------------------------------- +# Parsers + + +class Parser(DebugPrinter): + """ + Abstract base class for all parsers. + + Attributes: + comments_model: parser model for comments. + comments(list): A list of ParseTreeNode for matched comments. + sem_actions(dict): A dictionary of semantic actions keyed by the + rule name. + parse_tree(NonTerminal): The parse tree consisting of NonTerminal and + Terminal instances. + in_rule (str): Current rule name. + in_parse_comments (bool): True if parsing comments. + in_lex_rule (bool): True if in lexical rule. Currently used in Combine + decorator to convert match to a single Terminal. + in_not (bool): True if in Not parsing expression. Used for better error + reporting. + last_pexpression (ParsingExpression): Last parsing expression + traversed. + """ + + # Not marker for NoMatch rules list. Used if the first unsuccessful rule + # match is Not. + FIRST_NOT = Not() + + def __init__(self, skipws=True, ws=None, reduce_tree=False, autokwd=False, + ignore_case=False, memoization=False, **kwargs): + """ + Args: + skipws (bool): Should the whitespace skipping be done. Default is + True. + ws (str): A string consisting of whitespace characters. + reduce_tree (bool): If true non-terminals with single child will be + eliminated from the parse tree. Default is False. + autokwd(bool): If keyword-like StrMatches are matched on word + boundaries. Default is False. + ignore_case(bool): If case is ignored (default=False) + memoization(bool): If memoization should be used + (a.k.a. packrat parsing) + """ + + super(Parser, self).__init__(**kwargs) + + # Used to indicate state in which parser should not + # treat newlines as whitespaces. + self._eolterm = False + + self.skipws = skipws + if ws is not None: + self.ws = ws + else: + self.ws = DEFAULT_WS + + self.reduce_tree = reduce_tree + self.autokwd = autokwd + self.ignore_case = ignore_case + self.memoization = memoization + self.comments_model = None + self.comments = [] + self.comment_positions = {} + self.sem_actions = {} + + self.parse_tree = None + + # Create regex used for autokwd matching + flags = 0 + if ignore_case: + flags = re.IGNORECASE + self.keyword_regex = re.compile(r'[^\d\W]\w*', flags) + + # Keep track of root rule we are currently in. + # Used for debugging purposes + self.in_rule = '' + + self.in_parse_comments = False + + # Are we in lexical rule? If so do not + # skip whitespaces. + self.in_lex_rule = False + + # Are we in Not parsing expression? + self.in_not = False + + # Last parsing expression traversed + self.last_pexpression = None + + @property + def ws(self): + return self._ws + + @ws.setter + def ws(self, new_value): + self._real_ws = new_value + self._ws = new_value + if self.eolterm: + self._ws = self._ws.replace('\n', '').replace('\r', '') + + @property + def eolterm(self): + return self._eolterm + + @eolterm.setter + def eolterm(self, new_value): + # Toggle newline char in ws on eolterm property set. + # During eolterm state parser should not treat + # newline as a whitespace. + self._eolterm = new_value + if self._eolterm: + self._ws = self._ws.replace('\n', '').replace('\r', '') + else: + self._ws = self._real_ws + + def parse(self, _input, file_name=None): + """ + Parses input and produces parse tree. + + Args: + _input(str): An input string to parse. + file_name(str): If input is loaded from file this can be + set to file name. It is used in error messages. + """ + self.position = 0 # Input position + self.nm = None # Last NoMatch exception + self.line_ends = [] + self.input = _input + self.file_name = file_name + self.comment_positions = {} + self.cache_hits = 0 + self.cache_misses = 0 + try: + self.parse_tree = self._parse() + except NoMatch as e: + # Remove Not marker + if e.rules[0] is Parser.FIRST_NOT: + del e.rules[0] + # Get line and column from position + e.line, e.col = self.pos_to_linecol(e.position) + raise + finally: + # At end of parsing clear all memoization caches. + # Do this here to free memory. + if self.memoization: + self._clear_caches() + + # In debug mode export parse tree to dot file for + # visualization + if self.debug and self.parse_tree: + from arpeggio.export import PTDOTExporter + root_rule_name = self.parse_tree.rule_name + PTDOTExporter().exportFile( + self.parse_tree, "{}_parse_tree.dot".format(root_rule_name)) + return self.parse_tree + + def parse_file(self, file_name): + """ + Parses content from the given file. + Args: + file_name(str): A file name. + """ + with codecs.open(file_name, 'r', 'utf-8') as f: + content = f.read() + + return self.parse(content, file_name=file_name) + + def getASG(self, sem_actions=None, defaults=True): + """ + Creates Abstract Semantic Graph (ASG) from the parse tree. + + Args: + sem_actions (dict): The semantic actions dictionary to use for + semantic analysis. Rule names are the keys and semantic action + objects are values. + defaults (bool): If True a default semantic action will be + applied in case no action is defined for the node. + """ + if not self.parse_tree: + raise Exception( + "Parse tree is empty. You did call parse(), didn't you?") + + if sem_actions is None: + if not self.sem_actions: + raise Exception("Semantic actions not defined.") + else: + sem_actions = self.sem_actions + + if type(sem_actions) is not dict: + raise Exception("Semantic actions parameter must be a dictionary.") + + for_second_pass = [] + + def tree_walk(node): + """ + Walking the parse tree and calling first_pass for every registered + semantic actions and creating list of object that needs to be + called in the second pass. + """ + + if self.debug: + self.dprint( + "Walking down %s type: %s str: %s" % + (node.name, type(node).__name__, text(node))) + + children = SemanticActionResults() + if isinstance(node, NonTerminal): + for n in node: + child = tree_walk(n) + if child is not None: + children.append_result(n.rule_name, child) + + if self.debug: + self.dprint("Processing %s = '%s' type:%s len:%d" % + (node.name, text(node), type(node).__name__, + len(node) if isinstance(node, list) else 0)) + for i, a in enumerate(children): + self.dprint(" %d:%s type:%s" % + (i+1, text(a), type(a).__name__)) + + if node.rule_name in sem_actions: + sem_action = sem_actions[node.rule_name] + if isinstance(sem_action, types.FunctionType): + retval = sem_action(self, node, children) + else: + retval = sem_action.first_pass(self, node, children) + + if hasattr(sem_action, "second_pass"): + for_second_pass.append((node.rule_name, retval)) + + if self.debug: + action_name = sem_action.__name__ \ + if hasattr(sem_action, '__name__') \ + else sem_action.__class__.__name__ + self.dprint(" Applying semantic action %s" % action_name) + + else: + if defaults: + # If no rule is present use some sane defaults + if self.debug: + self.dprint(" Applying default semantic action.") + + retval = SemanticAction().first_pass(self, node, children) + + else: + retval = node + + if self.debug: + if retval is None: + self.dprint(" Suppressed.") + else: + self.dprint(" Resolved to = %s type:%s" % + (text(retval), type(retval).__name__)) + return retval + + if self.debug: + self.dprint("ASG: First pass") + asg = tree_walk(self.parse_tree) + + # Second pass + if self.debug: + self.dprint("ASG: Second pass") + for sa_name, asg_node in for_second_pass: + sem_actions[sa_name].second_pass(self, asg_node) + + return asg + + def pos_to_linecol(self, pos): + """ + Calculate (line, column) tuple for the given position in the stream. + """ + if not self.line_ends: + try: + # TODO: Check this implementation on Windows. + self.line_ends.append(self.input.index("\n")) + while True: + try: + self.line_ends.append( + self.input.index("\n", self.line_ends[-1] + 1)) + except ValueError: + break + except ValueError: + pass + + line = bisect.bisect_left(self.line_ends, pos) + col = pos + if line > 0: + col -= self.line_ends[line - 1] + if self.input[self.line_ends[line - 1]] in '\n\r': + col -= 1 + return line + 1, col + 1 + + def context(self, length=None, position=None): + """ + Returns current context substring, i.e. the substring around current + position. + Args: + length(int): If given used to mark with asterisk a length chars + from the current position. + position(int): The position in the input stream. + """ + if not position: + position = self.position + if length: + retval = "{}*{}*{}".format( + text(self.input[max(position - 10, 0):position]), + text(self.input[position:position + length]), + text(self.input[position + length:position + 10])) + else: + retval = "{}*{}".format( + text(self.input[max(position - 10, 0):position]), + text(self.input[position:position + 10])) + + return retval.replace('\n', ' ').replace('\r', '') + + def _nm_raise(self, *args): + """ + Register new NoMatch object if the input is consumed + from the last NoMatch and raise last NoMatch. + + Args: + args: A NoMatch instance or (value, position, parser) + """ + + rule, position, parser = args + if self.nm is None or not parser.in_parse_comments: + if self.nm is None or position > self.nm.position: + if self.in_not: + self.nm = NoMatch([Parser.FIRST_NOT], position, parser) + else: + self.nm = NoMatch([rule], position, parser) + elif position == self.nm.position and isinstance(rule, Match) \ + and not self.in_not: + self.nm.rules.append(rule) + + raise self.nm + + def _clear_caches(self): + """ + Clear memoization caches if packrat parser is used. + """ + self.parser_model._clear_cache() + if self.comments_model: + self.comments_model._clear_cache() + + +class CrossRef(object): + ''' + Used for rule reference resolving. + ''' + def __init__(self, target_rule_name, position=-1): + self.target_rule_name = target_rule_name + self.position = position + + +class ParserPython(Parser): + + def __init__(self, language_def, comment_def=None, syntax_classes=None, + *args, **kwargs): + """ + Constructs parser from python statements and expressions. + + Args: + language_def (python function): A python function that defines + the root rule of the grammar. + comment_def (python function): A python function that defines + the root rule of the comments grammar. + syntax_classes (dict): Overrides of special syntax parser + expression classes (StrMatch, Sequence, OrderedChoice). + + """ + super(ParserPython, self).__init__(*args, **kwargs) + + self.syntax_classes = syntax_classes if syntax_classes else {} + + # PEG Abstract Syntax Graph + self.parser_model = self._from_python(language_def) + + self.comments_model = None + if comment_def: + self.comments_model = self._from_python(comment_def) + self.comments_model.root = True + self.comments_model.rule_name = comment_def.__name__ + + # In debug mode export parser model to dot for + # visualization + if self.debug: + from arpeggio.export import PMDOTExporter + root_rule = language_def.__name__ + PMDOTExporter().exportFile(self.parser_model, + "{}_parser_model.dot".format(root_rule)) + + def _parse(self): + return self.parser_model.parse(self) + + def _from_python(self, expression): + """ + Create parser model from the definition given in the form of python + functions returning lists, tuples, callables, strings and + ParsingExpression objects. + + Returns: + Parser Model (PEG Abstract Semantic Graph) + """ + __rule_cache = {"EndOfFile": EndOfFile()} + __for_resolving = [] # Expressions that needs crossref resolvnih + self.__cross_refs = 0 + _StrMatch = self.syntax_classes.get('StrMatch', StrMatch) + _OrderedChoice = self.syntax_classes.get('OrderedChoice', + OrderedChoice) + _Sequence = self.syntax_classes.get('Sequence', Sequence) + + def inner_from_python(expression): + retval = None + if isinstance(expression, types.FunctionType): + # If this expression is a parser rule + rule_name = expression.__name__ + if rule_name in __rule_cache: + c_rule = __rule_cache.get(rule_name) + if self.debug: + self.dprint("Rule {} founded in cache." + .format(rule_name)) + if isinstance(c_rule, CrossRef): + self.__cross_refs += 1 + if self.debug: + self.dprint("CrossRef usage: {}" + .format(c_rule.target_rule_name)) + return c_rule + + # Semantic action for the rule + if hasattr(expression, "sem"): + self.sem_actions[rule_name] = expression.sem + + # Register rule cross-ref to support recursion + __rule_cache[rule_name] = CrossRef(rule_name) + + curr_expr = expression + while isinstance(curr_expr, types.FunctionType): + # If function directly returns another function + # go into until non-function is returned. + curr_expr = curr_expr() + retval = inner_from_python(curr_expr) + retval.rule_name = rule_name + retval.root = True + + # Update cache + __rule_cache[rule_name] = retval + if self.debug: + self.dprint("New rule: {} -> {}" + .format(rule_name, retval.__class__.__name__)) + + elif type(expression) is text or isinstance(expression, _StrMatch): + if type(expression) is text: + retval = _StrMatch(expression, + ignore_case=self.ignore_case) + else: + retval = expression + if expression.ignore_case is None: + expression.ignore_case = self.ignore_case + + if self.autokwd: + to_match = retval.to_match + match = self.keyword_regex.match(to_match) + if match and match.span() == (0, len(to_match)): + retval = RegExMatch(r'{}\b'.format(to_match), + ignore_case=self.ignore_case, + str_repr=to_match) + retval.compile() + + elif isinstance(expression, RegExMatch): + # Regular expression are not compiled yet + # to support global settings propagation from + # parser. + if expression.ignore_case is None: + expression.ignore_case = self.ignore_case + expression.compile() + + retval = expression + + elif isinstance(expression, Match): + retval = expression + + elif isinstance(expression, UnorderedGroup): + retval = expression + for n in retval.elements: + retval.nodes.append(inner_from_python(n)) + if any((isinstance(x, CrossRef) for x in retval.nodes)): + __for_resolving.append(retval) + + elif isinstance(expression, _Sequence) or \ + isinstance(expression, Repetition) or \ + isinstance(expression, SyntaxPredicate) or \ + isinstance(expression, Decorator): + retval = expression + retval.nodes.append(inner_from_python(retval.elements)) + if any((isinstance(x, CrossRef) for x in retval.nodes)): + __for_resolving.append(retval) + + elif type(expression) in [list, tuple]: + if type(expression) is list: + retval = _OrderedChoice(expression) + else: + retval = _Sequence(expression) + + retval.nodes = [inner_from_python(e) for e in expression] + if any((isinstance(x, CrossRef) for x in retval.nodes)): + __for_resolving.append(retval) + + else: + raise GrammarError("Unrecognized grammar element '%s'." % + text(expression)) + + # Translate separator expression. + if isinstance(expression, Repetition) and expression.sep: + expression.sep = inner_from_python(expression.sep) + + return retval + + # Cross-ref resolving + def resolve(): + for e in __for_resolving: + for i, node in enumerate(e.nodes): + if isinstance(node, CrossRef): + self.__cross_refs -= 1 + e.nodes[i] = __rule_cache[node.target_rule_name] + + parser_model = inner_from_python(expression) + resolve() + assert self.__cross_refs == 0, "Not all crossrefs are resolved!" + return parser_model + + def errors(self): + pass diff --git a/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..73499f5 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/cleanpeg.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/cleanpeg.cpython-312.pyc new file mode 100644 index 0000000..0231e5c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/cleanpeg.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/export.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/export.cpython-312.pyc new file mode 100644 index 0000000..68b01b9 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/export.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/peg.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/peg.cpython-312.pyc new file mode 100644 index 0000000..59f65dc Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/peg.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/utils.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000..0e5162c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/__pycache__/utils.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/cleanpeg.py b/myenv/lib/python3.12/site-packages/arpeggio/cleanpeg.py new file mode 100644 index 0000000..d9d7213 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/cleanpeg.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: cleanpeg.py +# Purpose: This module is a variation of the original peg.py. +# The syntax is slightly changed to be more readable and familiar to +# python users. It is based on the Yash's suggestion - issue 11 +# Author: Igor R. Dejanovic +# Copyright: (c) 2014-2017 Igor R. Dejanovic +# License: MIT License +####################################################################### + +from __future__ import print_function, unicode_literals + +from arpeggio import Optional, ZeroOrMore, Not, OneOrMore, EOF, ParserPython, \ + visit_parse_tree +from arpeggio import RegExMatch as _ +from .peg import PEGVisitor +from .peg import ParserPEG as ParserPEGOrig + +__all__ = ['ParserPEG'] + +# Lexical invariants +ASSIGNMENT = "=" +ORDERED_CHOICE = "/" +ZERO_OR_MORE = "*" +ONE_OR_MORE = "+" +OPTIONAL = "?" +UNORDERED_GROUP = "#" +AND = "&" +NOT = "!" +OPEN = "(" +CLOSE = ")" + +# PEG syntax rules +def peggrammar(): return OneOrMore(rule), EOF +def rule(): return rule_name, ASSIGNMENT, ordered_choice +def ordered_choice(): return sequence, ZeroOrMore(ORDERED_CHOICE, sequence) +def sequence(): return OneOrMore(prefix) +def prefix(): return Optional([AND, NOT]), sufix +def sufix(): return expression, Optional([OPTIONAL, + ZERO_OR_MORE, + ONE_OR_MORE, + UNORDERED_GROUP]) +def expression(): return [regex, rule_crossref, + (OPEN, ordered_choice, CLOSE), + str_match], Not(ASSIGNMENT) + +# PEG Lexical rules +def regex(): return [("r'", _(r'''[^'\\]*(?:\\.[^'\\]*)*'''), "'"), + ('r"', _(r'''[^"\\]*(?:\\.[^"\\]*)*'''), '"')] +def rule_name(): return _(r"[a-zA-Z_]([a-zA-Z_]|[0-9])*") +def rule_crossref(): return rule_name +def str_match(): return _(r'''(?s)('[^'\\]*(?:\\.[^'\\]*)*')|''' + r'''("[^"\\]*(?:\\.[^"\\]*)*")''') +def comment(): return "//", _(".*\n") + + +class ParserPEG(ParserPEGOrig): + + def _from_peg(self, language_def): + parser = ParserPython(peggrammar, comment, reduce_tree=False, + debug=self.debug) + parser.root_rule_name = self.root_rule_name + parse_tree = parser.parse(language_def) + + return visit_parse_tree(parse_tree, PEGVisitor(self.root_rule_name, + self.comment_rule_name, + self.ignore_case, + debug=self.debug)) diff --git a/myenv/lib/python3.12/site-packages/arpeggio/export.py b/myenv/lib/python3.12/site-packages/arpeggio/export.py new file mode 100644 index 0000000..5b92784 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/export.py @@ -0,0 +1,221 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: export.py +# Purpose: Export support for arpeggio +# Author: Igor R. Dejanović +# Copyright: (c) 2009 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import io +from arpeggio import Terminal + + +class Exporter(object): + """ + Base class for all Exporters. + """ + + def __init__(self): + super(Exporter, self).__init__() + + # Export initialization + self._render_set = set() # Used in rendering to prevent + # rendering + # of the same node multiple times + + self._adapter_map = {} # Used as a registry of adapters to + # ensure that the same adapter is + # returned for the same adaptee object + + def export(self, obj): + """ + Export of an obj to a string. + """ + self._outf = io.StringIO() + self._export(obj) + content = self._outf.getvalue() + self._outf.close() + return content + + def exportFile(self, obj, file_name): + """ + Export of obj to a file. + """ + self._outf = io.open(file_name, "w", encoding="utf-8") + self._export(obj) + self._outf.close() + + def _export(self, obj): + self._outf.write(self._start()) + self._render_node(obj) + self._outf.write(self._end()) + + def _start(self): + """ + Override this to specify the beginning of the graph representation. + """ + return "" + + def _end(self): + """ + Override this to specify the end of the graph representation. + """ + return "" + + +class ExportAdapter(object): + """ + Base adapter class for the export support. + Adapter should be defined for every export and graph type. + + Attributes: + adaptee: A node to adapt. + export: An export object used as a context of the export. + """ + def __init__(self, node, export): + self.adaptee = node # adaptee is adapted graph node + self.export = export + + +# ------------------------------------------------------------------------- +# Support for DOT language + + +class DOTExportAdapter(ExportAdapter): + """ + Base adapter class for the DOT export support. + """ + @property + def id(self): + """ + Graph node unique identification. + """ + raise NotImplementedError() + + @property + def desc(self): + """ + Graph node textual description. + """ + raise NotImplementedError() + + @property + def neighbours(self): + """ + A set of adjacent graph nodes. + """ + raise NotImplementedError() + + +class PMDOTExportAdapter(DOTExportAdapter): + """ + Adapter for ParsingExpression graph types (parser model). + """ + @property + def id(self): + return id(self.adaptee) + + @property + def desc(self): + return self.adaptee.desc + + @property + def neighbours(self): + if not hasattr(self, "_neighbours"): + self._neighbours= [] + + # Registry of adapters used in this export + adapter_map = self.export._adapter_map + + for c, n in enumerate(self.adaptee.nodes): + if isinstance(n, PMDOTExportAdapter): + # if the neighbour node is already adapted use that adapter + self._neighbours.append((str(c + 1), n)) + elif id(n) in adapter_map: + # current node is adaptee -> there is registered adapter + self._neighbours.append((str(c + 1), adapter_map[id(n)])) + else: + # Create new adapter + adapter = PMDOTExportAdapter(n, self.export) + self._neighbours.append((str(c + 1), adapter)) + adapter_map[adapter.id] = adapter + + return self._neighbours + + +class PTDOTExportAdapter(PMDOTExportAdapter): + """ + Adapter for ParseTreeNode graph types. + """ + @property + def neighbours(self): + if isinstance(self.adaptee, Terminal): + return [] + else: + if not hasattr(self, "_neighbours"): + self._neighbours = [] + for c, n in enumerate(self.adaptee): + adapter = PTDOTExportAdapter(n, self.export) + self._neighbours.append((str(c + 1), adapter)) + return self._neighbours + + +class DOTExporter(Exporter): + """ + Export to DOT language (part of GraphViz, see http://www.graphviz.org/) + """ + def _render_node(self, node): + if not node in self._render_set: + self._render_set.add(node) + self._outf.write('\n%s [label="%s"];' % + (node.id, self._dot_label_esc(node.desc))) + #TODO Comment handling +# if hasattr(node, "comments") and root.comments: +# retval += self.node(root.comments) +# retval += '\n%s->%s [label="comment"]' % \ + #(id(root), id(root.comments)) + for name, n in node.neighbours: + self._outf.write('\n%s->%s [label="%s"]' % + (node.id, n.id, name)) + self._outf.write('\n') + self._render_node(n) + + def _start(self): + return "digraph arpeggio_graph {" + + def _end(self): + return "\n}" + + def _dot_label_esc(self, to_esc): + to_esc = to_esc.replace("\\", "\\\\") + to_esc = to_esc.replace('\"', '\\"') + to_esc = to_esc.replace('\n', '\\n') + return to_esc + + +class PMDOTExporter(DOTExporter): + """ + A convenience DOTExport extension that uses ParserExpressionDOTExportAdapter + """ + def export(self, obj): + return super(PMDOTExporter, self).\ + export(PMDOTExportAdapter(obj, self)) + + def exportFile(self, obj, file_name): + return super(PMDOTExporter, self).\ + exportFile(PMDOTExportAdapter(obj, self), file_name) + + +class PTDOTExporter(DOTExporter): + """ + A convenience DOTExport extension that uses PTDOTExportAdapter + """ + def export(self, obj): + return super(PTDOTExporter, self).\ + export(PTDOTExportAdapter(obj, self)) + + def exportFile(self, obj, file_name): + return super(PTDOTExporter, self).\ + exportFile(PTDOTExportAdapter(obj, self), file_name) diff --git a/myenv/lib/python3.12/site-packages/arpeggio/peg.py b/myenv/lib/python3.12/site-packages/arpeggio/peg.py new file mode 100644 index 0000000..1f0ed76 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/peg.py @@ -0,0 +1,290 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: peg.py +# Purpose: Implementing PEG language +# Author: Igor R. Dejanovic +# Copyright: (c) 2009-2017 Igor R. Dejanovic +# License: MIT License +####################################################################### + +from __future__ import print_function, unicode_literals +import sys +import codecs +import copy +import re +from arpeggio import Sequence, OrderedChoice, Optional, ZeroOrMore, \ + OneOrMore, UnorderedGroup, EOF, EndOfFile, PTNodeVisitor, \ + SemanticError, CrossRef, GrammarError, StrMatch, And, Not, Parser, \ + ParserPython, visit_parse_tree +from arpeggio import RegExMatch as _ + +if sys.version < '3': + text = unicode +else: + text = str + +__all__ = ['ParserPEG'] + +# Lexical invariants +LEFT_ARROW = "<-" +ORDERED_CHOICE = "/" +ZERO_OR_MORE = "*" +ONE_OR_MORE = "+" +OPTIONAL = "?" +UNORDERED_GROUP = "#" +AND = "&" +NOT = "!" +OPEN = "(" +CLOSE = ")" + + +# PEG syntax rules +def peggrammar(): return OneOrMore(rule), EOF +def rule(): return rule_name, LEFT_ARROW, ordered_choice, ";" +def ordered_choice(): return sequence, ZeroOrMore(ORDERED_CHOICE, sequence) +def sequence(): return OneOrMore(prefix) +def prefix(): return Optional([AND, NOT]), sufix +def sufix(): return expression, Optional([OPTIONAL, + ZERO_OR_MORE, + ONE_OR_MORE, + UNORDERED_GROUP]) +def expression(): return [regex, rule_crossref, + (OPEN, ordered_choice, CLOSE), + str_match] + +# PEG Lexical rules +def regex(): return [("r'", _(r'''[^'\\]*(?:\\.[^'\\]*)*'''), "'"), + ('r"', _(r'''[^"\\]*(?:\\.[^"\\]*)*'''), '"')] +def rule_name(): return _(r"[a-zA-Z_]([a-zA-Z_]|[0-9])*") +def rule_crossref(): return rule_name +def str_match(): return _(r'''(?s)('[^'\\]*(?:\\.[^'\\]*)*')|''' + r'''("[^"\\]*(?:\\.[^"\\]*)*")''') +def comment(): return "//", _(".*\n") + + +# Escape sequences supported in PEG literal string matches +PEG_ESCAPE_SEQUENCES_RE = re.compile(r""" + \\ ( [\n\\'"abfnrtv] | # \\x single-character escapes + [0-7]{1,3} | # \\ooo octal escape + x[0-9A-Fa-f]{2} | # \\xXX hex escape + u[0-9A-Fa-f]{4} | # \\uXXXX hex escape + U[0-9A-Fa-f]{8} | # \\UXXXXXXXX hex escape + N\{[- 0-9A-Z]+\} # \\N{name} Unicode name or alias + ) + """, re.VERBOSE | re.UNICODE) + + +class PEGVisitor(PTNodeVisitor): + """ + Visitor that transforms parse tree to a PEG parser for the given language. + """ + + def __init__(self, root_rule_name, comment_rule_name, ignore_case, + *args, **kwargs): + super(PEGVisitor, self).__init__(*args, **kwargs) + self.root_rule_name = root_rule_name + self.comment_rule_name = comment_rule_name + self.ignore_case = ignore_case + # Used for linking phase + self.peg_rules = { + "EOF": EndOfFile() + } + + def visit_peggrammar(self, node, children): + + def _resolve(node): + """ + Resolves CrossRefs from the parser model. + """ + + if node in self.resolved: + return node + self.resolved.add(node) + + def get_rule_by_name(rule_name): + try: + return self.peg_rules[rule_name] + except KeyError: + raise SemanticError("Rule \"{}\" does not exists." + .format(rule_name)) + + def resolve_rule_by_name(rule_name): + + if self.debug: + self.dprint("Resolving crossref {}".format(rule_name)) + + resolved_rule = get_rule_by_name(rule_name) + while type(resolved_rule) is CrossRef: + target_rule = resolved_rule.target_rule_name + resolved_rule = get_rule_by_name(target_rule) + + # If resolved rule hasn't got the same name it + # should be cloned and preserved in the peg_rules cache + if resolved_rule.rule_name != rule_name: + resolved_rule = copy.copy(resolved_rule) + resolved_rule.rule_name = rule_name + self.peg_rules[rule_name] = resolved_rule + if self.debug: + self.dprint("Resolving: cloned to {} = > {}" + .format(resolved_rule.rule_name, + resolved_rule.name)) + return resolved_rule + + if isinstance(node, CrossRef): + # The root rule is a cross-ref + resolved_rule = resolve_rule_by_name(node.target_rule_name) + return _resolve(resolved_rule) + else: + # Resolve children nodes + for i, n in enumerate(node.nodes): + node.nodes[i] = _resolve(n) + self.resolved.add(node) + return node + + # Find root and comment rules + self.resolved = set() + comment_rule = None + for rule in children: + if rule.rule_name == self.root_rule_name: + root_rule = _resolve(rule) + if rule.rule_name == self.comment_rule_name: + comment_rule = _resolve(rule) + + assert root_rule, "Root rule not found!" + return root_rule, comment_rule + + def visit_rule(self, node, children): + rule_name = children[0] + if len(children) > 2: + retval = Sequence(nodes=children[1:]) + else: + retval = children[1] + + retval.rule_name = rule_name + retval.root = True + + # Keep a map of parser rules for cross reference + # resolving. + self.peg_rules[rule_name] = retval + return retval + + def visit_sequence(self, node, children): + if len(children) > 1: + return Sequence(nodes=children[:]) + else: + # If only one child rule exists reduce. + return children[0] + + def visit_ordered_choice(self, node, children): + if len(children) > 1: + retval = OrderedChoice(nodes=children[:]) + else: + # If only one child rule exists reduce. + retval = children[0] + return retval + + def visit_prefix(self, node, children): + if len(children) == 2: + if children[0] == NOT: + retval = Not() + else: + retval = And() + if type(children[1]) is list: + retval.nodes = children[1] + else: + retval.nodes = [children[1]] + else: + # If there is no optional prefix reduce. + retval = children[0] + + return retval + + def visit_sufix(self, node, children): + if len(children) == 2: + if type(children[0]) is list: + nodes = children[0] + else: + nodes = [children[0]] + if children[1] == ZERO_OR_MORE: + retval = ZeroOrMore(nodes=nodes) + elif children[1] == ONE_OR_MORE: + retval = OneOrMore(nodes=nodes) + elif children[1] == OPTIONAL: + retval = Optional(nodes=nodes) + else: + retval = UnorderedGroup(nodes=nodes[0].nodes) + else: + retval = children[0] + + return retval + + def visit_rule_crossref(self, node, children): + return CrossRef(node.value) + + def visit_regex(self, node, children): + match = _(children[0], ignore_case=self.ignore_case) + match.compile() + return match + + def visit_str_match(self, node, children): + match_str = node.value[1:-1] + + # Scan the string literal, and sequentially match those escape + # sequences which are syntactically valid Python. Attempt to convert + # those, raising ``GrammarError`` for any semantically invalid ones. + def decode_escape(match): + try: + return codecs.decode(match.group(0), "unicode_escape") + except UnicodeDecodeError: + raise GrammarError("Invalid escape sequence '%s'." % + match.group(0)) + match_str = PEG_ESCAPE_SEQUENCES_RE.sub(decode_escape, match_str) + + return StrMatch(match_str, ignore_case=self.ignore_case) + + +class ParserPEG(Parser): + + def __init__(self, language_def, root_rule_name, comment_rule_name=None, + *args, **kwargs): + """ + Constructs parser from textual PEG definition. + + Args: + language_def (str): A string describing language grammar using + PEG notation. + root_rule_name(str): The name of the root rule. + comment_rule_name(str): The name of the rule for comments. + """ + super(ParserPEG, self).__init__(*args, **kwargs) + self.root_rule_name = root_rule_name + self.comment_rule_name = comment_rule_name + + # PEG Abstract Syntax Graph + self.parser_model, self.comments_model = self._from_peg(language_def) + # Comments should be optional and there can be more of them + if self.comments_model: + self.comments_model.root = True + self.comments_model.rule_name = comment_rule_name + + # In debug mode export parser model to dot for + # visualization + if self.debug: + from arpeggio.export import PMDOTExporter + root_rule = self.parser_model.rule_name + PMDOTExporter().exportFile( + self.parser_model, "{}_peg_parser_model.dot".format(root_rule)) + + def _parse(self): + return self.parser_model.parse(self) + + def _from_peg(self, language_def): + parser = ParserPython(peggrammar, comment, reduce_tree=False, + debug=self.debug) + parser.root_rule_name = self.root_rule_name + parse_tree = parser.parse(language_def) + + return visit_parse_tree(parse_tree, PEGVisitor(self.root_rule_name, + self.comment_rule_name, + self.ignore_case, + debug=self.debug)) diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__init__.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..2728352 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_decorator_combine.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_decorator_combine.cpython-312.pyc new file mode 100644 index 0000000..092b2a5 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_decorator_combine.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_default_semantic_action.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_default_semantic_action.cpython-312.pyc new file mode 100644 index 0000000..f26892c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_default_semantic_action.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_eolterm.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_eolterm.cpython-312.pyc new file mode 100644 index 0000000..288301c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_eolterm.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_error_reporting.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_error_reporting.cpython-312.pyc new file mode 100644 index 0000000..7826a17 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_error_reporting.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_examples.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_examples.cpython-312.pyc new file mode 100644 index 0000000..9bd1c7c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_examples.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_exporter.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_exporter.cpython-312.pyc new file mode 100644 index 0000000..57a6787 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_exporter.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_flags.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_flags.cpython-312.pyc new file mode 100644 index 0000000..e6858b3 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_flags.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_parser_params.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_parser_params.cpython-312.pyc new file mode 100644 index 0000000..2fea707 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_parser_params.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_parser_resilience.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_parser_resilience.cpython-312.pyc new file mode 100644 index 0000000..d0fc1e2 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_parser_resilience.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_parsing_expressions.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_parsing_expressions.cpython-312.pyc new file mode 100644 index 0000000..55f4e6e Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_parsing_expressions.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_pathologic_models.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_pathologic_models.cpython-312.pyc new file mode 100644 index 0000000..e3be1d4 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_pathologic_models.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_peg_parser.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_peg_parser.cpython-312.pyc new file mode 100644 index 0000000..3184bfe Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_peg_parser.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_position.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_position.cpython-312.pyc new file mode 100644 index 0000000..433e83a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_position.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_ptnode_navigation_expressions.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_ptnode_navigation_expressions.cpython-312.pyc new file mode 100644 index 0000000..9b0a5e1 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_ptnode_navigation_expressions.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_python_parser.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_python_parser.cpython-312.pyc new file mode 100644 index 0000000..4a46d68 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_python_parser.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_reduce_tree.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_reduce_tree.cpython-312.pyc new file mode 100644 index 0000000..41518a8 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_reduce_tree.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_semantic_action_results.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_semantic_action_results.cpython-312.pyc new file mode 100644 index 0000000..e65cb87 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_semantic_action_results.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_separators.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_separators.cpython-312.pyc new file mode 100644 index 0000000..c3edab3 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_separators.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_sequence_params.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_sequence_params.cpython-312.pyc new file mode 100644 index 0000000..c133756 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_sequence_params.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_suppression.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_suppression.cpython-312.pyc new file mode 100644 index 0000000..6b4fded Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_suppression.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_unicode.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_unicode.cpython-312.pyc new file mode 100644 index 0000000..d5d4d30 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_unicode.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_visitor.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_visitor.cpython-312.pyc new file mode 100644 index 0000000..5488e4a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/__pycache__/test_visitor.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/__init__.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..93783c1 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/__pycache__/test_direct_rule_call.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/__pycache__/test_direct_rule_call.cpython-312.pyc new file mode 100644 index 0000000..cd60413 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/__pycache__/test_direct_rule_call.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/__pycache__/test_memoization.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/__pycache__/test_memoization.cpython-312.pyc new file mode 100644 index 0000000..0fb83f6 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/__pycache__/test_memoization.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_16/__init__.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_16/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_16/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_16/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..34ee0d5 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_16/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_16/__pycache__/test_issue_16.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_16/__pycache__/test_issue_16.cpython-312.pyc new file mode 100644 index 0000000..9ea98dd Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_16/__pycache__/test_issue_16.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_16/test_issue_16.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_16/test_issue_16.py new file mode 100644 index 0000000..58d7d3b --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_16/test_issue_16.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +from __future__ import absolute_import, unicode_literals, print_function + +import pytest +from arpeggio.cleanpeg import ParserPEG + +input = """\ +add($args[$i]); + } + + public function __get( $name = null ) { + return $this->self[$name]; + } + + public function add( $name = null, $enum = null ) { + if( isset($enum) ) + $this->self[$name] = $enum; + else + $this->self[$name] = end($this->self) + 1; + } + + +""" + +grammar = r""" + +calc = test + +test = visibility ws* function_keyword ws* word ws* arguments* ws* +function = visibility "function" word arguments block +block = "{" ws* r'[^}]*' ws* "}" +arguments = "(" ws* argument* ws* ")" + +// $types = array("cappuccino") +// arguments end with optional comma +argument = ( byvalue / byreference ) ("=" value )* ","* +byreference = "&" byvalue +byvalue = variable + +// value may be variable or array or string or any php type +value = variable + +visibility = "public" / "protected" / "private" +function_keyword = "function" + +variable = "$" literal r'[a-zA-Z0-9_]*' +word = r'[a-zA-Z0-9_]+' +literal = r'[a-zA-Z]+' + +comment = r'("//.*")|("/\*.*\*/")' +symbol = r'[\W]+' + +anyword = r'[\w]*' ws* +ws = r'[\s]+' + + +""" + + +def argument(parser, node, children): + """ + Removes parenthesis if exists and returns what was contained inside. + """ + print(children) + + if len(children) == 1: + print(children[0]) + return children[0] + + sign = -1 if children[0] == '-' else 1 + + return sign * children[-1] + +# Rules are mapped to semantic actions +sem_actions = { + "argument": argument, +} + + +def test_issue_16(): + + parser = ParserPEG(grammar, "calc", skipws=False) + + input_expr = """public function __construct( )""" + parse_tree = parser.parse(input_expr) + + # Do semantic analysis. Do not use default actions. + asg = parser.getASG(sem_actions=sem_actions, defaults=False) + + assert asg diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_20/__init__.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_20/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_20/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_20/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..fe74506 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_20/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_20/__pycache__/test_issue_20.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_20/__pycache__/test_issue_20.cpython-312.pyc new file mode 100644 index 0000000..33b196d Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_20/__pycache__/test_issue_20.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_20/test_issue_20.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_20/test_issue_20.py new file mode 100644 index 0000000..125c456 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_20/test_issue_20.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_optional_in_choice +# Purpose: Optional matches always succeeds but should not stop alternative +# probing on failed match. +# Author: Igor R. Dejanović +# Copyright: (c) 2015 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals + +# Grammar +from arpeggio import ParserPython, Optional, EOF + +def g(): return [Optional('first'), Optional('second'), Optional('third')], EOF + + +def test_optional_in_choice(): + parser = ParserPython(g) + input_str = "second" + parse_tree = parser.parse(input_str) + assert parse_tree is not None diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/__init__.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..d504053 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/__pycache__/test_issue_22.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/__pycache__/test_issue_22.cpython-312.pyc new file mode 100644 index 0000000..d2d430c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/__pycache__/test_issue_22.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/grammar1.peg b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/grammar1.peg new file mode 100644 index 0000000..1b95c6e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/grammar1.peg @@ -0,0 +1,17 @@ +number_token = r'(\d+|\d+\.\d*|\d*\.\d+)' +identifier_token = r'[a-zA-Z_][a-zA-Z0-9_]*' + +unqualified_identifier_expression = identifier_token +qualified_identifier_expression = identifier_token ( "." identifier_token )* + +unary_expression = number_token / qualified_identifier_expression + +method_call_expression = qualified_identifier_expression "(" ( rvalue_expression ( "," rvalue_expression )* )? ")" +collection_index_expression = qualified_identifier_expression "[" rvalue_expression ( "," rvalue_expression )* "]" + +lvalue_expression = qualified_identifier_expression +rvalue_expression = collection_index_expression / method_call_expression / unary_expression + +expression = collection_index_expression / method_call_expression / unary_expression + +belang = expression* EOF diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/grammar2.peg b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/grammar2.peg new file mode 100644 index 0000000..ebdc962 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/grammar2.peg @@ -0,0 +1,17 @@ +number_token = r'(\d+|\d+\.\d*|\d*\.\d+)' +identifier_token = r'[a-zA-Z_][a-zA-Z0-9_]*' + +qualified_identifier_expression = identifier_token ( "." identifier_token )* + +unary_expression = number_token / qualified_identifier_expression + +lvalue_expression = qualified_identifier_expression +rvalue_expression = expression + +expression = compound_expression / unary_expression +compound_expression = qualified_identifier_expression (method_call_par / index_par)+ + +method_call_par = "(" (rvalue_expression ("," rvalue_expression)* )? ")" +index_par = "[" rvalue_expression ("," rvalue_expression)* "]" + +belang = expression* EOF diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/test_issue_22.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/test_issue_22.py new file mode 100644 index 0000000..09a4c94 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_22/test_issue_22.py @@ -0,0 +1,19 @@ +import os +from arpeggio.cleanpeg import ParserPEG + + +def test_issue_22(): + """ + Infinite recursion during resolving of a grammar given in a clean PEG + notation. + """ + current_dir = os.path.dirname(__file__) + + grammar1 = open(os.path.join(current_dir, 'grammar1.peg')).read() + parser1 = ParserPEG(grammar1, 'belang') + parser1.parse('a [0]') + parser1.parse('a (0)') + + grammar2 = open(os.path.join(current_dir, 'grammar2.peg')).read() + parser2 = ParserPEG(grammar2, 'belang', debug=True) + parser2.parse('a [0](1)[2]') diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_26/__init__.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_26/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_26/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_26/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..c65543a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_26/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_26/__pycache__/test_issue_26.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_26/__pycache__/test_issue_26.cpython-312.pyc new file mode 100644 index 0000000..1e09278 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_26/__pycache__/test_issue_26.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_26/test_issue_26.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_26/test_issue_26.py new file mode 100644 index 0000000..39fa32c --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_26/test_issue_26.py @@ -0,0 +1,13 @@ +from arpeggio.cleanpeg import ParserPEG + +def test_regex_with_empty_successful_match_in_repetition(): + grammar = \ + """ + rule = (subexpression)+ + subexpression = r'^.*$' + """ + parser = ParserPEG(grammar, "rule") + parsed = parser.parse("something simple") + + assert parsed.rule_name == "rule" + assert parsed.subexpression.rule_name == "subexpression" diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_31/__init__.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_31/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_31/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_31/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..13284b2 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_31/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_31/__pycache__/test_issue_31.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_31/__pycache__/test_issue_31.cpython-312.pyc new file mode 100644 index 0000000..dbb1892 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_31/__pycache__/test_issue_31.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_31/test_issue_31.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_31/test_issue_31.py new file mode 100644 index 0000000..977aa6c --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_31/test_issue_31.py @@ -0,0 +1,17 @@ +from __future__ import unicode_literals +from arpeggio import ParserPython, ZeroOrMore + + +def test_empty_nested_parse(): + + def grammar(): return [first] + def first(): return ZeroOrMore("second") + + parser = ParserPython(grammar) + + # Parse tree will be empty + # as nothing will be parsed + tree = parser.parse("something") + + assert not tree + diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_32/__init__.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_32/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_32/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_32/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..0e6bbb5 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_32/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_32/__pycache__/test_issue_32.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_32/__pycache__/test_issue_32.cpython-312.pyc new file mode 100644 index 0000000..43f87b3 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_32/__pycache__/test_issue_32.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_32/test_issue_32.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_32/test_issue_32.py new file mode 100644 index 0000000..2ef7ab1 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_32/test_issue_32.py @@ -0,0 +1,242 @@ +# -*- coding: utf-8 -*- + +# Test github issue 32: ensure that Python-style escape sequences in peg and +# cleanpeg grammars are properly converted, and ensure that escaping of those +# sequences works as well. + +from __future__ import print_function +import re +import sys + +import pytest + +import arpeggio +from arpeggio.cleanpeg import ParserPEG as ParserCleanPEG +from arpeggio.peg import ParserPEG + + +def check_parser(grammar, text): + """Test that the PEG parsers correctly parse a grammar and match the given + text. Test both the peg and cleanpeg parsers. Raise an exception if the + grammar parse failed, and returns False if the match fails. Otherwise, + return True. + + Parameters: + grammar -- Not the full grammar, but just the PEG expression for a string + literal or regex match, e.g. "'x'" to match an x. + text -- The text to test against the grammar for a match. + """ + # test the peg parser + parser = ParserPEG('top <- ' + grammar + ' EOF;', 'top', skipws=False) + if parser.parse(text) is None: + return False + + # test the cleanpeg parser + parser = ParserCleanPEG('top = ' + grammar + ' EOF', 'top', skipws=False) + if parser.parse(text) is None: + return False + + return True + + +def check_regex(grammar, text): + """Before calling check_parser(), verify that the regular expression + given in ``grammar`` matches ``text``. Only works for single regexs. + """ + if not re.match(eval(grammar).strip() + '$', text): + return False + return check_parser(grammar, text) + + +# ==== Make sure things are working as expected. ==== + +def test_harness(): + assert check_parser(r"'x'", 'x') + with pytest.raises(arpeggio.NoMatch): + check_parser(r"'x'", 'y') + with pytest.raises(arpeggio.NoMatch): + check_parser(r"'x'", 'xx') + assert check_parser(r"'x' 'y'", 'xy') + assert check_parser(r"'\''", "'") + assert check_regex(r"r'x'", 'x') + + +# ==== Check things that were broken in arpeggio 1.5 @ commit 25dae48 ==== + +# ---- string literal quoting ---- + +def test_literal_quoting_1(): + # this happens to work in 25dae48 if there are no subsequent single quotes + # in the grammar: + assert check_parser(r"'\\'", '\\') + # add subsequent single quotes and it fails: + assert check_parser(r""" '\\' 'x' """, '\\x') + + +def test_literal_quoting_2(): + # this grammar should fail to parse, but passes on 25dae48: + with pytest.raises(arpeggio.NoMatch): + check_parser(r""" '\\'x' """, r"\'x") + + +def test_literal_quoting_3(): + # escaping double quotes within double-quoted strings was not implemented + # in 25dae48: + assert check_parser(r''' "x\"y" ''', 'x"y') + + +# ---- now repeat the above section with single and double quotes swapped ---- + +def test_literal_quoting_4(): + assert check_parser(r'"\\"', '\\') + assert check_parser(r''' "\\" "x" ''', '\\x') + + +def test_literal_quoting_5(): + with pytest.raises(arpeggio.NoMatch): + check_parser(r''' "\\"x" ''', r'\"x') + + +def test_literal_quoting_6(): + assert check_parser(r""" 'x\'y' """, "x'y") + + +# ---- regular expression quoting ---- + +# Because arpeggio has treated regular expressions in PEG grammars most +# nearly like raw strings, the tests below expect the peg and cleanpeg +# grammars to behave such that "rule <- r'';" will match the +# same text as the Python expression "re.match(r'')". +# +# This can be a little surprising at times, since Python's handling of +# quotes inside raw strings is somewhat odd. Raw strings "treat backslashes +# as literal characters"[1], yet a backslash also functions as an escape +# character before certain characters: +# - before quotes inside a string (e.g. "r'x\'x'" is accepted as the +# string "x\'x"), +# - before another backslash (e.g. "r'x\\'x'" fails with a syntax error, +# while "r'x\\x' is accepted as the string "x\\x"), and +# - similarly before a newline. +# +# [1] https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals + +def test_regex_quoting_1(): + assert check_regex(r"r'\\'", '\\') + assert check_regex(r'r"\\"', '\\') + assert check_parser(r""" r'\\' r'x' """, '\\x') + assert check_parser(r''' r"\\" r"x" ''', '\\x') + + +def test_regex_quoting_2(): + with pytest.raises(arpeggio.NoMatch): + check_parser(r""" r'\\' ' """, "\\' ") + with pytest.raises(arpeggio.NoMatch): + check_parser(r''' r"\\" " ''', '\\" ') + + +def test_regex_quoting_3(): + assert check_regex(r""" r'x\'y' """, "x'y") + assert check_regex(r''' r"x\"y" ''', 'x"y') + + +# ---- string literal escape sequence translation ---- + +def test_broken_escape_translation(): + # 25dae48 would translate this as 'newline-newline', not 'backslash-n-newline'. + assert check_parser(r"'\\n\n'", '\\n\n') + assert check_parser(r"'\\t\t'", '\\t\t') + + +def test_multiple_backslash_sequences(): + assert check_parser(r"'\\n'", '\\n') # backslash-n + assert check_parser(r"'\\\n'", '\\\n') # backslash-newline + assert check_parser(r"'\\\\n'", '\\\\n') # backslash-backslash-n + assert check_parser(r"'\\\\\n'", '\\\\\n') # backslash-backslash-newline + + +# ==== Check newly-implemented escape sequences ==== + +def test_single_character_escapes(): + # make sure parsing across newlines works, otherwise the following + # backslash-newline test won't work: + assert check_parser(" \n 'x' \n ", 'x') + # a compact test is clearer for failure diagnosis: + assert check_parser("'x\\\ny'", 'xy') # backslash-newline + # but this would probably only be used like so: + assert check_parser(""" 'extremely_\ +long_\ +match' """, 'extremely_long_match') + + # the remaining single-character escapes: + assert check_parser(r'"\\"', '\\') # \\ + assert check_parser(r"'\''", "'") # \' + assert check_parser("'\\\"'", '"') # \" + assert check_parser(r"'\a'", '\a') + assert check_parser(r"'\b'", '\b') + assert check_parser(r"'\f'", '\f') + assert check_parser(r"'\n'", '\n') + assert check_parser(r"'\r'", '\r') + assert check_parser(r"'\t'", '\t') + assert check_parser(r"'\v'", '\v') + + # unrecognized escape sequences *are not changed* + assert check_parser(r"'\x'", '\\x') + + +def test_octal_escapes(): + assert check_parser(r"'\7'", '\7') + assert check_parser(r"'\41'", '!') + assert check_parser(r"'\101'", 'A') + assert check_parser(r"'\1001'", '@1') # too long + + +def test_hexadecimal_escapes(): + assert check_parser(r"'\x41'", 'A') + assert check_parser(r"'\x4A'", 'J') + assert check_parser(r"'\x4a'", 'J') + assert check_parser(r"'\x__'", '\\x__') # too short + assert check_parser(r"'\x1_'", '\\x1_') # too short + assert check_parser(r"'\x411'", 'A1') # too long + + +def test_small_u_unicode_escapes(): + assert check_parser(r"'\u0041'", 'A') + assert check_parser(r"'\u004A'", 'J') + assert check_parser(r"'\u004a'", 'J') + assert check_parser(r"'\u____'", '\\u____') # too short + assert check_parser(r"'\u1___'", '\\u1___') # too short + assert check_parser(r"'\u41__'", '\\u41__') # too short + assert check_parser(r"'\u041_'", '\\u041_') # too short + assert check_parser(r"'\u00411'", 'A1') # too long + + +def test_big_u_unicode_escapes(): + assert check_parser(r"'\U00000041'", 'A') + assert check_parser(r"'\U0000004A'", 'J') + assert check_parser(r"'\U0000004a'", 'J') + assert check_parser(r"'\U________'", '\\U________') # too short + assert check_parser(r"'\U1_______'", '\\U1_______') # too short + assert check_parser(r"'\U41______'", '\\U41______') # too short + assert check_parser(r"'\U041_____'", '\\U041_____') # too short + assert check_parser(r"'\U0041____'", '\\U0041____') # too short + assert check_parser(r"'\U00041___'", '\\U00041___') # too short + assert check_parser(r"'\U000041__'", '\\U000041__') # too short + assert check_parser(r"'\U0000041_'", '\\U0000041_') # too short + assert check_parser(r"'\U000000411'", 'A1') # too long + with pytest.raises(arpeggio.GrammarError): + check_parser(r"'\U00110000'", '?') # out-of-range + + +def test_unicode_name_escapes(): + assert check_parser(r"'\N{LATIN SMALL LETTER B}'", 'b') + + if sys.version_info >= (3, 3): + # check that Unicode name aliases work as well + assert check_parser(r"'\N{LATIN CAPITAL LETTER GHA}'", '\u01a2') + + with pytest.raises(arpeggio.GrammarError): + check_parser(r"'\N{NOT A VALID NAME}'", '\\N{NOT A VALID NAME}') + + # This shouldn't raise, because it shouldn't pass the valid-escape filter: + assert check_parser(r"'\N{should not match filter regex!}'", + '\\N{should not match filter regex!}') diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_43/__init__.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_43/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_43/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_43/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..6111821 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_43/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_43/__pycache__/test_issue43.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_43/__pycache__/test_issue43.cpython-312.pyc new file mode 100644 index 0000000..5b5630a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_43/__pycache__/test_issue43.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_43/test_issue43.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_43/test_issue43.py new file mode 100644 index 0000000..a4cf22f --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_43/test_issue43.py @@ -0,0 +1,31 @@ +""" +See https://github.com/textX/Arpeggio/issues/43 +""" +from arpeggio.cleanpeg import ParserPEG + + +def try_grammer(peg): + p = ParserPEG(peg, 'letters', debug=False) + p.parse(""" { a b } """) + p.parse(""" { b a } """) + + +def test_plain_grammar(): + try_grammer(""" + letters = "{" ("a" "b")# "}" + n = "9" + """) + + +def test_bs_at_eol(): + try_grammer(""" + letters = "{" ("a" "b")# "}" \ + n = "9" + """) + + +def test_move_unordered_group_to_last_line_in_grammar(): + try_grammer(""" + n = "9" + letters = "{" ("a" "b")# "}" \ + """) diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_61/__pycache__/test_issue_61.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_61/__pycache__/test_issue_61.cpython-312.pyc new file mode 100644 index 0000000..57eeeca Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_61/__pycache__/test_issue_61.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_61/test_issue_61.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_61/test_issue_61.py new file mode 100644 index 0000000..950cd62 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_61/test_issue_61.py @@ -0,0 +1,48 @@ +from __future__ import unicode_literals +import pytest +from arpeggio import ParserPython, ZeroOrMore, Sequence, OrderedChoice, \ + EOF, NoMatch + + +def test_ordered_choice_skipws_ws(): + + # Both rules will skip white-spaces + def sentence(): + return Sequence(ZeroOrMore(word), skipws=True), EOF + + def word(): + return OrderedChoice([(id, ' ', '.'), id, '.'], skipws=True) + + def id(): + return 'id' + + parser = ParserPython(sentence) + + # Thus this parses without problem + # But the length is always 3 + EOF == 4 + # First alternative of word rule never matches + tree = parser.parse("id id .") + assert len(tree) == 4 + tree = parser.parse("id id.") + assert len(tree) == 4 + tree = parser.parse("idid.") + assert len(tree) == 4 + tree = parser.parse("idid .") + assert len(tree) == 4 + + # Now we change skipws flag + def word(): # noqa + return OrderedChoice([(id, ' ', '.'), id, '.'], skipws=False) + + parser = ParserPython(sentence) + + with pytest.raises(NoMatch): + # This can't parse anymore + parser.parse("id id .") + + tree = parser.parse("idid.") + assert len(tree) == 4 + # This is the case where 'id .' will be matched by the first alternative of + # word as there is no ws skipping + tree = parser.parse("idid .") + assert len(tree) == 3 diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_73/__pycache__/test_issue_73.cpython-312.pyc b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_73/__pycache__/test_issue_73.cpython-312.pyc new file mode 100644 index 0000000..1c48f92 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_73/__pycache__/test_issue_73.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_73/test_issue_73.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_73/test_issue_73.py new file mode 100644 index 0000000..944e8a0 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/issue_73/test_issue_73.py @@ -0,0 +1,33 @@ +from __future__ import unicode_literals +import pytest +from arpeggio import ParserPython, UnorderedGroup, Optional, \ + EOF, NoMatch + + +def test_nondeterministic_unordered_group(): + + def root(): + return 'word1', UnorderedGroup(some_rule, 'word2', some_rule), EOF + + def some_rule(): + return Optional('word2'), Optional('word3') + + content = '''word1 word2 ''' + + # If the 'word2' from unordered group in the `root` rule matches first + # the input parses, else it fails. + # We repeat parser construction and parsing many times to check + # if it fails every time. The current fix will iterate in order from left + # to right and repeat matching until all rules in a unordered group + # succeeds. + fail = 0 + success = 0 + for _ in range(100): + try: + parser = ParserPython(root) + parser.parse(content) + success += 1 + except NoMatch: + fail += 1 + + assert fail == 100 diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/test_direct_rule_call.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/test_direct_rule_call.py new file mode 100644 index 0000000..09650ca --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/test_direct_rule_call.py @@ -0,0 +1,31 @@ +from __future__ import unicode_literals +import pytest +from arpeggio import SemanticAction, ParserPython + +def test_direct_rule_call(): + ''' + Test regression where in direct rule call semantic action is + erroneously attached to both caller and callee. + ''' + + def grammar(): return rule1, rule2 + def rule1(): return "a" + def rule2(): return rule1 + + call_count = [0] + + class DummySemAction(SemanticAction): + def first_pass(self, parser, node, nodes): + call_count[0] += 1 + return SemanticAction.first_pass(self, parser, node, nodes) + + # Sem action is attached to rule2 only but + # this bug will attach it to rule1 also resulting in + # wrong call count. + rule2.sem = DummySemAction() + + parser = ParserPython(grammar) + parse_tree = parser.parse("aa") + parser.getASG() + + assert call_count[0] == 1, "Semantic action should be called once!" diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/test_memoization.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/test_memoization.py new file mode 100644 index 0000000..6b5fa2e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/regressions/test_memoization.py @@ -0,0 +1,52 @@ +from __future__ import unicode_literals +import pytest +import sys +from arpeggio import ParserPython + + +def test_memoization_positive(capsys): + ''' + Test that already matched rule is found in the cache on + subsequent matches. + Args: + capsys - pytest fixture for output capture + ''' + + def grammar(): return [(rule1, ruleb), (rule1, rulec)] + def rule1(): return rulea, ruleb + def rulea(): return "a" + def ruleb(): return "b" + def rulec(): return "c" + + parser = ParserPython(grammar, memoization=True, debug=True) + + # Parse input where a rule1 will match but ruleb will fail + # Second sequence will try rule1 again on the same location + # and result should be found in the cache. + parse_tree = parser.parse("a b c") + + # Assert that cached result is used + assert "Cache hit" in capsys.readouterr()[0] + assert parser.cache_hits == 1 + assert parser.cache_misses == 4 + +def test_memoization_nomatch(capsys): + ''' + Test that already failed match is found in the cache on + subsequent matches. + ''' + + def grammar(): return [(rule1, ruleb), [rule1, rulec]] + def rule1(): return rulea, ruleb + def rulea(): return "a" + def ruleb(): return "b" + def rulec(): return "c" + + parser = ParserPython(grammar, memoization=True, debug=True) + parse_tree = parser.parse("c") + + assert "Cache hit for [rule1=Sequence, 0] = '0'" in capsys.readouterr()[0] + assert parser.cache_hits == 1 + assert parser.cache_misses == 4 + + diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_decorator_combine.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_decorator_combine.py new file mode 100644 index 0000000..1525ec3 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_decorator_combine.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_decorator_combine +# Purpose: Test for Combine decorator. Combine decorator +# results in Terminal parse tree node. Whitespaces are +# preserved (they are not skipped) and comments are not matched. +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest +from arpeggio import ParserPython, ZeroOrMore, OneOrMore, NonTerminal, \ + Terminal, NoMatch, Combine + + +def test_combine_python(): + + # This will result in NonTerminal node + def root(): + return my_rule(), "." + + # This will result in Terminal node + def my_rule(): + return Combine(ZeroOrMore("a"), OneOrMore("b")) + + parser = ParserPython(root) + + input1 = "abbb." + + # Whitespaces are preserved in lexical rules so the following input + # should not be recognized. + input2 = "a b bb." + + ptree1 = parser.parse(input1) + + with pytest.raises(NoMatch): + parser.parse(input2) + + assert isinstance(ptree1, NonTerminal) + assert isinstance(ptree1[0], Terminal) + assert ptree1[0].value == "abbb" diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_default_semantic_action.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_default_semantic_action.py new file mode 100644 index 0000000..2efc65c --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_default_semantic_action.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_default_semantic_action +# Purpose: Default semantic action is applied during semantic analysis +# if no action is given for node type. Default action converts +# terminals to strings, remove StrMatch terminals from sequences. +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest # noqa +from arpeggio import ParserPython, SemanticAction, ParseTreeNode +from arpeggio import RegExMatch as _ + +try: + # For python 2.x + text=unicode +except: + # For python 3.x + text=str + +def grammar(): return parentheses, 'strmatch' +def parentheses(): return '(', rulea, ')' +def rulea(): return ['+', '-'], number +def number(): return _(r'\d+') + + +p_removed = False +number_str = False +parse_tree_node = False + + +class ParenthesesSA(SemanticAction): + def first_pass(self, parser, node, children): + global p_removed, parse_tree_node + p_removed = text(children[0]) != '(' + parse_tree_node = isinstance(children[0], ParseTreeNode) + return children[0] if len(children) == 1 else children[1] + + +class RuleSA(SemanticAction): + def first_pass(self, parser, node, children): + global number_str + number_str = type(children[1]) == text + return children[1] + + +parentheses.sem = ParenthesesSA() +rulea.sem = RuleSA() + + +def test_default_action_enabled(): + + parser = ParserPython(grammar) + + parser.parse('(-34) strmatch') + + parser.getASG(defaults=True) + + assert p_removed + assert number_str + assert not parse_tree_node + + +def test_default_action_disabled(): + + parser = ParserPython(grammar) + + parser.parse('(-34) strmatch') + + parser.getASG(defaults=False) + + assert not p_removed + assert not number_str + assert parse_tree_node diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_eolterm.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_eolterm.py new file mode 100644 index 0000000..8ed1fc8 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_eolterm.py @@ -0,0 +1,39 @@ +from __future__ import unicode_literals +import pytest # noqa + +# Grammar +from arpeggio import ZeroOrMore, OneOrMore, ParserPython, EOF + + +def test_zeroormore_eolterm(): + + def grammar(): return first, second, EOF + def first(): return ZeroOrMore(["a", "b"], eolterm=True) + def second(): return "a" + + # first rule should match only first line + # so that second rule will match "a" on the new line + input = """a a b a b b + a""" + + parser = ParserPython(grammar, reduce_tree=False) + result = parser.parse(input) + + assert result + + +def test_oneormore_eolterm(): + + def grammar(): return first, second, EOF + def first(): return OneOrMore(["a", "b"], eolterm=True) + def second(): return "a" + + # first rule should match only first line + # so that second rule will match "a" on the new line + input = """a a a b a + a""" + + parser = ParserPython(grammar, reduce_tree=False) + result = parser.parse(input) + + assert result diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_error_reporting.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_error_reporting.py new file mode 100644 index 0000000..eb66c40 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_error_reporting.py @@ -0,0 +1,223 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_error_reporting +# Purpose: Test error reporting for various cases. +# Author: Igor R. Dejanović +# Copyright: (c) 2015 Igor R. Dejanović +# License: MIT License +####################################################################### +from __future__ import unicode_literals +import pytest + +from arpeggio import Optional, Not, ParserPython, NoMatch, EOF +from arpeggio import RegExMatch as _ + + +def test_non_optional_precedence(): + """ + Test that all tried match at position are reported. + """ + def grammar(): + return Optional('a'), 'b' + + parser = ParserPython(grammar) + + with pytest.raises(NoMatch) as e: + parser.parse('c') + assert "Expected 'a' or 'b'" in str(e.value) + assert (e.value.line, e.value.col) == (1, 1) + + def grammar(): + return ['b', Optional('a')] + + parser = ParserPython(grammar) + + with pytest.raises(NoMatch) as e: + parser.parse('c') + + assert "Expected 'b'" in str(e.value) + assert (e.value.line, e.value.col) == (1, 1) + + +def test_optional_with_better_match(): + """ + Test that optional match that has gone further in the input stream + has precedence over non-optional. + """ + + def grammar(): return [first, Optional(second)] + def first(): return 'one', 'two', 'three', '4' + def second(): return 'one', 'two', 'three', 'four', 'five' + + parser = ParserPython(grammar) + + with pytest.raises(NoMatch) as e: + parser.parse('one two three four 5') + + assert "Expected 'five'" in str(e.value) + assert (e.value.line, e.value.col) == (1, 20) + + +def test_alternative_added(): + """ + Test that matches from alternative branches at the same positiona are + reported. + """ + + def grammar(): + return ['one', 'two'], _(r'\w+') + + parser = ParserPython(grammar) + + with pytest.raises(NoMatch) as e: + parser.parse(' three ident') + assert "Expected 'one' or 'two'" in str(e.value) + assert (e.value.line, e.value.col) == (1, 4) + + +def test_file_name_reporting(): + """ + Test that if parser has file name set it will be reported. + """ + + def grammar(): return Optional('a'), 'b', EOF + + parser = ParserPython(grammar) + + with pytest.raises(NoMatch) as e: + parser.parse("\n\n a c", file_name="test_file.peg") + assert "Expected 'b' at position test_file.peg:(3, 6)" in str(e.value) + assert (e.value.line, e.value.col) == (3, 6) + + +def test_comment_matching_not_reported(): + """ + Test that matching of comments is not reported. + """ + + def grammar(): return Optional('a'), 'b', EOF + def comments(): return _(r'//.*$') + + parser = ParserPython(grammar, comments) + + with pytest.raises(NoMatch) as e: + parser.parse('\n\n a // This is a comment \n c') + assert "Expected 'b' at position (4, 2)" in str(e.value) + assert (e.value.line, e.value.col) == (4, 2) + + +def test_not_match_at_beginning(): + """ + Test that matching of Not ParsingExpression is not reported in the + error message. + """ + + def grammar(): + return Not('one'), _(r'\w+') + + parser = ParserPython(grammar) + + with pytest.raises(NoMatch) as e: + parser.parse(' one ident') + assert "Not expected input" in str(e.value) + + +def test_not_match_as_alternative(): + """ + Test that Not is not reported if a part of OrderedChoice. + """ + + def grammar(): + return ['one', Not('two')], _(r'\w+') + + parser = ParserPython(grammar) + + with pytest.raises(NoMatch) as e: + parser.parse(' three ident') + assert "Expected 'one' at " in str(e.value) + + +def test_sequence_of_nots(): + """ + Test that sequence of Not rules is handled properly. + """ + + def grammar(): + return Not('one'), Not('two'), _(r'\w+') + + parser = ParserPython(grammar) + + with pytest.raises(NoMatch) as e: + parser.parse(' two ident') + assert "Not expected input" in str(e.value) + + +def test_compound_not_match(): + """ + Test a more complex Not match error reporting. + """ + def grammar(): + return [Not(['two', 'three']), 'one', 'two'], _(r'\w+') + + parser = ParserPython(grammar) + + with pytest.raises(NoMatch) as e: + parser.parse(' three ident') + assert "Expected 'one' or 'two' at" in str(e.value) + + with pytest.raises(NoMatch) as e: + parser.parse(' four ident') + assert "Expected 'one' or 'two' at" in str(e.value) + + +# HACK: Disabled just for this bugfix release as this require new handling of +# infallibles +def _test_not_succeed_in_ordered_choice(): + """ + Test that Not can succeed in ordered choice leading to ordered choice + to succeed. + See: https://github.com/textX/Arpeggio/issues/96 + """ + + def grammar(): + return [Not("a"), "a"], Optional("b") + + parser = ParserPython(grammar) + parser.parse('b') + + +def test_reporting_newline_symbols_when_not_matched(): + + # A case when a string match has newline + def grammar(): + return "first", "\n" + + parser = ParserPython(grammar, skipws=False) + + with pytest.raises(NoMatch) as e: + _ = parser.parse('first') + + assert "Expected '\\n' at position (1, 6)" in str(e.value) + + # A case when regex match has newline + from arpeggio import RegExMatch + def grammar(): + return "first", RegExMatch("\n") + + parser = ParserPython(grammar, skipws=False) + + with pytest.raises(NoMatch) as e: + _ = parser.parse('first') + + assert "Expected '\\n' at position (1, 6)" in str(e.value) + + # A case when the match is the root rule + def grammar(): + return "root\nrule" + + parser = ParserPython(grammar, skipws=False) + + with pytest.raises(NoMatch) as e: + _ = parser.parse('something') + + assert "Expected grammar at position (1, 1)" in str(e.value) diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_examples.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_examples.py new file mode 100644 index 0000000..3321543 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_examples.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_examples +# Purpose: Test that examples run without errors. +# Author: Igor R. Dejanović +# Copyright: (c) 2014-2015 Igor R. Dejanović +# License: MIT License +####################################################################### +import pytest # noqa +import os +import sys +import glob + +PY_LT_3_5 = sys.version_info < (3, 5) +if PY_LT_3_5: + import imp +else: + import importlib + + +def test_examples(): + + examples_folder = os.path.join(os.path.abspath(os.path.dirname(__file__)), + '..', '..', 'examples') + if not os.path.exists(examples_folder): + print('Warning: Examples not found. Skipping tests.') + return + + examples_pat = os.path.join(examples_folder, '*', '*.py') + + # Filter out __init__.py + examples = [f for f in glob.glob(examples_pat) if f != '__init__.py'] + for e in examples: + example_dir = os.path.dirname(e) + sys.path.insert(0, example_dir) + (module_name, _) = os.path.splitext(os.path.basename(e)) + if PY_LT_3_5: + (module_file, module_path, desc) = \ + imp.find_module(module_name, [example_dir]) + mod = imp.load_module(module_name, module_file, module_path, desc) + else: + mod_spec = importlib.util.spec_from_file_location(module_name, e) + mod = importlib.util.module_from_spec(mod_spec) + mod_spec.loader.exec_module(mod) + + if hasattr(mod, 'main'): + mod.main(debug=False) diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_exporter.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_exporter.py new file mode 100644 index 0000000..65933a4 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_exporter.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_python_parser +# Purpose: Testing the dot exporter. +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest +import os +from arpeggio.export import PMDOTExporter, PTDOTExporter + +# Grammar +from arpeggio import Optional, ZeroOrMore, OneOrMore, EOF, ParserPython +from arpeggio import RegExMatch as _ + + +def number(): return _(r'\d*\.\d*|\d+') +def factor(): return Optional(["+","-"]), [number, + ("(", expression, ")")] +def term(): return factor, ZeroOrMore(["*","/"], factor) +def expression(): return term, ZeroOrMore(["+", "-"], term) +def calc(): return OneOrMore(expression), EOF + + +@pytest.fixture +def parser(): + return ParserPython(calc) + + +def test_export_parser_model(parser): + """ + Testing parser model export + """ + + PMDOTExporter().exportFile(parser.parser_model, + "test_exporter_parser_model.dot") + + assert os.path.exists("test_exporter_parser_model.dot") + + +def test_export_parse_tree(parser): + """ + Testing parse tree export. + """ + + parse_tree = parser.parse("-(4-1)*5+(2+4.67)+5.89/(.2+7)") + PTDOTExporter().exportFile(parse_tree, + "test_exporter_parse_tree.dot") + + assert os.path.exists("test_exporter_parse_tree.dot") diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_flags.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_flags.py new file mode 100644 index 0000000..e83a272 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_flags.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_flags +# Purpose: Test for parser flags +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import re +import pytest + +# Grammar +from arpeggio import ParserPython, Optional, EOF +from arpeggio import RegExMatch as _ +from arpeggio import NoMatch + + +def foo(): return 'r', bar, Optional(qux), baz, Optional(ham), Optional(buz), EOF +def bar(): return 'BAR' +def baz(): return _(r'1\w+') +def buz(): return _(r'Aba*', ignore_case=True) +def qux(): return _(r'/\*.*\*/', multiline=True) +def ham(): return _(r'/\*.*\*/', re_flags=re.DOTALL) # equivalent to qux + + +@pytest.fixture +def parser_ci(): + return ParserPython(foo, ignore_case=True) + + +@pytest.fixture +def parser_nonci(): + return ParserPython(foo, ignore_case=False) + + +def test_parse_tree_ci(parser_ci): + input_str = "R bar 1baz" + parse_tree = parser_ci.parse(input_str) + assert parse_tree is not None + + +def test_parse_tree_nonci(parser_nonci): + input_str = "R bar 1baz" + with pytest.raises(NoMatch): + parser_nonci.parse(input_str) + + +def test_flags_override(parser_nonci): + # Parser is not case insensitive + # But the buz match is. + input_str = "r BAR 1baz abaaaaAAaaa" + parse_tree = parser_nonci.parse(input_str) + assert parse_tree is not None + + +def test_multiline_comment(parser_nonci): + input_str = "r BAR /*1baz\nabaaaaAAaaa\n*/1baz" + parse_tree = parser_nonci.parse(input_str) + assert parse_tree is not None + + +def test_multiline_comment_by_re_flags(parser_nonci): + input_str = "r BAR 1baz/*this\nis\nnot\nparsed*/" + parse_tree = parser_nonci.parse(input_str) + assert parse_tree is not None diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_parser_params.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_parser_params.py new file mode 100644 index 0000000..5c216ed --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_parser_params.py @@ -0,0 +1,109 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_parser_params +# Purpose: Test for parser parameters. +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest +from arpeggio import ParserPython, NoMatch +import sys + + +def test_autokwd(): + """ + autokwd will match keywords on word boundaries. + """ + def grammar(): + return ("one", "two", "three") + + parser = ParserPython(grammar, autokwd=True) + + # If autokwd is enabled this should parse without error. + parser.parse("one two three") + + # But this will not parse because each word to match + # will be, by default, tried to match as a whole word + with pytest.raises(NoMatch): + parser.parse("onetwothree") + + parser = ParserPython(grammar, autokwd=False) + # If we turn off the autokwd than this will match. + parser.parse("one two three") + parser.parse("onetwothree") + + +def test_skipws(): + """ + skipws will skip whitespaces. + """ + + def grammar(): + return ("one", "two", "three") + + parser = ParserPython(grammar) + + # If skipws is on this should parse without error. + parser.parse("one two three") + + # If not the same input will raise exception. + parser = ParserPython(grammar, skipws=False) + with pytest.raises(NoMatch): + parser.parse("one two three") + + +def test_ws(): + """ + ws consists of chars that will be skipped if skipws is enables. + By default it consists of space, tab and newline. + """ + + def grammar(): + return ("one", "two", "three") + + parser = ParserPython(grammar) + + # With default ws this should parse without error + parser.parse("""one + two three""") + + # If we make only a space char to be ws than the + # same input will raise exception. + parser = ParserPython(grammar, ws=" ") + with pytest.raises(NoMatch): + parser.parse("""one + two three""") + + # But if only spaces are between words than it will + # parse. + parser.parse("one two three") + + +def test_file(capsys): + """ + 'file' specifies an output file for the DebugPrinter mixin. + """ + + def grammar(): + return ("one", "two", "three") + + # First use stdout + parser = ParserPython(grammar, debug=True, file=sys.stdout) + out, err = capsys.readouterr() + + parser.dprint('this is stdout') + out, err = capsys.readouterr() + assert out == 'this is stdout\n' + assert err == '' + + # Now use stderr + parser = ParserPython(grammar, debug=False, file=sys.stderr) + out, err = capsys.readouterr() + + parser.dprint('this is stderr') + out, err = capsys.readouterr() + assert out == '' + assert err == 'this is stderr\n' diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_parser_resilience.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_parser_resilience.py new file mode 100644 index 0000000..a7926d7 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_parser_resilience.py @@ -0,0 +1,12 @@ +# coding=utf-8 +from __future__ import unicode_literals, absolute_import +from arpeggio import ParserPython, EOF +import pytest + + +def test_parser_resilience(): + """Tests that arpeggio parsers recover successfully from failure.""" + parser = ParserPython(('findme', EOF)) + with pytest.raises(TypeError): + parser.parse(map) + assert parser.parse(' findme ') is not None diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_parsing_expressions.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_parsing_expressions.py new file mode 100644 index 0000000..aea723a --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_parsing_expressions.py @@ -0,0 +1,397 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_parsing_expressions +# Purpose: Test for parsing expressions. +# Author: Igor R. Dejanović +# Copyright: (c) 2014-2017 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest +from arpeggio import ParserPython, UnorderedGroup, ZeroOrMore, OneOrMore, \ + NoMatch, EOF, Optional, And, Not, StrMatch, RegExMatch + + +def test_sequence(): + + def grammar(): + return ("a", "b", "c") + + parser = ParserPython(grammar) + + parsed = parser.parse("a b c") + + assert str(parsed) == "a | b | c" + assert repr(parsed) == "[ 'a' [0], 'b' [2], 'c' [4] ]" + + +def test_ordered_choice(): + + def grammar(): + return ["a", "b", "c"], EOF + + parser = ParserPython(grammar) + + parsed = parser.parse("b") + + assert str(parsed) == "b | " + assert repr(parsed) == "[ 'b' [0], EOF [1] ]" + + parsed = parser.parse("c") + assert str(parsed) == "c | " + assert repr(parsed) == "[ 'c' [0], EOF [1] ]" + + with pytest.raises(NoMatch): + parser.parse("ab") + + with pytest.raises(NoMatch): + parser.parse("bb") + + +def test_unordered_group(): + + def grammar(): + return UnorderedGroup("a", "b", "c"), EOF + + parser = ParserPython(grammar) + + parsed = parser.parse("b a c") + + assert str(parsed) == "b | a | c | " + assert repr(parsed) == "[ 'b' [0], 'a' [2], 'c' [4], EOF [5] ]" + + with pytest.raises(NoMatch): + parser.parse("a b a c") + + with pytest.raises(NoMatch): + parser.parse("a c") + + with pytest.raises(NoMatch): + parser.parse("b b a c") + + +def test_unordered_group_with_separator(): + + def grammar(): + return UnorderedGroup("a", "b", "c", sep=StrMatch(",")), EOF + + parser = ParserPython(grammar) + + parsed = parser.parse("b, a , c") + + assert str(parsed) == "b | , | a | , | c | " + assert repr(parsed) == \ + "[ 'b' [0], ',' [1], 'a' [3], ',' [5], 'c' [7], EOF [8] ]" + + with pytest.raises(NoMatch): + parser.parse("a, b, a, c") + + with pytest.raises(NoMatch): + parser.parse("a, c") + + with pytest.raises(NoMatch): + parser.parse("b, b, a, c") + + with pytest.raises(NoMatch): + parser.parse(",a, b, c") + + with pytest.raises(NoMatch): + parser.parse("a, b, c,") + + with pytest.raises(NoMatch): + parser.parse("a, ,b, c") + + +def test_unordered_group_with_optionals(): + + def grammar(): + return UnorderedGroup("a", Optional("b"), "c"), EOF + + parser = ParserPython(grammar) + + parsed = parser.parse("b a c") + assert str(parsed) == "b | a | c | " + + parsed = parser.parse("a c b") + assert str(parsed) == "a | c | b | " + + parsed = parser.parse("a c") + assert str(parsed) == "a | c | " + + with pytest.raises(NoMatch): + parser.parse("a b c b") + + with pytest.raises(NoMatch): + parser.parse("a b ") + + +def test_unordered_group_with_optionals_and_separator(): + + def grammar(): + return UnorderedGroup("a", Optional("b"), "c", sep=","), EOF + + parser = ParserPython(grammar) + + parsed = parser.parse("b, a, c") + assert parsed + + parsed = parser.parse("a, c, b") + assert parsed + + parsed = parser.parse("a, c") + assert parsed + + with pytest.raises(NoMatch): + parser.parse("a, b, c, b") + + with pytest.raises(NoMatch): + parser.parse("a, b ") + + with pytest.raises(NoMatch): + parser.parse("a, c, ") + + with pytest.raises(NoMatch): + parser.parse("a, b c ") + + with pytest.raises(NoMatch): + parser.parse(",a, c ") + + +def test_zero_or_more(): + + def grammar(): + return ZeroOrMore("a"), EOF + + parser = ParserPython(grammar) + + parsed = parser.parse("aaaaaaa") + + assert str(parsed) == "a | a | a | a | a | a | a | " + assert repr(parsed) == "[ 'a' [0], 'a' [1], 'a' [2],"\ + " 'a' [3], 'a' [4], 'a' [5], 'a' [6], EOF [7] ]" + + parsed = parser.parse("") + + assert str(parsed) == "" + assert repr(parsed) == "[ EOF [0] ]" + + with pytest.raises(NoMatch): + parser.parse("bbb") + + +def test_zero_or_more_with_separator(): + + def grammar(): + return ZeroOrMore("a", sep=","), EOF + + parser = ParserPython(grammar) + + parsed = parser.parse("a, a , a , a , a,a, a") + + assert str(parsed) == \ + "a | , | a | , | a | , | a | , | a | , | a | , | a | " + assert repr(parsed) == \ + "[ 'a' [0], ',' [1], 'a' [3], ',' [5], 'a' [7], ',' [9], "\ + "'a' [11], ',' [13], 'a' [16], ',' [17], 'a' [18], ',' [19],"\ + " 'a' [21], EOF [22] ]" + + parsed = parser.parse("") + + assert str(parsed) == "" + assert repr(parsed) == "[ EOF [0] ]" + + with pytest.raises(NoMatch): + parser.parse("aa a") + + with pytest.raises(NoMatch): + parser.parse(",a,a ,a") + + with pytest.raises(NoMatch): + parser.parse("a,a ,a,") + + with pytest.raises(NoMatch): + parser.parse("bbb") + + +def test_zero_or_more_with_optional_separator(): + + def grammar(): + return ZeroOrMore("a", sep=RegExMatch(",?")), EOF + + parser = ParserPython(grammar) + + parsed = parser.parse("a, a , a a , a,a, a") + + assert str(parsed) == \ + "a | , | a | , | a | a | , | a | , | a | , | a | " + assert repr(parsed) == \ + "[ 'a' [0], ',' [1], 'a' [3], ',' [5], 'a' [7], "\ + "'a' [11], ',' [13], 'a' [16], ',' [17], 'a' [18], ',' [19],"\ + " 'a' [21], EOF [22] ]" + + parsed = parser.parse("") + + assert str(parsed) == "" + assert repr(parsed) == "[ EOF [0] ]" + + parser.parse("aa a") + + with pytest.raises(NoMatch): + parser.parse(",a,a ,a") + + with pytest.raises(NoMatch): + parser.parse("a,a ,a,") + + with pytest.raises(NoMatch): + parser.parse("bbb") + + +def test_one_or_more(): + + def grammar(): + return OneOrMore("a"), "b" + + parser = ParserPython(grammar) + + parsed = parser.parse("aaaaaa a b") + + assert str(parsed) == "a | a | a | a | a | a | a | b" + assert repr(parsed) == "[ 'a' [0], 'a' [1], 'a' [2],"\ + " 'a' [3], 'a' [4], 'a' [5], 'a' [7], 'b' [10] ]" + + parser.parse("ab") + + with pytest.raises(NoMatch): + parser.parse("") + + with pytest.raises(NoMatch): + parser.parse("b") + + +def test_one_or_more_with_separator(): + + def grammar(): + return OneOrMore("a", sep=","), "b" + + parser = ParserPython(grammar) + + parsed = parser.parse("a, a, a, a b") + + assert str(parsed) == "a | , | a | , | a | , | a | b" + assert repr(parsed) == \ + "[ 'a' [0], ',' [1], 'a' [3], ',' [4], 'a' [6], ',' [7], "\ + "'a' [9], 'b' [12] ]" + + parser.parse("a b") + + with pytest.raises(NoMatch): + parser.parse("") + + with pytest.raises(NoMatch): + parser.parse("b") + + with pytest.raises(NoMatch): + parser.parse("a a b") + + with pytest.raises(NoMatch): + parser.parse("a a, b") + + with pytest.raises(NoMatch): + parser.parse(", a, a b") + + +def test_one_or_more_with_optional_separator(): + + def grammar(): + return OneOrMore("a", sep=RegExMatch(",?")), "b" + + parser = ParserPython(grammar) + + parsed = parser.parse("a, a a, a b") + + assert str(parsed) == "a | , | a | a | , | a | b" + assert repr(parsed) == \ + "[ 'a' [0], ',' [1], 'a' [3], 'a' [6], ',' [7], "\ + "'a' [9], 'b' [12] ]" + + parser.parse("a b") + + with pytest.raises(NoMatch): + parser.parse("") + + with pytest.raises(NoMatch): + parser.parse("b") + + with pytest.raises(NoMatch): + parser.parse("a a, b") + + with pytest.raises(NoMatch): + parser.parse(", a, a b") + + +def test_optional(): + + def grammar(): + return Optional("a"), "b", EOF + + parser = ParserPython(grammar) + + parsed = parser.parse("ab") + + assert str(parsed) == "a | b | " + assert repr(parsed) == "[ 'a' [0], 'b' [1], EOF [2] ]" + + parsed = parser.parse("b") + + assert str(parsed) == "b | " + assert repr(parsed) == "[ 'b' [0], EOF [1] ]" + + with pytest.raises(NoMatch): + parser.parse("aab") + + with pytest.raises(NoMatch): + parser.parse("") + + +# Syntax predicates + +def test_and(): + + def grammar(): + return "a", And("b"), ["c", "b"], EOF + + parser = ParserPython(grammar) + + parsed = parser.parse("ab") + assert str(parsed) == "a | b | " + assert repr(parsed) == "[ 'a' [0], 'b' [1], EOF [2] ]" + + # 'And' will try to match 'b' and fail so 'c' will never get matched + with pytest.raises(NoMatch): + parser.parse("ac") + + # 'And' will not consume 'b' from the input so second 'b' will never match + with pytest.raises(NoMatch): + parser.parse("abb") + + +def test_not(): + + def grammar(): + return "a", Not("b"), ["b", "c"], EOF + + parser = ParserPython(grammar) + + parsed = parser.parse("ac") + + assert str(parsed) == "a | c | " + assert repr(parsed) == "[ 'a' [0], 'c' [1], EOF [2] ]" + + # Not will will fail on 'b' + with pytest.raises(NoMatch): + parser.parse("ab") + + # And will not consume 'c' from the input so 'b' will never match + with pytest.raises(NoMatch): + parser.parse("acb") diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_pathologic_models.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_pathologic_models.py new file mode 100644 index 0000000..f5d89c9 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_pathologic_models.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_pathologic_models +# Purpose: Test for grammar models that could lead to infinite loops are +# handled properly. +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### +from __future__ import unicode_literals +import pytest + +from arpeggio import ZeroOrMore, Optional, ParserPython, NoMatch, EOF + + +def test_optional_inside_zeroormore(): + """ + Test optional match inside a zero or more. + Optional should always succeed thus inducing ZeroOrMore + to try the match again. + Arpeggio handle this case. + """ + def grammar(): + return ZeroOrMore(Optional('a')), EOF + + parser = ParserPython(grammar) + + with pytest.raises(NoMatch): + # This could lead to infinite loop + parser.parse('b') diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_peg_parser.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_peg_parser.py new file mode 100644 index 0000000..37a2293 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_peg_parser.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_peg_parser +# Purpose: Test for parser constructed using PEG textual grammars. +# Author: Igor R. Dejanović +# Copyright: (c) 2014-2017 Igor R. Dejanović +# License: MIT License +####################################################################### +import pytest # noqa +from arpeggio import Sequence, NonTerminal, NoMatch +from arpeggio.peg import ParserPEG +from arpeggio.cleanpeg import ParserPEG as ParserPEGClean + +grammar = r''' + // This is a comment + number <- r'\d*\.\d*|\d+'; + factor <- ("+" / "-")? + (number / "(" expression ")"); + // This is another comment + term <- factor (( "*" / "/") factor)*; + expression <- term (("+" / "-") term)*; + calc <- expression+ EOF; + // And final comment at the end of file +''' + +clean_grammar = grammar.replace('<-', '=').replace(';', '') + +@pytest.mark.parametrize('parser', [ParserPEG(grammar, 'calc'), + ParserPEGClean(clean_grammar, 'calc')]) +def test_construct_parser(parser): + assert parser.parser_model.rule_name == 'calc' + assert isinstance(parser.parser_model, Sequence) + assert parser.parser_model.nodes[0].name == 'OneOrMore' + + +@pytest.mark.parametrize('parser', [ParserPEG(grammar, 'calc'), + ParserPEGClean(clean_grammar, 'calc')]) +def test_parse_input(parser): + + input = "4+5*7/3.45*-45*(2.56+32)/-56*(2-1.34)" + result = parser.parse(input) + + assert isinstance(result, NonTerminal) + assert str(result) == "4 | + | 5 | * | 7 | / | 3.45 | * | - | 45 | * | ( | 2.56 | + | 32 | ) | / | - | 56 | * | ( | 2 | - | 1.34 | ) | " # noqa + assert repr(result) == "[ [ [ [ number '4' [0] ] ], '+' [1], [ [ number '5' [2] ], '*' [3], [ number '7' [4] ], '/' [5], [ number '3.45' [6] ], '*' [10], [ '-' [11], number '45' [12] ], '*' [14], [ '(' [15], [ [ [ number '2.56' [16] ] ], '+' [20], [ [ number '32' [21] ] ] ], ')' [23] ], '/' [24], [ '-' [25], number '56' [26] ], '*' [28], [ '(' [29], [ [ [ number '2' [30] ] ], '-' [31], [ [ number '1.34' [32] ] ] ], ')' [36] ] ] ], EOF [37] ]" # noqa + + +@pytest.mark.parametrize('parser', + [ParserPEG(grammar, 'calc', reduce_tree=True), + ParserPEGClean(clean_grammar, 'calc', + reduce_tree=True)]) +def test_reduce_tree(parser): + + input = "4+5*7/3.45*-45*(2.56+32)/-56*(2-1.34)" + result = parser.parse(input) + + assert isinstance(result, NonTerminal) + + assert str(result) == "4 | + | 5 | * | 7 | / | 3.45 | * | - | 45 | * | ( | 2.56 | + | 32 | ) | / | - | 56 | * | ( | 2 | - | 1.34 | ) | " # noqa + assert repr(result) == "[ [ number '4' [0], '+' [1], [ number '5' [2], '*' [3], number '7' [4], '/' [5], number '3.45' [6], '*' [10], [ '-' [11], number '45' [12] ], '*' [14], [ '(' [15], [ number '2.56' [16], '+' [20], number '32' [21] ], ')' [23] ], '/' [24], [ '-' [25], number '56' [26] ], '*' [28], [ '(' [29], [ number '2' [30], '-' [31], number '1.34' [32] ], ')' [36] ] ] ], EOF [37] ]" # noqa + + +def test_unordered_group(): + + grammar = """ + g <- (("a" "b") "c" )#; + """ + + parser = ParserPEG(grammar, 'g', reduce_tree=True) + + r = parser.parse("c a b") + assert isinstance(r, NonTerminal) + + r = parser.parse("a b c") + assert isinstance(r, NonTerminal) + + with pytest.raises(NoMatch): + parser.parse("a c b") diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_position.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_position.py new file mode 100644 index 0000000..9b98a17 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_position.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_position +# Purpose: Test that positions in the input stream are properly calculated. +# Author: Igor R. Dejanović +# Copyright: (c) 2015-2017 Igor R. Dejanović +# License: MIT License +####################################################################### +from __future__ import unicode_literals +import pytest +from arpeggio import ParserPython + + +@pytest.fixture +def parse_tree(): + + def grammar(): return ("first", "second", "third") + + parser = ParserPython(grammar) + + return parser.parse(" first \n\n second third") + + +def test_position(parse_tree): + assert parse_tree[0].position == 3 + assert parse_tree[1].position == 13 + assert parse_tree[2].position == 22 + assert parse_tree.position == 3 + + +def test_position_end(parse_tree): + assert parse_tree[0].position_end == 8 + assert parse_tree[1].position_end == 19 + assert parse_tree[2].position_end == 27 + assert parse_tree.position_end == 27 + + +def test_pos_to_linecol(): + + def grammar(): return ("a", "b", "c") + + parser = ParserPython(grammar) + + parse_tree = parser.parse("a\n\n\n b\nc") + + a_pos = parse_tree[0].position + assert parser.pos_to_linecol(a_pos) == (1, 1) + b_pos = parse_tree[1].position + assert parser.pos_to_linecol(b_pos) == (4, 2) + c_pos = parse_tree[2].position + assert parser.pos_to_linecol(c_pos) == (5, 1) diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_ptnode_navigation_expressions.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_ptnode_navigation_expressions.py new file mode 100644 index 0000000..b756e19 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_ptnode_navigation_expressions.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_ptnode_navigation_expressions +# Purpose: Test ParseTreeNode navigation expressions. +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest # noqa + +# Grammar +from arpeggio import ParserPython, ZeroOrMore, ParseTreeNode, NonTerminal + + +def foo(): return "a", bar, "b", baz, bar2, ZeroOrMore(bar) +def bar(): return [bla, bum], baz, "c" +def bar2():return ZeroOrMore(bla) +def baz(): return "d" +def bla(): return "bla" +def bum(): return ["bum", "bam"] + + +def test_lookup_single(): + + parser = ParserPython(foo, reduce_tree=False) + + result = parser.parse("a bum d c b d bla bum d c") + + # Uncomment following line to visualize the parse tree in graphviz + # PTDOTExporter().exportFile(result, 'test_ptnode_navigation_expressions.dot') + + assert isinstance(result, ParseTreeNode) + assert isinstance(result.bar, NonTerminal) + # dot access + assert result.bar.rule_name == 'bar' + # Index access + assert result[1].rule_name == 'bar' + + # There are six children from result + assert len(result) == 6 + + # There is two bar matched from result (at the begging and from ZeroOrMore) + # Dot access collect all NTs from the given path + assert len(result.bar) == 2 + # Verify position + assert result.bar[0].position == 2 + assert result.bar[1].position == 18 + + # Multilevel dot access returns all elements from all previous ones. + # For example this returns all bum from all bar in result + assert len(result.bar.bum) == 2 + # Verify that proper bum are returned + assert result.bar.bum[0].rule_name == 'bum' + assert result.bar.bum[1].position == 18 + + # Access to terminal + assert result.bar.bum[-1][0].value == 'bum' + assert result.bar2.bla[0].value == 'bla' + + # The same for all bla from all bar2 + assert len(result.bar2.bla) == 1 + + assert hasattr(result, "bar") + assert hasattr(result, "baz") + + # Test that accessing an invalid rule name raises AttributeError + with pytest.raises(AttributeError): + result.unexisting diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_python_parser.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_python_parser.py new file mode 100644 index 0000000..7db6484 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_python_parser.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_python_parser +# Purpose: Test for parser constructed using Python-based grammars. +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest # noqa + +# Grammar +from arpeggio import Optional, ZeroOrMore, OneOrMore, EOF, ParserPython,\ + Sequence, NonTerminal +from arpeggio import RegExMatch as _ + + +def number(): return _(r'\d*\.\d*|\d+') +def factor(): return Optional(["+", "-"]), [number, + ("(", expression, ")")] +def term(): return factor, ZeroOrMore(["*", "/"], factor) +def expression(): return term, ZeroOrMore(["+", "-"], term) +def calc(): return OneOrMore(expression), EOF + + +def test_pp_construction(): + ''' + Tests parser construction from python internal DSL description. + ''' + parser = ParserPython(calc) + + assert parser.parser_model.rule_name == 'calc' + assert isinstance(parser.parser_model, Sequence) + assert parser.parser_model.nodes[0].desc == 'OneOrMore' + + +def test_parse_input(): + + parser = ParserPython(calc) + input = "4+5*7/3.45*-45*(2.56+32)/-56*(2-1.34)" + result = parser.parse(input) + + assert isinstance(result, NonTerminal) + assert str(result) == "4 | + | 5 | * | 7 | / | 3.45 | * | - | 45 | * | ( | 2.56 | + | 32 | ) | / | - | 56 | * | ( | 2 | - | 1.34 | ) | " + assert repr(result) == "[ [ [ [ number '4' [0] ] ], '+' [1], [ [ number '5' [2] ], '*' [3], [ number '7' [4] ], '/' [5], [ number '3.45' [6] ], '*' [10], [ '-' [11], number '45' [12] ], '*' [14], [ '(' [15], [ [ [ number '2.56' [16] ] ], '+' [20], [ [ number '32' [21] ] ] ], ')' [23] ], '/' [24], [ '-' [25], number '56' [26] ], '*' [28], [ '(' [29], [ [ [ number '2' [30] ] ], '-' [31], [ [ number '1.34' [32] ] ] ], ')' [36] ] ] ], EOF [37] ]" + diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_reduce_tree.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_reduce_tree.py new file mode 100644 index 0000000..c132389 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_reduce_tree.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_reduce_tree +# Purpose: Test parse tree reduction +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest # noqa + +# Grammar +from arpeggio import ZeroOrMore, OneOrMore, ParserPython, Terminal, NonTerminal +from arpeggio import RegExMatch as _ + + +def grammar(): return first, "a", second, [first, second] +def first(): return [fourth, third], ZeroOrMore(third) +def second(): return OneOrMore(third), "b" +def third(): return [third_str, fourth] +def third_str(): return "3" +def fourth(): return _(r'\d+') + + +def test_reduce_tree(): + + input = "34 a 3 3 b 3 b" + + parser = ParserPython(grammar, reduce_tree=False) + result = parser.parse(input) + +# PTDOTExporter().exportFile(result, 'test_reduce_tree_pt.dot') + + assert result[0].rule_name == 'first' + assert isinstance(result[0], NonTerminal) + assert result[3].rule_name == 'first' + assert result[0][0].rule_name == 'fourth' + # Check reduction for direct OrderedChoice + assert result[2][0].rule_name == 'third' + + parser = ParserPython(grammar, reduce_tree=True) + result = parser.parse(input) + + # PTDOTExporter().exportFile(result, 'test_reduce_tree_pt.dot') + + assert result[0].rule_name == 'fourth' + assert isinstance(result[0], Terminal) + assert result[3].rule_name == 'fourth' + # Check reduction for direct OrderedChoice + assert result[2][0].rule_name == 'third_str' diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_semantic_action_results.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_semantic_action_results.py new file mode 100644 index 0000000..f23d493 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_semantic_action_results.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_semantic_action_results +# Purpose: Tests semantic action results passed to first_pass call +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest # noqa + +# Grammar +from arpeggio import ZeroOrMore, OneOrMore, ParserPython, \ + SemanticActionResults, PTNodeVisitor, visit_parse_tree +from arpeggio.export import PTDOTExporter +from arpeggio import RegExMatch as _ + + +def grammar(): return first, "a", second +def first(): return [fourth, third], ZeroOrMore(third) +def second(): return OneOrMore(third), "b" +def third(): return [third_str, fourth] +def third_str(): return "3" +def fourth(): return _(r'\d+') + + +first_sar = None +third_sar = None + + +class Visitor(PTNodeVisitor): + def visit_first(self, node, children): + global first_sar + first_sar = children + + def visit_third(self, node, children): + global third_sar + third_sar = children + + return 1 + + +def test_semantic_action_results(): + + global first_sar, third_sar + + input = "4 3 3 3 a 3 3 b" + + parser = ParserPython(grammar, reduce_tree=False) + result = parser.parse(input) + + PTDOTExporter().exportFile(result, 'test_semantic_action_results_pt.dot') + + visit_parse_tree(result, Visitor()) + + assert isinstance(first_sar, SemanticActionResults) + assert len(first_sar.third) == 3 + assert third_sar.third_str[0] == '3' diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_separators.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_separators.py new file mode 100644 index 0000000..acc6c0a --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_separators.py @@ -0,0 +1,61 @@ +from __future__ import unicode_literals +import pytest # noqa + +# Grammar +from arpeggio import ZeroOrMore, OneOrMore, UnorderedGroup, \ + ParserPython, NoMatch, EOF + + +def test_zeroormore_with_separator(): + + def grammar(): + return ZeroOrMore(['a', 'b'], sep=','), EOF + + parser = ParserPython(grammar, reduce_tree=False) + result = parser.parse('a, b, b, b, a') + assert result + + with pytest.raises(NoMatch): + parser.parse('a, b a') + + +def test_oneormore_with_ordered_choice_separator(): + + def grammar(): + return OneOrMore(['a', 'b'], sep=[',', ';']), EOF + + parser = ParserPython(grammar, reduce_tree=False) + result = parser.parse('a, a; a, b, a; a') + assert result + + with pytest.raises(NoMatch): + parser.parse('a, b a') + + with pytest.raises(NoMatch): + parser.parse('a, b: a') + + +def test_unordered_group_with_separator(): + + def grammar(): + return UnorderedGroup('a', 'b', 'c', sep=[',', ';']), EOF + + parser = ParserPython(grammar, reduce_tree=False) + result = parser.parse('b , a, c') + assert result + result = parser.parse('b , c; a') + assert result + + # Check separator matching + with pytest.raises(NoMatch): + parser.parse('a, b c') + + with pytest.raises(NoMatch): + parser.parse('a, c: a') + + # Each element must be matched exactly once + with pytest.raises(NoMatch): + parser.parse('a, b, b; c') + + with pytest.raises(NoMatch): + parser.parse('a, c') diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_sequence_params.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_sequence_params.py new file mode 100644 index 0000000..5b06771 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_sequence_params.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_sequence_params +# Purpose: Test Sequence expression parameters. +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest +from arpeggio import ParserPython, NoMatch, Sequence + + +def test_skipws(): + """ + skipws may be defined per Sequence. + """ + + def grammar(): + return Sequence("one", "two", "three"), "four" + + parser = ParserPython(grammar) + + # By default, skipws is True and whitespaces will be skipped. + parser.parse("one two three four") + + def grammar(): + return Sequence("one", "two", "three", skipws=False), "four" + + parser = ParserPython(grammar) + + # If we disable skipws for sequence only then whitespace + # skipping should not be done inside sequence. + with pytest.raises(NoMatch): + parser.parse("one two three four") + + # But it will be done outside of it + parser.parse("onetwothree four") + + +def test_ws(): + """ + ws can be changed per Sequence. + """ + + def grammar(): + return Sequence("one", "two", "three"), "four" + + parser = ParserPython(grammar) + + # By default, ws consists of space, tab and newline + # So this should parse. + parser.parse("""one + two three four""") + + def grammar(): + return Sequence("one", "two", "three", ws=' '), "four" + + parser = ParserPython(grammar) + + # If we change ws per sequence and set it to space only + # given input will raise exception + with pytest.raises(NoMatch): + parser.parse("""one + two three four""") + + # But ws will be default outside of sequence + parser.parse("""one two three + four""") + + # Test for ws with more than one char. + def grammar(): + return Sequence("one", "two", "three", ws=' \t'), "four" + + parser = ParserPython(grammar) + + # If we change ws per sequence and set it to spaces and tabs + # given input will raise exception + with pytest.raises(NoMatch): + parser.parse("one two \nthree \t four") + + # But ws will be default outside of sequence + parser.parse("one two three \n\t four") + + # Inside sequence a spaces and tabs will be skipped + parser.parse("one \t two\t three \nfour") diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_suppression.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_suppression.py new file mode 100644 index 0000000..62bf2b2 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_suppression.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_suppression +# Purpose: Test suppresion of parse tree nodes. +# Author: Igor R. Dejanović +# Copyright: (c) 2016 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest # noqa +from arpeggio import ParserPython, Sequence, StrMatch, RegExMatch + + +def test_sequence_suppress(): + """ + """ + + def grammar(): + return Sequence("one", "two", "three", suppress=True), "four" + + parser = ParserPython(grammar) + + result = parser.parse("one two three four") + assert result[0] == "four" + + +def test_suppress_string_match(): + """ + Test that string matches with suppress=True do not produce parse tree + nodes. + """ + + class SuppressStrMatch(StrMatch): + suppress = True + + def grammar(): + return "one", "two", SuppressStrMatch("three"), "four" + + parser = ParserPython(grammar) + + result = parser.parse("one two three four") + assert len(result) == 3 + assert result[1] == "two" + assert result[2] == "four" + + +def test_register_syntax_classes_suppress(): + """ + Test suppressing by overriding special syntax forms (lists - OrderedChoice, + tuples - Sequences and string - StrMatch). + """ + + class SuppressStrMatch(StrMatch): + suppress = True + + def grammar(): + return "one", "two", RegExMatch(r'\d+'), "three" + + parser = ParserPython(grammar, + syntax_classes={'StrMatch': SuppressStrMatch}) + + result = parser.parse("one two 42 three") + + # Only regex will end up in the tree + assert len(result) == 1 + assert result[0] == "42" diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_unicode.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_unicode.py new file mode 100644 index 0000000..7e6be10 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_unicode.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_unicode +# Purpose: Tests matching unicode characters +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest # noqa + +# Grammar +from arpeggio import ParserPython + +def grammar(): return first, "±", second +def first(): return "♪" +def second(): return "a" + + +def test_unicode_match(): + parser = ParserPython(grammar) + + parse_tree = parser.parse("♪ ± a") + assert parse_tree diff --git a/myenv/lib/python3.12/site-packages/arpeggio/tests/test_visitor.py b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_visitor.py new file mode 100644 index 0000000..045c655 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/tests/test_visitor.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +####################################################################### +# Name: test_semantic_action_results +# Purpose: Tests semantic actions based on visitor +# Author: Igor R. Dejanović +# Copyright: (c) 2014 Igor R. Dejanović +# License: MIT License +####################################################################### + +from __future__ import unicode_literals +import pytest # noqa + +# Grammar +from arpeggio import ZeroOrMore, OneOrMore, ParserPython,\ + PTNodeVisitor, visit_parse_tree, SemanticActionResults +from arpeggio.export import PTDOTExporter +from arpeggio import RegExMatch as _ + +def grammar(): return first, "a", second +def first(): return [fourth, third], ZeroOrMore(third) +def second(): return OneOrMore(third), "b" +def third(): return [third_str, fourth] +def third_str(): return "3" +def fourth(): return _(r'\d+') + + +first_sar = None +third_sar = None + + +class Visitor(PTNodeVisitor): + + def visit_first(self, node, children): + global first_sar + first_sar = children + + def visit_third(self, node, children): + global third_sar + third_sar = children + + return 1 + + +def test_semantic_action_results(): + + global first_sar, third_sar + + input = "4 3 3 3 a 3 3 b" + + parser = ParserPython(grammar, reduce_tree=False) + result = parser.parse(input) + + PTDOTExporter().exportFile(result, 'test_semantic_action_results_pt.dot') + + visit_parse_tree(result, Visitor(defaults=True)) + + assert isinstance(first_sar, SemanticActionResults) + assert len(first_sar.third) == 3 + assert third_sar.third_str[0] == '3' diff --git a/myenv/lib/python3.12/site-packages/arpeggio/utils.py b/myenv/lib/python3.12/site-packages/arpeggio/utils.py new file mode 100644 index 0000000..93905ea --- /dev/null +++ b/myenv/lib/python3.12/site-packages/arpeggio/utils.py @@ -0,0 +1,14 @@ +""" +Various utilities. +""" + +# isstr check if object is of string type. +# This works for both python 2 and 3 +# Taken from http://stackoverflow.com/questions/11301138/how-to-check-if-variable-is-string-with-python-2-and-3-compatibility +try: + basestring # attempt to evaluate basestring + def isstr(s): + return isinstance(s, basestring) +except NameError: + def isstr(s): + return isinstance(s, str) \ No newline at end of file diff --git a/myenv/lib/python3.12/site-packages/attr/__init__.py b/myenv/lib/python3.12/site-packages/attr/__init__.py new file mode 100644 index 0000000..51b1c25 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/__init__.py @@ -0,0 +1,103 @@ +# SPDX-License-Identifier: MIT + +""" +Classes Without Boilerplate +""" + +from functools import partial +from typing import Callable + +from . import converters, exceptions, filters, setters, validators +from ._cmp import cmp_using +from ._compat import Protocol +from ._config import get_run_validators, set_run_validators +from ._funcs import asdict, assoc, astuple, evolve, has, resolve_types +from ._make import ( + NOTHING, + Attribute, + Converter, + Factory, + attrib, + attrs, + fields, + fields_dict, + make_class, + validate, +) +from ._next_gen import define, field, frozen, mutable +from ._version_info import VersionInfo + + +s = attributes = attrs +ib = attr = attrib +dataclass = partial(attrs, auto_attribs=True) # happy Easter ;) + + +class AttrsInstance(Protocol): + pass + + +__all__ = [ + "Attribute", + "AttrsInstance", + "Converter", + "Factory", + "NOTHING", + "asdict", + "assoc", + "astuple", + "attr", + "attrib", + "attributes", + "attrs", + "cmp_using", + "converters", + "define", + "evolve", + "exceptions", + "field", + "fields", + "fields_dict", + "filters", + "frozen", + "get_run_validators", + "has", + "ib", + "make_class", + "mutable", + "resolve_types", + "s", + "set_run_validators", + "setters", + "validate", + "validators", +] + + +def _make_getattr(mod_name: str) -> Callable: + """ + Create a metadata proxy for packaging information that uses *mod_name* in + its warnings and errors. + """ + + def __getattr__(name: str) -> str: + if name not in ("__version__", "__version_info__"): + msg = f"module {mod_name} has no attribute {name}" + raise AttributeError(msg) + + try: + from importlib.metadata import metadata + except ImportError: + from importlib_metadata import metadata + + meta = metadata("attrs") + + if name == "__version_info__": + return VersionInfo._from_version_string(meta["version"]) + + return meta["version"] + + return __getattr__ + + +__getattr__ = _make_getattr(__name__) diff --git a/myenv/lib/python3.12/site-packages/attr/__init__.pyi b/myenv/lib/python3.12/site-packages/attr/__init__.pyi new file mode 100644 index 0000000..6ae0a83 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/__init__.pyi @@ -0,0 +1,388 @@ +import enum +import sys + +from typing import ( + Any, + Callable, + Generic, + Mapping, + Protocol, + Sequence, + TypeVar, + overload, +) + +# `import X as X` is required to make these public +from . import converters as converters +from . import exceptions as exceptions +from . import filters as filters +from . import setters as setters +from . import validators as validators +from ._cmp import cmp_using as cmp_using +from ._typing_compat import AttrsInstance_ +from ._version_info import VersionInfo +from attrs import ( + define as define, + field as field, + mutable as mutable, + frozen as frozen, + _EqOrderType, + _ValidatorType, + _ConverterType, + _ReprArgType, + _OnSetAttrType, + _OnSetAttrArgType, + _FieldTransformer, + _ValidatorArgType, +) + +if sys.version_info >= (3, 10): + from typing import TypeGuard +else: + from typing_extensions import TypeGuard + +if sys.version_info >= (3, 11): + from typing import dataclass_transform +else: + from typing_extensions import dataclass_transform + +__version__: str +__version_info__: VersionInfo +__title__: str +__description__: str +__url__: str +__uri__: str +__author__: str +__email__: str +__license__: str +__copyright__: str + +_T = TypeVar("_T") +_C = TypeVar("_C", bound=type) + +_FilterType = Callable[["Attribute[_T]", _T], bool] + +# We subclass this here to keep the protocol's qualified name clean. +class AttrsInstance(AttrsInstance_, Protocol): + pass + +_A = TypeVar("_A", bound=type[AttrsInstance]) + +class _Nothing(enum.Enum): + NOTHING = enum.auto() + +NOTHING = _Nothing.NOTHING + +# NOTE: Factory lies about its return type to make this possible: +# `x: List[int] # = Factory(list)` +# Work around mypy issue #4554 in the common case by using an overload. +if sys.version_info >= (3, 8): + from typing import Literal + @overload + def Factory(factory: Callable[[], _T]) -> _T: ... + @overload + def Factory( + factory: Callable[[Any], _T], + takes_self: Literal[True], + ) -> _T: ... + @overload + def Factory( + factory: Callable[[], _T], + takes_self: Literal[False], + ) -> _T: ... + +else: + @overload + def Factory(factory: Callable[[], _T]) -> _T: ... + @overload + def Factory( + factory: Union[Callable[[Any], _T], Callable[[], _T]], + takes_self: bool = ..., + ) -> _T: ... + +In = TypeVar("In") +Out = TypeVar("Out") + +class Converter(Generic[In, Out]): + @overload + def __init__(self, converter: Callable[[In], Out]) -> None: ... + @overload + def __init__( + self, + converter: Callable[[In, AttrsInstance, Attribute], Out], + *, + takes_self: Literal[True], + takes_field: Literal[True], + ) -> None: ... + @overload + def __init__( + self, + converter: Callable[[In, Attribute], Out], + *, + takes_field: Literal[True], + ) -> None: ... + @overload + def __init__( + self, + converter: Callable[[In, AttrsInstance], Out], + *, + takes_self: Literal[True], + ) -> None: ... + +class Attribute(Generic[_T]): + name: str + default: _T | None + validator: _ValidatorType[_T] | None + repr: _ReprArgType + cmp: _EqOrderType + eq: _EqOrderType + order: _EqOrderType + hash: bool | None + init: bool + converter: _ConverterType | Converter[Any, _T] | None + metadata: dict[Any, Any] + type: type[_T] | None + kw_only: bool + on_setattr: _OnSetAttrType + alias: str | None + + def evolve(self, **changes: Any) -> "Attribute[Any]": ... + +# NOTE: We had several choices for the annotation to use for type arg: +# 1) Type[_T] +# - Pros: Handles simple cases correctly +# - Cons: Might produce less informative errors in the case of conflicting +# TypeVars e.g. `attr.ib(default='bad', type=int)` +# 2) Callable[..., _T] +# - Pros: Better error messages than #1 for conflicting TypeVars +# - Cons: Terrible error messages for validator checks. +# e.g. attr.ib(type=int, validator=validate_str) +# -> error: Cannot infer function type argument +# 3) type (and do all of the work in the mypy plugin) +# - Pros: Simple here, and we could customize the plugin with our own errors. +# - Cons: Would need to write mypy plugin code to handle all the cases. +# We chose option #1. + +# `attr` lies about its return type to make the following possible: +# attr() -> Any +# attr(8) -> int +# attr(validator=) -> Whatever the callable expects. +# This makes this type of assignments possible: +# x: int = attr(8) +# +# This form catches explicit None or no default but with no other arguments +# returns Any. +@overload +def attrib( + default: None = ..., + validator: None = ..., + repr: _ReprArgType = ..., + cmp: _EqOrderType | None = ..., + hash: bool | None = ..., + init: bool = ..., + metadata: Mapping[Any, Any] | None = ..., + type: None = ..., + converter: None = ..., + factory: None = ..., + kw_only: bool = ..., + eq: _EqOrderType | None = ..., + order: _EqOrderType | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + alias: str | None = ..., +) -> Any: ... + +# This form catches an explicit None or no default and infers the type from the +# other arguments. +@overload +def attrib( + default: None = ..., + validator: _ValidatorArgType[_T] | None = ..., + repr: _ReprArgType = ..., + cmp: _EqOrderType | None = ..., + hash: bool | None = ..., + init: bool = ..., + metadata: Mapping[Any, Any] | None = ..., + type: type[_T] | None = ..., + converter: _ConverterType | Converter[Any, _T] | None = ..., + factory: Callable[[], _T] | None = ..., + kw_only: bool = ..., + eq: _EqOrderType | None = ..., + order: _EqOrderType | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + alias: str | None = ..., +) -> _T: ... + +# This form catches an explicit default argument. +@overload +def attrib( + default: _T, + validator: _ValidatorArgType[_T] | None = ..., + repr: _ReprArgType = ..., + cmp: _EqOrderType | None = ..., + hash: bool | None = ..., + init: bool = ..., + metadata: Mapping[Any, Any] | None = ..., + type: type[_T] | None = ..., + converter: _ConverterType | Converter[Any, _T] | None = ..., + factory: Callable[[], _T] | None = ..., + kw_only: bool = ..., + eq: _EqOrderType | None = ..., + order: _EqOrderType | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + alias: str | None = ..., +) -> _T: ... + +# This form covers type=non-Type: e.g. forward references (str), Any +@overload +def attrib( + default: _T | None = ..., + validator: _ValidatorArgType[_T] | None = ..., + repr: _ReprArgType = ..., + cmp: _EqOrderType | None = ..., + hash: bool | None = ..., + init: bool = ..., + metadata: Mapping[Any, Any] | None = ..., + type: object = ..., + converter: _ConverterType | Converter[Any, _T] | None = ..., + factory: Callable[[], _T] | None = ..., + kw_only: bool = ..., + eq: _EqOrderType | None = ..., + order: _EqOrderType | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + alias: str | None = ..., +) -> Any: ... +@overload +@dataclass_transform(order_default=True, field_specifiers=(attrib, field)) +def attrs( + maybe_cls: _C, + these: dict[str, Any] | None = ..., + repr_ns: str | None = ..., + repr: bool = ..., + cmp: _EqOrderType | None = ..., + hash: bool | None = ..., + init: bool = ..., + slots: bool = ..., + frozen: bool = ..., + weakref_slot: bool = ..., + str: bool = ..., + auto_attribs: bool = ..., + kw_only: bool = ..., + cache_hash: bool = ..., + auto_exc: bool = ..., + eq: _EqOrderType | None = ..., + order: _EqOrderType | None = ..., + auto_detect: bool = ..., + collect_by_mro: bool = ..., + getstate_setstate: bool | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + field_transformer: _FieldTransformer | None = ..., + match_args: bool = ..., + unsafe_hash: bool | None = ..., +) -> _C: ... +@overload +@dataclass_transform(order_default=True, field_specifiers=(attrib, field)) +def attrs( + maybe_cls: None = ..., + these: dict[str, Any] | None = ..., + repr_ns: str | None = ..., + repr: bool = ..., + cmp: _EqOrderType | None = ..., + hash: bool | None = ..., + init: bool = ..., + slots: bool = ..., + frozen: bool = ..., + weakref_slot: bool = ..., + str: bool = ..., + auto_attribs: bool = ..., + kw_only: bool = ..., + cache_hash: bool = ..., + auto_exc: bool = ..., + eq: _EqOrderType | None = ..., + order: _EqOrderType | None = ..., + auto_detect: bool = ..., + collect_by_mro: bool = ..., + getstate_setstate: bool | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + field_transformer: _FieldTransformer | None = ..., + match_args: bool = ..., + unsafe_hash: bool | None = ..., +) -> Callable[[_C], _C]: ... +def fields(cls: type[AttrsInstance]) -> Any: ... +def fields_dict(cls: type[AttrsInstance]) -> dict[str, Attribute[Any]]: ... +def validate(inst: AttrsInstance) -> None: ... +def resolve_types( + cls: _A, + globalns: dict[str, Any] | None = ..., + localns: dict[str, Any] | None = ..., + attribs: list[Attribute[Any]] | None = ..., + include_extras: bool = ..., +) -> _A: ... + +# TODO: add support for returning a proper attrs class from the mypy plugin +# we use Any instead of _CountingAttr so that e.g. `make_class('Foo', +# [attr.ib()])` is valid +def make_class( + name: str, + attrs: list[str] | tuple[str, ...] | dict[str, Any], + bases: tuple[type, ...] = ..., + class_body: dict[str, Any] | None = ..., + repr_ns: str | None = ..., + repr: bool = ..., + cmp: _EqOrderType | None = ..., + hash: bool | None = ..., + init: bool = ..., + slots: bool = ..., + frozen: bool = ..., + weakref_slot: bool = ..., + str: bool = ..., + auto_attribs: bool = ..., + kw_only: bool = ..., + cache_hash: bool = ..., + auto_exc: bool = ..., + eq: _EqOrderType | None = ..., + order: _EqOrderType | None = ..., + collect_by_mro: bool = ..., + on_setattr: _OnSetAttrArgType | None = ..., + field_transformer: _FieldTransformer | None = ..., +) -> type: ... + +# _funcs -- + +# TODO: add support for returning TypedDict from the mypy plugin +# FIXME: asdict/astuple do not honor their factory args. Waiting on one of +# these: +# https://github.com/python/mypy/issues/4236 +# https://github.com/python/typing/issues/253 +# XXX: remember to fix attrs.asdict/astuple too! +def asdict( + inst: AttrsInstance, + recurse: bool = ..., + filter: _FilterType[Any] | None = ..., + dict_factory: type[Mapping[Any, Any]] = ..., + retain_collection_types: bool = ..., + value_serializer: Callable[[type, Attribute[Any], Any], Any] | None = ..., + tuple_keys: bool | None = ..., +) -> dict[str, Any]: ... + +# TODO: add support for returning NamedTuple from the mypy plugin +def astuple( + inst: AttrsInstance, + recurse: bool = ..., + filter: _FilterType[Any] | None = ..., + tuple_factory: type[Sequence[Any]] = ..., + retain_collection_types: bool = ..., +) -> tuple[Any, ...]: ... +def has(cls: type) -> TypeGuard[type[AttrsInstance]]: ... +def assoc(inst: _T, **changes: Any) -> _T: ... +def evolve(inst: _T, **changes: Any) -> _T: ... + +# _config -- + +def set_run_validators(run: bool) -> None: ... +def get_run_validators() -> bool: ... + +# aliases -- + +s = attributes = attrs +ib = attr = attrib +dataclass = attrs # Technically, partial(attrs, auto_attribs=True) ;) diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..066dfe8 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/_cmp.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/_cmp.cpython-312.pyc new file mode 100644 index 0000000..ed4b68d Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/_cmp.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/_compat.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/_compat.cpython-312.pyc new file mode 100644 index 0000000..3c9bc57 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/_compat.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/_config.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/_config.cpython-312.pyc new file mode 100644 index 0000000..d9be58c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/_config.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/_funcs.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/_funcs.cpython-312.pyc new file mode 100644 index 0000000..82e9489 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/_funcs.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/_make.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/_make.cpython-312.pyc new file mode 100644 index 0000000..b943702 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/_make.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/_next_gen.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/_next_gen.cpython-312.pyc new file mode 100644 index 0000000..0f40f3a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/_next_gen.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/_version_info.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/_version_info.cpython-312.pyc new file mode 100644 index 0000000..d048698 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/_version_info.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/converters.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/converters.cpython-312.pyc new file mode 100644 index 0000000..449ab64 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/converters.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/exceptions.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/exceptions.cpython-312.pyc new file mode 100644 index 0000000..3e256c9 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/exceptions.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/filters.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/filters.cpython-312.pyc new file mode 100644 index 0000000..01d088a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/filters.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/setters.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/setters.cpython-312.pyc new file mode 100644 index 0000000..43c185c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/setters.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/__pycache__/validators.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attr/__pycache__/validators.cpython-312.pyc new file mode 100644 index 0000000..dde309a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attr/__pycache__/validators.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attr/_cmp.py b/myenv/lib/python3.12/site-packages/attr/_cmp.py new file mode 100644 index 0000000..f367bb3 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/_cmp.py @@ -0,0 +1,160 @@ +# SPDX-License-Identifier: MIT + + +import functools +import types + +from ._make import _make_ne + + +_operation_names = {"eq": "==", "lt": "<", "le": "<=", "gt": ">", "ge": ">="} + + +def cmp_using( + eq=None, + lt=None, + le=None, + gt=None, + ge=None, + require_same_type=True, + class_name="Comparable", +): + """ + Create a class that can be passed into `attrs.field`'s ``eq``, ``order``, + and ``cmp`` arguments to customize field comparison. + + The resulting class will have a full set of ordering methods if at least + one of ``{lt, le, gt, ge}`` and ``eq`` are provided. + + Args: + eq (typing.Callable | None): + Callable used to evaluate equality of two objects. + + lt (typing.Callable | None): + Callable used to evaluate whether one object is less than another + object. + + le (typing.Callable | None): + Callable used to evaluate whether one object is less than or equal + to another object. + + gt (typing.Callable | None): + Callable used to evaluate whether one object is greater than + another object. + + ge (typing.Callable | None): + Callable used to evaluate whether one object is greater than or + equal to another object. + + require_same_type (bool): + When `True`, equality and ordering methods will return + `NotImplemented` if objects are not of the same type. + + class_name (str | None): Name of class. Defaults to "Comparable". + + See `comparison` for more details. + + .. versionadded:: 21.1.0 + """ + + body = { + "__slots__": ["value"], + "__init__": _make_init(), + "_requirements": [], + "_is_comparable_to": _is_comparable_to, + } + + # Add operations. + num_order_functions = 0 + has_eq_function = False + + if eq is not None: + has_eq_function = True + body["__eq__"] = _make_operator("eq", eq) + body["__ne__"] = _make_ne() + + if lt is not None: + num_order_functions += 1 + body["__lt__"] = _make_operator("lt", lt) + + if le is not None: + num_order_functions += 1 + body["__le__"] = _make_operator("le", le) + + if gt is not None: + num_order_functions += 1 + body["__gt__"] = _make_operator("gt", gt) + + if ge is not None: + num_order_functions += 1 + body["__ge__"] = _make_operator("ge", ge) + + type_ = types.new_class( + class_name, (object,), {}, lambda ns: ns.update(body) + ) + + # Add same type requirement. + if require_same_type: + type_._requirements.append(_check_same_type) + + # Add total ordering if at least one operation was defined. + if 0 < num_order_functions < 4: + if not has_eq_function: + # functools.total_ordering requires __eq__ to be defined, + # so raise early error here to keep a nice stack. + msg = "eq must be define is order to complete ordering from lt, le, gt, ge." + raise ValueError(msg) + type_ = functools.total_ordering(type_) + + return type_ + + +def _make_init(): + """ + Create __init__ method. + """ + + def __init__(self, value): + """ + Initialize object with *value*. + """ + self.value = value + + return __init__ + + +def _make_operator(name, func): + """ + Create operator method. + """ + + def method(self, other): + if not self._is_comparable_to(other): + return NotImplemented + + result = func(self.value, other.value) + if result is NotImplemented: + return NotImplemented + + return result + + method.__name__ = f"__{name}__" + method.__doc__ = ( + f"Return a {_operation_names[name]} b. Computed by attrs." + ) + + return method + + +def _is_comparable_to(self, other): + """ + Check whether `other` is comparable to `self`. + """ + return all(func(self, other) for func in self._requirements) + + +def _check_same_type(self, other): + """ + Return True if *self* and *other* are of the same type, False otherwise. + """ + return other.value.__class__ is self.value.__class__ diff --git a/myenv/lib/python3.12/site-packages/attr/_cmp.pyi b/myenv/lib/python3.12/site-packages/attr/_cmp.pyi new file mode 100644 index 0000000..cc7893b --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/_cmp.pyi @@ -0,0 +1,13 @@ +from typing import Any, Callable + +_CompareWithType = Callable[[Any, Any], bool] + +def cmp_using( + eq: _CompareWithType | None = ..., + lt: _CompareWithType | None = ..., + le: _CompareWithType | None = ..., + gt: _CompareWithType | None = ..., + ge: _CompareWithType | None = ..., + require_same_type: bool = ..., + class_name: str = ..., +) -> type: ... diff --git a/myenv/lib/python3.12/site-packages/attr/_compat.py b/myenv/lib/python3.12/site-packages/attr/_compat.py new file mode 100644 index 0000000..104eeb0 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/_compat.py @@ -0,0 +1,103 @@ +# SPDX-License-Identifier: MIT + +import inspect +import platform +import sys +import threading + +from collections.abc import Mapping, Sequence # noqa: F401 +from typing import _GenericAlias + + +PYPY = platform.python_implementation() == "PyPy" +PY_3_8_PLUS = sys.version_info[:2] >= (3, 8) +PY_3_9_PLUS = sys.version_info[:2] >= (3, 9) +PY_3_10_PLUS = sys.version_info[:2] >= (3, 10) +PY_3_11_PLUS = sys.version_info[:2] >= (3, 11) +PY_3_12_PLUS = sys.version_info[:2] >= (3, 12) +PY_3_13_PLUS = sys.version_info[:2] >= (3, 13) +PY_3_14_PLUS = sys.version_info[:2] >= (3, 14) + + +if sys.version_info < (3, 8): + try: + from typing_extensions import Protocol + except ImportError: # pragma: no cover + Protocol = object +else: + from typing import Protocol # noqa: F401 + +if PY_3_14_PLUS: # pragma: no cover + import annotationlib + + _get_annotations = annotationlib.get_annotations + +else: + + def _get_annotations(cls): + """ + Get annotations for *cls*. + """ + return cls.__dict__.get("__annotations__", {}) + + +class _AnnotationExtractor: + """ + Extract type annotations from a callable, returning None whenever there + is none. + """ + + __slots__ = ["sig"] + + def __init__(self, callable): + try: + self.sig = inspect.signature(callable) + except (ValueError, TypeError): # inspect failed + self.sig = None + + def get_first_param_type(self): + """ + Return the type annotation of the first argument if it's not empty. + """ + if not self.sig: + return None + + params = list(self.sig.parameters.values()) + if params and params[0].annotation is not inspect.Parameter.empty: + return params[0].annotation + + return None + + def get_return_type(self): + """ + Return the return type if it's not empty. + """ + if ( + self.sig + and self.sig.return_annotation is not inspect.Signature.empty + ): + return self.sig.return_annotation + + return None + + +# Thread-local global to track attrs instances which are already being repr'd. +# This is needed because there is no other (thread-safe) way to pass info +# about the instances that are already being repr'd through the call stack +# in order to ensure we don't perform infinite recursion. +# +# For instance, if an instance contains a dict which contains that instance, +# we need to know that we're already repr'ing the outside instance from within +# the dict's repr() call. +# +# This lives here rather than in _make.py so that the functions in _make.py +# don't have a direct reference to the thread-local in their globals dict. +# If they have such a reference, it breaks cloudpickle. +repr_context = threading.local() + + +def get_generic_base(cl): + """If this is a generic class (A[str]), return the generic base for it.""" + if cl.__class__ is _GenericAlias: + return cl.__origin__ + return None diff --git a/myenv/lib/python3.12/site-packages/attr/_config.py b/myenv/lib/python3.12/site-packages/attr/_config.py new file mode 100644 index 0000000..9c245b1 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/_config.py @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: MIT + +__all__ = ["set_run_validators", "get_run_validators"] + +_run_validators = True + + +def set_run_validators(run): + """ + Set whether or not validators are run. By default, they are run. + + .. deprecated:: 21.3.0 It will not be removed, but it also will not be + moved to new ``attrs`` namespace. Use `attrs.validators.set_disabled()` + instead. + """ + if not isinstance(run, bool): + msg = "'run' must be bool." + raise TypeError(msg) + global _run_validators + _run_validators = run + + +def get_run_validators(): + """ + Return whether or not validators are run. + + .. deprecated:: 21.3.0 It will not be removed, but it also will not be + moved to new ``attrs`` namespace. Use `attrs.validators.get_disabled()` + instead. + """ + return _run_validators diff --git a/myenv/lib/python3.12/site-packages/attr/_funcs.py b/myenv/lib/python3.12/site-packages/attr/_funcs.py new file mode 100644 index 0000000..355cef4 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/_funcs.py @@ -0,0 +1,522 @@ +# SPDX-License-Identifier: MIT + + +import copy + +from ._compat import PY_3_9_PLUS, get_generic_base +from ._make import _OBJ_SETATTR, NOTHING, fields +from .exceptions import AttrsAttributeNotFoundError + + +def asdict( + inst, + recurse=True, + filter=None, + dict_factory=dict, + retain_collection_types=False, + value_serializer=None, +): + """ + Return the *attrs* attribute values of *inst* as a dict. + + Optionally recurse into other *attrs*-decorated classes. + + Args: + inst: Instance of an *attrs*-decorated class. + + recurse (bool): Recurse into classes that are also *attrs*-decorated. + + filter (~typing.Callable): + A callable whose return code determines whether an attribute or + element is included (`True`) or dropped (`False`). Is called with + the `attrs.Attribute` as the first argument and the value as the + second argument. + + dict_factory (~typing.Callable): + A callable to produce dictionaries from. For example, to produce + ordered dictionaries instead of normal Python dictionaries, pass in + ``collections.OrderedDict``. + + retain_collection_types (bool): + Do not convert to `list` when encountering an attribute whose type + is `tuple` or `set`. Only meaningful if *recurse* is `True`. + + value_serializer (typing.Callable | None): + A hook that is called for every attribute or dict key/value. It + receives the current instance, field and value and must return the + (updated) value. The hook is run *after* the optional *filter* has + been applied. + + Returns: + Return type of *dict_factory*. + + Raises: + attrs.exceptions.NotAnAttrsClassError: + If *cls* is not an *attrs* class. + + .. versionadded:: 16.0.0 *dict_factory* + .. versionadded:: 16.1.0 *retain_collection_types* + .. versionadded:: 20.3.0 *value_serializer* + .. versionadded:: 21.3.0 + If a dict has a collection for a key, it is serialized as a tuple. + """ + attrs = fields(inst.__class__) + rv = dict_factory() + for a in attrs: + v = getattr(inst, a.name) + if filter is not None and not filter(a, v): + continue + + if value_serializer is not None: + v = value_serializer(inst, a, v) + + if recurse is True: + if has(v.__class__): + rv[a.name] = asdict( + v, + recurse=True, + filter=filter, + dict_factory=dict_factory, + retain_collection_types=retain_collection_types, + value_serializer=value_serializer, + ) + elif isinstance(v, (tuple, list, set, frozenset)): + cf = v.__class__ if retain_collection_types is True else list + items = [ + _asdict_anything( + i, + is_key=False, + filter=filter, + dict_factory=dict_factory, + retain_collection_types=retain_collection_types, + value_serializer=value_serializer, + ) + for i in v + ] + try: + rv[a.name] = cf(items) + except TypeError: + if not issubclass(cf, tuple): + raise + # Workaround for TypeError: cf.__new__() missing 1 required + # positional argument (which appears, for a namedturle) + rv[a.name] = cf(*items) + elif isinstance(v, dict): + df = dict_factory + rv[a.name] = df( + ( + _asdict_anything( + kk, + is_key=True, + filter=filter, + dict_factory=df, + retain_collection_types=retain_collection_types, + value_serializer=value_serializer, + ), + _asdict_anything( + vv, + is_key=False, + filter=filter, + dict_factory=df, + retain_collection_types=retain_collection_types, + value_serializer=value_serializer, + ), + ) + for kk, vv in v.items() + ) + else: + rv[a.name] = v + else: + rv[a.name] = v + return rv + + +def _asdict_anything( + val, + is_key, + filter, + dict_factory, + retain_collection_types, + value_serializer, +): + """ + ``asdict`` only works on attrs instances, this works on anything. + """ + if getattr(val.__class__, "__attrs_attrs__", None) is not None: + # Attrs class. + rv = asdict( + val, + recurse=True, + filter=filter, + dict_factory=dict_factory, + retain_collection_types=retain_collection_types, + value_serializer=value_serializer, + ) + elif isinstance(val, (tuple, list, set, frozenset)): + if retain_collection_types is True: + cf = val.__class__ + elif is_key: + cf = tuple + else: + cf = list + + rv = cf( + [ + _asdict_anything( + i, + is_key=False, + filter=filter, + dict_factory=dict_factory, + retain_collection_types=retain_collection_types, + value_serializer=value_serializer, + ) + for i in val + ] + ) + elif isinstance(val, dict): + df = dict_factory + rv = df( + ( + _asdict_anything( + kk, + is_key=True, + filter=filter, + dict_factory=df, + retain_collection_types=retain_collection_types, + value_serializer=value_serializer, + ), + _asdict_anything( + vv, + is_key=False, + filter=filter, + dict_factory=df, + retain_collection_types=retain_collection_types, + value_serializer=value_serializer, + ), + ) + for kk, vv in val.items() + ) + else: + rv = val + if value_serializer is not None: + rv = value_serializer(None, None, rv) + + return rv + + +def astuple( + inst, + recurse=True, + filter=None, + tuple_factory=tuple, + retain_collection_types=False, +): + """ + Return the *attrs* attribute values of *inst* as a tuple. + + Optionally recurse into other *attrs*-decorated classes. + + Args: + inst: Instance of an *attrs*-decorated class. + + recurse (bool): + Recurse into classes that are also *attrs*-decorated. + + filter (~typing.Callable): + A callable whose return code determines whether an attribute or + element is included (`True`) or dropped (`False`). Is called with + the `attrs.Attribute` as the first argument and the value as the + second argument. + + tuple_factory (~typing.Callable): + A callable to produce tuples from. For example, to produce lists + instead of tuples. + + retain_collection_types (bool): + Do not convert to `list` or `dict` when encountering an attribute + which type is `tuple`, `dict` or `set`. Only meaningful if + *recurse* is `True`. + + Returns: + Return type of *tuple_factory* + + Raises: + attrs.exceptions.NotAnAttrsClassError: + If *cls* is not an *attrs* class. + + .. versionadded:: 16.2.0 + """ + attrs = fields(inst.__class__) + rv = [] + retain = retain_collection_types # Very long. :/ + for a in attrs: + v = getattr(inst, a.name) + if filter is not None and not filter(a, v): + continue + if recurse is True: + if has(v.__class__): + rv.append( + astuple( + v, + recurse=True, + filter=filter, + tuple_factory=tuple_factory, + retain_collection_types=retain, + ) + ) + elif isinstance(v, (tuple, list, set, frozenset)): + cf = v.__class__ if retain is True else list + items = [ + ( + astuple( + j, + recurse=True, + filter=filter, + tuple_factory=tuple_factory, + retain_collection_types=retain, + ) + if has(j.__class__) + else j + ) + for j in v + ] + try: + rv.append(cf(items)) + except TypeError: + if not issubclass(cf, tuple): + raise + # Workaround for TypeError: cf.__new__() missing 1 required + # positional argument (which appears, for a namedturle) + rv.append(cf(*items)) + elif isinstance(v, dict): + df = v.__class__ if retain is True else dict + rv.append( + df( + ( + ( + astuple( + kk, + tuple_factory=tuple_factory, + retain_collection_types=retain, + ) + if has(kk.__class__) + else kk + ), + ( + astuple( + vv, + tuple_factory=tuple_factory, + retain_collection_types=retain, + ) + if has(vv.__class__) + else vv + ), + ) + for kk, vv in v.items() + ) + ) + else: + rv.append(v) + else: + rv.append(v) + + return rv if tuple_factory is list else tuple_factory(rv) + + +def has(cls): + """ + Check whether *cls* is a class with *attrs* attributes. + + Args: + cls (type): Class to introspect. + + Raises: + TypeError: If *cls* is not a class. + + Returns: + bool: + """ + attrs = getattr(cls, "__attrs_attrs__", None) + if attrs is not None: + return True + + # No attrs, maybe it's a specialized generic (A[str])? + generic_base = get_generic_base(cls) + if generic_base is not None: + generic_attrs = getattr(generic_base, "__attrs_attrs__", None) + if generic_attrs is not None: + # Stick it on here for speed next time. + cls.__attrs_attrs__ = generic_attrs + return generic_attrs is not None + return False + + +def assoc(inst, **changes): + """ + Copy *inst* and apply *changes*. + + This is different from `evolve` that applies the changes to the arguments + that create the new instance. + + `evolve`'s behavior is preferable, but there are `edge cases`_ where it + doesn't work. Therefore `assoc` is deprecated, but will not be removed. + + .. _`edge cases`: https://github.com/python-attrs/attrs/issues/251 + + Args: + inst: Instance of a class with *attrs* attributes. + + changes: Keyword changes in the new copy. + + Returns: + A copy of inst with *changes* incorporated. + + Raises: + attrs.exceptions.AttrsAttributeNotFoundError: + If *attr_name* couldn't be found on *cls*. + + attrs.exceptions.NotAnAttrsClassError: + If *cls* is not an *attrs* class. + + .. deprecated:: 17.1.0 + Use `attrs.evolve` instead if you can. This function will not be + removed du to the slightly different approach compared to + `attrs.evolve`, though. + """ + new = copy.copy(inst) + attrs = fields(inst.__class__) + for k, v in changes.items(): + a = getattr(attrs, k, NOTHING) + if a is NOTHING: + msg = f"{k} is not an attrs attribute on {new.__class__}." + raise AttrsAttributeNotFoundError(msg) + _OBJ_SETATTR(new, k, v) + return new + + +def evolve(*args, **changes): + """ + Create a new instance, based on the first positional argument with + *changes* applied. + + Args: + + inst: + Instance of a class with *attrs* attributes. *inst* must be passed + as a positional argument. + + changes: + Keyword changes in the new copy. + + Returns: + A copy of inst with *changes* incorporated. + + Raises: + TypeError: + If *attr_name* couldn't be found in the class ``__init__``. + + attrs.exceptions.NotAnAttrsClassError: + If *cls* is not an *attrs* class. + + .. versionadded:: 17.1.0 + .. deprecated:: 23.1.0 + It is now deprecated to pass the instance using the keyword argument + *inst*. It will raise a warning until at least April 2024, after which + it will become an error. Always pass the instance as a positional + argument. + .. versionchanged:: 24.1.0 + *inst* can't be passed as a keyword argument anymore. + """ + try: + (inst,) = args + except ValueError: + msg = ( + f"evolve() takes 1 positional argument, but {len(args)} were given" + ) + raise TypeError(msg) from None + + cls = inst.__class__ + attrs = fields(cls) + for a in attrs: + if not a.init: + continue + attr_name = a.name # To deal with private attributes. + init_name = a.alias + if init_name not in changes: + changes[init_name] = getattr(inst, attr_name) + + return cls(**changes) + + +def resolve_types( + cls, globalns=None, localns=None, attribs=None, include_extras=True +): + """ + Resolve any strings and forward annotations in type annotations. + + This is only required if you need concrete types in :class:`Attribute`'s + *type* field. In other words, you don't need to resolve your types if you + only use them for static type checking. + + With no arguments, names will be looked up in the module in which the class + was created. If this is not what you want, for example, if the name only + exists inside a method, you may pass *globalns* or *localns* to specify + other dictionaries in which to look up these names. See the docs of + `typing.get_type_hints` for more details. + + Args: + cls (type): Class to resolve. + + globalns (dict | None): Dictionary containing global variables. + + localns (dict | None): Dictionary containing local variables. + + attribs (list | None): + List of attribs for the given class. This is necessary when calling + from inside a ``field_transformer`` since *cls* is not an *attrs* + class yet. + + include_extras (bool): + Resolve more accurately, if possible. Pass ``include_extras`` to + ``typing.get_hints``, if supported by the typing module. On + supported Python versions (3.9+), this resolves the types more + accurately. + + Raises: + TypeError: If *cls* is not a class. + + attrs.exceptions.NotAnAttrsClassError: + If *cls* is not an *attrs* class and you didn't pass any attribs. + + NameError: If types cannot be resolved because of missing variables. + + Returns: + *cls* so you can use this function also as a class decorator. Please + note that you have to apply it **after** `attrs.define`. That means the + decorator has to come in the line **before** `attrs.define`. + + .. versionadded:: 20.1.0 + .. versionadded:: 21.1.0 *attribs* + .. versionadded:: 23.1.0 *include_extras* + """ + # Since calling get_type_hints is expensive we cache whether we've + # done it already. + if getattr(cls, "__attrs_types_resolved__", None) != cls: + import typing + + kwargs = {"globalns": globalns, "localns": localns} + + if PY_3_9_PLUS: + kwargs["include_extras"] = include_extras + + hints = typing.get_type_hints(cls, **kwargs) + for field in fields(cls) if attribs is None else attribs: + if field.name in hints: + # Since fields have been frozen we must work around it. + _OBJ_SETATTR(field, "type", hints[field.name]) + # We store the class we resolved so that subclasses know they haven't + # been resolved. + cls.__attrs_types_resolved__ = cls + + # Return the class so you can use it as a decorator too. + return cls diff --git a/myenv/lib/python3.12/site-packages/attr/_make.py b/myenv/lib/python3.12/site-packages/attr/_make.py new file mode 100644 index 0000000..bf00c5f --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/_make.py @@ -0,0 +1,2960 @@ +# SPDX-License-Identifier: MIT + +from __future__ import annotations + +import abc +import contextlib +import copy +import enum +import functools +import inspect +import itertools +import linecache +import sys +import types +import typing + +from operator import itemgetter + +# We need to import _compat itself in addition to the _compat members to avoid +# having the thread-local in the globals here. +from . import _compat, _config, setters +from ._compat import ( + PY_3_8_PLUS, + PY_3_10_PLUS, + PY_3_11_PLUS, + _AnnotationExtractor, + _get_annotations, + get_generic_base, +) +from .exceptions import ( + DefaultAlreadySetError, + FrozenInstanceError, + NotAnAttrsClassError, + UnannotatedAttributeError, +) + + +# This is used at least twice, so cache it here. +_OBJ_SETATTR = object.__setattr__ +_INIT_FACTORY_PAT = "__attr_factory_%s" +_CLASSVAR_PREFIXES = ( + "typing.ClassVar", + "t.ClassVar", + "ClassVar", + "typing_extensions.ClassVar", +) +# we don't use a double-underscore prefix because that triggers +# name mangling when trying to create a slot for the field +# (when slots=True) +_HASH_CACHE_FIELD = "_attrs_cached_hash" + +_EMPTY_METADATA_SINGLETON = types.MappingProxyType({}) + +# Unique object for unequivocal getattr() defaults. +_SENTINEL = object() + +_DEFAULT_ON_SETATTR = setters.pipe(setters.convert, setters.validate) + + +class _Nothing(enum.Enum): + """ + Sentinel to indicate the lack of a value when `None` is ambiguous. + + If extending attrs, you can use ``typing.Literal[NOTHING]`` to show + that a value may be ``NOTHING``. + + .. versionchanged:: 21.1.0 ``bool(NOTHING)`` is now False. + .. versionchanged:: 22.2.0 ``NOTHING`` is now an ``enum.Enum`` variant. + """ + + NOTHING = enum.auto() + + def __repr__(self): + return "NOTHING" + + def __bool__(self): + return False + + +NOTHING = _Nothing.NOTHING +""" +Sentinel to indicate the lack of a value when `None` is ambiguous. +""" + + +class _CacheHashWrapper(int): + """ + An integer subclass that pickles / copies as None + + This is used for non-slots classes with ``cache_hash=True``, to avoid + serializing a potentially (even likely) invalid hash value. Since `None` + is the default value for uncalculated hashes, whenever this is copied, + the copy's value for the hash should automatically reset. + + See GH #613 for more details. + """ + + def __reduce__(self, _none_constructor=type(None), _args=()): # noqa: B008 + return _none_constructor, _args + + +def attrib( + default=NOTHING, + validator=None, + repr=True, + cmp=None, + hash=None, + init=True, + metadata=None, + type=None, + converter=None, + factory=None, + kw_only=False, + eq=None, + order=None, + on_setattr=None, + alias=None, +): + """ + Create a new field / attribute on a class. + + Identical to `attrs.field`, except it's not keyword-only. + + Consider using `attrs.field` in new code (``attr.ib`` will *never* go away, + though). + + .. warning:: + + Does **nothing** unless the class is also decorated with + `attr.s` (or similar)! + + + .. versionadded:: 15.2.0 *convert* + .. versionadded:: 16.3.0 *metadata* + .. versionchanged:: 17.1.0 *validator* can be a ``list`` now. + .. versionchanged:: 17.1.0 + *hash* is `None` and therefore mirrors *eq* by default. + .. versionadded:: 17.3.0 *type* + .. deprecated:: 17.4.0 *convert* + .. versionadded:: 17.4.0 + *converter* as a replacement for the deprecated *convert* to achieve + consistency with other noun-based arguments. + .. versionadded:: 18.1.0 + ``factory=f`` is syntactic sugar for ``default=attr.Factory(f)``. + .. versionadded:: 18.2.0 *kw_only* + .. versionchanged:: 19.2.0 *convert* keyword argument removed. + .. versionchanged:: 19.2.0 *repr* also accepts a custom callable. + .. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01. + .. versionadded:: 19.2.0 *eq* and *order* + .. versionadded:: 20.1.0 *on_setattr* + .. versionchanged:: 20.3.0 *kw_only* backported to Python 2 + .. versionchanged:: 21.1.0 + *eq*, *order*, and *cmp* also accept a custom callable + .. versionchanged:: 21.1.0 *cmp* undeprecated + .. versionadded:: 22.2.0 *alias* + """ + eq, eq_key, order, order_key = _determine_attrib_eq_order( + cmp, eq, order, True + ) + + if hash is not None and hash is not True and hash is not False: + msg = "Invalid value for hash. Must be True, False, or None." + raise TypeError(msg) + + if factory is not None: + if default is not NOTHING: + msg = ( + "The `default` and `factory` arguments are mutually exclusive." + ) + raise ValueError(msg) + if not callable(factory): + msg = "The `factory` argument must be a callable." + raise ValueError(msg) + default = Factory(factory) + + if metadata is None: + metadata = {} + + # Apply syntactic sugar by auto-wrapping. + if isinstance(on_setattr, (list, tuple)): + on_setattr = setters.pipe(*on_setattr) + + if validator and isinstance(validator, (list, tuple)): + validator = and_(*validator) + + if converter and isinstance(converter, (list, tuple)): + converter = pipe(*converter) + + return _CountingAttr( + default=default, + validator=validator, + repr=repr, + cmp=None, + hash=hash, + init=init, + converter=converter, + metadata=metadata, + type=type, + kw_only=kw_only, + eq=eq, + eq_key=eq_key, + order=order, + order_key=order_key, + on_setattr=on_setattr, + alias=alias, + ) + + +def _compile_and_eval(script, globs, locs=None, filename=""): + """ + Evaluate the script with the given global (globs) and local (locs) + variables. + """ + bytecode = compile(script, filename, "exec") + eval(bytecode, globs, locs) + + +def _make_method(name, script, filename, globs, locals=None): + """ + Create the method with the script given and return the method object. + """ + locs = {} if locals is None else locals + + # In order of debuggers like PDB being able to step through the code, + # we add a fake linecache entry. + count = 1 + base_filename = filename + while True: + linecache_tuple = ( + len(script), + None, + script.splitlines(True), + filename, + ) + old_val = linecache.cache.setdefault(filename, linecache_tuple) + if old_val == linecache_tuple: + break + + filename = f"{base_filename[:-1]}-{count}>" + count += 1 + + _compile_and_eval(script, globs, locs, filename) + + return locs[name] + + +def _make_attr_tuple_class(cls_name, attr_names): + """ + Create a tuple subclass to hold `Attribute`s for an `attrs` class. + + The subclass is a bare tuple with properties for names. + + class MyClassAttributes(tuple): + __slots__ = () + x = property(itemgetter(0)) + """ + attr_class_name = f"{cls_name}Attributes" + attr_class_template = [ + f"class {attr_class_name}(tuple):", + " __slots__ = ()", + ] + if attr_names: + for i, attr_name in enumerate(attr_names): + attr_class_template.append( + f" {attr_name} = _attrs_property(_attrs_itemgetter({i}))" + ) + else: + attr_class_template.append(" pass") + globs = {"_attrs_itemgetter": itemgetter, "_attrs_property": property} + _compile_and_eval("\n".join(attr_class_template), globs) + return globs[attr_class_name] + + +# Tuple class for extracted attributes from a class definition. +# `base_attrs` is a subset of `attrs`. +_Attributes = _make_attr_tuple_class( + "_Attributes", + [ + # all attributes to build dunder methods for + "attrs", + # attributes that have been inherited + "base_attrs", + # map inherited attributes to their originating classes + "base_attrs_map", + ], +) + + +def _is_class_var(annot): + """ + Check whether *annot* is a typing.ClassVar. + + The string comparison hack is used to avoid evaluating all string + annotations which would put attrs-based classes at a performance + disadvantage compared to plain old classes. + """ + annot = str(annot) + + # Annotation can be quoted. + if annot.startswith(("'", '"')) and annot.endswith(("'", '"')): + annot = annot[1:-1] + + return annot.startswith(_CLASSVAR_PREFIXES) + + +def _has_own_attribute(cls, attrib_name): + """ + Check whether *cls* defines *attrib_name* (and doesn't just inherit it). + """ + return attrib_name in cls.__dict__ + + +def _collect_base_attrs(cls, taken_attr_names): + """ + Collect attr.ibs from base classes of *cls*, except *taken_attr_names*. + """ + base_attrs = [] + base_attr_map = {} # A dictionary of base attrs to their classes. + + # Traverse the MRO and collect attributes. + for base_cls in reversed(cls.__mro__[1:-1]): + for a in getattr(base_cls, "__attrs_attrs__", []): + if a.inherited or a.name in taken_attr_names: + continue + + a = a.evolve(inherited=True) # noqa: PLW2901 + base_attrs.append(a) + base_attr_map[a.name] = base_cls + + # For each name, only keep the freshest definition i.e. the furthest at the + # back. base_attr_map is fine because it gets overwritten with every new + # instance. + filtered = [] + seen = set() + for a in reversed(base_attrs): + if a.name in seen: + continue + filtered.insert(0, a) + seen.add(a.name) + + return filtered, base_attr_map + + +def _collect_base_attrs_broken(cls, taken_attr_names): + """ + Collect attr.ibs from base classes of *cls*, except *taken_attr_names*. + + N.B. *taken_attr_names* will be mutated. + + Adhere to the old incorrect behavior. + + Notably it collects from the front and considers inherited attributes which + leads to the buggy behavior reported in #428. + """ + base_attrs = [] + base_attr_map = {} # A dictionary of base attrs to their classes. + + # Traverse the MRO and collect attributes. + for base_cls in cls.__mro__[1:-1]: + for a in getattr(base_cls, "__attrs_attrs__", []): + if a.name in taken_attr_names: + continue + + a = a.evolve(inherited=True) # noqa: PLW2901 + taken_attr_names.add(a.name) + base_attrs.append(a) + base_attr_map[a.name] = base_cls + + return base_attrs, base_attr_map + + +def _transform_attrs( + cls, these, auto_attribs, kw_only, collect_by_mro, field_transformer +): + """ + Transform all `_CountingAttr`s on a class into `Attribute`s. + + If *these* is passed, use that and don't look for them on the class. + + If *collect_by_mro* is True, collect them in the correct MRO order, + otherwise use the old -- incorrect -- order. See #428. + + Return an `_Attributes`. + """ + cd = cls.__dict__ + anns = _get_annotations(cls) + + if these is not None: + ca_list = list(these.items()) + elif auto_attribs is True: + ca_names = { + name + for name, attr in cd.items() + if isinstance(attr, _CountingAttr) + } + ca_list = [] + annot_names = set() + for attr_name, type in anns.items(): + if _is_class_var(type): + continue + annot_names.add(attr_name) + a = cd.get(attr_name, NOTHING) + + if not isinstance(a, _CountingAttr): + a = attrib() if a is NOTHING else attrib(default=a) + ca_list.append((attr_name, a)) + + unannotated = ca_names - annot_names + if len(unannotated) > 0: + raise UnannotatedAttributeError( + "The following `attr.ib`s lack a type annotation: " + + ", ".join( + sorted(unannotated, key=lambda n: cd.get(n).counter) + ) + + "." + ) + else: + ca_list = sorted( + ( + (name, attr) + for name, attr in cd.items() + if isinstance(attr, _CountingAttr) + ), + key=lambda e: e[1].counter, + ) + + own_attrs = [ + Attribute.from_counting_attr( + name=attr_name, ca=ca, type=anns.get(attr_name) + ) + for attr_name, ca in ca_list + ] + + if collect_by_mro: + base_attrs, base_attr_map = _collect_base_attrs( + cls, {a.name for a in own_attrs} + ) + else: + base_attrs, base_attr_map = _collect_base_attrs_broken( + cls, {a.name for a in own_attrs} + ) + + if kw_only: + own_attrs = [a.evolve(kw_only=True) for a in own_attrs] + base_attrs = [a.evolve(kw_only=True) for a in base_attrs] + + attrs = base_attrs + own_attrs + + # Mandatory vs non-mandatory attr order only matters when they are part of + # the __init__ signature and when they aren't kw_only (which are moved to + # the end and can be mandatory or non-mandatory in any order, as they will + # be specified as keyword args anyway). Check the order of those attrs: + had_default = False + for a in (a for a in attrs if a.init is not False and a.kw_only is False): + if had_default is True and a.default is NOTHING: + msg = f"No mandatory attributes allowed after an attribute with a default value or factory. Attribute in question: {a!r}" + raise ValueError(msg) + + if had_default is False and a.default is not NOTHING: + had_default = True + + if field_transformer is not None: + attrs = field_transformer(cls, attrs) + + # Resolve default field alias after executing field_transformer. + # This allows field_transformer to differentiate between explicit vs + # default aliases and supply their own defaults. + attrs = [ + a.evolve(alias=_default_init_alias_for(a.name)) if not a.alias else a + for a in attrs + ] + + # Create AttrsClass *after* applying the field_transformer since it may + # add or remove attributes! + attr_names = [a.name for a in attrs] + AttrsClass = _make_attr_tuple_class(cls.__name__, attr_names) + + return _Attributes((AttrsClass(attrs), base_attrs, base_attr_map)) + + +def _make_cached_property_getattr(cached_properties, original_getattr, cls): + lines = [ + # Wrapped to get `__class__` into closure cell for super() + # (It will be replaced with the newly constructed class after construction). + "def wrapper(_cls):", + " __class__ = _cls", + " def __getattr__(self, item, cached_properties=cached_properties, original_getattr=original_getattr, _cached_setattr_get=_cached_setattr_get):", + " func = cached_properties.get(item)", + " if func is not None:", + " result = func(self)", + " _setter = _cached_setattr_get(self)", + " _setter(item, result)", + " return result", + ] + if original_getattr is not None: + lines.append( + " return original_getattr(self, item)", + ) + else: + lines.extend( + [ + " try:", + " return super().__getattribute__(item)", + " except AttributeError:", + " if not hasattr(super(), '__getattr__'):", + " raise", + " return super().__getattr__(item)", + " original_error = f\"'{self.__class__.__name__}' object has no attribute '{item}'\"", + " raise AttributeError(original_error)", + ] + ) + + lines.extend( + [ + " return __getattr__", + "__getattr__ = wrapper(_cls)", + ] + ) + + unique_filename = _generate_unique_filename(cls, "getattr") + + glob = { + "cached_properties": cached_properties, + "_cached_setattr_get": _OBJ_SETATTR.__get__, + "original_getattr": original_getattr, + } + + return _make_method( + "__getattr__", + "\n".join(lines), + unique_filename, + glob, + locals={ + "_cls": cls, + }, + ) + + +def _frozen_setattrs(self, name, value): + """ + Attached to frozen classes as __setattr__. + """ + if isinstance(self, BaseException) and name in ( + "__cause__", + "__context__", + "__traceback__", + ): + BaseException.__setattr__(self, name, value) + return + + raise FrozenInstanceError() + + +def _frozen_delattrs(self, name): + """ + Attached to frozen classes as __delattr__. + """ + raise FrozenInstanceError() + + +class _ClassBuilder: + """ + Iteratively build *one* class. + """ + + __slots__ = ( + "_attr_names", + "_attrs", + "_base_attr_map", + "_base_names", + "_cache_hash", + "_cls", + "_cls_dict", + "_delete_attribs", + "_frozen", + "_has_pre_init", + "_pre_init_has_args", + "_has_post_init", + "_is_exc", + "_on_setattr", + "_slots", + "_weakref_slot", + "_wrote_own_setattr", + "_has_custom_setattr", + ) + + def __init__( + self, + cls, + these, + slots, + frozen, + weakref_slot, + getstate_setstate, + auto_attribs, + kw_only, + cache_hash, + is_exc, + collect_by_mro, + on_setattr, + has_custom_setattr, + field_transformer, + ): + attrs, base_attrs, base_map = _transform_attrs( + cls, + these, + auto_attribs, + kw_only, + collect_by_mro, + field_transformer, + ) + + self._cls = cls + self._cls_dict = dict(cls.__dict__) if slots else {} + self._attrs = attrs + self._base_names = {a.name for a in base_attrs} + self._base_attr_map = base_map + self._attr_names = tuple(a.name for a in attrs) + self._slots = slots + self._frozen = frozen + self._weakref_slot = weakref_slot + self._cache_hash = cache_hash + self._has_pre_init = bool(getattr(cls, "__attrs_pre_init__", False)) + self._pre_init_has_args = False + if self._has_pre_init: + # Check if the pre init method has more arguments than just `self` + # We want to pass arguments if pre init expects arguments + pre_init_func = cls.__attrs_pre_init__ + pre_init_signature = inspect.signature(pre_init_func) + self._pre_init_has_args = len(pre_init_signature.parameters) > 1 + self._has_post_init = bool(getattr(cls, "__attrs_post_init__", False)) + self._delete_attribs = not bool(these) + self._is_exc = is_exc + self._on_setattr = on_setattr + + self._has_custom_setattr = has_custom_setattr + self._wrote_own_setattr = False + + self._cls_dict["__attrs_attrs__"] = self._attrs + + if frozen: + self._cls_dict["__setattr__"] = _frozen_setattrs + self._cls_dict["__delattr__"] = _frozen_delattrs + + self._wrote_own_setattr = True + elif on_setattr in ( + _DEFAULT_ON_SETATTR, + setters.validate, + setters.convert, + ): + has_validator = has_converter = False + for a in attrs: + if a.validator is not None: + has_validator = True + if a.converter is not None: + has_converter = True + + if has_validator and has_converter: + break + if ( + ( + on_setattr == _DEFAULT_ON_SETATTR + and not (has_validator or has_converter) + ) + or (on_setattr == setters.validate and not has_validator) + or (on_setattr == setters.convert and not has_converter) + ): + # If class-level on_setattr is set to convert + validate, but + # there's no field to convert or validate, pretend like there's + # no on_setattr. + self._on_setattr = None + + if getstate_setstate: + ( + self._cls_dict["__getstate__"], + self._cls_dict["__setstate__"], + ) = self._make_getstate_setstate() + + def __repr__(self): + return f"<_ClassBuilder(cls={self._cls.__name__})>" + + def build_class(self): + """ + Finalize class based on the accumulated configuration. + + Builder cannot be used after calling this method. + """ + if self._slots is True: + cls = self._create_slots_class() + else: + cls = self._patch_original_class() + if PY_3_10_PLUS: + cls = abc.update_abstractmethods(cls) + + # The method gets only called if it's not inherited from a base class. + # _has_own_attribute does NOT work properly for classmethods. + if ( + getattr(cls, "__attrs_init_subclass__", None) + and "__attrs_init_subclass__" not in cls.__dict__ + ): + cls.__attrs_init_subclass__() + + return cls + + def _patch_original_class(self): + """ + Apply accumulated methods and return the class. + """ + cls = self._cls + base_names = self._base_names + + # Clean class of attribute definitions (`attr.ib()`s). + if self._delete_attribs: + for name in self._attr_names: + if ( + name not in base_names + and getattr(cls, name, _SENTINEL) is not _SENTINEL + ): + # An AttributeError can happen if a base class defines a + # class variable and we want to set an attribute with the + # same name by using only a type annotation. + with contextlib.suppress(AttributeError): + delattr(cls, name) + + # Attach our dunder methods. + for name, value in self._cls_dict.items(): + setattr(cls, name, value) + + # If we've inherited an attrs __setattr__ and don't write our own, + # reset it to object's. + if not self._wrote_own_setattr and getattr( + cls, "__attrs_own_setattr__", False + ): + cls.__attrs_own_setattr__ = False + + if not self._has_custom_setattr: + cls.__setattr__ = _OBJ_SETATTR + + return cls + + def _create_slots_class(self): + """ + Build and return a new class with a `__slots__` attribute. + """ + cd = { + k: v + for k, v in self._cls_dict.items() + if k not in (*tuple(self._attr_names), "__dict__", "__weakref__") + } + + # If our class doesn't have its own implementation of __setattr__ + # (either from the user or by us), check the bases, if one of them has + # an attrs-made __setattr__, that needs to be reset. We don't walk the + # MRO because we only care about our immediate base classes. + # XXX: This can be confused by subclassing a slotted attrs class with + # XXX: a non-attrs class and subclass the resulting class with an attrs + # XXX: class. See `test_slotted_confused` for details. For now that's + # XXX: OK with us. + if not self._wrote_own_setattr: + cd["__attrs_own_setattr__"] = False + + if not self._has_custom_setattr: + for base_cls in self._cls.__bases__: + if base_cls.__dict__.get("__attrs_own_setattr__", False): + cd["__setattr__"] = _OBJ_SETATTR + break + + # Traverse the MRO to collect existing slots + # and check for an existing __weakref__. + existing_slots = {} + weakref_inherited = False + for base_cls in self._cls.__mro__[1:-1]: + if base_cls.__dict__.get("__weakref__", None) is not None: + weakref_inherited = True + existing_slots.update( + { + name: getattr(base_cls, name) + for name in getattr(base_cls, "__slots__", []) + } + ) + + base_names = set(self._base_names) + + names = self._attr_names + if ( + self._weakref_slot + and "__weakref__" not in getattr(self._cls, "__slots__", ()) + and "__weakref__" not in names + and not weakref_inherited + ): + names += ("__weakref__",) + + if PY_3_8_PLUS: + cached_properties = { + name: cached_property.func + for name, cached_property in cd.items() + if isinstance(cached_property, functools.cached_property) + } + else: + # `functools.cached_property` was introduced in 3.8. + # So can't be used before this. + cached_properties = {} + + # Collect methods with a `__class__` reference that are shadowed in the new class. + # To know to update them. + additional_closure_functions_to_update = [] + if cached_properties: + class_annotations = _get_annotations(self._cls) + for name, func in cached_properties.items(): + # Add cached properties to names for slotting. + names += (name,) + # Clear out function from class to avoid clashing. + del cd[name] + additional_closure_functions_to_update.append(func) + annotation = inspect.signature(func).return_annotation + if annotation is not inspect.Parameter.empty: + class_annotations[name] = annotation + + original_getattr = cd.get("__getattr__") + if original_getattr is not None: + additional_closure_functions_to_update.append(original_getattr) + + cd["__getattr__"] = _make_cached_property_getattr( + cached_properties, original_getattr, self._cls + ) + + # We only add the names of attributes that aren't inherited. + # Setting __slots__ to inherited attributes wastes memory. + slot_names = [name for name in names if name not in base_names] + + # There are slots for attributes from current class + # that are defined in parent classes. + # As their descriptors may be overridden by a child class, + # we collect them here and update the class dict + reused_slots = { + slot: slot_descriptor + for slot, slot_descriptor in existing_slots.items() + if slot in slot_names + } + slot_names = [name for name in slot_names if name not in reused_slots] + cd.update(reused_slots) + if self._cache_hash: + slot_names.append(_HASH_CACHE_FIELD) + + cd["__slots__"] = tuple(slot_names) + + cd["__qualname__"] = self._cls.__qualname__ + + # Create new class based on old class and our methods. + cls = type(self._cls)(self._cls.__name__, self._cls.__bases__, cd) + + # The following is a fix for + # . + # If a method mentions `__class__` or uses the no-arg super(), the + # compiler will bake a reference to the class in the method itself + # as `method.__closure__`. Since we replace the class with a + # clone, we rewrite these references so it keeps working. + for item in itertools.chain( + cls.__dict__.values(), additional_closure_functions_to_update + ): + if isinstance(item, (classmethod, staticmethod)): + # Class- and staticmethods hide their functions inside. + # These might need to be rewritten as well. + closure_cells = getattr(item.__func__, "__closure__", None) + elif isinstance(item, property): + # Workaround for property `super()` shortcut (PY3-only). + # There is no universal way for other descriptors. + closure_cells = getattr(item.fget, "__closure__", None) + else: + closure_cells = getattr(item, "__closure__", None) + + if not closure_cells: # Catch None or the empty list. + continue + for cell in closure_cells: + try: + match = cell.cell_contents is self._cls + except ValueError: # noqa: PERF203 + # ValueError: Cell is empty + pass + else: + if match: + cell.cell_contents = cls + return cls + + def add_repr(self, ns): + self._cls_dict["__repr__"] = self._add_method_dunders( + _make_repr(self._attrs, ns, self._cls) + ) + return self + + def add_str(self): + repr = self._cls_dict.get("__repr__") + if repr is None: + msg = "__str__ can only be generated if a __repr__ exists." + raise ValueError(msg) + + def __str__(self): + return self.__repr__() + + self._cls_dict["__str__"] = self._add_method_dunders(__str__) + return self + + def _make_getstate_setstate(self): + """ + Create custom __setstate__ and __getstate__ methods. + """ + # __weakref__ is not writable. + state_attr_names = tuple( + an for an in self._attr_names if an != "__weakref__" + ) + + def slots_getstate(self): + """ + Automatically created by attrs. + """ + return {name: getattr(self, name) for name in state_attr_names} + + hash_caching_enabled = self._cache_hash + + def slots_setstate(self, state): + """ + Automatically created by attrs. + """ + __bound_setattr = _OBJ_SETATTR.__get__(self) + if isinstance(state, tuple): + # Backward compatibility with attrs instances pickled with + # attrs versions before v22.2.0 which stored tuples. + for name, value in zip(state_attr_names, state): + __bound_setattr(name, value) + else: + for name in state_attr_names: + if name in state: + __bound_setattr(name, state[name]) + + # The hash code cache is not included when the object is + # serialized, but it still needs to be initialized to None to + # indicate that the first call to __hash__ should be a cache + # miss. + if hash_caching_enabled: + __bound_setattr(_HASH_CACHE_FIELD, None) + + return slots_getstate, slots_setstate + + def make_unhashable(self): + self._cls_dict["__hash__"] = None + return self + + def add_hash(self): + self._cls_dict["__hash__"] = self._add_method_dunders( + _make_hash( + self._cls, + self._attrs, + frozen=self._frozen, + cache_hash=self._cache_hash, + ) + ) + + return self + + def add_init(self): + self._cls_dict["__init__"] = self._add_method_dunders( + _make_init( + self._cls, + self._attrs, + self._has_pre_init, + self._pre_init_has_args, + self._has_post_init, + self._frozen, + self._slots, + self._cache_hash, + self._base_attr_map, + self._is_exc, + self._on_setattr, + attrs_init=False, + ) + ) + + return self + + def add_match_args(self): + self._cls_dict["__match_args__"] = tuple( + field.name + for field in self._attrs + if field.init and not field.kw_only + ) + + def add_attrs_init(self): + self._cls_dict["__attrs_init__"] = self._add_method_dunders( + _make_init( + self._cls, + self._attrs, + self._has_pre_init, + self._pre_init_has_args, + self._has_post_init, + self._frozen, + self._slots, + self._cache_hash, + self._base_attr_map, + self._is_exc, + self._on_setattr, + attrs_init=True, + ) + ) + + return self + + def add_eq(self): + cd = self._cls_dict + + cd["__eq__"] = self._add_method_dunders( + _make_eq(self._cls, self._attrs) + ) + cd["__ne__"] = self._add_method_dunders(_make_ne()) + + return self + + def add_order(self): + cd = self._cls_dict + + cd["__lt__"], cd["__le__"], cd["__gt__"], cd["__ge__"] = ( + self._add_method_dunders(meth) + for meth in _make_order(self._cls, self._attrs) + ) + + return self + + def add_setattr(self): + if self._frozen: + return self + + sa_attrs = {} + for a in self._attrs: + on_setattr = a.on_setattr or self._on_setattr + if on_setattr and on_setattr is not setters.NO_OP: + sa_attrs[a.name] = a, on_setattr + + if not sa_attrs: + return self + + if self._has_custom_setattr: + # We need to write a __setattr__ but there already is one! + msg = "Can't combine custom __setattr__ with on_setattr hooks." + raise ValueError(msg) + + # docstring comes from _add_method_dunders + def __setattr__(self, name, val): + try: + a, hook = sa_attrs[name] + except KeyError: + nval = val + else: + nval = hook(self, a, val) + + _OBJ_SETATTR(self, name, nval) + + self._cls_dict["__attrs_own_setattr__"] = True + self._cls_dict["__setattr__"] = self._add_method_dunders(__setattr__) + self._wrote_own_setattr = True + + return self + + def _add_method_dunders(self, method): + """ + Add __module__ and __qualname__ to a *method* if possible. + """ + with contextlib.suppress(AttributeError): + method.__module__ = self._cls.__module__ + + with contextlib.suppress(AttributeError): + method.__qualname__ = f"{self._cls.__qualname__}.{method.__name__}" + + with contextlib.suppress(AttributeError): + method.__doc__ = ( + "Method generated by attrs for class " + f"{self._cls.__qualname__}." + ) + + return method + + +def _determine_attrs_eq_order(cmp, eq, order, default_eq): + """ + Validate the combination of *cmp*, *eq*, and *order*. Derive the effective + values of eq and order. If *eq* is None, set it to *default_eq*. + """ + if cmp is not None and any((eq is not None, order is not None)): + msg = "Don't mix `cmp` with `eq' and `order`." + raise ValueError(msg) + + # cmp takes precedence due to bw-compatibility. + if cmp is not None: + return cmp, cmp + + # If left None, equality is set to the specified default and ordering + # mirrors equality. + if eq is None: + eq = default_eq + + if order is None: + order = eq + + if eq is False and order is True: + msg = "`order` can only be True if `eq` is True too." + raise ValueError(msg) + + return eq, order + + +def _determine_attrib_eq_order(cmp, eq, order, default_eq): + """ + Validate the combination of *cmp*, *eq*, and *order*. Derive the effective + values of eq and order. If *eq* is None, set it to *default_eq*. + """ + if cmp is not None and any((eq is not None, order is not None)): + msg = "Don't mix `cmp` with `eq' and `order`." + raise ValueError(msg) + + def decide_callable_or_boolean(value): + """ + Decide whether a key function is used. + """ + if callable(value): + value, key = True, value + else: + key = None + return value, key + + # cmp takes precedence due to bw-compatibility. + if cmp is not None: + cmp, cmp_key = decide_callable_or_boolean(cmp) + return cmp, cmp_key, cmp, cmp_key + + # If left None, equality is set to the specified default and ordering + # mirrors equality. + if eq is None: + eq, eq_key = default_eq, None + else: + eq, eq_key = decide_callable_or_boolean(eq) + + if order is None: + order, order_key = eq, eq_key + else: + order, order_key = decide_callable_or_boolean(order) + + if eq is False and order is True: + msg = "`order` can only be True if `eq` is True too." + raise ValueError(msg) + + return eq, eq_key, order, order_key + + +def _determine_whether_to_implement( + cls, flag, auto_detect, dunders, default=True +): + """ + Check whether we should implement a set of methods for *cls*. + + *flag* is the argument passed into @attr.s like 'init', *auto_detect* the + same as passed into @attr.s and *dunders* is a tuple of attribute names + whose presence signal that the user has implemented it themselves. + + Return *default* if no reason for either for or against is found. + """ + if flag is True or flag is False: + return flag + + if flag is None and auto_detect is False: + return default + + # Logically, flag is None and auto_detect is True here. + for dunder in dunders: + if _has_own_attribute(cls, dunder): + return False + + return default + + +def attrs( + maybe_cls=None, + these=None, + repr_ns=None, + repr=None, + cmp=None, + hash=None, + init=None, + slots=False, + frozen=False, + weakref_slot=True, + str=False, + auto_attribs=False, + kw_only=False, + cache_hash=False, + auto_exc=False, + eq=None, + order=None, + auto_detect=False, + collect_by_mro=False, + getstate_setstate=None, + on_setattr=None, + field_transformer=None, + match_args=True, + unsafe_hash=None, +): + r""" + A class decorator that adds :term:`dunder methods` according to the + specified attributes using `attr.ib` or the *these* argument. + + Consider using `attrs.define` / `attrs.frozen` in new code (``attr.s`` will + *never* go away, though). + + Args: + repr_ns (str): + When using nested classes, there was no way in Python 2 to + automatically detect that. This argument allows to set a custom + name for a more meaningful ``repr`` output. This argument is + pointless in Python 3 and is therefore deprecated. + + .. caution:: + Refer to `attrs.define` for the rest of the parameters, but note that they + can have different defaults. + + Notably, leaving *on_setattr* as `None` will **not** add any hooks. + + .. versionadded:: 16.0.0 *slots* + .. versionadded:: 16.1.0 *frozen* + .. versionadded:: 16.3.0 *str* + .. versionadded:: 16.3.0 Support for ``__attrs_post_init__``. + .. versionchanged:: 17.1.0 + *hash* supports `None` as value which is also the default now. + .. versionadded:: 17.3.0 *auto_attribs* + .. versionchanged:: 18.1.0 + If *these* is passed, no attributes are deleted from the class body. + .. versionchanged:: 18.1.0 If *these* is ordered, the order is retained. + .. versionadded:: 18.2.0 *weakref_slot* + .. deprecated:: 18.2.0 + ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now raise a + `DeprecationWarning` if the classes compared are subclasses of + each other. ``__eq`` and ``__ne__`` never tried to compared subclasses + to each other. + .. versionchanged:: 19.2.0 + ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now do not consider + subclasses comparable anymore. + .. versionadded:: 18.2.0 *kw_only* + .. versionadded:: 18.2.0 *cache_hash* + .. versionadded:: 19.1.0 *auto_exc* + .. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01. + .. versionadded:: 19.2.0 *eq* and *order* + .. versionadded:: 20.1.0 *auto_detect* + .. versionadded:: 20.1.0 *collect_by_mro* + .. versionadded:: 20.1.0 *getstate_setstate* + .. versionadded:: 20.1.0 *on_setattr* + .. versionadded:: 20.3.0 *field_transformer* + .. versionchanged:: 21.1.0 + ``init=False`` injects ``__attrs_init__`` + .. versionchanged:: 21.1.0 Support for ``__attrs_pre_init__`` + .. versionchanged:: 21.1.0 *cmp* undeprecated + .. versionadded:: 21.3.0 *match_args* + .. versionadded:: 22.2.0 + *unsafe_hash* as an alias for *hash* (for :pep:`681` compliance). + .. deprecated:: 24.1.0 *repr_ns* + .. versionchanged:: 24.1.0 + Instances are not compared as tuples of attributes anymore, but using a + big ``and`` condition. This is faster and has more correct behavior for + uncomparable values like `math.nan`. + .. versionadded:: 24.1.0 + If a class has an *inherited* classmethod called + ``__attrs_init_subclass__``, it is executed after the class is created. + .. deprecated:: 24.1.0 *hash* is deprecated in favor of *unsafe_hash*. + """ + if repr_ns is not None: + import warnings + + warnings.warn( + DeprecationWarning( + "The `repr_ns` argument is deprecated and will be removed in or after August 2025." + ), + stacklevel=2, + ) + + eq_, order_ = _determine_attrs_eq_order(cmp, eq, order, None) + + # unsafe_hash takes precedence due to PEP 681. + if unsafe_hash is not None: + hash = unsafe_hash + + if isinstance(on_setattr, (list, tuple)): + on_setattr = setters.pipe(*on_setattr) + + def wrap(cls): + is_frozen = frozen or _has_frozen_base_class(cls) + is_exc = auto_exc is True and issubclass(cls, BaseException) + has_own_setattr = auto_detect and _has_own_attribute( + cls, "__setattr__" + ) + + if has_own_setattr and is_frozen: + msg = "Can't freeze a class with a custom __setattr__." + raise ValueError(msg) + + builder = _ClassBuilder( + cls, + these, + slots, + is_frozen, + weakref_slot, + _determine_whether_to_implement( + cls, + getstate_setstate, + auto_detect, + ("__getstate__", "__setstate__"), + default=slots, + ), + auto_attribs, + kw_only, + cache_hash, + is_exc, + collect_by_mro, + on_setattr, + has_own_setattr, + field_transformer, + ) + if _determine_whether_to_implement( + cls, repr, auto_detect, ("__repr__",) + ): + builder.add_repr(repr_ns) + if str is True: + builder.add_str() + + eq = _determine_whether_to_implement( + cls, eq_, auto_detect, ("__eq__", "__ne__") + ) + if not is_exc and eq is True: + builder.add_eq() + if not is_exc and _determine_whether_to_implement( + cls, order_, auto_detect, ("__lt__", "__le__", "__gt__", "__ge__") + ): + builder.add_order() + + builder.add_setattr() + + nonlocal hash + if ( + hash is None + and auto_detect is True + and _has_own_attribute(cls, "__hash__") + ): + hash = False + + if hash is not True and hash is not False and hash is not None: + # Can't use `hash in` because 1 == True for example. + msg = "Invalid value for hash. Must be True, False, or None." + raise TypeError(msg) + + if hash is False or (hash is None and eq is False) or is_exc: + # Don't do anything. Should fall back to __object__'s __hash__ + # which is by id. + if cache_hash: + msg = "Invalid value for cache_hash. To use hash caching, hashing must be either explicitly or implicitly enabled." + raise TypeError(msg) + elif hash is True or ( + hash is None and eq is True and is_frozen is True + ): + # Build a __hash__ if told so, or if it's safe. + builder.add_hash() + else: + # Raise TypeError on attempts to hash. + if cache_hash: + msg = "Invalid value for cache_hash. To use hash caching, hashing must be either explicitly or implicitly enabled." + raise TypeError(msg) + builder.make_unhashable() + + if _determine_whether_to_implement( + cls, init, auto_detect, ("__init__",) + ): + builder.add_init() + else: + builder.add_attrs_init() + if cache_hash: + msg = "Invalid value for cache_hash. To use hash caching, init must be True." + raise TypeError(msg) + + if ( + PY_3_10_PLUS + and match_args + and not _has_own_attribute(cls, "__match_args__") + ): + builder.add_match_args() + + return builder.build_class() + + # maybe_cls's type depends on the usage of the decorator. It's a class + # if it's used as `@attrs` but `None` if used as `@attrs()`. + if maybe_cls is None: + return wrap + + return wrap(maybe_cls) + + +_attrs = attrs +""" +Internal alias so we can use it in functions that take an argument called +*attrs*. +""" + + +def _has_frozen_base_class(cls): + """ + Check whether *cls* has a frozen ancestor by looking at its + __setattr__. + """ + return cls.__setattr__ is _frozen_setattrs + + +def _generate_unique_filename(cls, func_name): + """ + Create a "filename" suitable for a function being generated. + """ + return ( + f"" + ) + + +def _make_hash(cls, attrs, frozen, cache_hash): + attrs = tuple( + a for a in attrs if a.hash is True or (a.hash is None and a.eq is True) + ) + + tab = " " + + unique_filename = _generate_unique_filename(cls, "hash") + type_hash = hash(unique_filename) + # If eq is custom generated, we need to include the functions in globs + globs = {} + + hash_def = "def __hash__(self" + hash_func = "hash((" + closing_braces = "))" + if not cache_hash: + hash_def += "):" + else: + hash_def += ", *" + + hash_def += ", _cache_wrapper=__import__('attr._make')._make._CacheHashWrapper):" + hash_func = "_cache_wrapper(" + hash_func + closing_braces += ")" + + method_lines = [hash_def] + + def append_hash_computation_lines(prefix, indent): + """ + Generate the code for actually computing the hash code. + Below this will either be returned directly or used to compute + a value which is then cached, depending on the value of cache_hash + """ + + method_lines.extend( + [ + indent + prefix + hash_func, + indent + f" {type_hash},", + ] + ) + + for a in attrs: + if a.eq_key: + cmp_name = f"_{a.name}_key" + globs[cmp_name] = a.eq_key + method_lines.append( + indent + f" {cmp_name}(self.{a.name})," + ) + else: + method_lines.append(indent + f" self.{a.name},") + + method_lines.append(indent + " " + closing_braces) + + if cache_hash: + method_lines.append(tab + f"if self.{_HASH_CACHE_FIELD} is None:") + if frozen: + append_hash_computation_lines( + f"object.__setattr__(self, '{_HASH_CACHE_FIELD}', ", tab * 2 + ) + method_lines.append(tab * 2 + ")") # close __setattr__ + else: + append_hash_computation_lines( + f"self.{_HASH_CACHE_FIELD} = ", tab * 2 + ) + method_lines.append(tab + f"return self.{_HASH_CACHE_FIELD}") + else: + append_hash_computation_lines("return ", tab) + + script = "\n".join(method_lines) + return _make_method("__hash__", script, unique_filename, globs) + + +def _add_hash(cls, attrs): + """ + Add a hash method to *cls*. + """ + cls.__hash__ = _make_hash(cls, attrs, frozen=False, cache_hash=False) + return cls + + +def _make_ne(): + """ + Create __ne__ method. + """ + + def __ne__(self, other): + """ + Check equality and either forward a NotImplemented or + return the result negated. + """ + result = self.__eq__(other) + if result is NotImplemented: + return NotImplemented + + return not result + + return __ne__ + + +def _make_eq(cls, attrs): + """ + Create __eq__ method for *cls* with *attrs*. + """ + attrs = [a for a in attrs if a.eq] + + unique_filename = _generate_unique_filename(cls, "eq") + lines = [ + "def __eq__(self, other):", + " if other.__class__ is not self.__class__:", + " return NotImplemented", + ] + + # We can't just do a big self.x = other.x and... clause due to + # irregularities like nan == nan is false but (nan,) == (nan,) is true. + globs = {} + if attrs: + lines.append(" return (") + for a in attrs: + if a.eq_key: + cmp_name = f"_{a.name}_key" + # Add the key function to the global namespace + # of the evaluated function. + globs[cmp_name] = a.eq_key + lines.append( + f" {cmp_name}(self.{a.name}) == {cmp_name}(other.{a.name})" + ) + else: + lines.append(f" self.{a.name} == other.{a.name}") + if a is not attrs[-1]: + lines[-1] = f"{lines[-1]} and" + lines.append(" )") + else: + lines.append(" return True") + + script = "\n".join(lines) + + return _make_method("__eq__", script, unique_filename, globs) + + +def _make_order(cls, attrs): + """ + Create ordering methods for *cls* with *attrs*. + """ + attrs = [a for a in attrs if a.order] + + def attrs_to_tuple(obj): + """ + Save us some typing. + """ + return tuple( + key(value) if key else value + for value, key in ( + (getattr(obj, a.name), a.order_key) for a in attrs + ) + ) + + def __lt__(self, other): + """ + Automatically created by attrs. + """ + if other.__class__ is self.__class__: + return attrs_to_tuple(self) < attrs_to_tuple(other) + + return NotImplemented + + def __le__(self, other): + """ + Automatically created by attrs. + """ + if other.__class__ is self.__class__: + return attrs_to_tuple(self) <= attrs_to_tuple(other) + + return NotImplemented + + def __gt__(self, other): + """ + Automatically created by attrs. + """ + if other.__class__ is self.__class__: + return attrs_to_tuple(self) > attrs_to_tuple(other) + + return NotImplemented + + def __ge__(self, other): + """ + Automatically created by attrs. + """ + if other.__class__ is self.__class__: + return attrs_to_tuple(self) >= attrs_to_tuple(other) + + return NotImplemented + + return __lt__, __le__, __gt__, __ge__ + + +def _add_eq(cls, attrs=None): + """ + Add equality methods to *cls* with *attrs*. + """ + if attrs is None: + attrs = cls.__attrs_attrs__ + + cls.__eq__ = _make_eq(cls, attrs) + cls.__ne__ = _make_ne() + + return cls + + +def _make_repr(attrs, ns, cls): + unique_filename = _generate_unique_filename(cls, "repr") + # Figure out which attributes to include, and which function to use to + # format them. The a.repr value can be either bool or a custom + # callable. + attr_names_with_reprs = tuple( + (a.name, (repr if a.repr is True else a.repr), a.init) + for a in attrs + if a.repr is not False + ) + globs = { + name + "_repr": r for name, r, _ in attr_names_with_reprs if r != repr + } + globs["_compat"] = _compat + globs["AttributeError"] = AttributeError + globs["NOTHING"] = NOTHING + attribute_fragments = [] + for name, r, i in attr_names_with_reprs: + accessor = ( + "self." + name if i else 'getattr(self, "' + name + '", NOTHING)' + ) + fragment = ( + "%s={%s!r}" % (name, accessor) + if r == repr + else "%s={%s_repr(%s)}" % (name, name, accessor) + ) + attribute_fragments.append(fragment) + repr_fragment = ", ".join(attribute_fragments) + + if ns is None: + cls_name_fragment = '{self.__class__.__qualname__.rsplit(">.", 1)[-1]}' + else: + cls_name_fragment = ns + ".{self.__class__.__name__}" + + lines = [ + "def __repr__(self):", + " try:", + " already_repring = _compat.repr_context.already_repring", + " except AttributeError:", + " already_repring = {id(self),}", + " _compat.repr_context.already_repring = already_repring", + " else:", + " if id(self) in already_repring:", + " return '...'", + " else:", + " already_repring.add(id(self))", + " try:", + f" return f'{cls_name_fragment}({repr_fragment})'", + " finally:", + " already_repring.remove(id(self))", + ] + + return _make_method( + "__repr__", "\n".join(lines), unique_filename, globs=globs + ) + + +def _add_repr(cls, ns=None, attrs=None): + """ + Add a repr method to *cls*. + """ + if attrs is None: + attrs = cls.__attrs_attrs__ + + cls.__repr__ = _make_repr(attrs, ns, cls) + return cls + + +def fields(cls): + """ + Return the tuple of *attrs* attributes for a class. + + The tuple also allows accessing the fields by their names (see below for + examples). + + Args: + cls (type): Class to introspect. + + Raises: + TypeError: If *cls* is not a class. + + attrs.exceptions.NotAnAttrsClassError: + If *cls* is not an *attrs* class. + + Returns: + tuple (with name accessors) of `attrs.Attribute` + + .. versionchanged:: 16.2.0 Returned tuple allows accessing the fields + by name. + .. versionchanged:: 23.1.0 Add support for generic classes. + """ + generic_base = get_generic_base(cls) + + if generic_base is None and not isinstance(cls, type): + msg = "Passed object must be a class." + raise TypeError(msg) + + attrs = getattr(cls, "__attrs_attrs__", None) + + if attrs is None: + if generic_base is not None: + attrs = getattr(generic_base, "__attrs_attrs__", None) + if attrs is not None: + # Even though this is global state, stick it on here to speed + # it up. We rely on `cls` being cached for this to be + # efficient. + cls.__attrs_attrs__ = attrs + return attrs + msg = f"{cls!r} is not an attrs-decorated class." + raise NotAnAttrsClassError(msg) + + return attrs + + +def fields_dict(cls): + """ + Return an ordered dictionary of *attrs* attributes for a class, whose keys + are the attribute names. + + Args: + cls (type): Class to introspect. + + Raises: + TypeError: If *cls* is not a class. + + attrs.exceptions.NotAnAttrsClassError: + If *cls* is not an *attrs* class. + + Returns: + dict[str, attrs.Attribute]: Dict of attribute name to definition + + .. versionadded:: 18.1.0 + """ + if not isinstance(cls, type): + msg = "Passed object must be a class." + raise TypeError(msg) + attrs = getattr(cls, "__attrs_attrs__", None) + if attrs is None: + msg = f"{cls!r} is not an attrs-decorated class." + raise NotAnAttrsClassError(msg) + return {a.name: a for a in attrs} + + +def validate(inst): + """ + Validate all attributes on *inst* that have a validator. + + Leaves all exceptions through. + + Args: + inst: Instance of a class with *attrs* attributes. + """ + if _config._run_validators is False: + return + + for a in fields(inst.__class__): + v = a.validator + if v is not None: + v(inst, a, getattr(inst, a.name)) + + +def _is_slot_attr(a_name, base_attr_map): + """ + Check if the attribute name comes from a slot class. + """ + cls = base_attr_map.get(a_name) + return cls and "__slots__" in cls.__dict__ + + +def _make_init( + cls, + attrs, + pre_init, + pre_init_has_args, + post_init, + frozen, + slots, + cache_hash, + base_attr_map, + is_exc, + cls_on_setattr, + attrs_init, +): + has_cls_on_setattr = ( + cls_on_setattr is not None and cls_on_setattr is not setters.NO_OP + ) + + if frozen and has_cls_on_setattr: + msg = "Frozen classes can't use on_setattr." + raise ValueError(msg) + + needs_cached_setattr = cache_hash or frozen + filtered_attrs = [] + attr_dict = {} + for a in attrs: + if not a.init and a.default is NOTHING: + continue + + filtered_attrs.append(a) + attr_dict[a.name] = a + + if a.on_setattr is not None: + if frozen is True: + msg = "Frozen classes can't use on_setattr." + raise ValueError(msg) + + needs_cached_setattr = True + elif has_cls_on_setattr and a.on_setattr is not setters.NO_OP: + needs_cached_setattr = True + + unique_filename = _generate_unique_filename(cls, "init") + + script, globs, annotations = _attrs_to_init_script( + filtered_attrs, + frozen, + slots, + pre_init, + pre_init_has_args, + post_init, + cache_hash, + base_attr_map, + is_exc, + needs_cached_setattr, + has_cls_on_setattr, + "__attrs_init__" if attrs_init else "__init__", + ) + if cls.__module__ in sys.modules: + # This makes typing.get_type_hints(CLS.__init__) resolve string types. + globs.update(sys.modules[cls.__module__].__dict__) + + globs.update({"NOTHING": NOTHING, "attr_dict": attr_dict}) + + if needs_cached_setattr: + # Save the lookup overhead in __init__ if we need to circumvent + # setattr hooks. + globs["_cached_setattr_get"] = _OBJ_SETATTR.__get__ + + init = _make_method( + "__attrs_init__" if attrs_init else "__init__", + script, + unique_filename, + globs, + ) + init.__annotations__ = annotations + + return init + + +def _setattr(attr_name: str, value_var: str, has_on_setattr: bool) -> str: + """ + Use the cached object.setattr to set *attr_name* to *value_var*. + """ + return f"_setattr('{attr_name}', {value_var})" + + +def _setattr_with_converter( + attr_name: str, value_var: str, has_on_setattr: bool, converter: Converter +) -> str: + """ + Use the cached object.setattr to set *attr_name* to *value_var*, but run + its converter first. + """ + return f"_setattr('{attr_name}', {converter._fmt_converter_call(attr_name, value_var)})" + + +def _assign(attr_name: str, value: str, has_on_setattr: bool) -> str: + """ + Unless *attr_name* has an on_setattr hook, use normal assignment. Otherwise + relegate to _setattr. + """ + if has_on_setattr: + return _setattr(attr_name, value, True) + + return f"self.{attr_name} = {value}" + + +def _assign_with_converter( + attr_name: str, value_var: str, has_on_setattr: bool, converter: Converter +) -> str: + """ + Unless *attr_name* has an on_setattr hook, use normal assignment after + conversion. Otherwise relegate to _setattr_with_converter. + """ + if has_on_setattr: + return _setattr_with_converter(attr_name, value_var, True, converter) + + return f"self.{attr_name} = {converter._fmt_converter_call(attr_name, value_var)}" + + +def _determine_setters( + frozen: bool, slots: bool, base_attr_map: dict[str, type] +): + """ + Determine the correct setter functions based on whether a class is frozen + and/or slotted. + """ + if frozen is True: + if slots is True: + return (), _setattr, _setattr_with_converter + + # Dict frozen classes assign directly to __dict__. + # But only if the attribute doesn't come from an ancestor slot + # class. + # Note _inst_dict will be used again below if cache_hash is True + + def fmt_setter( + attr_name: str, value_var: str, has_on_setattr: bool + ) -> str: + if _is_slot_attr(attr_name, base_attr_map): + return _setattr(attr_name, value_var, has_on_setattr) + + return f"_inst_dict['{attr_name}'] = {value_var}" + + def fmt_setter_with_converter( + attr_name: str, + value_var: str, + has_on_setattr: bool, + converter: Converter, + ) -> str: + if has_on_setattr or _is_slot_attr(attr_name, base_attr_map): + return _setattr_with_converter( + attr_name, value_var, has_on_setattr, converter + ) + + return f"_inst_dict['{attr_name}'] = {converter._fmt_converter_call(attr_name, value_var)}" + + return ( + ("_inst_dict = self.__dict__",), + fmt_setter, + fmt_setter_with_converter, + ) + + # Not frozen -- we can just assign directly. + return (), _assign, _assign_with_converter + + +def _attrs_to_init_script( + attrs: list[Attribute], + is_frozen: bool, + is_slotted: bool, + call_pre_init: bool, + pre_init_has_args: bool, + call_post_init: bool, + does_cache_hash: bool, + base_attr_map: dict[str, type], + is_exc: bool, + needs_cached_setattr: bool, + has_cls_on_setattr: bool, + method_name: str, +) -> tuple[str, dict, dict]: + """ + Return a script of an initializer for *attrs*, a dict of globals, and + annotations for the initializer. + + The globals are required by the generated script. + """ + lines = ["self.__attrs_pre_init__()"] if call_pre_init else [] + + if needs_cached_setattr: + lines.append( + # Circumvent the __setattr__ descriptor to save one lookup per + # assignment. Note _setattr will be used again below if + # does_cache_hash is True. + "_setattr = _cached_setattr_get(self)" + ) + + extra_lines, fmt_setter, fmt_setter_with_converter = _determine_setters( + is_frozen, is_slotted, base_attr_map + ) + lines.extend(extra_lines) + + args = [] + kw_only_args = [] + attrs_to_validate = [] + + # This is a dictionary of names to validator and converter callables. + # Injecting this into __init__ globals lets us avoid lookups. + names_for_globals = {} + annotations = {"return": None} + + for a in attrs: + if a.validator: + attrs_to_validate.append(a) + + attr_name = a.name + has_on_setattr = a.on_setattr is not None or ( + a.on_setattr is not setters.NO_OP and has_cls_on_setattr + ) + # a.alias is set to maybe-mangled attr_name in _ClassBuilder if not + # explicitly provided + arg_name = a.alias + + has_factory = isinstance(a.default, Factory) + maybe_self = "self" if has_factory and a.default.takes_self else "" + + if a.converter and not isinstance(a.converter, Converter): + converter = Converter(a.converter) + else: + converter = a.converter + + if a.init is False: + if has_factory: + init_factory_name = _INIT_FACTORY_PAT % (a.name,) + if converter is not None: + lines.append( + fmt_setter_with_converter( + attr_name, + init_factory_name + f"({maybe_self})", + has_on_setattr, + converter, + ) + ) + names_for_globals[converter._get_global_name(a.name)] = ( + converter.converter + ) + else: + lines.append( + fmt_setter( + attr_name, + init_factory_name + f"({maybe_self})", + has_on_setattr, + ) + ) + names_for_globals[init_factory_name] = a.default.factory + elif converter is not None: + lines.append( + fmt_setter_with_converter( + attr_name, + f"attr_dict['{attr_name}'].default", + has_on_setattr, + converter, + ) + ) + names_for_globals[converter._get_global_name(a.name)] = ( + converter.converter + ) + else: + lines.append( + fmt_setter( + attr_name, + f"attr_dict['{attr_name}'].default", + has_on_setattr, + ) + ) + elif a.default is not NOTHING and not has_factory: + arg = f"{arg_name}=attr_dict['{attr_name}'].default" + if a.kw_only: + kw_only_args.append(arg) + else: + args.append(arg) + + if converter is not None: + lines.append( + fmt_setter_with_converter( + attr_name, arg_name, has_on_setattr, converter + ) + ) + names_for_globals[converter._get_global_name(a.name)] = ( + converter.converter + ) + else: + lines.append(fmt_setter(attr_name, arg_name, has_on_setattr)) + + elif has_factory: + arg = f"{arg_name}=NOTHING" + if a.kw_only: + kw_only_args.append(arg) + else: + args.append(arg) + lines.append(f"if {arg_name} is not NOTHING:") + + init_factory_name = _INIT_FACTORY_PAT % (a.name,) + if converter is not None: + lines.append( + " " + + fmt_setter_with_converter( + attr_name, arg_name, has_on_setattr, converter + ) + ) + lines.append("else:") + lines.append( + " " + + fmt_setter_with_converter( + attr_name, + init_factory_name + "(" + maybe_self + ")", + has_on_setattr, + converter, + ) + ) + names_for_globals[converter._get_global_name(a.name)] = ( + converter.converter + ) + else: + lines.append( + " " + fmt_setter(attr_name, arg_name, has_on_setattr) + ) + lines.append("else:") + lines.append( + " " + + fmt_setter( + attr_name, + init_factory_name + "(" + maybe_self + ")", + has_on_setattr, + ) + ) + names_for_globals[init_factory_name] = a.default.factory + else: + if a.kw_only: + kw_only_args.append(arg_name) + else: + args.append(arg_name) + + if converter is not None: + lines.append( + fmt_setter_with_converter( + attr_name, arg_name, has_on_setattr, converter + ) + ) + names_for_globals[converter._get_global_name(a.name)] = ( + converter.converter + ) + else: + lines.append(fmt_setter(attr_name, arg_name, has_on_setattr)) + + if a.init is True: + if a.type is not None and converter is None: + annotations[arg_name] = a.type + elif converter is not None and converter._first_param_type: + # Use the type from the converter if present. + annotations[arg_name] = converter._first_param_type + + if attrs_to_validate: # we can skip this if there are no validators. + names_for_globals["_config"] = _config + lines.append("if _config._run_validators is True:") + for a in attrs_to_validate: + val_name = "__attr_validator_" + a.name + attr_name = "__attr_" + a.name + lines.append(f" {val_name}(self, {attr_name}, self.{a.name})") + names_for_globals[val_name] = a.validator + names_for_globals[attr_name] = a + + if call_post_init: + lines.append("self.__attrs_post_init__()") + + # Because this is set only after __attrs_post_init__ is called, a crash + # will result if post-init tries to access the hash code. This seemed + # preferable to setting this beforehand, in which case alteration to field + # values during post-init combined with post-init accessing the hash code + # would result in silent bugs. + if does_cache_hash: + if is_frozen: + if is_slotted: + init_hash_cache = f"_setattr('{_HASH_CACHE_FIELD}', None)" + else: + init_hash_cache = f"_inst_dict['{_HASH_CACHE_FIELD}'] = None" + else: + init_hash_cache = f"self.{_HASH_CACHE_FIELD} = None" + lines.append(init_hash_cache) + + # For exceptions we rely on BaseException.__init__ for proper + # initialization. + if is_exc: + vals = ",".join(f"self.{a.name}" for a in attrs if a.init) + + lines.append(f"BaseException.__init__(self, {vals})") + + args = ", ".join(args) + pre_init_args = args + if kw_only_args: + # leading comma & kw_only args + args += f"{', ' if args else ''}*, {', '.join(kw_only_args)}" + pre_init_kw_only_args = ", ".join( + [ + f"{kw_arg_name}={kw_arg_name}" + # We need to remove the defaults from the kw_only_args. + for kw_arg_name in (kwa.split("=")[0] for kwa in kw_only_args) + ] + ) + pre_init_args += ", " if pre_init_args else "" + pre_init_args += pre_init_kw_only_args + + if call_pre_init and pre_init_has_args: + # If pre init method has arguments, pass same arguments as `__init__`. + lines[0] = f"self.__attrs_pre_init__({pre_init_args})" + + # Python 3.7 doesn't allow backslashes in f strings. + NL = "\n " + return ( + f"""def {method_name}(self, {args}): + {NL.join(lines) if lines else 'pass'} +""", + names_for_globals, + annotations, + ) + + +def _default_init_alias_for(name: str) -> str: + """ + The default __init__ parameter name for a field. + + This performs private-name adjustment via leading-unscore stripping, + and is the default value of Attribute.alias if not provided. + """ + + return name.lstrip("_") + + +class Attribute: + """ + *Read-only* representation of an attribute. + + .. warning:: + + You should never instantiate this class yourself. + + The class has *all* arguments of `attr.ib` (except for ``factory`` which is + only syntactic sugar for ``default=Factory(...)`` plus the following: + + - ``name`` (`str`): The name of the attribute. + - ``alias`` (`str`): The __init__ parameter name of the attribute, after + any explicit overrides and default private-attribute-name handling. + - ``inherited`` (`bool`): Whether or not that attribute has been inherited + from a base class. + - ``eq_key`` and ``order_key`` (`typing.Callable` or `None`): The + callables that are used for comparing and ordering objects by this + attribute, respectively. These are set by passing a callable to + `attr.ib`'s ``eq``, ``order``, or ``cmp`` arguments. See also + :ref:`comparison customization `. + + Instances of this class are frequently used for introspection purposes + like: + + - `fields` returns a tuple of them. + - Validators get them passed as the first argument. + - The :ref:`field transformer ` hook receives a list of + them. + - The ``alias`` property exposes the __init__ parameter name of the field, + with any overrides and default private-attribute handling applied. + + + .. versionadded:: 20.1.0 *inherited* + .. versionadded:: 20.1.0 *on_setattr* + .. versionchanged:: 20.2.0 *inherited* is not taken into account for + equality checks and hashing anymore. + .. versionadded:: 21.1.0 *eq_key* and *order_key* + .. versionadded:: 22.2.0 *alias* + + For the full version history of the fields, see `attr.ib`. + """ + + __slots__ = ( + "name", + "default", + "validator", + "repr", + "eq", + "eq_key", + "order", + "order_key", + "hash", + "init", + "metadata", + "type", + "converter", + "kw_only", + "inherited", + "on_setattr", + "alias", + ) + + def __init__( + self, + name, + default, + validator, + repr, + cmp, # XXX: unused, remove along with other cmp code. + hash, + init, + inherited, + metadata=None, + type=None, + converter=None, + kw_only=False, + eq=None, + eq_key=None, + order=None, + order_key=None, + on_setattr=None, + alias=None, + ): + eq, eq_key, order, order_key = _determine_attrib_eq_order( + cmp, eq_key or eq, order_key or order, True + ) + + # Cache this descriptor here to speed things up later. + bound_setattr = _OBJ_SETATTR.__get__(self) + + # Despite the big red warning, people *do* instantiate `Attribute` + # themselves. + bound_setattr("name", name) + bound_setattr("default", default) + bound_setattr("validator", validator) + bound_setattr("repr", repr) + bound_setattr("eq", eq) + bound_setattr("eq_key", eq_key) + bound_setattr("order", order) + bound_setattr("order_key", order_key) + bound_setattr("hash", hash) + bound_setattr("init", init) + bound_setattr("converter", converter) + bound_setattr( + "metadata", + ( + types.MappingProxyType(dict(metadata)) # Shallow copy + if metadata + else _EMPTY_METADATA_SINGLETON + ), + ) + bound_setattr("type", type) + bound_setattr("kw_only", kw_only) + bound_setattr("inherited", inherited) + bound_setattr("on_setattr", on_setattr) + bound_setattr("alias", alias) + + def __setattr__(self, name, value): + raise FrozenInstanceError() + + @classmethod + def from_counting_attr(cls, name, ca, type=None): + # type holds the annotated value. deal with conflicts: + if type is None: + type = ca.type + elif ca.type is not None: + msg = "Type annotation and type argument cannot both be present" + raise ValueError(msg) + inst_dict = { + k: getattr(ca, k) + for k in Attribute.__slots__ + if k + not in ( + "name", + "validator", + "default", + "type", + "inherited", + ) # exclude methods and deprecated alias + } + return cls( + name=name, + validator=ca._validator, + default=ca._default, + type=type, + cmp=None, + inherited=False, + **inst_dict, + ) + + # Don't use attrs.evolve since fields(Attribute) doesn't work + def evolve(self, **changes): + """ + Copy *self* and apply *changes*. + + This works similarly to `attrs.evolve` but that function does not work + with {class}`Attribute`. + + It is mainly meant to be used for `transform-fields`. + + .. versionadded:: 20.3.0 + """ + new = copy.copy(self) + + new._setattrs(changes.items()) + + return new + + # Don't use _add_pickle since fields(Attribute) doesn't work + def __getstate__(self): + """ + Play nice with pickle. + """ + return tuple( + getattr(self, name) if name != "metadata" else dict(self.metadata) + for name in self.__slots__ + ) + + def __setstate__(self, state): + """ + Play nice with pickle. + """ + self._setattrs(zip(self.__slots__, state)) + + def _setattrs(self, name_values_pairs): + bound_setattr = _OBJ_SETATTR.__get__(self) + for name, value in name_values_pairs: + if name != "metadata": + bound_setattr(name, value) + else: + bound_setattr( + name, + ( + types.MappingProxyType(dict(value)) + if value + else _EMPTY_METADATA_SINGLETON + ), + ) + + +_a = [ + Attribute( + name=name, + default=NOTHING, + validator=None, + repr=True, + cmp=None, + eq=True, + order=False, + hash=(name != "metadata"), + init=True, + inherited=False, + alias=_default_init_alias_for(name), + ) + for name in Attribute.__slots__ +] + +Attribute = _add_hash( + _add_eq( + _add_repr(Attribute, attrs=_a), + attrs=[a for a in _a if a.name != "inherited"], + ), + attrs=[a for a in _a if a.hash and a.name != "inherited"], +) + + +class _CountingAttr: + """ + Intermediate representation of attributes that uses a counter to preserve + the order in which the attributes have been defined. + + *Internal* data structure of the attrs library. Running into is most + likely the result of a bug like a forgotten `@attr.s` decorator. + """ + + __slots__ = ( + "counter", + "_default", + "repr", + "eq", + "eq_key", + "order", + "order_key", + "hash", + "init", + "metadata", + "_validator", + "converter", + "type", + "kw_only", + "on_setattr", + "alias", + ) + __attrs_attrs__ = ( + *tuple( + Attribute( + name=name, + alias=_default_init_alias_for(name), + default=NOTHING, + validator=None, + repr=True, + cmp=None, + hash=True, + init=True, + kw_only=False, + eq=True, + eq_key=None, + order=False, + order_key=None, + inherited=False, + on_setattr=None, + ) + for name in ( + "counter", + "_default", + "repr", + "eq", + "order", + "hash", + "init", + "on_setattr", + "alias", + ) + ), + Attribute( + name="metadata", + alias="metadata", + default=None, + validator=None, + repr=True, + cmp=None, + hash=False, + init=True, + kw_only=False, + eq=True, + eq_key=None, + order=False, + order_key=None, + inherited=False, + on_setattr=None, + ), + ) + cls_counter = 0 + + def __init__( + self, + default, + validator, + repr, + cmp, + hash, + init, + converter, + metadata, + type, + kw_only, + eq, + eq_key, + order, + order_key, + on_setattr, + alias, + ): + _CountingAttr.cls_counter += 1 + self.counter = _CountingAttr.cls_counter + self._default = default + self._validator = validator + self.converter = converter + self.repr = repr + self.eq = eq + self.eq_key = eq_key + self.order = order + self.order_key = order_key + self.hash = hash + self.init = init + self.metadata = metadata + self.type = type + self.kw_only = kw_only + self.on_setattr = on_setattr + self.alias = alias + + def validator(self, meth): + """ + Decorator that adds *meth* to the list of validators. + + Returns *meth* unchanged. + + .. versionadded:: 17.1.0 + """ + if self._validator is None: + self._validator = meth + else: + self._validator = and_(self._validator, meth) + return meth + + def default(self, meth): + """ + Decorator that allows to set the default for an attribute. + + Returns *meth* unchanged. + + Raises: + DefaultAlreadySetError: If default has been set before. + + .. versionadded:: 17.1.0 + """ + if self._default is not NOTHING: + raise DefaultAlreadySetError() + + self._default = Factory(meth, takes_self=True) + + return meth + + +_CountingAttr = _add_eq(_add_repr(_CountingAttr)) + + +class Factory: + """ + Stores a factory callable. + + If passed as the default value to `attrs.field`, the factory is used to + generate a new value. + + Args: + factory (typing.Callable): + A callable that takes either none or exactly one mandatory + positional argument depending on *takes_self*. + + takes_self (bool): + Pass the partially initialized instance that is being initialized + as a positional argument. + + .. versionadded:: 17.1.0 *takes_self* + """ + + __slots__ = ("factory", "takes_self") + + def __init__(self, factory, takes_self=False): + self.factory = factory + self.takes_self = takes_self + + def __getstate__(self): + """ + Play nice with pickle. + """ + return tuple(getattr(self, name) for name in self.__slots__) + + def __setstate__(self, state): + """ + Play nice with pickle. + """ + for name, value in zip(self.__slots__, state): + setattr(self, name, value) + + +_f = [ + Attribute( + name=name, + default=NOTHING, + validator=None, + repr=True, + cmp=None, + eq=True, + order=False, + hash=True, + init=True, + inherited=False, + ) + for name in Factory.__slots__ +] + +Factory = _add_hash(_add_eq(_add_repr(Factory, attrs=_f), attrs=_f), attrs=_f) + + +class Converter: + """ + Stores a converter callable. + + Allows for the wrapped converter to take additional arguments. The + arguments are passed in the order they are documented. + + Args: + converter (Callable): A callable that converts the passed value. + + takes_self (bool): + Pass the partially initialized instance that is being initialized + as a positional argument. (default: `False`) + + takes_field (bool): + Pass the field definition (an :class:`Attribute`) into the + converter as a positional argument. (default: `False`) + + .. versionadded:: 24.1.0 + """ + + __slots__ = ( + "converter", + "takes_self", + "takes_field", + "_first_param_type", + "_global_name", + "__call__", + ) + + def __init__(self, converter, *, takes_self=False, takes_field=False): + self.converter = converter + self.takes_self = takes_self + self.takes_field = takes_field + + ex = _AnnotationExtractor(converter) + self._first_param_type = ex.get_first_param_type() + + if not (self.takes_self or self.takes_field): + self.__call__ = lambda value, _, __: self.converter(value) + elif self.takes_self and not self.takes_field: + self.__call__ = lambda value, instance, __: self.converter( + value, instance + ) + elif not self.takes_self and self.takes_field: + self.__call__ = lambda value, __, field: self.converter( + value, field + ) + else: + self.__call__ = lambda value, instance, field: self.converter( + value, instance, field + ) + + rt = ex.get_return_type() + if rt is not None: + self.__call__.__annotations__["return"] = rt + + @staticmethod + def _get_global_name(attr_name: str) -> str: + """ + Return the name that a converter for an attribute name *attr_name* + would have. + """ + return f"__attr_converter_{attr_name}" + + def _fmt_converter_call(self, attr_name: str, value_var: str) -> str: + """ + Return a string that calls the converter for an attribute name + *attr_name* and the value in variable named *value_var* according to + `self.takes_self` and `self.takes_field`. + """ + if not (self.takes_self or self.takes_field): + return f"{self._get_global_name(attr_name)}({value_var})" + + if self.takes_self and self.takes_field: + return f"{self._get_global_name(attr_name)}({value_var}, self, attr_dict['{attr_name}'])" + + if self.takes_self: + return f"{self._get_global_name(attr_name)}({value_var}, self)" + + return f"{self._get_global_name(attr_name)}({value_var}, attr_dict['{attr_name}'])" + + def __getstate__(self): + """ + Return a dict containing only converter and takes_self -- the rest gets + computed when loading. + """ + return { + "converter": self.converter, + "takes_self": self.takes_self, + "takes_field": self.takes_field, + } + + def __setstate__(self, state): + """ + Load instance from state. + """ + self.__init__(**state) + + +_f = [ + Attribute( + name=name, + default=NOTHING, + validator=None, + repr=True, + cmp=None, + eq=True, + order=False, + hash=True, + init=True, + inherited=False, + ) + for name in ("converter", "takes_self", "takes_field") +] + +Converter = _add_hash( + _add_eq(_add_repr(Converter, attrs=_f), attrs=_f), attrs=_f +) + + +def make_class( + name, attrs, bases=(object,), class_body=None, **attributes_arguments +): + r""" + A quick way to create a new class called *name* with *attrs*. + + Args: + name (str): The name for the new class. + + attrs( list | dict): + A list of names or a dictionary of mappings of names to `attr.ib`\ + s / `attrs.field`\ s. + + The order is deduced from the order of the names or attributes + inside *attrs*. Otherwise the order of the definition of the + attributes is used. + + bases (tuple[type, ...]): Classes that the new class will subclass. + + class_body (dict): + An optional dictionary of class attributes for the new class. + + attributes_arguments: Passed unmodified to `attr.s`. + + Returns: + type: A new class with *attrs*. + + .. versionadded:: 17.1.0 *bases* + .. versionchanged:: 18.1.0 If *attrs* is ordered, the order is retained. + .. versionchanged:: 23.2.0 *class_body* + """ + if isinstance(attrs, dict): + cls_dict = attrs + elif isinstance(attrs, (list, tuple)): + cls_dict = {a: attrib() for a in attrs} + else: + msg = "attrs argument must be a dict or a list." + raise TypeError(msg) + + pre_init = cls_dict.pop("__attrs_pre_init__", None) + post_init = cls_dict.pop("__attrs_post_init__", None) + user_init = cls_dict.pop("__init__", None) + + body = {} + if class_body is not None: + body.update(class_body) + if pre_init is not None: + body["__attrs_pre_init__"] = pre_init + if post_init is not None: + body["__attrs_post_init__"] = post_init + if user_init is not None: + body["__init__"] = user_init + + type_ = types.new_class(name, bases, {}, lambda ns: ns.update(body)) + + # For pickling to work, the __module__ variable needs to be set to the + # frame where the class is created. Bypass this step in environments where + # sys._getframe is not defined (Jython for example) or sys._getframe is not + # defined for arguments greater than 0 (IronPython). + with contextlib.suppress(AttributeError, ValueError): + type_.__module__ = sys._getframe(1).f_globals.get( + "__name__", "__main__" + ) + + # We do it here for proper warnings with meaningful stacklevel. + cmp = attributes_arguments.pop("cmp", None) + ( + attributes_arguments["eq"], + attributes_arguments["order"], + ) = _determine_attrs_eq_order( + cmp, + attributes_arguments.get("eq"), + attributes_arguments.get("order"), + True, + ) + + cls = _attrs(these=cls_dict, **attributes_arguments)(type_) + # Only add type annotations now or "_attrs()" will complain: + cls.__annotations__ = { + k: v.type for k, v in cls_dict.items() if v.type is not None + } + return cls + + +# These are required by within this module so we define them here and merely +# import into .validators / .converters. + + +@attrs(slots=True, unsafe_hash=True) +class _AndValidator: + """ + Compose many validators to a single one. + """ + + _validators = attrib() + + def __call__(self, inst, attr, value): + for v in self._validators: + v(inst, attr, value) + + +def and_(*validators): + """ + A validator that composes multiple validators into one. + + When called on a value, it runs all wrapped validators. + + Args: + validators (~collections.abc.Iterable[typing.Callable]): + Arbitrary number of validators. + + .. versionadded:: 17.1.0 + """ + vals = [] + for validator in validators: + vals.extend( + validator._validators + if isinstance(validator, _AndValidator) + else [validator] + ) + + return _AndValidator(tuple(vals)) + + +def pipe(*converters): + """ + A converter that composes multiple converters into one. + + When called on a value, it runs all wrapped converters, returning the + *last* value. + + Type annotations will be inferred from the wrapped converters', if they + have any. + + converters (~collections.abc.Iterable[typing.Callable]): + Arbitrary number of converters. + + .. versionadded:: 20.1.0 + """ + + def pipe_converter(val, inst, field): + for c in converters: + val = c(val, inst, field) if isinstance(c, Converter) else c(val) + + return val + + if not converters: + # If the converter list is empty, pipe_converter is the identity. + A = typing.TypeVar("A") + pipe_converter.__annotations__.update({"val": A, "return": A}) + else: + # Get parameter type from first converter. + t = _AnnotationExtractor(converters[0]).get_first_param_type() + if t: + pipe_converter.__annotations__["val"] = t + + last = converters[-1] + if not PY_3_11_PLUS and isinstance(last, Converter): + last = last.__call__ + + # Get return type from last converter. + rt = _AnnotationExtractor(last).get_return_type() + if rt: + pipe_converter.__annotations__["return"] = rt + + return Converter(pipe_converter, takes_self=True, takes_field=True) diff --git a/myenv/lib/python3.12/site-packages/attr/_next_gen.py b/myenv/lib/python3.12/site-packages/attr/_next_gen.py new file mode 100644 index 0000000..dbb65cc --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/_next_gen.py @@ -0,0 +1,631 @@ +# SPDX-License-Identifier: MIT + +""" +These are keyword-only APIs that call `attr.s` and `attr.ib` with different +default values. +""" + + +from functools import partial + +from . import setters +from ._funcs import asdict as _asdict +from ._funcs import astuple as _astuple +from ._make import ( + _DEFAULT_ON_SETATTR, + NOTHING, + _frozen_setattrs, + attrib, + attrs, +) +from .exceptions import UnannotatedAttributeError + + +def define( + maybe_cls=None, + *, + these=None, + repr=None, + unsafe_hash=None, + hash=None, + init=None, + slots=True, + frozen=False, + weakref_slot=True, + str=False, + auto_attribs=None, + kw_only=False, + cache_hash=False, + auto_exc=True, + eq=None, + order=False, + auto_detect=True, + getstate_setstate=None, + on_setattr=None, + field_transformer=None, + match_args=True, +): + r""" + A class decorator that adds :term:`dunder methods` according to + :term:`fields ` specified using :doc:`type annotations `, + `field()` calls, or the *these* argument. + + Since *attrs* patches or replaces an existing class, you cannot use + `object.__init_subclass__` with *attrs* classes, because it runs too early. + As a replacement, you can define ``__attrs_init_subclass__`` on your class. + It will be called by *attrs* classes that subclass it after they're + created. See also :ref:`init-subclass`. + + Args: + slots (bool): + Create a :term:`slotted class ` that's more + memory-efficient. Slotted classes are generally superior to the + default dict classes, but have some gotchas you should know about, + so we encourage you to read the :term:`glossary entry `. + + auto_detect (bool): + Instead of setting the *init*, *repr*, *eq*, and *hash* arguments + explicitly, assume they are set to True **unless any** of the + involved methods for one of the arguments is implemented in the + *current* class (meaning, it is *not* inherited from some base + class). + + So, for example by implementing ``__eq__`` on a class yourself, + *attrs* will deduce ``eq=False`` and will create *neither* + ``__eq__`` *nor* ``__ne__`` (but Python classes come with a + sensible ``__ne__`` by default, so it *should* be enough to only + implement ``__eq__`` in most cases). + + Passing True or False` to *init*, *repr*, *eq*, *cmp*, or *hash* + overrides whatever *auto_detect* would determine. + + auto_exc (bool): + If the class subclasses `BaseException` (which implicitly includes + any subclass of any exception), the following happens to behave + like a well-behaved Python exception class: + + - the values for *eq*, *order*, and *hash* are ignored and the + instances compare and hash by the instance's ids [#]_ , + - all attributes that are either passed into ``__init__`` or have a + default value are additionally available as a tuple in the + ``args`` attribute, + - the value of *str* is ignored leaving ``__str__`` to base + classes. + + .. [#] + Note that *attrs* will *not* remove existing implementations of + ``__hash__`` or the equality methods. It just won't add own + ones. + + on_setattr (~typing.Callable | list[~typing.Callable] | None | ~typing.Literal[attrs.setters.NO_OP]): + A callable that is run whenever the user attempts to set an + attribute (either by assignment like ``i.x = 42`` or by using + `setattr` like ``setattr(i, "x", 42)``). It receives the same + arguments as validators: the instance, the attribute that is being + modified, and the new value. + + If no exception is raised, the attribute is set to the return value + of the callable. + + If a list of callables is passed, they're automatically wrapped in + an `attrs.setters.pipe`. + + If left None, the default behavior is to run converters and + validators whenever an attribute is set. + + init (bool): + Create a ``__init__`` method that initializes the *attrs* + attributes. Leading underscores are stripped for the argument name, + unless an alias is set on the attribute. + + .. seealso:: + `init` shows advanced ways to customize the generated + ``__init__`` method, including executing code before and after. + + repr(bool): + Create a ``__repr__`` method with a human readable representation + of *attrs* attributes. + + str (bool): + Create a ``__str__`` method that is identical to ``__repr__``. This + is usually not necessary except for `Exception`\ s. + + eq (bool | None): + If True or None (default), add ``__eq__`` and ``__ne__`` methods + that check two instances for equality. + + .. seealso:: + `comparison` describes how to customize the comparison behavior + going as far comparing NumPy arrays. + + order (bool | None): + If True, add ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` + methods that behave like *eq* above and allow instances to be + ordered. + + They compare the instances as if they were tuples of their *attrs* + attributes if and only if the types of both classes are + *identical*. + + If `None` mirror value of *eq*. + + .. seealso:: `comparison` + + cmp (bool | None): + Setting *cmp* is equivalent to setting *eq* and *order* to the same + value. Must not be mixed with *eq* or *order*. + + unsafe_hash (bool | None): + If None (default), the ``__hash__`` method is generated according + how *eq* and *frozen* are set. + + 1. If *both* are True, *attrs* will generate a ``__hash__`` for + you. + 2. If *eq* is True and *frozen* is False, ``__hash__`` will be set + to None, marking it unhashable (which it is). + 3. If *eq* is False, ``__hash__`` will be left untouched meaning + the ``__hash__`` method of the base class will be used. If the + base class is `object`, this means it will fall back to id-based + hashing. + + Although not recommended, you can decide for yourself and force + *attrs* to create one (for example, if the class is immutable even + though you didn't freeze it programmatically) by passing True or + not. Both of these cases are rather special and should be used + carefully. + + .. seealso:: + + - Our documentation on `hashing`, + - Python's documentation on `object.__hash__`, + - and the `GitHub issue that led to the default \ behavior + `_ for more + details. + + hash (bool | None): + Deprecated alias for *unsafe_hash*. *unsafe_hash* takes precedence. + + cache_hash (bool): + Ensure that the object's hash code is computed only once and stored + on the object. If this is set to True, hashing must be either + explicitly or implicitly enabled for this class. If the hash code + is cached, avoid any reassignments of fields involved in hash code + computation or mutations of the objects those fields point to after + object creation. If such changes occur, the behavior of the + object's hash code is undefined. + + frozen (bool): + Make instances immutable after initialization. If someone attempts + to modify a frozen instance, `attrs.exceptions.FrozenInstanceError` + is raised. + + .. note:: + + 1. This is achieved by installing a custom ``__setattr__`` + method on your class, so you can't implement your own. + + 2. True immutability is impossible in Python. + + 3. This *does* have a minor a runtime performance `impact + ` when initializing new instances. In other + words: ``__init__`` is slightly slower with ``frozen=True``. + + 4. If a class is frozen, you cannot modify ``self`` in + ``__attrs_post_init__`` or a self-written ``__init__``. You + can circumvent that limitation by using + ``object.__setattr__(self, "attribute_name", value)``. + + 5. Subclasses of a frozen class are frozen too. + + kw_only (bool): + Make all attributes keyword-only in the generated ``__init__`` (if + *init* is False, this parameter is ignored). + + weakref_slot (bool): + Make instances weak-referenceable. This has no effect unless + *slots* is True. + + field_transformer (~typing.Callable | None): + A function that is called with the original class object and all + fields right before *attrs* finalizes the class. You can use this, + for example, to automatically add converters or validators to + fields based on their types. + + .. seealso:: `transform-fields` + + match_args (bool): + If True (default), set ``__match_args__`` on the class to support + :pep:`634` (*Structural Pattern Matching*). It is a tuple of all + non-keyword-only ``__init__`` parameter names on Python 3.10 and + later. Ignored on older Python versions. + + collect_by_mro (bool): + If True, *attrs* collects attributes from base classes correctly + according to the `method resolution order + `_. If False, *attrs* + will mimic the (wrong) behavior of `dataclasses` and :pep:`681`. + + See also `issue #428 + `_. + + getstate_setstate (bool | None): + .. note:: + + This is usually only interesting for slotted classes and you + should probably just set *auto_detect* to True. + + If True, ``__getstate__`` and ``__setstate__`` are generated and + attached to the class. This is necessary for slotted classes to be + pickleable. If left None, it's True by default for slotted classes + and False for dict classes. + + If *auto_detect* is True, and *getstate_setstate* is left None, and + **either** ``__getstate__`` or ``__setstate__`` is detected + directly on the class (meaning: not inherited), it is set to False + (this is usually what you want). + + auto_attribs (bool | None): + If True, look at type annotations to determine which attributes to + use, like `dataclasses`. If False, it will only look for explicit + :func:`field` class attributes, like classic *attrs*. + + If left None, it will guess: + + 1. If any attributes are annotated and no unannotated + `attrs.field`\ s are found, it assumes *auto_attribs=True*. + 2. Otherwise it assumes *auto_attribs=False* and tries to collect + `attrs.field`\ s. + + If *attrs* decides to look at type annotations, **all** fields + **must** be annotated. If *attrs* encounters a field that is set to + a :func:`field` / `attr.ib` but lacks a type annotation, an + `attrs.exceptions.UnannotatedAttributeError` is raised. Use + ``field_name: typing.Any = field(...)`` if you don't want to set a + type. + + .. warning:: + + For features that use the attribute name to create decorators + (for example, :ref:`validators `), you still *must* + assign :func:`field` / `attr.ib` to them. Otherwise Python will + either not find the name or try to use the default value to + call, for example, ``validator`` on it. + + Attributes annotated as `typing.ClassVar`, and attributes that are + neither annotated nor set to an `field()` are **ignored**. + + these (dict[str, object]): + A dictionary of name to the (private) return value of `field()` + mappings. This is useful to avoid the definition of your attributes + within the class body because you can't (for example, if you want + to add ``__repr__`` methods to Django models) or don't want to. + + If *these* is not `None`, *attrs* will *not* search the class body + for attributes and will *not* remove any attributes from it. + + The order is deduced from the order of the attributes inside + *these*. + + Arguably, this is a rather obscure feature. + + .. versionadded:: 20.1.0 + .. versionchanged:: 21.3.0 Converters are also run ``on_setattr``. + .. versionadded:: 22.2.0 + *unsafe_hash* as an alias for *hash* (for :pep:`681` compliance). + .. versionchanged:: 24.1.0 + Instances are not compared as tuples of attributes anymore, but using a + big ``and`` condition. This is faster and has more correct behavior for + uncomparable values like `math.nan`. + .. versionadded:: 24.1.0 + If a class has an *inherited* classmethod called + ``__attrs_init_subclass__``, it is executed after the class is created. + .. deprecated:: 24.1.0 *hash* is deprecated in favor of *unsafe_hash*. + + .. note:: + + The main differences to the classic `attr.s` are: + + - Automatically detect whether or not *auto_attribs* should be `True` + (c.f. *auto_attribs* parameter). + - Converters and validators run when attributes are set by default -- + if *frozen* is `False`. + - *slots=True* + + Usually, this has only upsides and few visible effects in everyday + programming. But it *can* lead to some surprising behaviors, so + please make sure to read :term:`slotted classes`. + + - *auto_exc=True* + - *auto_detect=True* + - *order=False* + - Some options that were only relevant on Python 2 or were kept around + for backwards-compatibility have been removed. + + """ + + def do_it(cls, auto_attribs): + return attrs( + maybe_cls=cls, + these=these, + repr=repr, + hash=hash, + unsafe_hash=unsafe_hash, + init=init, + slots=slots, + frozen=frozen, + weakref_slot=weakref_slot, + str=str, + auto_attribs=auto_attribs, + kw_only=kw_only, + cache_hash=cache_hash, + auto_exc=auto_exc, + eq=eq, + order=order, + auto_detect=auto_detect, + collect_by_mro=True, + getstate_setstate=getstate_setstate, + on_setattr=on_setattr, + field_transformer=field_transformer, + match_args=match_args, + ) + + def wrap(cls): + """ + Making this a wrapper ensures this code runs during class creation. + + We also ensure that frozen-ness of classes is inherited. + """ + nonlocal frozen, on_setattr + + had_on_setattr = on_setattr not in (None, setters.NO_OP) + + # By default, mutable classes convert & validate on setattr. + if frozen is False and on_setattr is None: + on_setattr = _DEFAULT_ON_SETATTR + + # However, if we subclass a frozen class, we inherit the immutability + # and disable on_setattr. + for base_cls in cls.__bases__: + if base_cls.__setattr__ is _frozen_setattrs: + if had_on_setattr: + msg = "Frozen classes can't use on_setattr (frozen-ness was inherited)." + raise ValueError(msg) + + on_setattr = setters.NO_OP + break + + if auto_attribs is not None: + return do_it(cls, auto_attribs) + + try: + return do_it(cls, True) + except UnannotatedAttributeError: + return do_it(cls, False) + + # maybe_cls's type depends on the usage of the decorator. It's a class + # if it's used as `@attrs` but `None` if used as `@attrs()`. + if maybe_cls is None: + return wrap + + return wrap(maybe_cls) + + +mutable = define +frozen = partial(define, frozen=True, on_setattr=None) + + +def field( + *, + default=NOTHING, + validator=None, + repr=True, + hash=None, + init=True, + metadata=None, + type=None, + converter=None, + factory=None, + kw_only=False, + eq=None, + order=None, + on_setattr=None, + alias=None, +): + """ + Create a new :term:`field` / :term:`attribute` on a class. + + .. warning:: + + Does **nothing** unless the class is also decorated with + `attrs.define` (or similar)! + + Args: + default: + A value that is used if an *attrs*-generated ``__init__`` is used + and no value is passed while instantiating or the attribute is + excluded using ``init=False``. + + If the value is an instance of `attrs.Factory`, its callable will + be used to construct a new value (useful for mutable data types + like lists or dicts). + + If a default is not set (or set manually to `attrs.NOTHING`), a + value *must* be supplied when instantiating; otherwise a + `TypeError` will be raised. + + .. seealso:: `defaults` + + factory (~typing.Callable): + Syntactic sugar for ``default=attr.Factory(factory)``. + + validator (~typing.Callable | list[~typing.Callable]): + Callable that is called by *attrs*-generated ``__init__`` methods + after the instance has been initialized. They receive the + initialized instance, the :func:`~attrs.Attribute`, and the passed + value. + + The return value is *not* inspected so the validator has to throw + an exception itself. + + If a `list` is passed, its items are treated as validators and must + all pass. + + Validators can be globally disabled and re-enabled using + `attrs.validators.get_disabled` / `attrs.validators.set_disabled`. + + The validator can also be set using decorator notation as shown + below. + + .. seealso:: :ref:`validators` + + repr (bool | ~typing.Callable): + Include this attribute in the generated ``__repr__`` method. If + True, include the attribute; if False, omit it. By default, the + built-in ``repr()`` function is used. To override how the attribute + value is formatted, pass a ``callable`` that takes a single value + and returns a string. Note that the resulting string is used as-is, + which means it will be used directly *instead* of calling + ``repr()`` (the default). + + eq (bool | ~typing.Callable): + If True (default), include this attribute in the generated + ``__eq__`` and ``__ne__`` methods that check two instances for + equality. To override how the attribute value is compared, pass a + callable that takes a single value and returns the value to be + compared. + + .. seealso:: `comparison` + + order (bool | ~typing.Callable): + If True (default), include this attributes in the generated + ``__lt__``, ``__le__``, ``__gt__`` and ``__ge__`` methods. To + override how the attribute value is ordered, pass a callable that + takes a single value and returns the value to be ordered. + + .. seealso:: `comparison` + + cmp(bool | ~typing.Callable): + Setting *cmp* is equivalent to setting *eq* and *order* to the same + value. Must not be mixed with *eq* or *order*. + + .. seealso:: `comparison` + + hash (bool | None): + Include this attribute in the generated ``__hash__`` method. If + None (default), mirror *eq*'s value. This is the correct behavior + according the Python spec. Setting this value to anything else + than None is *discouraged*. + + .. seealso:: `hashing` + + init (bool): + Include this attribute in the generated ``__init__`` method. + + It is possible to set this to False and set a default value. In + that case this attributed is unconditionally initialized with the + specified default value or factory. + + .. seealso:: `init` + + converter (typing.Callable | Converter): + A callable that is called by *attrs*-generated ``__init__`` methods + to convert attribute's value to the desired format. + + If a vanilla callable is passed, it is given the passed-in value as + the only positional argument. It is possible to receive additional + arguments by wrapping the callable in a `Converter`. + + Either way, the returned value will be used as the new value of the + attribute. The value is converted before being passed to the + validator, if any. + + .. seealso:: :ref:`converters` + + metadata (dict | None): + An arbitrary mapping, to be used by third-party code. + + .. seealso:: `extending-metadata`. + + type (type): + The type of the attribute. Nowadays, the preferred method to + specify the type is using a variable annotation (see :pep:`526`). + This argument is provided for backwards-compatibility and for usage + with `make_class`. Regardless of the approach used, the type will + be stored on ``Attribute.type``. + + Please note that *attrs* doesn't do anything with this metadata by + itself. You can use it as part of your own code or for `static type + checking `. + + kw_only (bool): + Make this attribute keyword-only in the generated ``__init__`` (if + ``init`` is False, this parameter is ignored). + + on_setattr (~typing.Callable | list[~typing.Callable] | None | ~typing.Literal[attrs.setters.NO_OP]): + Allows to overwrite the *on_setattr* setting from `attr.s`. If left + None, the *on_setattr* value from `attr.s` is used. Set to + `attrs.setters.NO_OP` to run **no** `setattr` hooks for this + attribute -- regardless of the setting in `define()`. + + alias (str | None): + Override this attribute's parameter name in the generated + ``__init__`` method. If left None, default to ``name`` stripped + of leading underscores. See `private-attributes`. + + .. versionadded:: 20.1.0 + .. versionchanged:: 21.1.0 + *eq*, *order*, and *cmp* also accept a custom callable + .. versionadded:: 22.2.0 *alias* + .. versionadded:: 23.1.0 + The *type* parameter has been re-added; mostly for `attrs.make_class`. + Please note that type checkers ignore this metadata. + + .. seealso:: + + `attr.ib` + """ + return attrib( + default=default, + validator=validator, + repr=repr, + hash=hash, + init=init, + metadata=metadata, + type=type, + converter=converter, + factory=factory, + kw_only=kw_only, + eq=eq, + order=order, + on_setattr=on_setattr, + alias=alias, + ) + + +def asdict(inst, *, recurse=True, filter=None, value_serializer=None): + """ + Same as `attr.asdict`, except that collections types are always retained + and dict is always used as *dict_factory*. + + .. versionadded:: 21.3.0 + """ + return _asdict( + inst=inst, + recurse=recurse, + filter=filter, + value_serializer=value_serializer, + retain_collection_types=True, + ) + + +def astuple(inst, *, recurse=True, filter=None): + """ + Same as `attr.astuple`, except that collections types are always retained + and `tuple` is always used as the *tuple_factory*. + + .. versionadded:: 21.3.0 + """ + return _astuple( + inst=inst, recurse=recurse, filter=filter, retain_collection_types=True + ) diff --git a/myenv/lib/python3.12/site-packages/attr/_typing_compat.pyi b/myenv/lib/python3.12/site-packages/attr/_typing_compat.pyi new file mode 100644 index 0000000..ca7b71e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/_typing_compat.pyi @@ -0,0 +1,15 @@ +from typing import Any, ClassVar, Protocol + +# MYPY is a special constant in mypy which works the same way as `TYPE_CHECKING`. +MYPY = False + +if MYPY: + # A protocol to be able to statically accept an attrs class. + class AttrsInstance_(Protocol): + __attrs_attrs__: ClassVar[Any] + +else: + # For type checkers without plug-in support use an empty protocol that + # will (hopefully) be combined into a union. + class AttrsInstance_(Protocol): + pass diff --git a/myenv/lib/python3.12/site-packages/attr/_version_info.py b/myenv/lib/python3.12/site-packages/attr/_version_info.py new file mode 100644 index 0000000..51a1312 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/_version_info.py @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: MIT + + +from functools import total_ordering + +from ._funcs import astuple +from ._make import attrib, attrs + + +@total_ordering +@attrs(eq=False, order=False, slots=True, frozen=True) +class VersionInfo: + """ + A version object that can be compared to tuple of length 1--4: + + >>> attr.VersionInfo(19, 1, 0, "final") <= (19, 2) + True + >>> attr.VersionInfo(19, 1, 0, "final") < (19, 1, 1) + True + >>> vi = attr.VersionInfo(19, 2, 0, "final") + >>> vi < (19, 1, 1) + False + >>> vi < (19,) + False + >>> vi == (19, 2,) + True + >>> vi == (19, 2, 1) + False + + .. versionadded:: 19.2 + """ + + year = attrib(type=int) + minor = attrib(type=int) + micro = attrib(type=int) + releaselevel = attrib(type=str) + + @classmethod + def _from_version_string(cls, s): + """ + Parse *s* and return a _VersionInfo. + """ + v = s.split(".") + if len(v) == 3: + v.append("final") + + return cls( + year=int(v[0]), minor=int(v[1]), micro=int(v[2]), releaselevel=v[3] + ) + + def _ensure_tuple(self, other): + """ + Ensure *other* is a tuple of a valid length. + + Returns a possibly transformed *other* and ourselves as a tuple of + the same length as *other*. + """ + + if self.__class__ is other.__class__: + other = astuple(other) + + if not isinstance(other, tuple): + raise NotImplementedError + + if not (1 <= len(other) <= 4): + raise NotImplementedError + + return astuple(self)[: len(other)], other + + def __eq__(self, other): + try: + us, them = self._ensure_tuple(other) + except NotImplementedError: + return NotImplemented + + return us == them + + def __lt__(self, other): + try: + us, them = self._ensure_tuple(other) + except NotImplementedError: + return NotImplemented + + # Since alphabetically "dev0" < "final" < "post1" < "post2", we don't + # have to do anything special with releaselevel for now. + return us < them diff --git a/myenv/lib/python3.12/site-packages/attr/_version_info.pyi b/myenv/lib/python3.12/site-packages/attr/_version_info.pyi new file mode 100644 index 0000000..45ced08 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/_version_info.pyi @@ -0,0 +1,9 @@ +class VersionInfo: + @property + def year(self) -> int: ... + @property + def minor(self) -> int: ... + @property + def micro(self) -> int: ... + @property + def releaselevel(self) -> str: ... diff --git a/myenv/lib/python3.12/site-packages/attr/converters.py b/myenv/lib/python3.12/site-packages/attr/converters.py new file mode 100644 index 0000000..9238311 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/converters.py @@ -0,0 +1,151 @@ +# SPDX-License-Identifier: MIT + +""" +Commonly useful converters. +""" + + +import typing + +from ._compat import _AnnotationExtractor +from ._make import NOTHING, Factory, pipe + + +__all__ = [ + "default_if_none", + "optional", + "pipe", + "to_bool", +] + + +def optional(converter): + """ + A converter that allows an attribute to be optional. An optional attribute + is one which can be set to `None`. + + Type annotations will be inferred from the wrapped converter's, if it has + any. + + Args: + converter (typing.Callable): + the converter that is used for non-`None` values. + + .. versionadded:: 17.1.0 + """ + + def optional_converter(val): + if val is None: + return None + return converter(val) + + xtr = _AnnotationExtractor(converter) + + t = xtr.get_first_param_type() + if t: + optional_converter.__annotations__["val"] = typing.Optional[t] + + rt = xtr.get_return_type() + if rt: + optional_converter.__annotations__["return"] = typing.Optional[rt] + + return optional_converter + + +def default_if_none(default=NOTHING, factory=None): + """ + A converter that allows to replace `None` values by *default* or the result + of *factory*. + + Args: + default: + Value to be used if `None` is passed. Passing an instance of + `attrs.Factory` is supported, however the ``takes_self`` option is + *not*. + + factory (typing.Callable): + A callable that takes no parameters whose result is used if `None` + is passed. + + Raises: + TypeError: If **neither** *default* or *factory* is passed. + + TypeError: If **both** *default* and *factory* are passed. + + ValueError: + If an instance of `attrs.Factory` is passed with + ``takes_self=True``. + + .. versionadded:: 18.2.0 + """ + if default is NOTHING and factory is None: + msg = "Must pass either `default` or `factory`." + raise TypeError(msg) + + if default is not NOTHING and factory is not None: + msg = "Must pass either `default` or `factory` but not both." + raise TypeError(msg) + + if factory is not None: + default = Factory(factory) + + if isinstance(default, Factory): + if default.takes_self: + msg = "`takes_self` is not supported by default_if_none." + raise ValueError(msg) + + def default_if_none_converter(val): + if val is not None: + return val + + return default.factory() + + else: + + def default_if_none_converter(val): + if val is not None: + return val + + return default + + return default_if_none_converter + + +def to_bool(val): + """ + Convert "boolean" strings (for example, from environment variables) to real + booleans. + + Values mapping to `True`: + + - ``True`` + - ``"true"`` / ``"t"`` + - ``"yes"`` / ``"y"`` + - ``"on"`` + - ``"1"`` + - ``1`` + + Values mapping to `False`: + + - ``False`` + - ``"false"`` / ``"f"`` + - ``"no"`` / ``"n"`` + - ``"off"`` + - ``"0"`` + - ``0`` + + Raises: + ValueError: For any other value. + + .. versionadded:: 21.3.0 + """ + if isinstance(val, str): + val = val.lower() + + if val in (True, "true", "t", "yes", "y", "on", "1", 1): + return True + if val in (False, "false", "f", "no", "n", "off", "0", 0): + return False + + msg = f"Cannot convert value to bool: {val!r}" + raise ValueError(msg) diff --git a/myenv/lib/python3.12/site-packages/attr/converters.pyi b/myenv/lib/python3.12/site-packages/attr/converters.pyi new file mode 100644 index 0000000..9ef478f --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/converters.pyi @@ -0,0 +1,13 @@ +from typing import Callable, TypeVar, overload + +from attrs import _ConverterType + +_T = TypeVar("_T") + +def pipe(*validators: _ConverterType) -> _ConverterType: ... +def optional(converter: _ConverterType) -> _ConverterType: ... +@overload +def default_if_none(default: _T) -> _ConverterType: ... +@overload +def default_if_none(*, factory: Callable[[], _T]) -> _ConverterType: ... +def to_bool(val: str) -> bool: ... diff --git a/myenv/lib/python3.12/site-packages/attr/exceptions.py b/myenv/lib/python3.12/site-packages/attr/exceptions.py new file mode 100644 index 0000000..3b7abb8 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/exceptions.py @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: MIT + +from __future__ import annotations + +from typing import ClassVar + + +class FrozenError(AttributeError): + """ + A frozen/immutable instance or attribute have been attempted to be + modified. + + It mirrors the behavior of ``namedtuples`` by using the same error message + and subclassing `AttributeError`. + + .. versionadded:: 20.1.0 + """ + + msg = "can't set attribute" + args: ClassVar[tuple[str]] = [msg] + + +class FrozenInstanceError(FrozenError): + """ + A frozen instance has been attempted to be modified. + + .. versionadded:: 16.1.0 + """ + + +class FrozenAttributeError(FrozenError): + """ + A frozen attribute has been attempted to be modified. + + .. versionadded:: 20.1.0 + """ + + +class AttrsAttributeNotFoundError(ValueError): + """ + An *attrs* function couldn't find an attribute that the user asked for. + + .. versionadded:: 16.2.0 + """ + + +class NotAnAttrsClassError(ValueError): + """ + A non-*attrs* class has been passed into an *attrs* function. + + .. versionadded:: 16.2.0 + """ + + +class DefaultAlreadySetError(RuntimeError): + """ + A default has been set when defining the field and is attempted to be reset + using the decorator. + + .. versionadded:: 17.1.0 + """ + + +class UnannotatedAttributeError(RuntimeError): + """ + A class with ``auto_attribs=True`` has a field without a type annotation. + + .. versionadded:: 17.3.0 + """ + + +class PythonTooOldError(RuntimeError): + """ + It was attempted to use an *attrs* feature that requires a newer Python + version. + + .. versionadded:: 18.2.0 + """ + + +class NotCallableError(TypeError): + """ + A field requiring a callable has been set with a value that is not + callable. + + .. versionadded:: 19.2.0 + """ + + def __init__(self, msg, value): + super(TypeError, self).__init__(msg, value) + self.msg = msg + self.value = value + + def __str__(self): + return str(self.msg) diff --git a/myenv/lib/python3.12/site-packages/attr/exceptions.pyi b/myenv/lib/python3.12/site-packages/attr/exceptions.pyi new file mode 100644 index 0000000..f268011 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/exceptions.pyi @@ -0,0 +1,17 @@ +from typing import Any + +class FrozenError(AttributeError): + msg: str = ... + +class FrozenInstanceError(FrozenError): ... +class FrozenAttributeError(FrozenError): ... +class AttrsAttributeNotFoundError(ValueError): ... +class NotAnAttrsClassError(ValueError): ... +class DefaultAlreadySetError(RuntimeError): ... +class UnannotatedAttributeError(RuntimeError): ... +class PythonTooOldError(RuntimeError): ... + +class NotCallableError(TypeError): + msg: str = ... + value: Any = ... + def __init__(self, msg: str, value: Any) -> None: ... diff --git a/myenv/lib/python3.12/site-packages/attr/filters.py b/myenv/lib/python3.12/site-packages/attr/filters.py new file mode 100644 index 0000000..689b170 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/filters.py @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: MIT + +""" +Commonly useful filters for `attrs.asdict` and `attrs.astuple`. +""" + +from ._make import Attribute + + +def _split_what(what): + """ + Returns a tuple of `frozenset`s of classes and attributes. + """ + return ( + frozenset(cls for cls in what if isinstance(cls, type)), + frozenset(cls for cls in what if isinstance(cls, str)), + frozenset(cls for cls in what if isinstance(cls, Attribute)), + ) + + +def include(*what): + """ + Create a filter that only allows *what*. + + Args: + what (list[type, str, attrs.Attribute]): + What to include. Can be a type, a name, or an attribute. + + Returns: + Callable: + A callable that can be passed to `attrs.asdict`'s and + `attrs.astuple`'s *filter* argument. + + .. versionchanged:: 23.1.0 Accept strings with field names. + """ + cls, names, attrs = _split_what(what) + + def include_(attribute, value): + return ( + value.__class__ in cls + or attribute.name in names + or attribute in attrs + ) + + return include_ + + +def exclude(*what): + """ + Create a filter that does **not** allow *what*. + + Args: + what (list[type, str, attrs.Attribute]): + What to exclude. Can be a type, a name, or an attribute. + + Returns: + Callable: + A callable that can be passed to `attrs.asdict`'s and + `attrs.astuple`'s *filter* argument. + + .. versionchanged:: 23.3.0 Accept field name string as input argument + """ + cls, names, attrs = _split_what(what) + + def exclude_(attribute, value): + return not ( + value.__class__ in cls + or attribute.name in names + or attribute in attrs + ) + + return exclude_ diff --git a/myenv/lib/python3.12/site-packages/attr/filters.pyi b/myenv/lib/python3.12/site-packages/attr/filters.pyi new file mode 100644 index 0000000..974abdc --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/filters.pyi @@ -0,0 +1,6 @@ +from typing import Any + +from . import Attribute, _FilterType + +def include(*what: type | str | Attribute[Any]) -> _FilterType[Any]: ... +def exclude(*what: type | str | Attribute[Any]) -> _FilterType[Any]: ... diff --git a/myenv/lib/python3.12/site-packages/attr/py.typed b/myenv/lib/python3.12/site-packages/attr/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/attr/setters.py b/myenv/lib/python3.12/site-packages/attr/setters.py new file mode 100644 index 0000000..a9ce016 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/setters.py @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: MIT + +""" +Commonly used hooks for on_setattr. +""" + +from . import _config +from .exceptions import FrozenAttributeError + + +def pipe(*setters): + """ + Run all *setters* and return the return value of the last one. + + .. versionadded:: 20.1.0 + """ + + def wrapped_pipe(instance, attrib, new_value): + rv = new_value + + for setter in setters: + rv = setter(instance, attrib, rv) + + return rv + + return wrapped_pipe + + +def frozen(_, __, ___): + """ + Prevent an attribute to be modified. + + .. versionadded:: 20.1.0 + """ + raise FrozenAttributeError() + + +def validate(instance, attrib, new_value): + """ + Run *attrib*'s validator on *new_value* if it has one. + + .. versionadded:: 20.1.0 + """ + if _config._run_validators is False: + return new_value + + v = attrib.validator + if not v: + return new_value + + v(instance, attrib, new_value) + + return new_value + + +def convert(instance, attrib, new_value): + """ + Run *attrib*'s converter -- if it has one -- on *new_value* and return the + result. + + .. versionadded:: 20.1.0 + """ + c = attrib.converter + if c: + # This can be removed once we drop 3.8 and use attrs.Converter instead. + from ._make import Converter + + if not isinstance(c, Converter): + return c(new_value) + + return c(new_value, instance, attrib) + + return new_value + + +# Sentinel for disabling class-wide *on_setattr* hooks for certain attributes. +# Sphinx's autodata stopped working, so the docstring is inlined in the API +# docs. +NO_OP = object() diff --git a/myenv/lib/python3.12/site-packages/attr/setters.pyi b/myenv/lib/python3.12/site-packages/attr/setters.pyi new file mode 100644 index 0000000..73abf36 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/setters.pyi @@ -0,0 +1,20 @@ +from typing import Any, NewType, NoReturn, TypeVar + +from . import Attribute +from attrs import _OnSetAttrType + +_T = TypeVar("_T") + +def frozen( + instance: Any, attribute: Attribute[Any], new_value: Any +) -> NoReturn: ... +def pipe(*setters: _OnSetAttrType) -> _OnSetAttrType: ... +def validate(instance: Any, attribute: Attribute[_T], new_value: _T) -> _T: ... + +# convert is allowed to return Any, because they can be chained using pipe. +def convert( + instance: Any, attribute: Attribute[Any], new_value: Any +) -> Any: ... + +_NoOpType = NewType("_NoOpType", object) +NO_OP: _NoOpType diff --git a/myenv/lib/python3.12/site-packages/attr/validators.py b/myenv/lib/python3.12/site-packages/attr/validators.py new file mode 100644 index 0000000..8a56717 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/validators.py @@ -0,0 +1,711 @@ +# SPDX-License-Identifier: MIT + +""" +Commonly useful validators. +""" + + +import operator +import re + +from contextlib import contextmanager +from re import Pattern + +from ._config import get_run_validators, set_run_validators +from ._make import _AndValidator, and_, attrib, attrs +from .converters import default_if_none +from .exceptions import NotCallableError + + +__all__ = [ + "and_", + "deep_iterable", + "deep_mapping", + "disabled", + "ge", + "get_disabled", + "gt", + "in_", + "instance_of", + "is_callable", + "le", + "lt", + "matches_re", + "max_len", + "min_len", + "not_", + "optional", + "or_", + "set_disabled", +] + + +def set_disabled(disabled): + """ + Globally disable or enable running validators. + + By default, they are run. + + Args: + disabled (bool): If `True`, disable running all validators. + + .. warning:: + + This function is not thread-safe! + + .. versionadded:: 21.3.0 + """ + set_run_validators(not disabled) + + +def get_disabled(): + """ + Return a bool indicating whether validators are currently disabled or not. + + Returns: + bool:`True` if validators are currently disabled. + + .. versionadded:: 21.3.0 + """ + return not get_run_validators() + + +@contextmanager +def disabled(): + """ + Context manager that disables running validators within its context. + + .. warning:: + + This context manager is not thread-safe! + + .. versionadded:: 21.3.0 + """ + set_run_validators(False) + try: + yield + finally: + set_run_validators(True) + + +@attrs(repr=False, slots=True, unsafe_hash=True) +class _InstanceOfValidator: + type = attrib() + + def __call__(self, inst, attr, value): + """ + We use a callable class to be able to change the ``__repr__``. + """ + if not isinstance(value, self.type): + msg = f"'{attr.name}' must be {self.type!r} (got {value!r} that is a {value.__class__!r})." + raise TypeError( + msg, + attr, + self.type, + value, + ) + + def __repr__(self): + return f"" + + +def instance_of(type): + """ + A validator that raises a `TypeError` if the initializer is called with a + wrong type for this particular attribute (checks are performed using + `isinstance` therefore it's also valid to pass a tuple of types). + + Args: + type (type | tuple[type]): The type to check for. + + Raises: + TypeError: + With a human readable error message, the attribute (of type + `attrs.Attribute`), the expected type, and the value it got. + """ + return _InstanceOfValidator(type) + + +@attrs(repr=False, frozen=True, slots=True) +class _MatchesReValidator: + pattern = attrib() + match_func = attrib() + + def __call__(self, inst, attr, value): + """ + We use a callable class to be able to change the ``__repr__``. + """ + if not self.match_func(value): + msg = f"'{attr.name}' must match regex {self.pattern.pattern!r} ({value!r} doesn't)" + raise ValueError( + msg, + attr, + self.pattern, + value, + ) + + def __repr__(self): + return f"" + + +def matches_re(regex, flags=0, func=None): + r""" + A validator that raises `ValueError` if the initializer is called with a + string that doesn't match *regex*. + + Args: + regex (str, re.Pattern): + A regex string or precompiled pattern to match against + + flags (int): + Flags that will be passed to the underlying re function (default 0) + + func (typing.Callable): + Which underlying `re` function to call. Valid options are + `re.fullmatch`, `re.search`, and `re.match`; the default `None` + means `re.fullmatch`. For performance reasons, the pattern is + always precompiled using `re.compile`. + + .. versionadded:: 19.2.0 + .. versionchanged:: 21.3.0 *regex* can be a pre-compiled pattern. + """ + valid_funcs = (re.fullmatch, None, re.search, re.match) + if func not in valid_funcs: + msg = "'func' must be one of {}.".format( + ", ".join( + sorted(e and e.__name__ or "None" for e in set(valid_funcs)) + ) + ) + raise ValueError(msg) + + if isinstance(regex, Pattern): + if flags: + msg = "'flags' can only be used with a string pattern; pass flags to re.compile() instead" + raise TypeError(msg) + pattern = regex + else: + pattern = re.compile(regex, flags) + + if func is re.match: + match_func = pattern.match + elif func is re.search: + match_func = pattern.search + else: + match_func = pattern.fullmatch + + return _MatchesReValidator(pattern, match_func) + + +@attrs(repr=False, slots=True, unsafe_hash=True) +class _OptionalValidator: + validator = attrib() + + def __call__(self, inst, attr, value): + if value is None: + return + + self.validator(inst, attr, value) + + def __repr__(self): + return f"" + + +def optional(validator): + """ + A validator that makes an attribute optional. An optional attribute is one + which can be set to `None` in addition to satisfying the requirements of + the sub-validator. + + Args: + validator + (typing.Callable | tuple[typing.Callable] | list[typing.Callable]): + A validator (or validators) that is used for non-`None` values. + + .. versionadded:: 15.1.0 + .. versionchanged:: 17.1.0 *validator* can be a list of validators. + .. versionchanged:: 23.1.0 *validator* can also be a tuple of validators. + """ + if isinstance(validator, (list, tuple)): + return _OptionalValidator(_AndValidator(validator)) + + return _OptionalValidator(validator) + + +@attrs(repr=False, slots=True, unsafe_hash=True) +class _InValidator: + options = attrib() + _original_options = attrib(hash=False) + + def __call__(self, inst, attr, value): + try: + in_options = value in self.options + except TypeError: # e.g. `1 in "abc"` + in_options = False + + if not in_options: + msg = f"'{attr.name}' must be in {self._original_options!r} (got {value!r})" + raise ValueError( + msg, + attr, + self._original_options, + value, + ) + + def __repr__(self): + return f"" + + +def in_(options): + """ + A validator that raises a `ValueError` if the initializer is called with a + value that does not belong in the *options* provided. + + The check is performed using ``value in options``, so *options* has to + support that operation. + + To keep the validator hashable, dicts, lists, and sets are transparently + transformed into a `tuple`. + + Args: + options: Allowed options. + + Raises: + ValueError: + With a human readable error message, the attribute (of type + `attrs.Attribute`), the expected options, and the value it got. + + .. versionadded:: 17.1.0 + .. versionchanged:: 22.1.0 + The ValueError was incomplete until now and only contained the human + readable error message. Now it contains all the information that has + been promised since 17.1.0. + .. versionchanged:: 24.1.0 + *options* that are a list, dict, or a set are now transformed into a + tuple to keep the validator hashable. + """ + repr_options = options + if isinstance(options, (list, dict, set)): + options = tuple(options) + + return _InValidator(options, repr_options) + + +@attrs(repr=False, slots=False, unsafe_hash=True) +class _IsCallableValidator: + def __call__(self, inst, attr, value): + """ + We use a callable class to be able to change the ``__repr__``. + """ + if not callable(value): + message = ( + "'{name}' must be callable " + "(got {value!r} that is a {actual!r})." + ) + raise NotCallableError( + msg=message.format( + name=attr.name, value=value, actual=value.__class__ + ), + value=value, + ) + + def __repr__(self): + return "" + + +def is_callable(): + """ + A validator that raises a `attrs.exceptions.NotCallableError` if the + initializer is called with a value for this particular attribute that is + not callable. + + .. versionadded:: 19.1.0 + + Raises: + attrs.exceptions.NotCallableError: + With a human readable error message containing the attribute + (`attrs.Attribute`) name, and the value it got. + """ + return _IsCallableValidator() + + +@attrs(repr=False, slots=True, unsafe_hash=True) +class _DeepIterable: + member_validator = attrib(validator=is_callable()) + iterable_validator = attrib( + default=None, validator=optional(is_callable()) + ) + + def __call__(self, inst, attr, value): + """ + We use a callable class to be able to change the ``__repr__``. + """ + if self.iterable_validator is not None: + self.iterable_validator(inst, attr, value) + + for member in value: + self.member_validator(inst, attr, member) + + def __repr__(self): + iterable_identifier = ( + "" + if self.iterable_validator is None + else f" {self.iterable_validator!r}" + ) + return ( + f"" + ) + + +def deep_iterable(member_validator, iterable_validator=None): + """ + A validator that performs deep validation of an iterable. + + Args: + member_validator: Validator to apply to iterable members. + + iterable_validator: + Validator to apply to iterable itself (optional). + + Raises + TypeError: if any sub-validators fail + + .. versionadded:: 19.1.0 + """ + if isinstance(member_validator, (list, tuple)): + member_validator = and_(*member_validator) + return _DeepIterable(member_validator, iterable_validator) + + +@attrs(repr=False, slots=True, unsafe_hash=True) +class _DeepMapping: + key_validator = attrib(validator=is_callable()) + value_validator = attrib(validator=is_callable()) + mapping_validator = attrib(default=None, validator=optional(is_callable())) + + def __call__(self, inst, attr, value): + """ + We use a callable class to be able to change the ``__repr__``. + """ + if self.mapping_validator is not None: + self.mapping_validator(inst, attr, value) + + for key in value: + self.key_validator(inst, attr, key) + self.value_validator(inst, attr, value[key]) + + def __repr__(self): + return f"" + + +def deep_mapping(key_validator, value_validator, mapping_validator=None): + """ + A validator that performs deep validation of a dictionary. + + Args: + key_validator: Validator to apply to dictionary keys. + + value_validator: Validator to apply to dictionary values. + + mapping_validator: + Validator to apply to top-level mapping attribute (optional). + + .. versionadded:: 19.1.0 + + Raises: + TypeError: if any sub-validators fail + """ + return _DeepMapping(key_validator, value_validator, mapping_validator) + + +@attrs(repr=False, frozen=True, slots=True) +class _NumberValidator: + bound = attrib() + compare_op = attrib() + compare_func = attrib() + + def __call__(self, inst, attr, value): + """ + We use a callable class to be able to change the ``__repr__``. + """ + if not self.compare_func(value, self.bound): + msg = f"'{attr.name}' must be {self.compare_op} {self.bound}: {value}" + raise ValueError(msg) + + def __repr__(self): + return f"" + + +def lt(val): + """ + A validator that raises `ValueError` if the initializer is called with a + number larger or equal to *val*. + + The validator uses `operator.lt` to compare the values. + + Args: + val: Exclusive upper bound for values. + + .. versionadded:: 21.3.0 + """ + return _NumberValidator(val, "<", operator.lt) + + +def le(val): + """ + A validator that raises `ValueError` if the initializer is called with a + number greater than *val*. + + The validator uses `operator.le` to compare the values. + + Args: + val: Inclusive upper bound for values. + + .. versionadded:: 21.3.0 + """ + return _NumberValidator(val, "<=", operator.le) + + +def ge(val): + """ + A validator that raises `ValueError` if the initializer is called with a + number smaller than *val*. + + The validator uses `operator.ge` to compare the values. + + Args: + val: Inclusive lower bound for values + + .. versionadded:: 21.3.0 + """ + return _NumberValidator(val, ">=", operator.ge) + + +def gt(val): + """ + A validator that raises `ValueError` if the initializer is called with a + number smaller or equal to *val*. + + The validator uses `operator.ge` to compare the values. + + Args: + val: Exclusive lower bound for values + + .. versionadded:: 21.3.0 + """ + return _NumberValidator(val, ">", operator.gt) + + +@attrs(repr=False, frozen=True, slots=True) +class _MaxLengthValidator: + max_length = attrib() + + def __call__(self, inst, attr, value): + """ + We use a callable class to be able to change the ``__repr__``. + """ + if len(value) > self.max_length: + msg = f"Length of '{attr.name}' must be <= {self.max_length}: {len(value)}" + raise ValueError(msg) + + def __repr__(self): + return f"" + + +def max_len(length): + """ + A validator that raises `ValueError` if the initializer is called + with a string or iterable that is longer than *length*. + + Args: + length (int): Maximum length of the string or iterable + + .. versionadded:: 21.3.0 + """ + return _MaxLengthValidator(length) + + +@attrs(repr=False, frozen=True, slots=True) +class _MinLengthValidator: + min_length = attrib() + + def __call__(self, inst, attr, value): + """ + We use a callable class to be able to change the ``__repr__``. + """ + if len(value) < self.min_length: + msg = f"Length of '{attr.name}' must be >= {self.min_length}: {len(value)}" + raise ValueError(msg) + + def __repr__(self): + return f"" + + +def min_len(length): + """ + A validator that raises `ValueError` if the initializer is called + with a string or iterable that is shorter than *length*. + + Args: + length (int): Minimum length of the string or iterable + + .. versionadded:: 22.1.0 + """ + return _MinLengthValidator(length) + + +@attrs(repr=False, slots=True, unsafe_hash=True) +class _SubclassOfValidator: + type = attrib() + + def __call__(self, inst, attr, value): + """ + We use a callable class to be able to change the ``__repr__``. + """ + if not issubclass(value, self.type): + msg = f"'{attr.name}' must be a subclass of {self.type!r} (got {value!r})." + raise TypeError( + msg, + attr, + self.type, + value, + ) + + def __repr__(self): + return f"" + + +def _subclass_of(type): + """ + A validator that raises a `TypeError` if the initializer is called with a + wrong type for this particular attribute (checks are performed using + `issubclass` therefore it's also valid to pass a tuple of types). + + Args: + type (type | tuple[type, ...]): The type(s) to check for. + + Raises: + TypeError: + With a human readable error message, the attribute (of type + `attrs.Attribute`), the expected type, and the value it got. + """ + return _SubclassOfValidator(type) + + +@attrs(repr=False, slots=True, unsafe_hash=True) +class _NotValidator: + validator = attrib() + msg = attrib( + converter=default_if_none( + "not_ validator child '{validator!r}' " + "did not raise a captured error" + ) + ) + exc_types = attrib( + validator=deep_iterable( + member_validator=_subclass_of(Exception), + iterable_validator=instance_of(tuple), + ), + ) + + def __call__(self, inst, attr, value): + try: + self.validator(inst, attr, value) + except self.exc_types: + pass # suppress error to invert validity + else: + raise ValueError( + self.msg.format( + validator=self.validator, + exc_types=self.exc_types, + ), + attr, + self.validator, + value, + self.exc_types, + ) + + def __repr__(self): + return f"" + + +def not_(validator, *, msg=None, exc_types=(ValueError, TypeError)): + """ + A validator that wraps and logically 'inverts' the validator passed to it. + It will raise a `ValueError` if the provided validator *doesn't* raise a + `ValueError` or `TypeError` (by default), and will suppress the exception + if the provided validator *does*. + + Intended to be used with existing validators to compose logic without + needing to create inverted variants, for example, ``not_(in_(...))``. + + Args: + validator: A validator to be logically inverted. + + msg (str): + Message to raise if validator fails. Formatted with keys + ``exc_types`` and ``validator``. + + exc_types (tuple[type, ...]): + Exception type(s) to capture. Other types raised by child + validators will not be intercepted and pass through. + + Raises: + ValueError: + With a human readable error message, the attribute (of type + `attrs.Attribute`), the validator that failed to raise an + exception, the value it got, and the expected exception types. + + .. versionadded:: 22.2.0 + """ + try: + exc_types = tuple(exc_types) + except TypeError: + exc_types = (exc_types,) + return _NotValidator(validator, msg, exc_types) + + +@attrs(repr=False, slots=True, unsafe_hash=True) +class _OrValidator: + validators = attrib() + + def __call__(self, inst, attr, value): + for v in self.validators: + try: + v(inst, attr, value) + except Exception: # noqa: BLE001, PERF203, S112 + continue + else: + return + + msg = f"None of {self.validators!r} satisfied for value {value!r}" + raise ValueError(msg) + + def __repr__(self): + return f"" + + +def or_(*validators): + """ + A validator that composes multiple validators into one. + + When called on a value, it runs all wrapped validators until one of them is + satisfied. + + Args: + validators (~collections.abc.Iterable[typing.Callable]): + Arbitrary number of validators. + + Raises: + ValueError: + If no validator is satisfied. Raised with a human-readable error + message listing all the wrapped validators and the value that + failed all of them. + + .. versionadded:: 24.1.0 + """ + vals = [] + for v in validators: + vals.extend(v.validators if isinstance(v, _OrValidator) else [v]) + + return _OrValidator(tuple(vals)) diff --git a/myenv/lib/python3.12/site-packages/attr/validators.pyi b/myenv/lib/python3.12/site-packages/attr/validators.pyi new file mode 100644 index 0000000..a314110 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attr/validators.pyi @@ -0,0 +1,83 @@ +from typing import ( + Any, + AnyStr, + Callable, + Container, + ContextManager, + Iterable, + Mapping, + Match, + Pattern, + TypeVar, + overload, +) + +from attrs import _ValidatorType +from attrs import _ValidatorArgType + +_T = TypeVar("_T") +_T1 = TypeVar("_T1") +_T2 = TypeVar("_T2") +_T3 = TypeVar("_T3") +_I = TypeVar("_I", bound=Iterable) +_K = TypeVar("_K") +_V = TypeVar("_V") +_M = TypeVar("_M", bound=Mapping) + +def set_disabled(run: bool) -> None: ... +def get_disabled() -> bool: ... +def disabled() -> ContextManager[None]: ... + +# To be more precise on instance_of use some overloads. +# If there are more than 3 items in the tuple then we fall back to Any +@overload +def instance_of(type: type[_T]) -> _ValidatorType[_T]: ... +@overload +def instance_of(type: tuple[type[_T]]) -> _ValidatorType[_T]: ... +@overload +def instance_of( + type: tuple[type[_T1], type[_T2]] +) -> _ValidatorType[_T1 | _T2]: ... +@overload +def instance_of( + type: tuple[type[_T1], type[_T2], type[_T3]] +) -> _ValidatorType[_T1 | _T2 | _T3]: ... +@overload +def instance_of(type: tuple[type, ...]) -> _ValidatorType[Any]: ... +def optional( + validator: ( + _ValidatorType[_T] + | list[_ValidatorType[_T]] + | tuple[_ValidatorType[_T]] + ), +) -> _ValidatorType[_T | None]: ... +def in_(options: Container[_T]) -> _ValidatorType[_T]: ... +def and_(*validators: _ValidatorType[_T]) -> _ValidatorType[_T]: ... +def matches_re( + regex: Pattern[AnyStr] | AnyStr, + flags: int = ..., + func: Callable[[AnyStr, AnyStr, int], Match[AnyStr] | None] | None = ..., +) -> _ValidatorType[AnyStr]: ... +def deep_iterable( + member_validator: _ValidatorArgType[_T], + iterable_validator: _ValidatorType[_I] | None = ..., +) -> _ValidatorType[_I]: ... +def deep_mapping( + key_validator: _ValidatorType[_K], + value_validator: _ValidatorType[_V], + mapping_validator: _ValidatorType[_M] | None = ..., +) -> _ValidatorType[_M]: ... +def is_callable() -> _ValidatorType[_T]: ... +def lt(val: _T) -> _ValidatorType[_T]: ... +def le(val: _T) -> _ValidatorType[_T]: ... +def ge(val: _T) -> _ValidatorType[_T]: ... +def gt(val: _T) -> _ValidatorType[_T]: ... +def max_len(length: int) -> _ValidatorType[_T]: ... +def min_len(length: int) -> _ValidatorType[_T]: ... +def not_( + validator: _ValidatorType[_T], + *, + msg: str | None = None, + exc_types: type[Exception] | Iterable[type[Exception]] = ..., +) -> _ValidatorType[_T]: ... +def or_(*validators: _ValidatorType[_T]) -> _ValidatorType[_T]: ... diff --git a/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/INSTALLER b/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/INSTALLER new file mode 100644 index 0000000..a1b589e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/METADATA b/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/METADATA new file mode 100644 index 0000000..a85b378 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/METADATA @@ -0,0 +1,242 @@ +Metadata-Version: 2.3 +Name: attrs +Version: 24.2.0 +Summary: Classes Without Boilerplate +Project-URL: Documentation, https://www.attrs.org/ +Project-URL: Changelog, https://www.attrs.org/en/stable/changelog.html +Project-URL: GitHub, https://github.com/python-attrs/attrs +Project-URL: Funding, https://github.com/sponsors/hynek +Project-URL: Tidelift, https://tidelift.com/subscription/pkg/pypi-attrs?utm_source=pypi-attrs&utm_medium=pypi +Author-email: Hynek Schlawack +License-Expression: MIT +License-File: LICENSE +Keywords: attribute,boilerplate,class +Classifier: Development Status :: 5 - Production/Stable +Classifier: License :: OSI Approved :: MIT License +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Typing :: Typed +Requires-Python: >=3.7 +Requires-Dist: importlib-metadata; python_version < '3.8' +Provides-Extra: benchmark +Requires-Dist: cloudpickle; (platform_python_implementation == 'CPython') and extra == 'benchmark' +Requires-Dist: hypothesis; extra == 'benchmark' +Requires-Dist: mypy>=1.11.1; (platform_python_implementation == 'CPython' and python_version >= '3.9') and extra == 'benchmark' +Requires-Dist: pympler; extra == 'benchmark' +Requires-Dist: pytest-codspeed; extra == 'benchmark' +Requires-Dist: pytest-mypy-plugins; (platform_python_implementation == 'CPython' and python_version >= '3.9' and python_version < '3.13') and extra == 'benchmark' +Requires-Dist: pytest-xdist[psutil]; extra == 'benchmark' +Requires-Dist: pytest>=4.3.0; extra == 'benchmark' +Provides-Extra: cov +Requires-Dist: cloudpickle; (platform_python_implementation == 'CPython') and extra == 'cov' +Requires-Dist: coverage[toml]>=5.3; extra == 'cov' +Requires-Dist: hypothesis; extra == 'cov' +Requires-Dist: mypy>=1.11.1; (platform_python_implementation == 'CPython' and python_version >= '3.9') and extra == 'cov' +Requires-Dist: pympler; extra == 'cov' +Requires-Dist: pytest-mypy-plugins; (platform_python_implementation == 'CPython' and python_version >= '3.9' and python_version < '3.13') and extra == 'cov' +Requires-Dist: pytest-xdist[psutil]; extra == 'cov' +Requires-Dist: pytest>=4.3.0; extra == 'cov' +Provides-Extra: dev +Requires-Dist: cloudpickle; (platform_python_implementation == 'CPython') and extra == 'dev' +Requires-Dist: hypothesis; extra == 'dev' +Requires-Dist: mypy>=1.11.1; (platform_python_implementation == 'CPython' and python_version >= '3.9') and extra == 'dev' +Requires-Dist: pre-commit; extra == 'dev' +Requires-Dist: pympler; extra == 'dev' +Requires-Dist: pytest-mypy-plugins; (platform_python_implementation == 'CPython' and python_version >= '3.9' and python_version < '3.13') and extra == 'dev' +Requires-Dist: pytest-xdist[psutil]; extra == 'dev' +Requires-Dist: pytest>=4.3.0; extra == 'dev' +Provides-Extra: docs +Requires-Dist: cogapp; extra == 'docs' +Requires-Dist: furo; extra == 'docs' +Requires-Dist: myst-parser; extra == 'docs' +Requires-Dist: sphinx; extra == 'docs' +Requires-Dist: sphinx-notfound-page; extra == 'docs' +Requires-Dist: sphinxcontrib-towncrier; extra == 'docs' +Requires-Dist: towncrier<24.7; extra == 'docs' +Provides-Extra: tests +Requires-Dist: cloudpickle; (platform_python_implementation == 'CPython') and extra == 'tests' +Requires-Dist: hypothesis; extra == 'tests' +Requires-Dist: mypy>=1.11.1; (platform_python_implementation == 'CPython' and python_version >= '3.9') and extra == 'tests' +Requires-Dist: pympler; extra == 'tests' +Requires-Dist: pytest-mypy-plugins; (platform_python_implementation == 'CPython' and python_version >= '3.9' and python_version < '3.13') and extra == 'tests' +Requires-Dist: pytest-xdist[psutil]; extra == 'tests' +Requires-Dist: pytest>=4.3.0; extra == 'tests' +Provides-Extra: tests-mypy +Requires-Dist: mypy>=1.11.1; (platform_python_implementation == 'CPython' and python_version >= '3.9') and extra == 'tests-mypy' +Requires-Dist: pytest-mypy-plugins; (platform_python_implementation == 'CPython' and python_version >= '3.9' and python_version < '3.13') and extra == 'tests-mypy' +Description-Content-Type: text/markdown + +

+ + attrs + +

+ + +*attrs* is the Python package that will bring back the **joy** of **writing classes** by relieving you from the drudgery of implementing object protocols (aka [dunder methods](https://www.attrs.org/en/latest/glossary.html#term-dunder-methods)). +[Trusted by NASA](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile#list-of-qualifying-repositories-for-mars-2020-helicopter-contributor-achievement) for Mars missions since 2020! + +Its main goal is to help you to write **concise** and **correct** software without slowing down your code. + + +## Sponsors + +*attrs* would not be possible without our [amazing sponsors](https://github.com/sponsors/hynek). +Especially those generously supporting us at the *The Organization* tier and higher: + + + +

+ + + + + + + + +

+ + + +

+ Please consider joining them to help make attrs’s maintenance more sustainable! +

+ + + +## Example + +*attrs* gives you a class decorator and a way to declaratively define the attributes on that class: + + + +```pycon +>>> from attrs import asdict, define, make_class, Factory + +>>> @define +... class SomeClass: +... a_number: int = 42 +... list_of_numbers: list[int] = Factory(list) +... +... def hard_math(self, another_number): +... return self.a_number + sum(self.list_of_numbers) * another_number + + +>>> sc = SomeClass(1, [1, 2, 3]) +>>> sc +SomeClass(a_number=1, list_of_numbers=[1, 2, 3]) + +>>> sc.hard_math(3) +19 +>>> sc == SomeClass(1, [1, 2, 3]) +True +>>> sc != SomeClass(2, [3, 2, 1]) +True + +>>> asdict(sc) +{'a_number': 1, 'list_of_numbers': [1, 2, 3]} + +>>> SomeClass() +SomeClass(a_number=42, list_of_numbers=[]) + +>>> C = make_class("C", ["a", "b"]) +>>> C("foo", "bar") +C(a='foo', b='bar') +``` + +After *declaring* your attributes, *attrs* gives you: + +- a concise and explicit overview of the class's attributes, +- a nice human-readable `__repr__`, +- equality-checking methods, +- an initializer, +- and much more, + +*without* writing dull boilerplate code again and again and *without* runtime performance penalties. + +--- + +This example uses *attrs*'s modern APIs that have been introduced in version 20.1.0, and the *attrs* package import name that has been added in version 21.3.0. +The classic APIs (`@attr.s`, `attr.ib`, plus their serious-business aliases) and the `attr` package import name will remain **indefinitely**. + +Check out [*On The Core API Names*](https://www.attrs.org/en/latest/names.html) for an in-depth explanation! + + +### Hate Type Annotations!? + +No problem! +Types are entirely **optional** with *attrs*. +Simply assign `attrs.field()` to the attributes instead of annotating them with types: + +```python +from attrs import define, field + +@define +class SomeClass: + a_number = field(default=42) + list_of_numbers = field(factory=list) +``` + + +## Data Classes + +On the tin, *attrs* might remind you of `dataclasses` (and indeed, `dataclasses` [are a descendant](https://hynek.me/articles/import-attrs/) of *attrs*). +In practice it does a lot more and is more flexible. +For instance, it allows you to define [special handling of NumPy arrays for equality checks](https://www.attrs.org/en/stable/comparison.html#customization), allows more ways to [plug into the initialization process](https://www.attrs.org/en/stable/init.html#hooking-yourself-into-initialization), has a replacement for `__init_subclass__`, and allows for stepping through the generated methods using a debugger. + +For more details, please refer to our [comparison page](https://www.attrs.org/en/stable/why.html#data-classes), but generally speaking, we are more likely to commit crimes against nature to make things work that one would expect to work, but that are quite complicated in practice. + + +## Project Information + +- [**Changelog**](https://www.attrs.org/en/stable/changelog.html) +- [**Documentation**](https://www.attrs.org/) +- [**PyPI**](https://pypi.org/project/attrs/) +- [**Source Code**](https://github.com/python-attrs/attrs) +- [**Contributing**](https://github.com/python-attrs/attrs/blob/main/.github/CONTRIBUTING.md) +- [**Third-party Extensions**](https://github.com/python-attrs/attrs/wiki/Extensions-to-attrs) +- **Get Help**: use the `python-attrs` tag on [Stack Overflow](https://stackoverflow.com/questions/tagged/python-attrs) + + +### *attrs* for Enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of *attrs* and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. +Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. +[Learn more](https://tidelift.com/?utm_source=lifter&utm_medium=referral&utm_campaign=hynek). + +## Release Information + +### Deprecations + +- Given the amount of warnings raised in the broader ecosystem, we've decided to only soft-deprecate the *hash* argument to `@define` / `@attr.s`. + Please don't use it in new code, but we don't intend to remove it anymore. + [#1330](https://github.com/python-attrs/attrs/issues/1330) + + +### Changes + +- `attrs.converters.pipe()` (and its syntactic sugar of passing a list for `attrs.field()`'s / `attr.ib()`'s *converter* argument) works again when passing `attrs.setters.convert` to *on_setattr* (which is default for `attrs.define`). + [#1328](https://github.com/python-attrs/attrs/issues/1328) +- Restored support for PEP [649](https://peps.python.org/pep-0649/) / [749](https://peps.python.org/pep-0749/)-implementing Pythons -- currently 3.14-dev. + [#1329](https://github.com/python-attrs/attrs/issues/1329) + + + +--- + +[Full changelog →](https://www.attrs.org/en/stable/changelog.html) diff --git a/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/RECORD b/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/RECORD new file mode 100644 index 0000000..1b01979 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/RECORD @@ -0,0 +1,55 @@ +attr/__init__.py,sha256=l8Ewh5KZE7CCY0i1iDfSCnFiUTIkBVoqsXjX9EZnIVA,2087 +attr/__init__.pyi,sha256=aTVHBPX6krCGvbQvOl_UKqEzmi2HFsaIVm2WKmAiqVs,11434 +attr/__pycache__/__init__.cpython-312.pyc,, +attr/__pycache__/_cmp.cpython-312.pyc,, +attr/__pycache__/_compat.cpython-312.pyc,, +attr/__pycache__/_config.cpython-312.pyc,, +attr/__pycache__/_funcs.cpython-312.pyc,, +attr/__pycache__/_make.cpython-312.pyc,, +attr/__pycache__/_next_gen.cpython-312.pyc,, +attr/__pycache__/_version_info.cpython-312.pyc,, +attr/__pycache__/converters.cpython-312.pyc,, +attr/__pycache__/exceptions.cpython-312.pyc,, +attr/__pycache__/filters.cpython-312.pyc,, +attr/__pycache__/setters.cpython-312.pyc,, +attr/__pycache__/validators.cpython-312.pyc,, +attr/_cmp.py,sha256=3umHiBtgsEYtvNP_8XrQwTCdFoZIX4DEur76N-2a3X8,4123 +attr/_cmp.pyi,sha256=U-_RU_UZOyPUEQzXE6RMYQQcjkZRY25wTH99sN0s7MM,368 +attr/_compat.py,sha256=n2Uk3c-ywv0PkFfGlvqR7SzDXp4NOhWmNV_ZK6YfWoM,2958 +attr/_config.py,sha256=z81Vt-GeT_2taxs1XZfmHx9TWlSxjPb6eZH1LTGsS54,843 +attr/_funcs.py,sha256=SGDmNlED1TM3tgO9Ap2mfRfVI24XEAcrNQs7o2eBXHQ,17386 +attr/_make.py,sha256=BjENJz5eJoojJVbCoupWjXLLEZJ7VID89lisLbQUlmQ,91479 +attr/_next_gen.py,sha256=dhGb96VFg4kXBkS9Zdz1A2uxVJ99q_RT1hw3kLA9-uI,24630 +attr/_typing_compat.pyi,sha256=XDP54TUn-ZKhD62TOQebmzrwFyomhUCoGRpclb6alRA,469 +attr/_version_info.py,sha256=exSqb3b5E-fMSsgZAlEw9XcLpEgobPORCZpcaEglAM4,2121 +attr/_version_info.pyi,sha256=x_M3L3WuB7r_ULXAWjx959udKQ4HLB8l-hsc1FDGNvk,209 +attr/converters.py,sha256=vNa58pZi9V6uxBzl4t1QrHbQfkT4iRFAodyXe7lcgg0,3506 +attr/converters.pyi,sha256=mpDoVFO3Cpx8xYSSV0iZFl7IAHuoNBglxKfxHvLj_sY,410 +attr/exceptions.py,sha256=HRFq4iybmv7-DcZwyjl6M1euM2YeJVK_hFxuaBGAngI,1977 +attr/exceptions.pyi,sha256=zZq8bCUnKAy9mDtBEw42ZhPhAUIHoTKedDQInJD883M,539 +attr/filters.py,sha256=ZBiKWLp3R0LfCZsq7X11pn9WX8NslS2wXM4jsnLOGc8,1795 +attr/filters.pyi,sha256=3J5BG-dTxltBk1_-RuNRUHrv2qu1v8v4aDNAQ7_mifA,208 +attr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +attr/setters.py,sha256=faMQeiBo_nbXYnPaQ1pq8PXeA7Zr-uNsVsPMiKCmxhc,1619 +attr/setters.pyi,sha256=NnVkaFU1BB4JB8E4JuXyrzTUgvtMpj8p3wBdJY7uix4,584 +attr/validators.py,sha256=985eTP6RHyon61YEauMJgyNy1rEOhJWiSXMJgRxPtrQ,20045 +attr/validators.pyi,sha256=LjKf7AoXZfvGSfT3LRs61Qfln94konYyMUPoJJjOxK4,2502 +attrs-24.2.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +attrs-24.2.0.dist-info/METADATA,sha256=3Jgk4lr9Y1SAqAcwOLPN_mpW0wc6VOGm-yHt1LsPIHw,11524 +attrs-24.2.0.dist-info/RECORD,, +attrs-24.2.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87 +attrs-24.2.0.dist-info/licenses/LICENSE,sha256=iCEVyV38KvHutnFPjsbVy8q_Znyv-HKfQkINpj9xTp8,1109 +attrs/__init__.py,sha256=5FHo-EMFOX-g4ialSK4fwOjuoHzLISJDZCwoOl02Ty8,1071 +attrs/__init__.pyi,sha256=o3l92VsD9kHz8sldEtb_tllBTs3TeL-vIBMTxo2Zc_4,7703 +attrs/__pycache__/__init__.cpython-312.pyc,, +attrs/__pycache__/converters.cpython-312.pyc,, +attrs/__pycache__/exceptions.cpython-312.pyc,, +attrs/__pycache__/filters.cpython-312.pyc,, +attrs/__pycache__/setters.cpython-312.pyc,, +attrs/__pycache__/validators.cpython-312.pyc,, +attrs/converters.py,sha256=8kQljrVwfSTRu8INwEk8SI0eGrzmWftsT7rM0EqyohM,76 +attrs/exceptions.py,sha256=ACCCmg19-vDFaDPY9vFl199SPXCQMN_bENs4DALjzms,76 +attrs/filters.py,sha256=VOUMZug9uEU6dUuA0dF1jInUK0PL3fLgP0VBS5d-CDE,73 +attrs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +attrs/setters.py,sha256=eL1YidYQV3T2h9_SYIZSZR1FAcHGb1TuCTy0E0Lv2SU,73 +attrs/validators.py,sha256=xcy6wD5TtTkdCG1f4XWbocPSO0faBjk5IfVJfP6SUj0,76 diff --git a/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/WHEEL b/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/WHEEL new file mode 100644 index 0000000..cdd68a4 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/WHEEL @@ -0,0 +1,4 @@ +Wheel-Version: 1.0 +Generator: hatchling 1.25.0 +Root-Is-Purelib: true +Tag: py3-none-any diff --git a/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/licenses/LICENSE b/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/licenses/LICENSE new file mode 100644 index 0000000..2bd6453 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attrs-24.2.0.dist-info/licenses/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Hynek Schlawack and the attrs contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/myenv/lib/python3.12/site-packages/attrs/__init__.py b/myenv/lib/python3.12/site-packages/attrs/__init__.py new file mode 100644 index 0000000..963b197 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attrs/__init__.py @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: MIT + +from attr import ( + NOTHING, + Attribute, + AttrsInstance, + Converter, + Factory, + _make_getattr, + assoc, + cmp_using, + define, + evolve, + field, + fields, + fields_dict, + frozen, + has, + make_class, + mutable, + resolve_types, + validate, +) +from attr._next_gen import asdict, astuple + +from . import converters, exceptions, filters, setters, validators + + +__all__ = [ + "__author__", + "__copyright__", + "__description__", + "__doc__", + "__email__", + "__license__", + "__title__", + "__url__", + "__version__", + "__version_info__", + "asdict", + "assoc", + "astuple", + "Attribute", + "AttrsInstance", + "cmp_using", + "Converter", + "converters", + "define", + "evolve", + "exceptions", + "Factory", + "field", + "fields_dict", + "fields", + "filters", + "frozen", + "has", + "make_class", + "mutable", + "NOTHING", + "resolve_types", + "setters", + "validate", + "validators", +] + +__getattr__ = _make_getattr(__name__) diff --git a/myenv/lib/python3.12/site-packages/attrs/__init__.pyi b/myenv/lib/python3.12/site-packages/attrs/__init__.pyi new file mode 100644 index 0000000..b2670de --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attrs/__init__.pyi @@ -0,0 +1,252 @@ +import sys + +from typing import ( + Any, + Callable, + Mapping, + Sequence, + overload, + TypeVar, +) + +# Because we need to type our own stuff, we have to make everything from +# attr explicitly public too. +from attr import __author__ as __author__ +from attr import __copyright__ as __copyright__ +from attr import __description__ as __description__ +from attr import __email__ as __email__ +from attr import __license__ as __license__ +from attr import __title__ as __title__ +from attr import __url__ as __url__ +from attr import __version__ as __version__ +from attr import __version_info__ as __version_info__ +from attr import assoc as assoc +from attr import Attribute as Attribute +from attr import AttrsInstance as AttrsInstance +from attr import cmp_using as cmp_using +from attr import converters as converters +from attr import Converter as Converter +from attr import evolve as evolve +from attr import exceptions as exceptions +from attr import Factory as Factory +from attr import fields as fields +from attr import fields_dict as fields_dict +from attr import filters as filters +from attr import has as has +from attr import make_class as make_class +from attr import NOTHING as NOTHING +from attr import resolve_types as resolve_types +from attr import setters as setters +from attr import validate as validate +from attr import validators as validators +from attr import attrib, asdict as asdict, astuple as astuple + +if sys.version_info >= (3, 11): + from typing import dataclass_transform +else: + from typing_extensions import dataclass_transform + +_T = TypeVar("_T") +_C = TypeVar("_C", bound=type) + +_EqOrderType = bool | Callable[[Any], Any] +_ValidatorType = Callable[[Any, "Attribute[_T]", _T], Any] +_ConverterType = Callable[[Any], Any] +_ReprType = Callable[[Any], str] +_ReprArgType = bool | _ReprType +_OnSetAttrType = Callable[[Any, "Attribute[Any]", Any], Any] +_OnSetAttrArgType = _OnSetAttrType | list[_OnSetAttrType] | setters._NoOpType +_FieldTransformer = Callable[ + [type, list["Attribute[Any]"]], list["Attribute[Any]"] +] +# FIXME: in reality, if multiple validators are passed they must be in a list +# or tuple, but those are invariant and so would prevent subtypes of +# _ValidatorType from working when passed in a list or tuple. +_ValidatorArgType = _ValidatorType[_T] | Sequence[_ValidatorType[_T]] + +@overload +def field( + *, + default: None = ..., + validator: None = ..., + repr: _ReprArgType = ..., + hash: bool | None = ..., + init: bool = ..., + metadata: Mapping[Any, Any] | None = ..., + converter: None = ..., + factory: None = ..., + kw_only: bool = ..., + eq: bool | None = ..., + order: bool | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + alias: str | None = ..., + type: type | None = ..., +) -> Any: ... + +# This form catches an explicit None or no default and infers the type from the +# other arguments. +@overload +def field( + *, + default: None = ..., + validator: _ValidatorArgType[_T] | None = ..., + repr: _ReprArgType = ..., + hash: bool | None = ..., + init: bool = ..., + metadata: Mapping[Any, Any] | None = ..., + converter: _ConverterType | Converter[Any, _T] | None = ..., + factory: Callable[[], _T] | None = ..., + kw_only: bool = ..., + eq: _EqOrderType | None = ..., + order: _EqOrderType | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + alias: str | None = ..., + type: type | None = ..., +) -> _T: ... + +# This form catches an explicit default argument. +@overload +def field( + *, + default: _T, + validator: _ValidatorArgType[_T] | None = ..., + repr: _ReprArgType = ..., + hash: bool | None = ..., + init: bool = ..., + metadata: Mapping[Any, Any] | None = ..., + converter: _ConverterType | Converter[Any, _T] | None = ..., + factory: Callable[[], _T] | None = ..., + kw_only: bool = ..., + eq: _EqOrderType | None = ..., + order: _EqOrderType | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + alias: str | None = ..., + type: type | None = ..., +) -> _T: ... + +# This form covers type=non-Type: e.g. forward references (str), Any +@overload +def field( + *, + default: _T | None = ..., + validator: _ValidatorArgType[_T] | None = ..., + repr: _ReprArgType = ..., + hash: bool | None = ..., + init: bool = ..., + metadata: Mapping[Any, Any] | None = ..., + converter: _ConverterType | Converter[Any, _T] | None = ..., + factory: Callable[[], _T] | None = ..., + kw_only: bool = ..., + eq: _EqOrderType | None = ..., + order: _EqOrderType | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + alias: str | None = ..., + type: type | None = ..., +) -> Any: ... +@overload +@dataclass_transform(field_specifiers=(attrib, field)) +def define( + maybe_cls: _C, + *, + these: dict[str, Any] | None = ..., + repr: bool = ..., + unsafe_hash: bool | None = ..., + hash: bool | None = ..., + init: bool = ..., + slots: bool = ..., + frozen: bool = ..., + weakref_slot: bool = ..., + str: bool = ..., + auto_attribs: bool = ..., + kw_only: bool = ..., + cache_hash: bool = ..., + auto_exc: bool = ..., + eq: bool | None = ..., + order: bool | None = ..., + auto_detect: bool = ..., + getstate_setstate: bool | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + field_transformer: _FieldTransformer | None = ..., + match_args: bool = ..., +) -> _C: ... +@overload +@dataclass_transform(field_specifiers=(attrib, field)) +def define( + maybe_cls: None = ..., + *, + these: dict[str, Any] | None = ..., + repr: bool = ..., + unsafe_hash: bool | None = ..., + hash: bool | None = ..., + init: bool = ..., + slots: bool = ..., + frozen: bool = ..., + weakref_slot: bool = ..., + str: bool = ..., + auto_attribs: bool = ..., + kw_only: bool = ..., + cache_hash: bool = ..., + auto_exc: bool = ..., + eq: bool | None = ..., + order: bool | None = ..., + auto_detect: bool = ..., + getstate_setstate: bool | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + field_transformer: _FieldTransformer | None = ..., + match_args: bool = ..., +) -> Callable[[_C], _C]: ... + +mutable = define + +@overload +@dataclass_transform(frozen_default=True, field_specifiers=(attrib, field)) +def frozen( + maybe_cls: _C, + *, + these: dict[str, Any] | None = ..., + repr: bool = ..., + unsafe_hash: bool | None = ..., + hash: bool | None = ..., + init: bool = ..., + slots: bool = ..., + frozen: bool = ..., + weakref_slot: bool = ..., + str: bool = ..., + auto_attribs: bool = ..., + kw_only: bool = ..., + cache_hash: bool = ..., + auto_exc: bool = ..., + eq: bool | None = ..., + order: bool | None = ..., + auto_detect: bool = ..., + getstate_setstate: bool | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + field_transformer: _FieldTransformer | None = ..., + match_args: bool = ..., +) -> _C: ... +@overload +@dataclass_transform(frozen_default=True, field_specifiers=(attrib, field)) +def frozen( + maybe_cls: None = ..., + *, + these: dict[str, Any] | None = ..., + repr: bool = ..., + unsafe_hash: bool | None = ..., + hash: bool | None = ..., + init: bool = ..., + slots: bool = ..., + frozen: bool = ..., + weakref_slot: bool = ..., + str: bool = ..., + auto_attribs: bool = ..., + kw_only: bool = ..., + cache_hash: bool = ..., + auto_exc: bool = ..., + eq: bool | None = ..., + order: bool | None = ..., + auto_detect: bool = ..., + getstate_setstate: bool | None = ..., + on_setattr: _OnSetAttrArgType | None = ..., + field_transformer: _FieldTransformer | None = ..., + match_args: bool = ..., +) -> Callable[[_C], _C]: ... diff --git a/myenv/lib/python3.12/site-packages/attrs/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attrs/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..52d7904 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attrs/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attrs/__pycache__/converters.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attrs/__pycache__/converters.cpython-312.pyc new file mode 100644 index 0000000..01cd7ef Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attrs/__pycache__/converters.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attrs/__pycache__/exceptions.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attrs/__pycache__/exceptions.cpython-312.pyc new file mode 100644 index 0000000..fd7b66f Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attrs/__pycache__/exceptions.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attrs/__pycache__/filters.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attrs/__pycache__/filters.cpython-312.pyc new file mode 100644 index 0000000..259d3e6 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attrs/__pycache__/filters.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attrs/__pycache__/setters.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attrs/__pycache__/setters.cpython-312.pyc new file mode 100644 index 0000000..2f20cb0 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attrs/__pycache__/setters.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attrs/__pycache__/validators.cpython-312.pyc b/myenv/lib/python3.12/site-packages/attrs/__pycache__/validators.cpython-312.pyc new file mode 100644 index 0000000..8801b07 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/attrs/__pycache__/validators.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/attrs/converters.py b/myenv/lib/python3.12/site-packages/attrs/converters.py new file mode 100644 index 0000000..7821f6c --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attrs/converters.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MIT + +from attr.converters import * # noqa: F403 diff --git a/myenv/lib/python3.12/site-packages/attrs/exceptions.py b/myenv/lib/python3.12/site-packages/attrs/exceptions.py new file mode 100644 index 0000000..3323f9d --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attrs/exceptions.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MIT + +from attr.exceptions import * # noqa: F403 diff --git a/myenv/lib/python3.12/site-packages/attrs/filters.py b/myenv/lib/python3.12/site-packages/attrs/filters.py new file mode 100644 index 0000000..3080f48 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attrs/filters.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MIT + +from attr.filters import * # noqa: F403 diff --git a/myenv/lib/python3.12/site-packages/attrs/py.typed b/myenv/lib/python3.12/site-packages/attrs/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/attrs/setters.py b/myenv/lib/python3.12/site-packages/attrs/setters.py new file mode 100644 index 0000000..f3d73bb --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attrs/setters.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MIT + +from attr.setters import * # noqa: F403 diff --git a/myenv/lib/python3.12/site-packages/attrs/validators.py b/myenv/lib/python3.12/site-packages/attrs/validators.py new file mode 100644 index 0000000..037e124 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/attrs/validators.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MIT + +from attr.validators import * # noqa: F403 diff --git a/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/INSTALLER b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/INSTALLER new file mode 100644 index 0000000..a1b589e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/LICENSE b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/LICENSE new file mode 100644 index 0000000..94cfb21 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/LICENSE @@ -0,0 +1,24 @@ + debugpy + + Copyright (c) Microsoft Corporation + All rights reserved. + + MIT License + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/METADATA b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/METADATA new file mode 100644 index 0000000..d4ce656 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/METADATA @@ -0,0 +1,27 @@ +Metadata-Version: 2.1 +Name: debugpy +Version: 1.8.9 +Summary: An implementation of the Debug Adapter Protocol for Python +Home-page: https://aka.ms/debugpy +Author: Microsoft Corporation +Author-email: ptvshelp@microsoft.com +License: MIT +Project-URL: Source, https://github.com/microsoft/debugpy +Classifier: Development Status :: 5 - Production/Stable +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Topic :: Software Development :: Debuggers +Classifier: Operating System :: Microsoft :: Windows +Classifier: Operating System :: MacOS +Classifier: Operating System :: POSIX +Classifier: License :: OSI Approved :: MIT License +Requires-Python: >=3.8 +Description-Content-Type: text/markdown +License-File: LICENSE + +debugpy is an implementation of the Debug Adapter Protocol for Python. + +The source code and the issue tracker is [hosted on GitHub](https://github.com/microsoft/debugpy/). diff --git a/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/RECORD b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/RECORD new file mode 100644 index 0000000..de614bc --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/RECORD @@ -0,0 +1,536 @@ +../../../bin/debugpy,sha256=EuVHc-215aZv70CG9j4bgCmu3GdPQxfLCbuBF8w8i7g,300 +debugpy-1.8.9.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +debugpy-1.8.9.dist-info/LICENSE,sha256=g8PtOU5gAGfBe30cCb0-og8HA7jAcW5qn0FLmfy9-BA,1176 +debugpy-1.8.9.dist-info/METADATA,sha256=uXHWCkCNmenKUXSq5WWlyecVp80rHElZyKSfI-Gcp7Y,1093 +debugpy-1.8.9.dist-info/RECORD,, +debugpy-1.8.9.dist-info/WHEEL,sha256=1RWCnhubPuPKqvmBwMRMY-6dUmf4qJFlSvGgdfRq1aQ,224 +debugpy-1.8.9.dist-info/entry_points.txt,sha256=NczeIkyCjwYAaTVWNszVe-gdhF1rXbqCcWqwFtDyhhk,52 +debugpy-1.8.9.dist-info/top_level.txt,sha256=6Om6JTEaqkWnj-9-7kJOJr988sTO6iSuiK4N9X6RLpg,8 +debugpy/ThirdPartyNotices.txt,sha256=WzmT853BlHOtkEiV_xtk96iazYeVDKWB2tqKMtcm_jo,34345 +debugpy/__init__.py,sha256=B621TRbcw1Pr4LrqSZB8Qr0CW9QfpbpcEz2eaN16jns,1018 +debugpy/__main__.py,sha256=a_DXjwzIJwPVnXlh7z_VnXqhSpuEr1vd1DzCwVt6tVQ,3187 +debugpy/__pycache__/__init__.cpython-312.pyc,, +debugpy/__pycache__/__main__.cpython-312.pyc,, +debugpy/__pycache__/_version.cpython-312.pyc,, +debugpy/__pycache__/public_api.cpython-312.pyc,, +debugpy/_vendored/__init__.py,sha256=cQGcZObOjPcKFDQk06oWNgqBHh2rXDCv0JTNISv3_rg,3878 +debugpy/_vendored/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/__pycache__/_pydevd_packaging.cpython-312.pyc,, +debugpy/_vendored/__pycache__/_util.cpython-312.pyc,, +debugpy/_vendored/__pycache__/force_pydevd.cpython-312.pyc,, +debugpy/_vendored/_pydevd_packaging.py,sha256=cYo9maxM8jNPj-vdvCtweaYAPX210Pg8-NHS8ZU02Mg,1245 +debugpy/_vendored/_util.py,sha256=E5k-21l2RXQHxl0C5YF5ZmZr-Fzgd9eNl1c6UYYzjfg,1840 +debugpy/_vendored/force_pydevd.py,sha256=spQVMTUrxCRoNiSKKIkK96AhEi0JX6vHxcBIJNcNQE0,3172 +debugpy/_vendored/pydevd/__pycache__/pydev_app_engine_debug_startup.cpython-312.pyc,, +debugpy/_vendored/pydevd/__pycache__/pydev_coverage.cpython-312.pyc,, +debugpy/_vendored/pydevd/__pycache__/pydev_pysrc.cpython-312.pyc,, +debugpy/_vendored/pydevd/__pycache__/pydev_run_in_console.cpython-312.pyc,, +debugpy/_vendored/pydevd/__pycache__/pydevconsole.cpython-312.pyc,, +debugpy/_vendored/pydevd/__pycache__/pydevd.cpython-312.pyc,, +debugpy/_vendored/pydevd/__pycache__/pydevd_file_utils.cpython-312.pyc,, +debugpy/_vendored/pydevd/__pycache__/pydevd_tracing.cpython-312.pyc,, +debugpy/_vendored/pydevd/__pycache__/setup_pydevd_cython.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_calltip_util.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_completer.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_execfile.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_filesystem_encoding.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_getopt.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_imports_tipper.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_jy_imports_tipper.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_log.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_saved_modules.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_sys_patch.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_tipper_common.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_console_utils.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_import_hook.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_imports.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_ipython_console.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_ipython_console_011.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_is_thread_alive.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_localhost.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_log.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_monkey.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_monkey_qt.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_override.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_umd.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_versioncheck.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/_pydev_calltip_util.py,sha256=ZMO1wM5-1IrV2d-896sMLYoC0RAGSE-8-PBbfNo6m9s,4684 +debugpy/_vendored/pydevd/_pydev_bundle/_pydev_completer.py,sha256=uTezSnBcGiiy1AhwehM1XzHOr7NbTHXQz_0C9uze674,8535 +debugpy/_vendored/pydevd/_pydev_bundle/_pydev_execfile.py,sha256=YeFIPF5nFVaA1seRIa_KAMM1ac5Qo43DS9iuyBe-tFo,485 +debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py,sha256=yp-aAAwAGrLlR7GyzAb0fbsNFLaEy1uMJPLg8ULFi64,1101 +debugpy/_vendored/pydevd/_pydev_bundle/_pydev_getopt.py,sha256=St7LkdI7n2bF4Xw_Kr-8t7_1YqfI0xAW8mkX_57ccv8,4429 +debugpy/_vendored/pydevd/_pydev_bundle/_pydev_imports_tipper.py,sha256=4Pgzh0yaDeQi1YKKopCgRu-eCcAL2zf9BaPMtJ4WSgQ,12312 +debugpy/_vendored/pydevd/_pydev_bundle/_pydev_jy_imports_tipper.py,sha256=nE9qiNXx3_ZIwFlpKFPB1KHhcvEphoSGhv8ALOYzPBE,16994 +debugpy/_vendored/pydevd/_pydev_bundle/_pydev_log.py,sha256=ENhSEv7ekEcaw-91a1EW6nqlDEO61qL6BvVSS29fshE,554 +debugpy/_vendored/pydevd/_pydev_bundle/_pydev_saved_modules.py,sha256=wegdTSDGivI0gctzCr8N2ueFxXfztNP3Ehznao3RWP4,4740 +debugpy/_vendored/pydevd/_pydev_bundle/_pydev_sys_patch.py,sha256=u0Nl0sV-18ldTJu0okEeR-21l3Gju0aa2JiRfK9QliQ,2237 +debugpy/_vendored/pydevd/_pydev_bundle/_pydev_tipper_common.py,sha256=jEVMSSg8ShzeGNaYIdPUxDNwo1tp1UfbUs_XrCh5ieY,1228 +debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__init__.py,sha256=Vdcr0nJLaQOYBWn5o4rvZfi5n2-A52oyiJbQEOV31RM,12706 +debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py,sha256=t1lS1eqr5VYb7sy8SCfI9mUGrrCvKe8YdUFmlNe9eg0,23750 +debugpy/_vendored/pydevd/_pydev_bundle/pydev_import_hook.py,sha256=gou6qpNq2AtOlV105_KjbRFGuLinxVxVmm-oJediz-M,1320 +debugpy/_vendored/pydevd/_pydev_bundle/pydev_imports.py,sha256=BtBesnz6_ROgrRXhNsX3EOZ1wQdmYi8KzdYaUQPqvG4,403 +debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console.py,sha256=1nRJShSTk7u7LFh9FD3Mmgx38b5N2OKljHuUMlXi0Oo,3773 +debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console_011.py,sha256=rpH_5dgX-ftT69TakcnEyBatLzSOrzIr__rWAUht91Q,20763 +debugpy/_vendored/pydevd/_pydev_bundle/pydev_is_thread_alive.py,sha256=j_2C_x_vxQi1l6ccKaeTtyQfbWLZ5v-kpoyTnux2pEw,877 +debugpy/_vendored/pydevd/_pydev_bundle/pydev_localhost.py,sha256=hdpf8wjIcwxImg_n9eyC3fTLLIpqXBCbICFZ_8ymVRA,2071 +debugpy/_vendored/pydevd/_pydev_bundle/pydev_log.py,sha256=4DmESdPd4gu3HSjuwSZsO9A1mCMX-H3RlMjJSHbNuFY,9321 +debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py,sha256=d-Wle8TY3imtH72Qsty0s9Bq98CQEw_c12afGs1QdtA,44063 +debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey_qt.py,sha256=08fPxniJEp63MqA_llPXlq5gfliXtwslmHQu3njcLTE,7310 +debugpy/_vendored/pydevd/_pydev_bundle/pydev_override.py,sha256=RDNX5x3GQDkZvCYP_uzi_hQ17vLYPGFXM0OhEkfrbiY,871 +debugpy/_vendored/pydevd/_pydev_bundle/pydev_umd.py,sha256=3a4qX92uJSnAPBzUEc0Pwxgufq-4Mw0VNrxjK5v6zBw,6228 +debugpy/_vendored/pydevd/_pydev_bundle/pydev_versioncheck.py,sha256=vKCufGZ5intWqErkMxo1V_gwB1lIt1wtu5lzi0bfkaE,508 +debugpy/_vendored/pydevd/_pydev_runfiles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_coverage.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_nose.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_parallel.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_parallel_client.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_pytest2.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_unittest.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_xml_rpc.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles.py,sha256=j9CMZnmkYwtnBRakF7DWvLhTkiiuj82H9LyGUkS6SuM,32678 +debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py,sha256=bHeJjZUZOt4Dc2a7S3jrRerth52qkWdOhUUTS5JZRl0,3408 +debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_nose.py,sha256=shYjBqxALylDKZjkSZRtf27dvBaooxhNshHizks0GxU,7556 +debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel.py,sha256=32dQKKeVuZsVPLWOGeHnrJFLLegs8r84RpLCvNpqXwU,9480 +debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel_client.py,sha256=eWV6nbYBpLwNOv1GIPr32VOkUscKHhZJaqFpNq9yDj8,7712 +debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_pytest2.py,sha256=L3H6rGDFd8ZCPwaR814uQtV6AAahO0WKK3FvSpO4j6k,9845 +debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_unittest.py,sha256=XOwg_BGkHh5DGQ4BhgHcCFWXPQHnW17llxpXuVElPV8,6566 +debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_xml_rpc.py,sha256=IdgMXY3ubZaGuc7Ek2prf2KddciKX3E5CTC1SoC8E6I,10833 +debugpy/_vendored/pydevd/_pydevd_bundle/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevconsole_code.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_additional_thread_info.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_additional_thread_info_regular.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_api.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_breakpoints.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_bytecode_utils.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_bytecode_utils_py311.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_code_to_source.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_collect_bytecode_info.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_comm.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_comm_constants.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_command_line_handling.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_console.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_constants.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_custom_frames.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_cython_wrapper.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_daemon_thread.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_defaults.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_dont_trace.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_dont_trace_files.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_exec2.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_extension_api.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_extension_utils.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_filtering.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_frame.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_frame_utils.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_gevent_integration.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_import_class.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_io.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_json_debug_options.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_net_command.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_net_command_factory_json.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_net_command_factory_xml.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_plugin_utils.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_process_net_command.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_process_net_command_json.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_referrers.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_reload.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_resolver.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_runpy.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_safe_repr.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_save_locals.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_signature.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_source_mapping.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_stackless.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_suspended_frames.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_thread_lifecycle.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_timeout.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_trace_dispatch.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_trace_dispatch_regular.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_traceproperty.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_utils.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_vars.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_vm_type.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_xml.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py,sha256=AUrSO4NvkLu2y6zYuCoLJGxsLJaz-5dO7qwnuD7NUGc,23353 +debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/__main__pydevd_gen_debug_adapter_protocol.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/pydevd_base_schema.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/pydevd_schema.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/pydevd_schema_log.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json,sha256=ZK1DO5_0uSNgdx_I2sUNz5yslRwAV9CvDS-Ca0MIe_s,170390 +debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocolCustom.json,sha256=NmKM_bN5s6ozUPXIFc_Q3w6unk6Zf1hb1pgyjvxv4QM,10616 +debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_base_schema.py,sha256=BHq0SoUikbOeHAyM65ubD9jMBoB0vMCmvzuVzClBkPE,4000 +debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py,sha256=a6zohIFheZYlwweF7zbLPvSyNDwyy60rp70ltwIfUVQ,843038 +debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema_log.py,sha256=123W8MKmZHTj7dNj7QT91n6HdYt_jDaWhk_WOc-X5Vk,1254 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevconsole_code.py,sha256=jpc0pWVCqQi6NLpmkfUpEFLCDSUuSzPjW7k6c2rFPS8,18936 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py,sha256=yZWzEG_rc-bLwcO-QDkwLm1gfxDkfsxRShOmR2vvEGI,1644 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py,sha256=cFx2V7EQ41GC0GEkp7sRrYl0ys485PYS8Rn-5XXAsWY,10811 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py,sha256=iJ1kbtW0MLq2AgsP5Jkh7AaRmUnKYRUVfFcSnM9BYv8,51296 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_breakpoints.py,sha256=RpGULGmfu0bxngCoGQWCyweGINfgQ-MGv4VfwFm7pJs,6004 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils.py,sha256=pEUOkF9ZQYGOpFCn9xew3AuoJJda24mUD7uMGE3jmYE,29025 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils_py311.py,sha256=bGoEjyxw9Cwiyh370B3f6e7jg3E-dBmNLvGMFrdtfYU,3600 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_code_to_source.py,sha256=g3pel_1S6KZJMMRoMGP1Q6WHm6arR85_z2UuQnagjdk,17560 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py,sha256=J-lD6gK0jC7ebY0_JfRCsmB1IA_Hy02-V2s5tnmWSCc,35130 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py,sha256=gnDS8w2pjeK-cMsm0arO8xGnC21PUCxZsufo7pgHg3w,78702 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py,sha256=KKGZxtVkEeEM5q0wx3T6FW1hffOCZShrzCU2z9f97dI,6076 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_command_line_handling.py,sha256=aOfHy9eRFV2qc3PjmSFd5AHyHU8UqXHObsetOmmBtas,6102 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__pycache__/pydevd_concurrency_logger.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__pycache__/pydevd_thread_wrappers.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_concurrency_logger.py,sha256=6tBkRL4jF1ImM7rSh9zovvgf6Q6F7JQYdXuuvOZewjQ,20708 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_thread_wrappers.py,sha256=cBQ_QMkzxrWDrREe5t-QzRcxhPM-K_iyScKhP4uOWUU,2038 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_console.py,sha256=FM_He7YK5qV65C_tZO2vxoaWpVy3ptN3hZY8SGYHhrc,10169 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_constants.py,sha256=ixmOzAXWjIObWRe5b1Y2uHdgfRzuea171iiae9DmHUY,28493 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py,sha256=zfl--e0QFREouhGYO-_Gt1cQ8u6ueDiAoIJY7Hc2Ztg,4424 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c,sha256=_qloia3vS8JMI_jKpsb04j_iHF1aQdPEfpAJczm8Da0,2621187 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cpython-312-x86_64-linux-gnu.so,sha256=8SmWvLalgzeCzLvfFEVlqCMK2eRW9ZVSD7F4GFMPCXY,4988896 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pxd,sha256=XKgDVO6Tp-gH3RVQVP05yzIViQuA5RR97hp5R05RDQM,1691 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx,sha256=--h19TffmvHDbhiB-CLWiFuHnEEUyUM9FFnaAJDu79g,98873 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython_wrapper.py,sha256=sGHXLxVW9kKVS81I22ewZsrgsGJL1hbSv2mlKWOIogs,1850 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py,sha256=V93_fOxroEKto3Gi1mwTDNkqR_fXDKtu3oy3PkeECMM,8377 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_defaults.py,sha256=5nz2GRseE6ioxiJ_s1dCjBwvlI8j_d3szEQ9nArtfww,2294 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace.py,sha256=gLJnuCKPrRYrdkPum_xnEaGoSlB4XXC4_qmyZkm929E,3562 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py,sha256=rrwR9jMY2WDjgjAUJ25B6B3UklGpGqM3F7-6vwTm5ak,6363 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_exec2.py,sha256=t46OdHix6ySRWE7mawY8NMNXrwbSWmFum3rVV5sLpkE,160 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_api.py,sha256=Y3TyC1OKxSiryduwI6_8jOhkQao0pKqHINa7mvAbQfQ,3906 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_utils.py,sha256=iQtNDZKv-hGFSdUg9KnzJ-l_o0VarIFAMateVvj01ZY,2300 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py,sha256=0ih5GKDXv2aM3xl_h91BB3WQRbmheRU7eIA-RKUwjr8,12993 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py,sha256=I-NY3Srwc3jdpUdKSaRFC_SYvL0uhavGptYzDgNWAQs,64529 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame_utils.py,sha256=lgqBlHv_JjI90Xna7KYTBPeFOuw79OsAPI04MVPNecM,14084 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_gevent_integration.py,sha256=AjOT4VSCd4iBxdTf7vCU4euSS6gWbhKZcQcFljyXkUw,3866 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_import_class.py,sha256=FxvE5zjfcmidba4rDih2relTmTHC7kQeHjoxsUijG8o,1779 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_io.py,sha256=Ap8jBhmOJd8NxYdsomRfFojXtEgxXH4CAU4t3K8LFcY,8115 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py,sha256=NGcRVk2hb2SuM6VKGp2QjDSEI3-47tSF-ZK2cGyluTM,6153 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py,sha256=_iMSMyC7ENFjg7YA4OV8-5QQf226v-WHlXou55H0cHA,4595 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py,sha256=X6mLeyQvEMlIP3Q6Ap9cwAEAZlV5G0j7ptLUY0YqBEM,25196 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py,sha256=rpM8QOvlh0dqN6cO95cZLCzC5LqOs9sCiZmZEsvy5Vs,23784 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py,sha256=y6FV81GoR5mHvGVeNsnVuifunXjqc2YtBeI0N0nuI4Y,7200 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py,sha256=953VV4ntmcdRRKhhazI49uAn_j2Wm1cZrHbZtooPEZA,36009 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py,sha256=BOZ-UTZW_gdrkIywjzALte12VJFDkohXeiQqyRDgtXg,57539 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_referrers.py,sha256=dhGMvpD2F0tFX6v9w4rXjtyKc4QOzpySKMWHAQ4RANM,9678 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_reload.py,sha256=IusZgHtATN80C1kpe3iAD9WqKkW5zydzXGwum-uEdVY,15779 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py,sha256=c_9bGh06MbEQw4hbwa7bU6KMQmaUzIu8w4viX3KdBJs,29621 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py,sha256=dQEIMsoceb-KuCmhPFRnxKcxrqoEthhSW0j0rBrnmrU,13007 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_safe_repr.py,sha256=sPopHB3gqKdTZUbM8Dm2sEs9Tfp52ocnAxkA8kSQ98Y,14392 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_save_locals.py,sha256=9h9aJisgkUtB-nZ2CgRxXt4JQPmW0yTj5SQicAoBr-U,4160 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_signature.py,sha256=UjmfnYIfcofVeA-CdwPlXXRwWFJnsXPrLGoogYA5cO0,6877 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_source_mapping.py,sha256=5LCHce85kLWRQK_yv7neJEtzkQs6l4wuS9Pw1xS8DEk,6491 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_stackless.py,sha256=IKEjb4CWvnqi3Mn9dkZzmphx7nJPUND0esVmhswXXcU,16921 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py,sha256=kVWcxu1eVcoBkcICetP1Soaa_RYcx0dhZ_SzvUsvkHs,21082 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py,sha256=ZouTzWGAYnkNceUz8huF0QPN6pm3U2q_3DFY39-sotc,3854 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py,sha256=iTEiKxJJ15sY4rqnDMBnT0Cp0rPo2sTHSfy7RGZMB_k,8407 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py,sha256=grsHR472gmkJF6-qYOzHQPLhtnLkdkCY_I2Ie5uSiCk,3917 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch_regular.py,sha256=PyNvnDnWlgWeR7S6_DRgWv4aApKq-9HSWKxbTivgJZ4,23358 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_traceproperty.py,sha256=2_4hpLfcctLGL5poRezbA-OdRyG-Cbr1Rid09iKhaEY,3256 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py,sha256=0hwVWSwFxeoyjskk0s8NELC1b_r57sIAiIypwUN8itU,17819 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py,sha256=GRTcrybaTe8d5a8gV1GUPJG6JzM1ikmT-wa-aEop8n8,31129 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py,sha256=BEG4bhTNYPlwmdJe0hCvIU01TizoxhqbIMZR0L6H2Qo,1557 +debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_xml.py,sha256=ekN1XZJ3v0xgPdarUAsZQ0nklq9Ks63FOMoZX2LIFAQ,15499 +debugpy/_vendored/pydevd/_pydevd_frame_eval/.gitignore,sha256=EKhbR-PpYtbvIYhIYeDDdUKDcU_kZf4kBzDgARh1Fgg,87 +debugpy/_vendored/pydevd/_pydevd_frame_eval/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_frame_eval_cython_wrapper.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_frame_eval_main.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_frame_tracing.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_modify_bytecode.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_cython_wrapper.py,sha256=dNoR--B9du5TXeycVvNkQwkBf9_utKATcJAKshhRTXE,1341 +debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py,sha256=RY--kYB1fBBhr_uAF5ohaiB77VcnVf7XCcsE8FMVzdo,2444 +debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c,sha256=RTL4Mo8CXDFJKpkl-tQ83BSXiyUTDt-JMCARVPeAYq0,1181258 +debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pxd,sha256=0pKrUK3YwQtlJk7vvhZzqnDCJvB6JOb4V23Zl8UrqYI,5324 +debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.template.pyx,sha256=YOHqtbizcUtC_jMeBlNQ6FLQZn-CZ3fcoqChyHF4h4g,24550 +debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py,sha256=o-H1r3hMgoWEqiTyjfPMeJHWn87lQXTsqM44PYMEndw,4218 +debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_modify_bytecode.py,sha256=2NTPPo720-yNRYcpO_FXYUkZRbWrpFLPHnCVEksiv0E,13545 +debugpy/_vendored/pydevd/_pydevd_frame_eval/release_mem.h,sha256=MbMCNJQXkcJZ8UU7xoH44MwqE3QRWZX5WCAz7zCju6Y,79 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/README.txt,sha256=jgSPsMO3Gc8ncNUe5RwdxdVB-YHyAioWMPXHcD6KbQE,700 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__pycache__/pydevd_fix_code.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/COPYING,sha256=baWkm-Te2LLURwK7TL0zOkMSVjVCU_ezvObHBo298Tk,1074 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/METADATA,sha256=9XadDK6YTQ-FPowYI5DS4ieA7hRGnRP_fM5Z9ioPkEQ,2929 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/RECORD,sha256=2udHTtpgQXukzLaj7MVfrJhBa40hV7SjP8vyZ5vNqMU,2995 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/WHEEL,sha256=OqRkF0eY5GHssMorFjlbTIq072vpHpF60fIQA6lS9xA,92 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/direct_url.json,sha256=s58Rb4KXRlMKxk-mzpvr_tJRQ-Hx8-DHsU6NdohCnAg,93 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/top_level.txt,sha256=9BhdB7HqYZ-PvHNoWX6ilwLYWQqcgEOLwdb3aXm5Gys,9 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__init__.py,sha256=lOOVD9sXmMmUhGrsHT-Hbfvxkkr_fksHhoK3MMRvO9w,4153 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/bytecode.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/cfg.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/concrete.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/flags.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/instr.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/peephole_opt.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/bytecode.py,sha256=Ltz55rgfiI8u6AkgKEjPQcN6cmbsbI038V0Z2yI6Ohs,7089 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/cfg.py,sha256=4kRdapTM7vm84NztarrXylB7OyVs58OX0QRFCnSbw7k,15106 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/concrete.py,sha256=1Dxiyq8YdbTGp485BphORX9YC_lqtEDPyWvOB3BsEw4,22153 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/flags.py,sha256=O0EOKqo3KG5fCNiC-PbKrRUxtY8qmLyFmOifalrA-Dg,5851 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/instr.py,sha256=Xh7F5I5aRvET9ckEtwcWixjyorJTgHTxNRy3sUFOZTU,11319 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py,sha256=hWqADZBfR2XFzgQhnMI3Ehvr_qmU3YD5EUhFHmVNQYw,15694 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py,sha256=Y9YYEfLXTsK-cawB_vGY5J-eS9zMlgQhrR8PgtAytzI,4944 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_bytecode.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_cfg.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_code.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_concrete.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_flags.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_instr.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_misc.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_peephole_opt.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/util_annotation.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py,sha256=dCNH33zllq0I1cdJJMiJMVSEPak59HudvPTfLQJ_pjI,15879 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py,sha256=alz8zqwS7YKpxeZmm0DJLQESYdq6MMHM0aWJIku4W7g,28311 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py,sha256=Zme1AIunMA3-8bI80UUz7N6b4XBTzGp8fbKplgh1oy8,2425 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py,sha256=A2tz5Ok3Rc096nA4TicSLc4-p5_RegKZ2I0mWbxOMhM,49321 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py,sha256=jJZeKuoydHU8MysWEbRVFziUBpqEa8XckLjBt4iRrJQ,6007 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py,sha256=DXZCzcn-zTHdufz8jst0oA_szJyjD4I53kQYFk9iMc0,11537 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py,sha256=U-00FGCnM6lzxwrKsR6ky4bmwT72ixumWTEbggdNyLE,7017 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py,sha256=yFqYsN_9AJnWW6wifg-civ_1rdzXlJgEOosNWFqyJrs,32866 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/util_annotation.py,sha256=VULvmILaYyzOfOii8hHR-j0pnW04h0hgdk1-kwIMJ18,463 +debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/pydevd_fix_code.py,sha256=01uudUsZpFPHvT234uV4oKSJBGgdl8jGolZ2oPjqy9M,1761 +debugpy/_vendored/pydevd/_pydevd_sys_monitoring/__pycache__/_pydevd_sys_monitoring.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_sys_monitoring/__pycache__/pydevd_sys_monitoring.cpython-312.pyc,, +debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring.py,sha256=BI-BAJjuCMJog9PzdYM3iHLm6BX5s-gdq6hadKDFSy0,73390 +debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.c,sha256=IcfeNwlGd3ApZFLBF08lcQ8Jvoy-tDQWssQKEjsl-aE,2022211 +debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.cpython-312-x86_64-linux-gnu.so,sha256=E0rBbyPkSlhhCFYujkk6g8gzAbCKh3tqgl3Is1x0cPs,4031712 +debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pxd,sha256=p9bIrp0Afnk7VI84PAyUkZ5-YmX0FHRDgUuD49jqNOg,2339 +debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pyx,sha256=h6q6c3rW6zfamydPfFR0pjQIGBe8GyoQjhc_BBRkRFo,75750 +debugpy/_vendored/pydevd/_pydevd_sys_monitoring/pydevd_sys_monitoring.py,sha256=r3vtANxiCWK4eyGAkh90n8hAEdFMkyKvgWHpxNpFahA,549 +debugpy/_vendored/pydevd/pydev_app_engine_debug_startup.py,sha256=aUfyVkecqLGb2_lcEasx_0r_tfmBJ5ujI-oALs2OMWY,669 +debugpy/_vendored/pydevd/pydev_coverage.py,sha256=MAXc7dsM_iVzYeMWWgFGow3vshy4597VxNMhqoXw6rs,3112 +debugpy/_vendored/pydevd/pydev_ipython/README,sha256=rvIWDUoNsPxITSg6EUu3L9DihmZUCwx68vQsqo_FSQg,538 +debugpy/_vendored/pydevd/pydev_ipython/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/inputhook.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/inputhookglut.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/inputhookgtk.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/inputhookgtk3.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/inputhookpyglet.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/inputhookqt4.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/inputhookqt5.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/inputhookqt6.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/inputhooktk.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/inputhookwx.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/matplotlibtools.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/qt.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/qt_for_kernel.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/qt_loaders.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/__pycache__/version.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_ipython/inputhook.py,sha256=AObjWOCN_FZqvlhxRRnAzPNvFyUd2CC9OPwh7SE8_Mw,19978 +debugpy/_vendored/pydevd/pydev_ipython/inputhookglut.py,sha256=EN3MwAQLeZPJ6YQGf9jPqf0Dt1yfzRy9vFI3KoTvxrY,5619 +debugpy/_vendored/pydevd/pydev_ipython/inputhookgtk.py,sha256=kwFRWRb4gU4wv39gkL-3JyR58W5wkwhFrQWh_a4WVZM,1114 +debugpy/_vendored/pydevd/pydev_ipython/inputhookgtk3.py,sha256=JXhh_JdEDCjFJVYaI-RIP5N4WS5bLUFhMObS_vf98cw,1112 +debugpy/_vendored/pydevd/pydev_ipython/inputhookpyglet.py,sha256=Z81MLqlQNqHOKgV9VVaplWLRx83-ESHx7NhyCK3ZnA4,3264 +debugpy/_vendored/pydevd/pydev_ipython/inputhookqt4.py,sha256=fmjiu01IGsgnGTNzsWNywwjRvKPAt2MnOTrhDP6KoTo,7251 +debugpy/_vendored/pydevd/pydev_ipython/inputhookqt5.py,sha256=w9SmF3s1AI6lQt6eOt0HubsuThlauHN3tardQdHcxZU,7297 +debugpy/_vendored/pydevd/pydev_ipython/inputhookqt6.py,sha256=lnZl_FKgPKpAtRVpssboxMdajYTAar6J7-eVsrSMcgY,7332 +debugpy/_vendored/pydevd/pydev_ipython/inputhooktk.py,sha256=UwU5VCPtL6BayUy4VauXnzocDotgAA59nnHCVCTujks,754 +debugpy/_vendored/pydevd/pydev_ipython/inputhookwx.py,sha256=HhX9S6aPZcyT21yvE_V2lmWiujKUY6PQfnbEpIXdlg0,6527 +debugpy/_vendored/pydevd/pydev_ipython/matplotlibtools.py,sha256=ALCaCLM3ikmARJtyfNgVbM76EKK2U8ZoVgD74vWyBfk,5355 +debugpy/_vendored/pydevd/pydev_ipython/qt.py,sha256=TeVCKo2j9m2UVUYHWKPnNxYviNwYksQXqU6dVMuoGSQ,872 +debugpy/_vendored/pydevd/pydev_ipython/qt_for_kernel.py,sha256=ascvuaRSEjDV_Qg1svDntW5dXizhDiZ7-JWa2C6in-U,3954 +debugpy/_vendored/pydevd/pydev_ipython/qt_loaders.py,sha256=0Zw9erdlR9c-kxNQvR68fKR8HGcJWFvptsqSHv7pWbY,10423 +debugpy/_vendored/pydevd/pydev_ipython/version.py,sha256=Dwjp3k3a_fdBFmSewViOYY1YT3h5duLNsbbNKKF7xWY,1496 +debugpy/_vendored/pydevd/pydev_pysrc.py,sha256=dOUTYxOuRSKfHdc6ow5BINVU-xfhfhX0xf8jNIIJ4B0,101 +debugpy/_vendored/pydevd/pydev_run_in_console.py,sha256=V3HQfKuyTVXz2piosoOqDCKVK1numOsuh5bdo3a9Z_w,4637 +debugpy/_vendored/pydevd/pydev_sitecustomize/__not_in_default_pythonpath.txt,sha256=hnkTAuxSFW_Tilgw0Bt1RVLrfGRE3hYjAmTPm1k-sc8,21 +debugpy/_vendored/pydevd/pydev_sitecustomize/__pycache__/sitecustomize.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydev_sitecustomize/sitecustomize.py,sha256=3jy-E93p1fIpuoH9YjBAc3Z_fctGTp9tU-05B7fNHY8,9672 +debugpy/_vendored/pydevd/pydevconsole.py,sha256=RA9k6VaVL5cmIQBE1qoAZAw5Kvk1TK0Va7xEEtxZ6ko,21119 +debugpy/_vendored/pydevd/pydevd.py,sha256=hTW3iG4WMqHwfphLoagRZ-A_VK5qVpEC1KvwM5SKbKI,154970 +debugpy/_vendored/pydevd/pydevd_attach_to_process/README.txt,sha256=JibLodU4lzwvGyI8TNbfYhu626MPpYN3z4YAw82zTPU,960 +debugpy/_vendored/pydevd/pydevd_attach_to_process/__pycache__/_always_live_program.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/__pycache__/_check.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/__pycache__/_test_attach_to_process.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/__pycache__/_test_attach_to_process_linux.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/__pycache__/add_code_to_python_process.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/__pycache__/attach_pydevd.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/__pycache__/attach_script.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/_always_live_program.py,sha256=paautgjjZYWolomOWv4ti1K6_XumjSDDbrHPkXYC1Bs,687 +debugpy/_vendored/pydevd/pydevd_attach_to_process/_check.py,sha256=yL5p7qHGw-1aoESl1fbcwV6QXgHmtb3bTTFN0xV9108,136 +debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process.py,sha256=ETGZegNNorgxyYuJUviWu4hFm6946sv9ZGd7_N4doAw,299 +debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process_linux.py,sha256=NVKu3K_p9zzbHbULftrrxe-FvH4XIm7G7ipL8lXt0r8,2563 +debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py,sha256=CvNaX4F9U-66fwEmE36gbvdq0OQw88DmPTuuneuCE60,22591 +debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_linux_amd64.so,sha256=VfHUwn20XKLQTma5FaRtdCChDTrtM8QZgvIvex7RjEI,31160 +debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_pydevd.py,sha256=Sqinii4iXCP4OPrn54queWZ7oyBmJDoyb8FY8n8FHMQ,2585 +debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_script.py,sha256=L7RA14Og8NhnR5bUFuPaNIXKoQb0d4ldEm_ppbI4KZo,8027 +debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace.hpp,sha256=GCjlTIQW1wRoEpp1yCbeJiUaa9JDTbeOypJiZBRtxPE,8399 +debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_310.hpp,sha256=mNr6LVLPDoCRyxLPTdYb0JWDXSfRn7xuAzPOzZWvoFs,4062 +debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_311.hpp,sha256=_tpO9I0U0f2RqCYM8DIOPQJTLv8sL2NCxwKE2BnR0NE,4269 +debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_common.hpp,sha256=r1ch6UgwF4rxW8ehiNnAvJE18VCoUl2TujP7nTCy0vQ,1870 +debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_settrace.hpp,sha256=OKa2mC0dEpE3nAij3mA3sYyVlEXuj5nDI-C-fdW-mdM,7681 +debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_utils.hpp,sha256=7GKYwDPPvu5JhPtni2zB44r0Kh0bO2NZH-LAiFkY55A,3865 +debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_version.hpp,sha256=gh4nf1am3is_-_ocE3Z8TQbEoZko-BP6EtrYMQTtPjs,2912 +debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h,sha256=ueIyBiClInxfKMlgAVMuxTvmhESadiWeA4uSwZAROeo,21631 +debugpy/_vendored/pydevd/pydevd_attach_to_process/common/ref_utils.hpp,sha256=8wDFQk9XoAnK2EdM4J-RErKfBYZn93uG6Rw5OCbLsA0,1475 +debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/.gitignore,sha256=r3rDatBumb9cRDhx35hsdJp9URPUmjgkynAQViLIoR4,82 +debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/__pycache__/lldb_prepare.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/attach.cpp,sha256=xG8NmOwfuhXN93spuG_uEfe0tOn32hnljCqY5f1z354,3703 +debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_linux.sh,sha256=zLx_fpShueHqBioStvOE0hm1aBuvIkc5EygxXSSh8mQ,275 +debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_mac.sh,sha256=6szfH260KYg9ZuPusllOBx4vfPXU6ZrOrOrEdh-2bOM,232 +debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_manylinux.cmd,sha256=W93C4jG-fGn27rd1Yes3neP2upJTO9qAdKZPf8cvSQE,633 +debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/lldb_prepare.py,sha256=GqHCLbSBblmzU84bAmmyz5Qx_H8dvFupmTdINziqjxg,1679 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__init__.py,sha256=XA6hCWO9SoUtiuxV1v3HJkZa1BmIShgUprOgi4OlTUQ,6882 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/breakpoint.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/compat.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/crash.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/debug.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/disasm.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/event.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/interactive.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/module.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/process.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/registry.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/search.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/sql.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/system.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/textio.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/thread.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/util.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__pycache__/window.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/breakpoint.py,sha256=jcOEzFhaddlbO3Zugzl0Mh-lstl85asKhlPmrgcfA14,165140 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/compat.py,sha256=ihE-Lzas1wWBRbIEBQA9LPvG3Jh7y4iPJuMlk-Kos_c,5269 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/crash.py,sha256=SI0ruZbchgv9LAUJJmf1v0R2wsjwcTp04WUeyjh_AEI,64753 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/debug.py,sha256=r7FgApjADs2mU5ZmqtSpIFEEgDbjA4IGKRjbacGrXUY,57665 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/disasm.py,sha256=5BydhX5AvIJfxRkIZIo6YsDxiks52LmgH7769WmV2uU,24389 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/event.py,sha256=fOHu-P2XEd0KPuErInrjY6BBs-nxBsFEz5P9O_kmzIw,65139 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/interactive.py,sha256=0EeHQfjF65jKLYvkyJcJQcOJSMPp0iSzyXZRTUUTubA,83677 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/module.py,sha256=KJHWzxNqkD3aRCR_Cwl-nDjPhlxOFIEn6xtrero3-Tk,69754 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/process.py,sha256=pDXB9nk_-ExnUc6ntUg5IE5pUgRnjeMlUbzS94-4h0c,179713 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/registry.py,sha256=h7xU3ikr-ejiRUtCFaSdQcTIW2P6bskCE4aKQZJEqMQ,21439 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/search.py,sha256=n5rySAFHiTgOfBQN1OoE5dPdinSglAQOfz2jLD-yiuc,23241 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/sql.py,sha256=qMaGYYTqXd5COhAiPIKalHk0ycfrFAKFxjc9fUUSAf0,33696 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/system.py,sha256=PGw1QhMNzdckVKExOV6wtmmnz17e3DUdx9Stni7dvBo,44397 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/textio.py,sha256=xL7IV2tYCILF7vzyx__DZbj_32P5Eyym2mZBjc9RhPQ,59539 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/thread.py,sha256=ca1FgBLQgWFaK7YpdGH-_oTVCz1fLqH8SMHkwnYmbaY,74682 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/util.py,sha256=F94MaOk56bD9hw5IRRVU4HvVrgAFMjmUd428C_g_0No,35919 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__init__.py,sha256=ZtWZmRPUrihwFxg_CjXvQQAc7jhhgCjPoJmzrg8_coo,2813 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/advapi32.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/context_amd64.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/context_i386.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/dbghelp.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/defines.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/gdi32.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/kernel32.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/ntdll.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/peb_teb.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/psapi.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/shell32.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/shlwapi.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/user32.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/version.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__pycache__/wtsapi32.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/advapi32.py,sha256=ocN7LpTDO2iIVpciWimF6sqI90DVJwD7FMYR7M1JiSA,118442 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/context_amd64.py,sha256=S2-vrADxktXe25VdRuOy6Q4Dj8mxr1Dd4MIq9Vy-5V0,23649 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/context_i386.py,sha256=PamJv8oAvxylJJe4m5p-58VLUGY3ULTrIqhZdjedsGg,15408 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/dbghelp.py,sha256=TESaeh8YTpsEKj9ZhWcpkuZ6RAHLjDdJAarB7qzNlMQ,44984 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/defines.py,sha256=bWZzQ-fHDgZWBbhe8-nTrq436brWZ39AFot351UvHLI,20900 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/gdi32.py,sha256=eerwd8qqKxNzlulR47vVf5p_WixeCFmaQLAkLiWRzA0,14155 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/kernel32.py,sha256=Cs_R4qfbCqvPZ4qY-IfrvNx4bu5rUhqccJwjFu3yftY,158759 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/ntdll.py,sha256=KkyFYI9eK8jOVws0j7-G_mDmHKTYP0fLFQkQfilrv2Q,20556 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/peb_teb.py,sha256=PuHmAyFLTrkx2lpPTK9JNYT8YB7zHPcOAgapIlbmIm4,136048 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/psapi.py,sha256=gKLiFGbpmzJ36zj-CW0GWCrbrTwtomVysnLIDXmi80Y,13705 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/shell32.py,sha256=NmlMKVF92SnCh4dIq7gX4LCV4qfdZJEWiK2XbL1u71c,12773 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/shlwapi.py,sha256=iN18pyt4X9RCsQj_fxkCAyqCqIfmIYP4UV1Ftg0eylQ,25371 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/user32.py,sha256=gIX0gA0qSK_eenRqDUyPnnf6hMnvMnMHCWG3XutnWOs,51438 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/version.py,sha256=UAEkxj40ZltRTW4oaNGMZTfQW5-gRmGlVbz3C1e2E5A,33834 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/wtsapi32.py,sha256=-sDrGpAQv0y9VxFwbdDFH-ozfvE75R_uygva0L58Reo,10781 +debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/window.py,sha256=oBsxsI37NbQkLcDu_JVBRnyRBitXN4AI0Z1b4HSO2R8,24017 +debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/attach.cpp,sha256=hJY1byqijqru-q6167Akh20aOTLp19cGeANoFpWCTxw,27984 +debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/attach.h,sha256=rWBA3kdzfyHaE9X9Diub3cojoJlXjC3TKnLQv-nGCeA,1846 +debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/compile_windows.bat,sha256=YbDPk6EGQPYRNtKjex7GajIrFnnuZ1kigsDYRgEB71o,2160 +debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/inject_dll.cpp,sha256=GQmZbpNBRMMW1WFcDFOlJaGLy1-oZ4qCCIyo5exPLBM,4792 +debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/py_win_helpers.hpp,sha256=45pO-c1ofub4nn0XY9kMsTm3s48_EPE-VWAhld3704I,2479 +debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/run_code_in_memory.hpp,sha256=zvDC9cVGZ6BXEsz_Im-QMIubdw6vX3BCIg2T11cVfvg,3355 +debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/run_code_on_dllmain.cpp,sha256=ApQza8ZJrfe2U4jTJPa8ItzvnHc7w2G6Yrfq4BT_56g,2516 +debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/stdafx.cpp,sha256=NO8qlc7sKU6oHA_AnXJSodHupZLizp3npBTc-EGpBj8,999 +debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/stdafx.h,sha256=l0tEIxxiv0XrIeiJ2zedTd4fYrdlxVTK8ECpBk881WM,1162 +debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/targetver.h,sha256=fqw-iPopG_V-pFRxf33lVFL0uvWfDUB2ky0bibFblK0,1013 +debugpy/_vendored/pydevd/pydevd_file_utils.py,sha256=C_tIt1ElBnF5ju8Lq8pCNKmuYcHz6Z3EdqSQZxX56e8,36394 +debugpy/_vendored/pydevd/pydevd_plugins/__init__.py,sha256=_2bZAHuDVAx7MM7KA7pt3DYp641NY4RzSoRAwesWKfU,67 +debugpy/_vendored/pydevd/pydevd_plugins/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_plugins/__pycache__/django_debug.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_plugins/__pycache__/jinja2_debug.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_plugins/__pycache__/pydevd_line_validation.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_plugins/django_debug.py,sha256=8StvDnfs-3MFuuknOFsoyK_AK5UuEzzthk8DTNFNIn8,22246 +debugpy/_vendored/pydevd/pydevd_plugins/extensions/README.md,sha256=cxu8F295snUVNgqE5xXKnZTpbqbR3LTmm60pgK0IOTs,1183 +debugpy/_vendored/pydevd/pydevd_plugins/extensions/__init__.py,sha256=_2bZAHuDVAx7MM7KA7pt3DYp641NY4RzSoRAwesWKfU,67 +debugpy/_vendored/pydevd/pydevd_plugins/extensions/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/__init__.py,sha256=_2bZAHuDVAx7MM7KA7pt3DYp641NY4RzSoRAwesWKfU,67 +debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/__pycache__/__init__.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/__pycache__/pydevd_helpers.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/__pycache__/pydevd_plugin_numpy_types.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/__pycache__/pydevd_plugin_pandas_types.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/__pycache__/pydevd_plugins_django_form_str.cpython-312.pyc,, +debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_helpers.py,sha256=F4ODS-1OYkAbKeIikE1y6hh4x2nMJueFtA-uRnQVrYY,642 +debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugin_numpy_types.py,sha256=uDczvkuJgBLb_ULhJ2CA6v5_3JJ9EvNy3ZF6z5i2f-8,3250 +debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugin_pandas_types.py,sha256=DNs8j07AA-OtDwQNIZVGqwWKqEHYFPSIgTa7HtGZVdI,6575 +debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugins_django_form_str.py,sha256=-aj9h1rqP46DMilxMGwi1p3fDa47VxZkiLC3SlRs7nw,539 +debugpy/_vendored/pydevd/pydevd_plugins/jinja2_debug.py,sha256=lVb2Xix86off_pI7FPfukDo5QE_dkHnpPeTiWd1mDJc,19018 +debugpy/_vendored/pydevd/pydevd_plugins/pydevd_line_validation.py,sha256=YGJZ4SY2O6pY70mxSb36fFy0_9uxSDkrA1Z-MqUrYSU,6654 +debugpy/_vendored/pydevd/pydevd_tracing.py,sha256=EgBJwIt0Hn3t6C6Jfd6UoDCIrsxnuES1fxaAWizEasg,15779 +debugpy/_vendored/pydevd/setup_pydevd_cython.py,sha256=bg0KwBVRwAdDKp3u8mlU4arkPvKGlI0A-kQb899V1RI,11446 +debugpy/_version.py,sha256=4qfkdWnkTpt2toZzPoLHMk07oc2bQ_eCXSWR9qiAMXg,497 +debugpy/adapter/__init__.py,sha256=ewTjlS3VAb6lypFWfGZjY7j2wiW6ApS3KSPJrm0xsEk,346 +debugpy/adapter/__main__.py,sha256=MBXkVyKOTc0QwB-vrUAI_al7EMaGIC3k7mXtfBv7U78,8257 +debugpy/adapter/__pycache__/__init__.cpython-312.pyc,, +debugpy/adapter/__pycache__/__main__.cpython-312.pyc,, +debugpy/adapter/__pycache__/clients.cpython-312.pyc,, +debugpy/adapter/__pycache__/components.cpython-312.pyc,, +debugpy/adapter/__pycache__/launchers.cpython-312.pyc,, +debugpy/adapter/__pycache__/servers.cpython-312.pyc,, +debugpy/adapter/__pycache__/sessions.cpython-312.pyc,, +debugpy/adapter/clients.py,sha256=qzv-eHGZvSW2LpiglWyHQr-Oym5-cSuocWlHt74uSDs,31341 +debugpy/adapter/components.py,sha256=M-xe4YIK3oKEwj_G-42kfqYuYODRB-S_m7sI962pAX0,6081 +debugpy/adapter/launchers.py,sha256=VWMB5i8GJX6CW1FP3OtT1a-iGqMcTabJ3UowNiWq02A,7000 +debugpy/adapter/servers.py,sha256=todtOnPao_cU1tl39ynNxMwgHHP8HKNjMPLSDvPZIF0,23418 +debugpy/adapter/sessions.py,sha256=KzkGF3hWP59siooY3UbnATQY2wqIbCHFpqJHO7aR8jo,11229 +debugpy/common/__init__.py,sha256=A9wk72d0JyUbZBXHLvMi7v65_5hy2chhoNTupk5mYYk,609 +debugpy/common/__pycache__/__init__.cpython-312.pyc,, +debugpy/common/__pycache__/json.cpython-312.pyc,, +debugpy/common/__pycache__/log.cpython-312.pyc,, +debugpy/common/__pycache__/messaging.cpython-312.pyc,, +debugpy/common/__pycache__/singleton.cpython-312.pyc,, +debugpy/common/__pycache__/sockets.cpython-312.pyc,, +debugpy/common/__pycache__/stacks.cpython-312.pyc,, +debugpy/common/__pycache__/timestamp.cpython-312.pyc,, +debugpy/common/__pycache__/util.cpython-312.pyc,, +debugpy/common/json.py,sha256=NoinXsMZHybYGNiSbq3_OWPJxtmYbDew6RkqF3zMyZ8,9674 +debugpy/common/log.py,sha256=NqGC5AIo9zdls1FKn5Gv0n1EvLmaB0d5s12CRY7ZpLs,11706 +debugpy/common/messaging.py,sha256=ptfq2f__NWYhqSU_vcP1CtDZ9H5hmCTOUn_e4s3QbFs,56620 +debugpy/common/singleton.py,sha256=bSTqWB9bLp1SpP1W9-LH_OlU9Arbd7pqu4OcjYKDQ_0,7666 +debugpy/common/sockets.py,sha256=RsRPizhPy6SRsK5DSEiUWIBX2fw-D90ch-KnSfQwmZk,4224 +debugpy/common/stacks.py,sha256=czZjqyY_5ntvOSpelZlJkpH4Gqq9JyZY7tcUqz4sWXA,1526 +debugpy/common/timestamp.py,sha256=ZocK6sWz2JUD1hBAKj672ta8D3ze0Z3zJD_CWjeDq7A,410 +debugpy/common/util.py,sha256=CPWCyS757aIcGISxf_SbaGlewSCFOgou0raEKfCZ56I,4646 +debugpy/launcher/__init__.py,sha256=L7aoLf-CaGikoiEJokF5JmSL0Y7FWIn2EOJFV89KbbY,890 +debugpy/launcher/__main__.py,sha256=yLvc7PNl8YulPLINLZVBGY-38hClmkgec0LmkEQna_Q,3812 +debugpy/launcher/__pycache__/__init__.cpython-312.pyc,, +debugpy/launcher/__pycache__/__main__.cpython-312.pyc,, +debugpy/launcher/__pycache__/debuggee.cpython-312.pyc,, +debugpy/launcher/__pycache__/handlers.cpython-312.pyc,, +debugpy/launcher/__pycache__/output.cpython-312.pyc,, +debugpy/launcher/__pycache__/winapi.cpython-312.pyc,, +debugpy/launcher/debuggee.py,sha256=I8pCEge8cSsVZL7J0sZTOh9IuwIzZf7ENGV3-HxSey8,8689 +debugpy/launcher/handlers.py,sha256=vsMHp4SKqbR1ar27RW7t-SbApXdWPfhS7qLlgr_cw8g,5728 +debugpy/launcher/output.py,sha256=R8YWa7ccb9Sy_ighQqN9R5W1OdMNcnmizmTLYc6yTsg,3748 +debugpy/launcher/winapi.py,sha256=7ACn2Hxf8Kx5bBmxmuC-0A_hG60kEfrDtrZW_BnnjV4,3129 +debugpy/public_api.py,sha256=cIm_msfe3DCnISmyd1t71JDfVIbcO69TlnywLtFtBP0,6376 +debugpy/server/__init__.py,sha256=mmPRoui4PkSeZxG3r5Gep6YB0MLMq_lIJru1pfGmKUY,323 +debugpy/server/__pycache__/__init__.cpython-312.pyc,, +debugpy/server/__pycache__/api.cpython-312.pyc,, +debugpy/server/__pycache__/attach_pid_injected.cpython-312.pyc,, +debugpy/server/__pycache__/cli.cpython-312.pyc,, +debugpy/server/api.py,sha256=fQoGQIzIYZPl1TUs7Tb0lA6q2sI3jIuZksArUeD7xkA,11789 +debugpy/server/attach_pid_injected.py,sha256=mx8G8CDw5HGOPBM5XGkjkLka_LHVQJEuMJ4tUJHQqX8,2734 +debugpy/server/cli.py,sha256=NoysHvEe6CKV5YLcJ_18PBe2KL5Ygbx-5SCbkaGCuRQ,16357 diff --git a/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/WHEEL b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/WHEEL new file mode 100644 index 0000000..e5ff606 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/WHEEL @@ -0,0 +1,8 @@ +Wheel-Version: 1.0 +Generator: setuptools (75.6.0) +Root-Is-Purelib: false +Tag: cp312-cp312-manylinux_2_5_x86_64 +Tag: cp312-cp312-manylinux1_x86_64 +Tag: cp312-cp312-manylinux_2_17_x86_64 +Tag: cp312-cp312-manylinux2014_x86_64 + diff --git a/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/entry_points.txt b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/entry_points.txt new file mode 100644 index 0000000..5aedaf5 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/entry_points.txt @@ -0,0 +1,2 @@ +[console_scripts] +debugpy = debugpy.server.cli:main diff --git a/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/top_level.txt b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/top_level.txt new file mode 100644 index 0000000..2802a6b --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy-1.8.9.dist-info/top_level.txt @@ -0,0 +1 @@ +debugpy diff --git a/myenv/lib/python3.12/site-packages/debugpy/ThirdPartyNotices.txt b/myenv/lib/python3.12/site-packages/debugpy/ThirdPartyNotices.txt new file mode 100644 index 0000000..2b30990 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/ThirdPartyNotices.txt @@ -0,0 +1,499 @@ + +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +Do Not Translate or Localize + +debugpy incorporates third party material from the projects listed below. + + +1. PyDev.Debugger (https://github.com/fabioz/PyDev.Debugger) + Includes:File copyright Brainwy Software Ltda. + Includes:File(s) related to Python, Cpython + Includes:File authored by Yuli Fitterman + Includes:File copyright Brainwy software Ltda + Includes:File with methods from Spyder + Includes:File(s) related to IPython + Includes:Files copyright Microsoft Corporation + Includes:six + Includes:WinAppDbg + Includes:XML-RPC client interface for Python + + +%% PyDev.Debugger NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The source code for the PyDev.Debugger files are provided with debugpy, or you may send a check or money order for US $5.00, including the product name (debugpy), the open source component name (PyDev.Debugger) and version number, to: Source Code Compliance Team, Microsoft Corporation, One Microsoft Way, Redmond, WA 98052, USA. + +Eclipse Public License, Version 1.0 (EPL-1.0) +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. +1. DEFINITIONS +"Contribution" means: +a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and +b) in the case of each subsequent Contributor: +i) changes to the Program, and +ii) additions to the Program; +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. +"Contributor" means any person or entity that distributes the Program. +"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. +"Program" means the Contributions distributed in accordance with this Agreement. +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. +2. GRANT OF RIGHTS +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. +c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. +d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. +3. REQUIREMENTS +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: +a) it complies with the terms and conditions of this Agreement; and +b) its license agreement: +i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; +ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; +iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and +iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. +When the Program is made available in source code form: +a) it must be made available under this Agreement; and +b) a copy of this Agreement must be included with each copy of the Program. +Contributors may not remove or alter any copyright notices contained within the Program. +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. +4. COMMERCIAL DISTRIBUTION +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. +5. NO WARRANTY +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. +6. DISCLAIMER OF LIABILITY +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +7. GENERAL +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. +If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. +========================================= +Includes File copyright Brainwy Software Ltda. + +File includes the following notice: + +Copyright: Brainwy Software Ltda. + +License: EPL. + +========================================= +Includes file(s) from Python, Python xreload, Cpython and an ActiveState.com Recipe on "NULL OBJECT DESIGN PATTERN (PYTHON RECIPE)" + +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2013, 2014, 2015, 2016, 2017 Python Software Foundation; All Rights +Reserved" are retained in Python alone or in any derivative version prepared by +Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 +------------------------------------------- + +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 + +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the +Individual or Organization ("Licensee") accessing and otherwise using +this software in source or binary form and its associated +documentation ("the Software"). + +2. Subject to the terms and conditions of this BeOpen Python License +Agreement, BeOpen hereby grants Licensee a non-exclusive, +royalty-free, world-wide license to reproduce, analyze, test, perform +and/or display publicly, prepare derivative works, distribute, and +otherwise use the Software alone or in any derivative version, +provided, however, that the BeOpen Python License is retained in the +Software, alone or in any derivative version prepared by Licensee. + +3. BeOpen is making the Software available to Licensee on an "AS IS" +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +5. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +6. This License Agreement shall be governed by and interpreted in all +respects by the law of the State of California, excluding conflict of +law provisions. Nothing in this License Agreement shall be deemed to +create any relationship of agency, partnership, or joint venture +between BeOpen and Licensee. This License Agreement does not grant +permission to use BeOpen trademarks or trade names in a trademark +sense to endorse or promote products or services of Licensee, or any +third party. As an exception, the "BeOpen Python" logos available at +http://www.pythonlabs.com/logos.html may be used according to the +permissions granted on that web page. + +7. By copying, installing or otherwise using the software, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 +--------------------------------------- + +1. This LICENSE AGREEMENT is between the Corporation for National +Research Initiatives, having an office at 1895 Preston White Drive, +Reston, VA 20191 ("CNRI"), and the Individual or Organization +("Licensee") accessing and otherwise using Python 1.6.1 software in +source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, CNRI +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 1.6.1 +alone or in any derivative version, provided, however, that CNRI's +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) +1995-2001 Corporation for National Research Initiatives; All Rights +Reserved" are retained in Python 1.6.1 alone or in any derivative +version prepared by Licensee. Alternately, in lieu of CNRI's License +Agreement, Licensee may substitute the following text (omitting the +quotes): "Python 1.6.1 is made available subject to the terms and +conditions in CNRI's License Agreement. This Agreement together with +Python 1.6.1 may be located on the Internet using the following +unique, persistent identifier (known as a handle): 1895.22/1013. This +Agreement may also be obtained from a proxy server on the Internet +using the following URL: http://hdl.handle.net/1895.22/1013". + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 1.6.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 1.6.1. + +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. This License Agreement shall be governed by the federal +intellectual property law of the United States, including without +limitation the federal copyright law, and, to the extent such +U.S. federal law does not apply, by the law of the Commonwealth of +Virginia, excluding Virginia's conflict of law provisions. +Notwithstanding the foregoing, with regard to derivative works based +on Python 1.6.1 that incorporate non-separable material that was +previously distributed under the GNU General Public License (GPL), the +law of the Commonwealth of Virginia shall govern this License +Agreement only as to issues arising under or with respect to +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this +License Agreement shall be deemed to create any relationship of +agency, partnership, or joint venture between CNRI and Licensee. This +License Agreement does not grant permission to use CNRI trademarks or +trade name in a trademark sense to endorse or promote products or +services of Licensee, or any third party. + +8. By clicking on the "ACCEPT" button where indicated, or by copying, +installing or otherwise using Python 1.6.1, Licensee agrees to be +bound by the terms and conditions of this License Agreement. + + ACCEPT + + +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 +-------------------------------------------------- + +Copyright (C) 2006-2010 Python Software Foundation + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +========================================= +Includes File authored by Yuli Fitterman + +Copyright (c) Yuli Fitterman + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +========================================= +Includes file(s): * Copyright (c) Brainwy software Ltda. + * + * This source code is subject to terms and conditions of the Apache License, Version 2.0. A + * copy of the license can be found in the License.html file at the root of this distribution. If + * you cannot locate the Apache License, Version 2.0, please send an email to + * vspython@microsoft.com. By using this source code in any fashion, you are agreeing to be bound + * by the terms of the Apache License, Version 2.0. + * + * You must not remove this notice, or any other, from this software. +========================================= +Includes file(s): Copyright (c) 2009-2012 Pierre Raybaut + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +========================================= +Includes file(s) from Ipython + +Copyright (c) 2008-2010, IPython Development Team +Copyright (c) 2001-2007, Fernando Perez. +Copyright (c) 2001, Janko Hauser +Copyright (c) 2001, Nathaniel Gray + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +Neither the name of the IPython Development Team nor the names of its +contributors may be used to endorse or promote products derived from this +software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +========================================= +Includes file(s): * Copyright (c) Microsoft Corporation. +* +* This source code is subject to terms and conditions of the Apache License, Version 2.0. A +* copy of the license can be found in the License.html file at the root of this distribution. If +* you cannot locate the Apache License, Version 2.0, please send an email to +* vspython@microsoft.com. By using this source code in any fashion, you are agreeing to be bound +* by the terms of the Apache License, Version 2.0. +* +* You must not remove this notice, or any other, from this software. +========================================= +Includes file(s) from https://pythonhosted.org/six/ + +Copyright (c) 2010-2018 Benjamin Peterson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +Includes WinAppDbg + +# Copyright (c) 2009-2014, Mario Vilas +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice,this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +========================================= +Includes XML-RPC client interface for Python +# Copyright (c) 1999-2002 by Secret Labs AB +# Copyright (c) 1999-2002 by Fredrik Lundh +# +# By obtaining, using, and/or copying this software and/or its +# associated documentation, you agree that you have read, understood, +# and will comply with the following terms and conditions: +# +# Permission to use, copy, modify, and distribute this software and +# its associated documentation for any purpose and without fee is +# hereby granted, provided that the above copyright notice appears in +# all copies, and that both that copyright notice and this permission +# notice appear in supporting documentation, and that the name of +# Secret Labs AB or the author not be used in advertising or publicity +# pertaining to distribution of the software without specific, written +# prior permission. +# +# SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD +# TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- +# ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR +# BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY +# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. +========================================= +Includes https://github.com/vstinner/bytecode e3e77fb690ed05ac171e15694e1c5d0e0dc34e86 - MIT + +Copyright (c) 2016 Red Hat. + +The MIT License (MIT) +Copyright (c) 2016 Red Hat. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +Includes https://github.com/benhoyt/scandir 6ed381881bc2fb9de05804e892eeeeb3601a3af2 - BSD 3-Clause "New" or "Revised" License + +Copyright (c) 2012, Ben Hoyt +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +* Neither the name of Ben Hoyt nor the names of its contributors may be used +to endorse or promote products derived from this software without specific +prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +========================================= +END OF PyDev.Debugger NOTICES, INFORMATION, AND LICENSE diff --git a/myenv/lib/python3.12/site-packages/debugpy/__init__.py b/myenv/lib/python3.12/site-packages/debugpy/__init__.py new file mode 100644 index 0000000..975bec7 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/__init__.py @@ -0,0 +1,38 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE in the project root +# for license information. + +"""An implementation of the Debug Adapter Protocol (DAP) for Python. + +https://microsoft.github.io/debug-adapter-protocol/ +""" + +# debugpy stable public API consists solely of members of this module that are +# enumerated below. +__all__ = [ # noqa + "__version__", + "breakpoint", + "configure", + "connect", + "debug_this_thread", + "is_client_connected", + "listen", + "log_to", + "trace_this_thread", + "wait_for_client", +] + +import sys + +assert sys.version_info >= (3, 7), ( + "Python 3.6 and below is not supported by this version of debugpy; " + "use debugpy 1.5.1 or earlier." +) + + +# Actual definitions are in a separate file to work around parsing issues causing +# SyntaxError on Python 2 and preventing the above version check from executing. +from debugpy.public_api import * # noqa +from debugpy.public_api import __version__ + +del sys diff --git a/myenv/lib/python3.12/site-packages/debugpy/__main__.py b/myenv/lib/python3.12/site-packages/debugpy/__main__.py new file mode 100644 index 0000000..14b9013 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/__main__.py @@ -0,0 +1,71 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE in the project root +# for license information. + +import sys + +if __name__ == "__main__": + + # There are three ways to run debugpy: + # + # 1. Installed as a module in the current environment (python -m debugpy ...) + # 2. Run as a script from source code (python /src/debugpy ...) + # 3. Installed as a module in a random directory + # + # ----- + # + # In the first case, no extra work is needed. Importing debugpy will work as expected. + # Also, running 'debugpy' instead of 'python -m debugpy' will work because of the entry point + # defined in setup.py. + # + # ----- + # + # In the second case, sys.path[0] is the one added automatically by Python for the directory + # containing this file. 'import debugpy' will not work since we need the parent directory + # of debugpy/ to be in sys.path, rather than debugpy/ itself. So we need to modify sys.path[0]. + # Running 'debugpy' will not work because the entry point is not defined in this case. + # + # ----- + # + # In the third case, running 'python -m debugpy' will not work because the module is not installed + # in any environment. Running 'python /debugpy' will work, just like the second case. + # But running the entry point will not work because python doesn't know where to find the debugpy module. + # + # In this case, no changes to sys.path are required. You just have to do the following before calling + # the entry point: + # 1. Add to PYTHONPATH. + # On Windows, this is set PYTHONPATH=%PYTHONPATH%; + # 2. Add /bin to PATH. (OPTIONAL) + # On Windows, this is set PATH=%PATH%;\bin + # 3. Run the entry point from a command prompt + # On Windows, this is \bin\debugpy.exe, or just 'debugpy' if you did the previous step. + # + # ----- + # + # If we modify sys.path, 'import debugpy' will work, but it will break other imports + # because they will be resolved relative to debugpy/ - e.g. `import debugger` will try + # to import debugpy/debugger.py. + # + # To fix both problems, we need to do the following steps: + # 1. Modify sys.path[0] to point at the parent directory of debugpy/ instead of debugpy/ itself. + # 2. Import debugpy. + # 3. Remove sys.path[0] so that it doesn't affect future imports. + # + # For example, suppose the user did: + # + # python /foo/bar/debugpy ... + # + # At the beginning of this script, sys.path[0] will contain "/foo/bar/debugpy". + # We want to replace it with "/foo/bar', then 'import debugpy', then remove the replaced entry. + # The imported debugpy module will remain in sys.modules, and thus all future imports of it + # or its submodules will resolve accordingly. + if "debugpy" not in sys.modules: + + # Do not use dirname() to walk up - this can be a relative path, e.g. ".". + sys.path[0] = sys.path[0] + "/../" + import debugpy # noqa + del sys.path[0] + + from debugpy.server import cli + + cli.main() diff --git a/myenv/lib/python3.12/site-packages/debugpy/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..d457a19 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/__pycache__/__main__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/__pycache__/__main__.cpython-312.pyc new file mode 100644 index 0000000..9c9e68c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/__pycache__/__main__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/__pycache__/_version.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/__pycache__/_version.cpython-312.pyc new file mode 100644 index 0000000..39e1ef3 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/__pycache__/_version.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/__pycache__/public_api.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/__pycache__/public_api.cpython-312.pyc new file mode 100644 index 0000000..5d83186 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/__pycache__/public_api.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/__init__.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/__init__.py new file mode 100644 index 0000000..daf9f90 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/__init__.py @@ -0,0 +1,126 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE in the project root +# for license information. + +import contextlib +from importlib import import_module +import os +import sys + +from . import _util + + +VENDORED_ROOT = os.path.dirname(os.path.abspath(__file__)) +# TODO: Move the "pydevd" git submodule to the debugpy/_vendored directory +# and then drop the following fallback. +if "pydevd" not in os.listdir(VENDORED_ROOT): + VENDORED_ROOT = os.path.dirname(VENDORED_ROOT) + + +def list_all(resolve=False): + """Return the list of vendored projects.""" + # TODO: Derive from os.listdir(VENDORED_ROOT)? + projects = ["pydevd"] + if not resolve: + return projects + return [project_root(name) for name in projects] + + +def project_root(project): + """Return the path the root dir of the vendored project. + + If "project" is an empty string then the path prefix for vendored + projects (e.g. "debugpy/_vendored/") will be returned. + """ + if not project: + project = "" + return os.path.join(VENDORED_ROOT, project) + + +def iter_project_files(project, relative=False, **kwargs): + """Yield (dirname, basename, filename) for all files in the project.""" + if relative: + with _util.cwd(VENDORED_ROOT): + for result in _util.iter_all_files(project, **kwargs): + yield result + else: + root = project_root(project) + for result in _util.iter_all_files(root, **kwargs): + yield result + + +def iter_packaging_files(project): + """Yield the filenames for all files in the project. + + The filenames are relative to "debugpy/_vendored". This is most + useful for the "package data" in a setup.py. + """ + # TODO: Use default filters? __pycache__ and .pyc? + prune_dir = None + exclude_file = None + try: + mod = import_module("._{}_packaging".format(project), __name__) + except ImportError: + pass + else: + prune_dir = getattr(mod, "prune_dir", prune_dir) + exclude_file = getattr(mod, "exclude_file", exclude_file) + results = iter_project_files( + project, relative=True, prune_dir=prune_dir, exclude_file=exclude_file + ) + for _, _, filename in results: + yield filename + + +def prefix_matcher(*prefixes): + """Return a module match func that matches any of the given prefixes.""" + assert prefixes + + def match(name, module): + for prefix in prefixes: + if name.startswith(prefix): + return True + else: + return False + + return match + + +def check_modules(project, match, root=None): + """Verify that only vendored modules have been imported.""" + if root is None: + root = project_root(project) + extensions = [] + unvendored = {} + for modname, mod in list(sys.modules.items()): + if not match(modname, mod): + continue + try: + filename = getattr(mod, "__file__", None) + except: # In theory it's possible that any error is raised when accessing __file__ + filename = None + if not filename: # extension module + extensions.append(modname) + elif not filename.startswith(root): + unvendored[modname] = filename + return unvendored, extensions + + +@contextlib.contextmanager +def vendored(project, root=None): + """A context manager under which the vendored project will be imported.""" + if root is None: + root = project_root(project) + # Add the vendored project directory, so that it gets tried first. + sys.path.insert(0, root) + try: + yield root + finally: + sys.path.remove(root) + + +def preimport(project, modules, **kwargs): + """Import each of the named modules out of the vendored project.""" + with vendored(project, **kwargs): + for name in modules: + import_module(name) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..ed2d498 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/__pycache__/_pydevd_packaging.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/__pycache__/_pydevd_packaging.cpython-312.pyc new file mode 100644 index 0000000..7094785 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/__pycache__/_pydevd_packaging.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/__pycache__/_util.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/__pycache__/_util.cpython-312.pyc new file mode 100644 index 0000000..45f2cf1 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/__pycache__/_util.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/__pycache__/force_pydevd.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/__pycache__/force_pydevd.cpython-312.pyc new file mode 100644 index 0000000..ff53f3e Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/__pycache__/force_pydevd.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/_pydevd_packaging.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/_pydevd_packaging.py new file mode 100644 index 0000000..87cffd3 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/_pydevd_packaging.py @@ -0,0 +1,48 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE in the project root +# for license information. + +from . import VENDORED_ROOT +from ._util import cwd, iter_all_files + + +INCLUDES = [ + 'setup_pydevd_cython.py', +] + + +def iter_files(): + # From the root of pydevd repo, we want only scripts and + # subdirectories that constitute the package itself (not helper + # scripts, tests etc). But when walking down into those + # subdirectories, we want everything below. + + with cwd(VENDORED_ROOT): + return iter_all_files('pydevd', prune_dir, exclude_file) + + +def prune_dir(dirname, basename): + if basename == '__pycache__': + return True + elif dirname != 'pydevd': + return False + elif basename.startswith('pydev'): + return False + elif basename.startswith('_pydev'): + return False + return True + + +def exclude_file(dirname, basename): + if dirname == 'pydevd': + if basename in INCLUDES: + return False + elif not basename.endswith('.py'): + return True + elif 'pydev' not in basename: + return True + return False + + if basename.endswith('.pyc'): + return True + return False diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/_util.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/_util.py new file mode 100644 index 0000000..7eab574 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/_util.py @@ -0,0 +1,59 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE in the project root +# for license information. + +import contextlib +import os + + +@contextlib.contextmanager +def cwd(dirname): + """A context manager for operating in a different directory.""" + orig = os.getcwd() + os.chdir(dirname) + try: + yield orig + finally: + os.chdir(orig) + + +def iter_all_files(root, prune_dir=None, exclude_file=None): + """Yield (dirname, basename, filename) for each file in the tree. + + This is an alternative to os.walk() that flattens out the tree and + with filtering. + """ + pending = [root] + while pending: + dirname = pending.pop(0) + for result in _iter_files(dirname, pending, prune_dir, exclude_file): + yield result + + +def iter_tree(root, prune_dir=None, exclude_file=None): + """Yield (dirname, files) for each directory in the tree. + + The list of files is actually a list of (basename, filename). + + This is an alternative to os.walk() with filtering.""" + pending = [root] + while pending: + dirname = pending.pop(0) + files = [] + for _, b, f in _iter_files(dirname, pending, prune_dir, exclude_file): + files.append((b, f)) + yield dirname, files + + +def _iter_files(dirname, subdirs, prune_dir, exclude_file): + for basename in os.listdir(dirname): + filename = os.path.join(dirname, basename) + if os.path.isdir(filename): + if prune_dir is not None and prune_dir(dirname, basename): + continue + subdirs.append(filename) + else: + # TODO: Use os.path.isfile() to narrow it down? + if exclude_file is not None and exclude_file(dirname, basename): + continue + yield dirname, basename, filename diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/force_pydevd.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/force_pydevd.py new file mode 100644 index 0000000..cfd8927 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/force_pydevd.py @@ -0,0 +1,81 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE in the project root +# for license information. + +from importlib import import_module +import os +import warnings + +from . import check_modules, prefix_matcher, preimport, vendored + +# Ensure that pydevd is our vendored copy. +_unvendored, _ = check_modules('pydevd', + prefix_matcher('pydev', '_pydev')) +if _unvendored: + _unvendored = sorted(_unvendored.values()) + msg = 'incompatible copy of pydevd already imported' + # raise ImportError(msg) + warnings.warn(msg + ':\n {}'.format('\n '.join(_unvendored))) + +# If debugpy logging is enabled, enable it for pydevd as well +if "DEBUGPY_LOG_DIR" in os.environ: + os.environ[str("PYDEVD_DEBUG")] = str("True") + os.environ[str("PYDEVD_DEBUG_FILE")] = os.environ["DEBUGPY_LOG_DIR"] + str("/debugpy.pydevd.log") + +# Disable pydevd frame-eval optimizations only if unset, to allow opt-in. +if "PYDEVD_USE_FRAME_EVAL" not in os.environ: + os.environ[str("PYDEVD_USE_FRAME_EVAL")] = str("NO") + +# Constants must be set before importing any other pydevd module +# # due to heavy use of "from" in them. +with warnings.catch_warnings(): + warnings.simplefilter("ignore", category=DeprecationWarning) + with vendored('pydevd'): + pydevd_constants = import_module('_pydevd_bundle.pydevd_constants') +# We limit representation size in our representation provider when needed. +pydevd_constants.MAXIMUM_VARIABLE_REPRESENTATION_SIZE = 2 ** 32 + +# Now make sure all the top-level modules and packages in pydevd are +# loaded. Any pydevd modules that aren't loaded at this point, will +# be loaded using their parent package's __path__ (i.e. one of the +# following). +with warnings.catch_warnings(): + warnings.simplefilter("ignore", category=DeprecationWarning) + preimport('pydevd', [ + '_pydev_bundle', + '_pydev_runfiles', + '_pydevd_bundle', + '_pydevd_frame_eval', + 'pydev_ipython', + 'pydevd_plugins', + 'pydevd', + ]) + +# When pydevd is imported it sets the breakpoint behavior, but it needs to be +# overridden because by default pydevd will connect to the remote debugger using +# its own custom protocol rather than DAP. +import pydevd # noqa +import debugpy # noqa + + +def debugpy_breakpointhook(): + debugpy.breakpoint() + + +pydevd.install_breakpointhook(debugpy_breakpointhook) + +# Ensure that pydevd uses JSON protocol +from _pydevd_bundle import pydevd_constants +from _pydevd_bundle import pydevd_defaults +pydevd_defaults.PydevdCustomization.DEFAULT_PROTOCOL = pydevd_constants.HTTP_JSON_PROTOCOL + +# Enable some defaults related to debugpy such as sending a single notification when +# threads pause and stopping on any exception. +pydevd_defaults.PydevdCustomization.DEBUG_MODE = 'debugpy-dap' + +# This is important when pydevd attaches automatically to a subprocess. In this case, we have to +# make sure that debugpy is properly put back in the game for users to be able to use it. +pydevd_defaults.PydevdCustomization.PREIMPORT = '%s;%s' % ( + os.path.dirname(os.path.dirname(debugpy.__file__)), + 'debugpy._vendored.force_pydevd' +) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydev_app_engine_debug_startup.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydev_app_engine_debug_startup.cpython-312.pyc new file mode 100644 index 0000000..ab0f435 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydev_app_engine_debug_startup.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydev_coverage.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydev_coverage.cpython-312.pyc new file mode 100644 index 0000000..dc637e1 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydev_coverage.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydev_pysrc.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydev_pysrc.cpython-312.pyc new file mode 100644 index 0000000..40bf983 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydev_pysrc.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydev_run_in_console.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydev_run_in_console.cpython-312.pyc new file mode 100644 index 0000000..a65db3f Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydev_run_in_console.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydevconsole.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydevconsole.cpython-312.pyc new file mode 100644 index 0000000..2e84b3f Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydevconsole.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydevd.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydevd.cpython-312.pyc new file mode 100644 index 0000000..f294814 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydevd.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydevd_file_utils.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydevd_file_utils.cpython-312.pyc new file mode 100644 index 0000000..6514983 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydevd_file_utils.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydevd_tracing.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydevd_tracing.cpython-312.pyc new file mode 100644 index 0000000..b7fbbc2 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/pydevd_tracing.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/setup_pydevd_cython.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/setup_pydevd_cython.cpython-312.pyc new file mode 100644 index 0000000..b80f2bd Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/__pycache__/setup_pydevd_cython.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__init__.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..35f487d Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_calltip_util.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_calltip_util.cpython-312.pyc new file mode 100644 index 0000000..4c58125 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_calltip_util.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_completer.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_completer.cpython-312.pyc new file mode 100644 index 0000000..971c5d5 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_completer.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_execfile.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_execfile.cpython-312.pyc new file mode 100644 index 0000000..9a9be12 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_execfile.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_filesystem_encoding.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_filesystem_encoding.cpython-312.pyc new file mode 100644 index 0000000..58f1e19 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_filesystem_encoding.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_getopt.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_getopt.cpython-312.pyc new file mode 100644 index 0000000..c316cb9 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_getopt.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_imports_tipper.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_imports_tipper.cpython-312.pyc new file mode 100644 index 0000000..5d228ac Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_imports_tipper.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_jy_imports_tipper.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_jy_imports_tipper.cpython-312.pyc new file mode 100644 index 0000000..3dae16f Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_jy_imports_tipper.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_log.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_log.cpython-312.pyc new file mode 100644 index 0000000..6351fa7 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_log.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_saved_modules.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_saved_modules.cpython-312.pyc new file mode 100644 index 0000000..fb3e140 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_saved_modules.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_sys_patch.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_sys_patch.cpython-312.pyc new file mode 100644 index 0000000..a118f91 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_sys_patch.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_tipper_common.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_tipper_common.cpython-312.pyc new file mode 100644 index 0000000..7a777d3 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/_pydev_tipper_common.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_console_utils.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_console_utils.cpython-312.pyc new file mode 100644 index 0000000..4ca99ef Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_console_utils.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_import_hook.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_import_hook.cpython-312.pyc new file mode 100644 index 0000000..91f85ab Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_import_hook.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_imports.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_imports.cpython-312.pyc new file mode 100644 index 0000000..ebe031e Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_imports.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_ipython_console.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_ipython_console.cpython-312.pyc new file mode 100644 index 0000000..2ee9def Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_ipython_console.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_ipython_console_011.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_ipython_console_011.cpython-312.pyc new file mode 100644 index 0000000..4197a3c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_ipython_console_011.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_is_thread_alive.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_is_thread_alive.cpython-312.pyc new file mode 100644 index 0000000..dc64710 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_is_thread_alive.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_localhost.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_localhost.cpython-312.pyc new file mode 100644 index 0000000..cf92b3a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_localhost.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_log.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_log.cpython-312.pyc new file mode 100644 index 0000000..8e23c67 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_log.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_monkey.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_monkey.cpython-312.pyc new file mode 100644 index 0000000..3652e65 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_monkey.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_monkey_qt.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_monkey_qt.cpython-312.pyc new file mode 100644 index 0000000..a98a857 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_monkey_qt.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_override.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_override.cpython-312.pyc new file mode 100644 index 0000000..390361e Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_override.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_umd.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_umd.cpython-312.pyc new file mode 100644 index 0000000..408cef8 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_umd.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_versioncheck.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_versioncheck.cpython-312.pyc new file mode 100644 index 0000000..a29dd19 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/__pycache__/pydev_versioncheck.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_calltip_util.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_calltip_util.py new file mode 100644 index 0000000..ad93476 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_calltip_util.py @@ -0,0 +1,153 @@ +""" +License: Apache 2.0 +Author: Yuli Fitterman +""" +import types + +from _pydevd_bundle.pydevd_constants import IS_JYTHON + +try: + import inspect +except: + import traceback + + traceback.print_exc() # Ok, no inspect available (search will not work) + +from _pydev_bundle._pydev_imports_tipper import signature_from_docstring + + +def is_bound_method(obj): + if isinstance(obj, types.MethodType): + return getattr(obj, "__self__", getattr(obj, "im_self", None)) is not None + else: + return False + + +def get_class_name(instance): + return getattr(getattr(instance, "__class__", None), "__name__", None) + + +def get_bound_class_name(obj): + my_self = getattr(obj, "__self__", getattr(obj, "im_self", None)) + if my_self is None: + return None + return get_class_name(my_self) + + +def get_description(obj): + try: + ob_call = obj.__call__ + except: + ob_call = None + + if isinstance(obj, type) or type(obj).__name__ == "classobj": + fob = getattr(obj, "__init__", lambda: None) + if not isinstance(fob, (types.FunctionType, types.MethodType)): + fob = obj + elif is_bound_method(ob_call): + fob = ob_call + else: + fob = obj + + argspec = "" + fn_name = None + fn_class = None + if isinstance(fob, (types.FunctionType, types.MethodType)): + spec_info = inspect.getfullargspec(fob) + argspec = inspect.formatargspec(*spec_info) + fn_name = getattr(fob, "__name__", None) + if isinstance(obj, type) or type(obj).__name__ == "classobj": + fn_name = "__init__" + fn_class = getattr(obj, "__name__", "UnknownClass") + elif is_bound_method(obj) or is_bound_method(ob_call): + fn_class = get_bound_class_name(obj) or "UnknownClass" + + else: + fn_name = getattr(fob, "__name__", None) + fn_self = getattr(fob, "__self__", None) + if fn_self is not None and not isinstance(fn_self, types.ModuleType): + fn_class = get_class_name(fn_self) + + doc_string = get_docstring(ob_call) if is_bound_method(ob_call) else get_docstring(obj) + return create_method_stub(fn_name, fn_class, argspec, doc_string) + + +def create_method_stub(fn_name, fn_class, argspec, doc_string): + if fn_name and argspec: + doc_string = "" if doc_string is None else doc_string + fn_stub = create_function_stub(fn_name, argspec, doc_string, indent=1 if fn_class else 0) + if fn_class: + expr = fn_class if fn_name == "__init__" else fn_class + "()." + fn_name + return create_class_stub(fn_class, fn_stub) + "\n" + expr + else: + expr = fn_name + return fn_stub + "\n" + expr + elif doc_string: + if fn_name: + restored_signature, _ = signature_from_docstring(doc_string, fn_name) + if restored_signature: + return create_method_stub(fn_name, fn_class, restored_signature, doc_string) + return create_function_stub("unknown", "(*args, **kwargs)", doc_string) + "\nunknown" + + else: + return "" + + +def get_docstring(obj): + if obj is not None: + try: + if IS_JYTHON: + # Jython + doc = obj.__doc__ + if doc is not None: + return doc + + from _pydev_bundle import _pydev_jy_imports_tipper + + is_method, infos = _pydev_jy_imports_tipper.ismethod(obj) + ret = "" + if is_method: + for info in infos: + ret += info.get_as_doc() + return ret + + else: + doc = inspect.getdoc(obj) + if doc is not None: + return doc + except: + pass + else: + return "" + try: + # if no attempt succeeded, try to return repr()... + return repr(obj) + except: + try: + # otherwise the class + return str(obj.__class__) + except: + # if all fails, go to an empty string + return "" + + +def create_class_stub(class_name, contents): + return "class %s(object):\n%s" % (class_name, contents) + + +def create_function_stub(fn_name, fn_argspec, fn_docstring, indent=0): + def shift_right(string, prefix): + return "".join(prefix + line for line in string.splitlines(True)) + + fn_docstring = shift_right(inspect.cleandoc(fn_docstring), " " * (indent + 1)) + ret = ''' +def %s%s: + """%s""" + pass +''' % (fn_name, fn_argspec, fn_docstring) + ret = ret[1:] # remove first /n + ret = ret.replace("\t", " ") + if indent: + prefix = " " * indent + ret = shift_right(ret, prefix) + return ret diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_completer.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_completer.py new file mode 100644 index 0000000..69a2b23 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_completer.py @@ -0,0 +1,267 @@ +from collections import namedtuple +from string import ascii_letters, digits + +from _pydevd_bundle import pydevd_xml +import pydevconsole + +import builtins as __builtin__ # Py3 + +try: + import java.lang # @UnusedImport + from _pydev_bundle import _pydev_jy_imports_tipper + + _pydev_imports_tipper = _pydev_jy_imports_tipper +except ImportError: + IS_JYTHON = False + from _pydev_bundle import _pydev_imports_tipper + +dir2 = _pydev_imports_tipper.generate_imports_tip_for_module + + +# ======================================================================================================================= +# _StartsWithFilter +# ======================================================================================================================= +class _StartsWithFilter: + """ + Used because we can't create a lambda that'll use an outer scope in jython 2.1 + """ + + def __init__(self, start_with): + self.start_with = start_with.lower() + + def __call__(self, name): + return name.lower().startswith(self.start_with) + + +# ======================================================================================================================= +# Completer +# +# This class was gotten from IPython.completer (dir2 was replaced with the completer already in pydev) +# ======================================================================================================================= +class Completer: + def __init__(self, namespace=None, global_namespace=None): + """Create a new completer for the command line. + + Completer([namespace,global_namespace]) -> completer instance. + + If unspecified, the default namespace where completions are performed + is __main__ (technically, __main__.__dict__). Namespaces should be + given as dictionaries. + + An optional second namespace can be given. This allows the completer + to handle cases where both the local and global scopes need to be + distinguished. + + Completer instances should be used as the completion mechanism of + readline via the set_completer() call: + + readline.set_completer(Completer(my_namespace).complete) + """ + + # Don't bind to namespace quite yet, but flag whether the user wants a + # specific namespace or to use __main__.__dict__. This will allow us + # to bind to __main__.__dict__ at completion time, not now. + if namespace is None: + self.use_main_ns = 1 + else: + self.use_main_ns = 0 + self.namespace = namespace + + # The global namespace, if given, can be bound directly + if global_namespace is None: + self.global_namespace = {} + else: + self.global_namespace = global_namespace + + def complete(self, text): + """Return the next possible completion for 'text'. + + This is called successively with state == 0, 1, 2, ... until it + returns None. The completion should begin with 'text'. + + """ + if self.use_main_ns: + # In pydev this option should never be used + raise RuntimeError("Namespace must be provided!") + self.namespace = __main__.__dict__ # @UndefinedVariable + + if "." in text: + return self.attr_matches(text) + else: + return self.global_matches(text) + + def global_matches(self, text): + """Compute matches when text is a simple name. + + Return a list of all keywords, built-in functions and names currently + defined in self.namespace or self.global_namespace that match. + + """ + + def get_item(obj, attr): + return obj[attr] + + a = {} + + for dict_with_comps in [__builtin__.__dict__, self.namespace, self.global_namespace]: # @UndefinedVariable + a.update(dict_with_comps) + + filter = _StartsWithFilter(text) + + return dir2(a, a.keys(), get_item, filter) + + def attr_matches(self, text): + """Compute matches when text contains a dot. + + Assuming the text is of the form NAME.NAME....[NAME], and is + evaluatable in self.namespace or self.global_namespace, it will be + evaluated and its attributes (as revealed by dir()) are used as + possible completions. (For class instances, class members are are + also considered.) + + WARNING: this can still invoke arbitrary C code, if an object + with a __getattr__ hook is evaluated. + + """ + import re + + # Another option, seems to work great. Catches things like ''. + m = re.match(r"(\S+(\.\w+)*)\.(\w*)$", text) # @UndefinedVariable + + if not m: + return [] + + expr, attr = m.group(1, 3) + try: + obj = eval(expr, self.namespace) + except: + try: + obj = eval(expr, self.global_namespace) + except: + return [] + + filter = _StartsWithFilter(attr) + + words = dir2(obj, filter=filter) + + return words + + +def generate_completions(frame, act_tok): + """ + :return list(tuple(method_name, docstring, parameters, completion_type)) + + method_name: str + docstring: str + parameters: str -- i.e.: "(a, b)" + completion_type is an int + See: _pydev_bundle._pydev_imports_tipper for TYPE_ constants + """ + if frame is None: + return [] + + # Not using frame.f_globals because of https://sourceforge.net/tracker2/?func=detail&aid=2541355&group_id=85796&atid=577329 + # (Names not resolved in generator expression in method) + # See message: http://mail.python.org/pipermail/python-list/2009-January/526522.html + updated_globals = {} + updated_globals.update(frame.f_globals) + updated_globals.update(frame.f_locals) # locals later because it has precedence over the actual globals + + if pydevconsole.IPYTHON: + completions = pydevconsole.get_completions(act_tok, act_tok, updated_globals, frame.f_locals) + else: + completer = Completer(updated_globals, None) + # list(tuple(name, descr, parameters, type)) + completions = completer.complete(act_tok) + + return completions + + +def generate_completions_as_xml(frame, act_tok): + completions = generate_completions(frame, act_tok) + return completions_to_xml(completions) + + +def completions_to_xml(completions): + valid_xml = pydevd_xml.make_valid_xml_value + quote = pydevd_xml.quote + msg = [""] + + for comp in completions: + msg.append('_= \t"))) + msg.append('" p1="') + msg.append(valid_xml(quote(comp[1], "/>_= \t"))) + msg.append('" p2="') + msg.append(valid_xml(quote(comp[2], "/>_= \t"))) + msg.append('" p3="') + msg.append(valid_xml(quote(comp[3], "/>_= \t"))) + msg.append('"/>') + msg.append("") + + return "".join(msg) + + +identifier_start = ascii_letters + "_" +identifier_part = ascii_letters + "_" + digits + +identifier_start = set(identifier_start) +identifier_part = set(identifier_part) + + +def isidentifier(s): + return s.isidentifier() + + +TokenAndQualifier = namedtuple("TokenAndQualifier", "token, qualifier") + + +def extract_token_and_qualifier(text, line=0, column=0): + """ + Extracts the token a qualifier from the text given the line/colum + (see test_extract_token_and_qualifier for examples). + + :param unicode text: + :param int line: 0-based + :param int column: 0-based + """ + # Note: not using the tokenize module because text should be unicode and + # line/column refer to the unicode text (otherwise we'd have to know + # those ranges after converted to bytes). + if line < 0: + line = 0 + if column < 0: + column = 0 + + if isinstance(text, bytes): + text = text.decode("utf-8") + + lines = text.splitlines() + try: + text = lines[line] + except IndexError: + return TokenAndQualifier("", "") + + if column >= len(text): + column = len(text) + + text = text[:column] + token = "" + qualifier = "" + + temp_token = [] + for i in range(column - 1, -1, -1): + c = text[i] + if c in identifier_part or isidentifier(c) or c == ".": + temp_token.append(c) + else: + break + temp_token = "".join(reversed(temp_token)) + if "." in temp_token: + temp_token = temp_token.split(".") + token = ".".join(temp_token[:-1]) + qualifier = temp_token[-1] + else: + qualifier = temp_token + + return TokenAndQualifier(token, qualifier) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_execfile.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_execfile.py new file mode 100644 index 0000000..4abdd4b --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_execfile.py @@ -0,0 +1,16 @@ +# We must redefine it in Py3k if it's not already there +def execfile(file, glob=None, loc=None): + if glob is None: + import sys + + glob = sys._getframe().f_back.f_globals + if loc is None: + loc = glob + + import tokenize + + with tokenize.open(file) as stream: + contents = stream.read() + + # execute the script (note: it's important to compile first to have the filename set in debug mode) + exec(compile(contents + "\n", file, "exec"), glob, loc) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py new file mode 100644 index 0000000..b0a21bf --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py @@ -0,0 +1,43 @@ +import sys + + +def __getfilesystemencoding(): + """ + Note: there's a copy of this method in interpreterInfo.py + """ + try: + ret = sys.getfilesystemencoding() + if not ret: + raise RuntimeError("Unable to get encoding.") + return ret + except: + try: + # Handle Jython + from java.lang import System # @UnresolvedImport + + env = System.getProperty("os.name").lower() + if env.find("win") != -1: + return "ISO-8859-1" # mbcs does not work on Jython, so, use a (hopefully) suitable replacement + return "utf-8" + except: + pass + + # Only available from 2.3 onwards. + if sys.platform == "win32": + return "mbcs" + return "utf-8" + + +def getfilesystemencoding(): + try: + ret = __getfilesystemencoding() + + # Check if the encoding is actually there to be used! + if hasattr("", "encode"): + "".encode(ret) + if hasattr("", "decode"): + "".decode(ret) + + return ret + except: + return "utf-8" diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_getopt.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_getopt.py new file mode 100644 index 0000000..d8765ca --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_getopt.py @@ -0,0 +1,133 @@ +# ======================================================================================================================= +# getopt code copied since gnu_getopt is not available on jython 2.1 +# ======================================================================================================================= +class GetoptError(Exception): + opt = "" + msg = "" + + def __init__(self, msg, opt=""): + self.msg = msg + self.opt = opt + Exception.__init__(self, msg, opt) + + def __str__(self): + return self.msg + + +def gnu_getopt(args, shortopts, longopts=[]): + """getopt(args, options[, long_options]) -> opts, args + + This function works like getopt(), except that GNU style scanning + mode is used by default. This means that option and non-option + arguments may be intermixed. The getopt() function stops + processing options as soon as a non-option argument is + encountered. + + If the first character of the option string is `+', or if the + environment variable POSIXLY_CORRECT is set, then option + processing stops as soon as a non-option argument is encountered. + """ + + opts = [] + prog_args = [] + if type("") == type(longopts): + longopts = [longopts] + else: + longopts = list(longopts) + + # Allow options after non-option arguments? + all_options_first = False + if shortopts.startswith("+"): + shortopts = shortopts[1:] + all_options_first = True + + while args: + if args[0] == "--": + prog_args += args[1:] + break + + if args[0][:2] == "--": + opts, args = do_longs(opts, args[0][2:], longopts, args[1:]) + elif args[0][:1] == "-": + opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:]) + else: + if all_options_first: + prog_args += args + break + else: + prog_args.append(args[0]) + args = args[1:] + + return opts, prog_args + + +def do_longs(opts, opt, longopts, args): + try: + i = opt.index("=") + except ValueError: + optarg = None + else: + opt, optarg = opt[:i], opt[i + 1 :] + + has_arg, opt = long_has_args(opt, longopts) + if has_arg: + if optarg is None: + if not args: + raise GetoptError("option --%s requires argument" % opt, opt) + optarg, args = args[0], args[1:] + elif optarg: + raise GetoptError("option --%s must not have an argument" % opt, opt) + opts.append(("--" + opt, optarg or "")) + return opts, args + + +# Return: +# has_arg? +# full option name +def long_has_args(opt, longopts): + possibilities = [o for o in longopts if o.startswith(opt)] + if not possibilities: + raise GetoptError("option --%s not recognized" % opt, opt) + # Is there an exact match? + if opt in possibilities: + return False, opt + elif opt + "=" in possibilities: + return True, opt + # No exact match, so better be unique. + if len(possibilities) > 1: + # XXX since possibilities contains all valid continuations, might be + # nice to work them into the error msg + raise GetoptError("option --%s not a unique prefix" % opt, opt) + assert len(possibilities) == 1 + unique_match = possibilities[0] + has_arg = unique_match.endswith("=") + if has_arg: + unique_match = unique_match[:-1] + return has_arg, unique_match + + +def do_shorts(opts, optstring, shortopts, args): + while optstring != "": + opt, optstring = optstring[0], optstring[1:] + if short_has_arg(opt, shortopts): + if optstring == "": + if not args: + raise GetoptError("option -%s requires argument" % opt, opt) + optstring, args = args[0], args[1:] + optarg, optstring = optstring, "" + else: + optarg = "" + opts.append(("-" + opt, optarg)) + return opts, args + + +def short_has_arg(opt, shortopts): + for i in range(len(shortopts)): + if opt == shortopts[i] != ":": + return shortopts.startswith(":", i + 1) + raise GetoptError("option -%s not recognized" % opt, opt) + + +# ======================================================================================================================= +# End getopt code +# ======================================================================================================================= diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_imports_tipper.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_imports_tipper.py new file mode 100644 index 0000000..b8f0abc --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_imports_tipper.py @@ -0,0 +1,372 @@ +import inspect +import os.path +import sys + +from _pydev_bundle._pydev_tipper_common import do_find +from _pydevd_bundle.pydevd_utils import hasattr_checked, dir_checked + +from inspect import getfullargspec + + +def getargspec(*args, **kwargs): + arg_spec = getfullargspec(*args, **kwargs) + return arg_spec.args, arg_spec.varargs, arg_spec.varkw, arg_spec.defaults, arg_spec.kwonlyargs or [], arg_spec.kwonlydefaults or {} + + +# completion types. +TYPE_IMPORT = "0" +TYPE_CLASS = "1" +TYPE_FUNCTION = "2" +TYPE_ATTR = "3" +TYPE_BUILTIN = "4" +TYPE_PARAM = "5" + + +def _imp(name, log=None): + try: + return __import__(name) + except: + if "." in name: + sub = name[0 : name.rfind(".")] + + if log is not None: + log.add_content("Unable to import", name, "trying with", sub) + log.add_exception() + + return _imp(sub, log) + else: + s = "Unable to import module: %s - sys.path: %s" % (str(name), sys.path) + if log is not None: + log.add_content(s) + log.add_exception() + + raise ImportError(s) + + +IS_IPY = False +if sys.platform == "cli": + IS_IPY = True + _old_imp = _imp + + def _imp(name, log=None): + # We must add a reference in clr for .Net + import clr # @UnresolvedImport + + initial_name = name + while "." in name: + try: + clr.AddReference(name) + break # If it worked, that's OK. + except: + name = name[0 : name.rfind(".")] + else: + try: + clr.AddReference(name) + except: + pass # That's OK (not dot net module). + + return _old_imp(initial_name, log) + + +def get_file(mod): + f = None + try: + f = inspect.getsourcefile(mod) or inspect.getfile(mod) + except: + try: + f = getattr(mod, "__file__", None) + except: + f = None + if f and f.lower(f[-4:]) in [".pyc", ".pyo"]: + filename = f[:-4] + ".py" + if os.path.exists(filename): + f = filename + + return f + + +def Find(name, log=None): + f = None + + mod = _imp(name, log) + parent = mod + foundAs = "" + + if inspect.ismodule(mod): + f = get_file(mod) + + components = name.split(".") + + old_comp = None + for comp in components[1:]: + try: + # this happens in the following case: + # we have mx.DateTime.mxDateTime.mxDateTime.pyd + # but after importing it, mx.DateTime.mxDateTime shadows access to mxDateTime.pyd + mod = getattr(mod, comp) + except AttributeError: + if old_comp != comp: + raise + + if inspect.ismodule(mod): + f = get_file(mod) + else: + if len(foundAs) > 0: + foundAs = foundAs + "." + foundAs = foundAs + comp + + old_comp = comp + + return f, mod, parent, foundAs + + +def search_definition(data): + """@return file, line, col""" + + data = data.replace("\n", "") + if data.endswith("."): + data = data.rstrip(".") + f, mod, parent, foundAs = Find(data) + try: + return do_find(f, mod), foundAs + except: + return do_find(f, parent), foundAs + + +def generate_tip(data, log=None): + data = data.replace("\n", "") + if data.endswith("."): + data = data.rstrip(".") + + f, mod, parent, foundAs = Find(data, log) + # print_ >> open('temp.txt', 'w'), f + tips = generate_imports_tip_for_module(mod) + return f, tips + + +def check_char(c): + if c == "-" or c == ".": + return "_" + return c + + +_SENTINEL = object() + + +def generate_imports_tip_for_module(obj_to_complete, dir_comps=None, getattr=getattr, filter=lambda name: True): + """ + @param obj_to_complete: the object from where we should get the completions + @param dir_comps: if passed, we should not 'dir' the object and should just iterate those passed as kwonly_arg parameter + @param getattr: the way to get kwonly_arg given object from the obj_to_complete (used for the completer) + @param filter: kwonly_arg callable that receives the name and decides if it should be appended or not to the results + @return: list of tuples, so that each tuple represents kwonly_arg completion with: + name, doc, args, type (from the TYPE_* constants) + """ + ret = [] + + if dir_comps is None: + dir_comps = dir_checked(obj_to_complete) + if hasattr_checked(obj_to_complete, "__dict__"): + dir_comps.append("__dict__") + if hasattr_checked(obj_to_complete, "__class__"): + dir_comps.append("__class__") + + get_complete_info = True + + if len(dir_comps) > 1000: + # ok, we don't want to let our users wait forever... + # no complete info for you... + + get_complete_info = False + + dontGetDocsOn = (float, int, str, tuple, list, dict) + dontGetattrOn = (dict, list, set, tuple) + for d in dir_comps: + if d is None: + continue + + if not filter(d): + continue + + args = "" + + try: + try: + if isinstance(obj_to_complete, dontGetattrOn): + raise Exception( + 'Since python 3.9, e.g. "dict[str]" will return' + " a dict that's only supposed to take strings. " + 'Interestingly, e.g. dict["val"] is also valid ' + "and presumably represents a dict that only takes " + 'keys that are "val". This breaks our check for ' + "class attributes." + ) + obj = getattr(obj_to_complete.__class__, d) + except: + obj = getattr(obj_to_complete, d) + except: # just ignore and get it without additional info + ret.append((d, "", args, TYPE_BUILTIN)) + else: + if get_complete_info: + try: + retType = TYPE_BUILTIN + + # check if we have to get docs + getDoc = True + for class_ in dontGetDocsOn: + if isinstance(obj, class_): + getDoc = False + break + + doc = "" + if getDoc: + # no need to get this info... too many constants are defined and + # makes things much slower (passing all that through sockets takes quite some time) + try: + doc = inspect.getdoc(obj) + if doc is None: + doc = "" + except: # may happen on jython when checking java classes (so, just ignore it) + doc = "" + + if inspect.ismethod(obj) or inspect.isbuiltin(obj) or inspect.isfunction(obj) or inspect.isroutine(obj): + try: + args, vargs, kwargs, defaults, kwonly_args, kwonly_defaults = getargspec(obj) + + args = args[:] + + for kwonly_arg in kwonly_args: + default = kwonly_defaults.get(kwonly_arg, _SENTINEL) + if default is not _SENTINEL: + args.append("%s=%s" % (kwonly_arg, default)) + else: + args.append(str(kwonly_arg)) + + args = "(%s)" % (", ".join(args)) + except TypeError: + # ok, let's see if we can get the arguments from the doc + args, doc = signature_from_docstring(doc, getattr(obj, "__name__", None)) + + retType = TYPE_FUNCTION + + elif inspect.isclass(obj): + retType = TYPE_CLASS + + elif inspect.ismodule(obj): + retType = TYPE_IMPORT + + else: + retType = TYPE_ATTR + + # add token and doc to return - assure only strings. + ret.append((d, doc, args, retType)) + + except: # just ignore and get it without aditional info + ret.append((d, "", args, TYPE_BUILTIN)) + + else: # get_complete_info == False + if inspect.ismethod(obj) or inspect.isbuiltin(obj) or inspect.isfunction(obj) or inspect.isroutine(obj): + retType = TYPE_FUNCTION + + elif inspect.isclass(obj): + retType = TYPE_CLASS + + elif inspect.ismodule(obj): + retType = TYPE_IMPORT + + else: + retType = TYPE_ATTR + # ok, no complete info, let's try to do this as fast and clean as possible + # so, no docs for this kind of information, only the signatures + ret.append((d, "", str(args), retType)) + + return ret + + +def signature_from_docstring(doc, obj_name): + args = "()" + try: + found = False + if len(doc) > 0: + if IS_IPY: + # Handle case where we have the situation below + # sort(self, object cmp, object key) + # sort(self, object cmp, object key, bool reverse) + # sort(self) + # sort(self, object cmp) + + # Or: sort(self: list, cmp: object, key: object) + # sort(self: list, cmp: object, key: object, reverse: bool) + # sort(self: list) + # sort(self: list, cmp: object) + if obj_name: + name = obj_name + "(" + + # Fix issue where it was appearing sort(aa)sort(bb)sort(cc) in the same line. + lines = doc.splitlines() + if len(lines) == 1: + c = doc.count(name) + if c > 1: + doc = ("\n" + name).join(doc.split(name)) + + major = "" + for line in doc.splitlines(): + if line.startswith(name) and line.endswith(")"): + if len(line) > len(major): + major = line + if major: + args = major[major.index("(") :] + found = True + + if not found: + i = doc.find("->") + if i < 0: + i = doc.find("--") + if i < 0: + i = doc.find("\n") + if i < 0: + i = doc.find("\r") + + if i > 0: + s = doc[0:i] + s = s.strip() + + # let's see if we have a docstring in the first line + if s[-1] == ")": + start = s.find("(") + if start >= 0: + end = s.find("[") + if end <= 0: + end = s.find(")") + if end <= 0: + end = len(s) + + args = s[start:end] + if not args[-1] == ")": + args = args + ")" + + # now, get rid of unwanted chars + l = len(args) - 1 + r = [] + for i in range(len(args)): + if i == 0 or i == l: + r.append(args[i]) + else: + r.append(check_char(args[i])) + + args = "".join(r) + + if IS_IPY: + if args.startswith("(self:"): + i = args.find(",") + if i >= 0: + args = "(self" + args[i:] + else: + args = "(self)" + i = args.find(")") + if i > 0: + args = args[: i + 1] + + except: + pass + return args, doc diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_jy_imports_tipper.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_jy_imports_tipper.py new file mode 100644 index 0000000..d1265de --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_jy_imports_tipper.py @@ -0,0 +1,485 @@ +import traceback +from io import StringIO +from java.lang import StringBuffer # @UnresolvedImport +from java.lang import String # @UnresolvedImport +import java.lang # @UnresolvedImport +import sys +from _pydev_bundle._pydev_tipper_common import do_find + +from org.python.core import PyReflectedFunction # @UnresolvedImport + +from org.python import core # @UnresolvedImport +from org.python.core import PyClass # @UnresolvedImport + +# completion types. +TYPE_IMPORT = "0" +TYPE_CLASS = "1" +TYPE_FUNCTION = "2" +TYPE_ATTR = "3" +TYPE_BUILTIN = "4" +TYPE_PARAM = "5" + + +def _imp(name): + try: + return __import__(name) + except: + if "." in name: + sub = name[0 : name.rfind(".")] + return _imp(sub) + else: + s = "Unable to import module: %s - sys.path: %s" % (str(name), sys.path) + raise RuntimeError(s) + + +import java.util + +_java_rt_file = getattr(java.util, "__file__", None) + + +def Find(name): + f = None + if name.startswith("__builtin__"): + if name == "__builtin__.str": + name = "org.python.core.PyString" + elif name == "__builtin__.dict": + name = "org.python.core.PyDictionary" + + mod = _imp(name) + parent = mod + foundAs = "" + + try: + f = getattr(mod, "__file__", None) + except: + f = None + + components = name.split(".") + old_comp = None + for comp in components[1:]: + try: + # this happens in the following case: + # we have mx.DateTime.mxDateTime.mxDateTime.pyd + # but after importing it, mx.DateTime.mxDateTime does shadows access to mxDateTime.pyd + mod = getattr(mod, comp) + except AttributeError: + if old_comp != comp: + raise + + if hasattr(mod, "__file__"): + f = mod.__file__ + else: + if len(foundAs) > 0: + foundAs = foundAs + "." + foundAs = foundAs + comp + + old_comp = comp + + if f is None and name.startswith("java.lang"): + # Hack: java.lang.__file__ is None on Jython 2.7 (whereas it pointed to rt.jar on Jython 2.5). + f = _java_rt_file + + if f is not None: + if f.endswith(".pyc"): + f = f[:-1] + elif f.endswith("$py.class"): + f = f[: -len("$py.class")] + ".py" + return f, mod, parent, foundAs + + +def format_param_class_name(paramClassName): + if paramClassName.startswith(""): + paramClassName = paramClassName[len(" + paramClassName = paramClassName.split("'")[1] + except: + paramClassName = repr(paramTypesClass) # just in case something else happens... it will at least be visible + # if the parameter equals [C, it means it it a char array, so, let's change it + + a = format_param_class_name(paramClassName) + # a = a.replace('[]','Array') + # a = a.replace('Object', 'obj') + # a = a.replace('String', 's') + # a = a.replace('Integer', 'i') + # a = a.replace('Char', 'c') + # a = a.replace('Double', 'd') + args.append(a) # so we don't leave invalid code + + info = Info(name, args=args, ret=ret) + # print_ info.basic_as_str() + infos.append(info) + + return 1, infos + except Exception: + s = StringIO() + traceback.print_exc(file=s) + return 1, [Info(str("ERROR"), doc=s.getvalue())] + + return 0, None + + +def ismodule(mod): + # java modules... do we have other way to know that? + if not hasattr(mod, "getClass") and not hasattr(mod, "__class__") and hasattr(mod, "__name__"): + return 1 + + return isinstance(mod, core.PyModule) + + +def dir_obj(obj): + ret = [] + found = java.util.HashMap() + original = obj + if hasattr(obj, "__class__"): + if obj.__class__ == java.lang.Class: + # get info about superclasses + classes = [] + classes.append(obj) + try: + c = obj.getSuperclass() + except TypeError: + # may happen on jython when getting the java.lang.Class class + c = obj.getSuperclass(obj) + + while c != None: + classes.append(c) + c = c.getSuperclass() + + # get info about interfaces + interfs = [] + for obj in classes: + try: + interfs.extend(obj.getInterfaces()) + except TypeError: + interfs.extend(obj.getInterfaces(obj)) + classes.extend(interfs) + + # now is the time when we actually get info on the declared methods and fields + for obj in classes: + try: + declaredMethods = obj.getDeclaredMethods() + except TypeError: + declaredMethods = obj.getDeclaredMethods(obj) + + try: + declaredFields = obj.getDeclaredFields() + except TypeError: + declaredFields = obj.getDeclaredFields(obj) + + for i in range(len(declaredMethods)): + name = declaredMethods[i].getName() + ret.append(name) + found.put(name, 1) + + for i in range(len(declaredFields)): + name = declaredFields[i].getName() + ret.append(name) + found.put(name, 1) + + elif isclass(obj.__class__): + d = dir(obj.__class__) + for name in d: + ret.append(name) + found.put(name, 1) + + # this simple dir does not always get all the info, that's why we have the part before + # (e.g.: if we do a dir on String, some methods that are from other interfaces such as + # charAt don't appear) + d = dir(original) + for name in d: + if found.get(name) != 1: + ret.append(name) + + return ret + + +def format_arg(arg): + """formats an argument to be shown""" + + s = str(arg) + dot = s.rfind(".") + if dot >= 0: + s = s[dot + 1 :] + + s = s.replace(";", "") + s = s.replace("[]", "Array") + if len(s) > 0: + c = s[0].lower() + s = c + s[1:] + + return s + + +def search_definition(data): + """@return file, line, col""" + + data = data.replace("\n", "") + if data.endswith("."): + data = data.rstrip(".") + f, mod, parent, foundAs = Find(data) + try: + return do_find(f, mod), foundAs + except: + return do_find(f, parent), foundAs + + +def generate_imports_tip_for_module(obj_to_complete, dir_comps=None, getattr=getattr, filter=lambda name: True): + """ + @param obj_to_complete: the object from where we should get the completions + @param dir_comps: if passed, we should not 'dir' the object and should just iterate those passed as a parameter + @param getattr: the way to get a given object from the obj_to_complete (used for the completer) + @param filter: a callable that receives the name and decides if it should be appended or not to the results + @return: list of tuples, so that each tuple represents a completion with: + name, doc, args, type (from the TYPE_* constants) + """ + ret = [] + + if dir_comps is None: + dir_comps = dir_obj(obj_to_complete) + + for d in dir_comps: + if d is None: + continue + + if not filter(d): + continue + + args = "" + doc = "" + retType = TYPE_BUILTIN + + try: + obj = getattr(obj_to_complete, d) + except (AttributeError, java.lang.NoClassDefFoundError): + # jython has a bug in its custom classloader that prevents some things from working correctly, so, let's see if + # we can fix that... (maybe fixing it in jython itself would be a better idea, as this is clearly a bug) + # for that we need a custom classloader... we have references from it in the below places: + # + # http://mindprod.com/jgloss/classloader.html + # http://www.javaworld.com/javaworld/jw-03-2000/jw-03-classload-p2.html + # http://freshmeat.net/articles/view/1643/ + # + # note: this only happens when we add things to the sys.path at runtime, if they are added to the classpath + # before the run, everything goes fine. + # + # The code below ilustrates what I mean... + # + # import sys + # sys.path.insert(1, r"C:\bin\eclipse310\plugins\org.junit_3.8.1\junit.jar" ) + # + # import junit.framework + # print_ dir(junit.framework) #shows the TestCase class here + # + # import junit.framework.TestCase + # + # raises the error: + # Traceback (innermost last): + # File "", line 1, in ? + # ImportError: No module named TestCase + # + # whereas if we had added the jar to the classpath before, everything would be fine by now... + + ret.append((d, "", "", retType)) + # that's ok, private things cannot be gotten... + continue + else: + isMet = ismethod(obj) + if isMet[0] and isMet[1]: + info = isMet[1][0] + try: + args, vargs, kwargs = info.args, info.varargs, info.kwargs + doc = info.get_as_doc() + r = "" + for a in args: + if len(r) > 0: + r += ", " + r += format_arg(a) + args = "(%s)" % (r) + except TypeError: + traceback.print_exc() + args = "()" + + retType = TYPE_FUNCTION + + elif isclass(obj): + retType = TYPE_CLASS + + elif ismodule(obj): + retType = TYPE_IMPORT + + # add token and doc to return - assure only strings. + ret.append((d, doc, args, retType)) + + return ret + + +if __name__ == "__main__": + sys.path.append(r"D:\dev_programs\eclipse_3\310\eclipse\plugins\org.junit_3.8.1\junit.jar") + sys.stdout.write("%s\n" % Find("junit.framework.TestCase")) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_log.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_log.py new file mode 100644 index 0000000..5c9580f --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_log.py @@ -0,0 +1,23 @@ +import traceback +import sys +from io import StringIO + + +class Log: + def __init__(self): + self._contents = [] + + def add_content(self, *content): + self._contents.append(" ".join(content)) + + def add_exception(self): + s = StringIO() + exc_info = sys.exc_info() + traceback.print_exception(exc_info[0], exc_info[1], exc_info[2], limit=None, file=s) + self._contents.append(s.getvalue()) + + def get_contents(self): + return "\n".join(self._contents) + + def clear_log(self): + del self._contents[:] diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_saved_modules.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_saved_modules.py new file mode 100644 index 0000000..f1ba037 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_saved_modules.py @@ -0,0 +1,134 @@ +import sys +import os + + +def find_in_pythonpath(module_name): + # Check all the occurrences where we could match the given module/package in the PYTHONPATH. + # + # This is a simplistic approach, but probably covers most of the cases we're interested in + # (i.e.: this may fail in more elaborate cases of import customization or .zip imports, but + # this should be rare in general). + found_at = [] + + parts = module_name.split(".") # split because we need to convert mod.name to mod/name + for path in sys.path: + target = os.path.join(path, *parts) + target_py = target + ".py" + if os.path.isdir(target): + found_at.append(target) + if os.path.exists(target_py): + found_at.append(target_py) + return found_at + + +class DebuggerInitializationError(Exception): + pass + + +class VerifyShadowedImport(object): + def __init__(self, import_name): + self.import_name = import_name + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + if exc_type is not None: + if exc_type == DebuggerInitializationError: + return False # It's already an error we generated. + + # We couldn't even import it... + found_at = find_in_pythonpath(self.import_name) + + if len(found_at) <= 1: + # It wasn't found anywhere or there was just 1 occurrence. + # Let's just return to show the original error. + return False + + # We found more than 1 occurrence of the same module in the PYTHONPATH + # (the user module and the standard library module). + # Let's notify the user as it seems that the module was shadowed. + msg = self._generate_shadowed_import_message(found_at) + raise DebuggerInitializationError(msg) + + def _generate_shadowed_import_message(self, found_at): + msg = """It was not possible to initialize the debugger due to a module name conflict. + +i.e.: the module "%(import_name)s" could not be imported because it is shadowed by: +%(found_at)s +Please rename this file/folder so that the original module from the standard library can be imported.""" % { + "import_name": self.import_name, + "found_at": found_at[0], + } + + return msg + + def check(self, module, expected_attributes): + msg = "" + for expected_attribute in expected_attributes: + try: + getattr(module, expected_attribute) + except: + msg = self._generate_shadowed_import_message([module.__file__]) + break + + if msg: + raise DebuggerInitializationError(msg) + + +with VerifyShadowedImport("threading") as verify_shadowed: + import threading + + verify_shadowed.check(threading, ["Thread", "settrace", "setprofile", "Lock", "RLock", "current_thread"]) + ThreadingEvent = threading.Event + ThreadingLock = threading.Lock + threading_current_thread = threading.current_thread + +with VerifyShadowedImport("time") as verify_shadowed: + import time + + verify_shadowed.check(time, ["sleep", "time", "mktime"]) + +with VerifyShadowedImport("socket") as verify_shadowed: + import socket + + verify_shadowed.check(socket, ["socket", "gethostname", "getaddrinfo"]) + +with VerifyShadowedImport("select") as verify_shadowed: + import select + + verify_shadowed.check(select, ["select"]) + +with VerifyShadowedImport("code") as verify_shadowed: + import code as _code + + verify_shadowed.check(_code, ["compile_command", "InteractiveInterpreter"]) + +with VerifyShadowedImport("_thread") as verify_shadowed: + import _thread as thread + + verify_shadowed.check(thread, ["start_new_thread", "start_new", "allocate_lock"]) + +with VerifyShadowedImport("queue") as verify_shadowed: + import queue as _queue + + verify_shadowed.check(_queue, ["Queue", "LifoQueue", "Empty", "Full", "deque"]) + +with VerifyShadowedImport("xmlrpclib") as verify_shadowed: + import xmlrpc.client as xmlrpclib + + verify_shadowed.check(xmlrpclib, ["ServerProxy", "Marshaller", "Server"]) + +with VerifyShadowedImport("xmlrpc.server") as verify_shadowed: + import xmlrpc.server as xmlrpcserver + + verify_shadowed.check(xmlrpcserver, ["SimpleXMLRPCServer"]) + +with VerifyShadowedImport("http.server") as verify_shadowed: + import http.server as BaseHTTPServer + + verify_shadowed.check(BaseHTTPServer, ["BaseHTTPRequestHandler"]) + +# If set, this is a version of the threading.enumerate that doesn't have the patching to remove the pydevd threads. +# Note: as it can't be set during execution, don't import the name (import the module and access it through its name). +pydevd_saved_threading_enumerate = None diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_sys_patch.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_sys_patch.py new file mode 100644 index 0000000..23e7d4f --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_sys_patch.py @@ -0,0 +1,77 @@ +import sys + + +def patch_sys_module(): + def patched_exc_info(fun): + def pydev_debugger_exc_info(): + type, value, traceback = fun() + if type == ImportError: + # we should not show frame added by plugin_import call + if traceback and hasattr(traceback, "tb_next"): + return type, value, traceback.tb_next + return type, value, traceback + + return pydev_debugger_exc_info + + system_exc_info = sys.exc_info + sys.exc_info = patched_exc_info(system_exc_info) + if not hasattr(sys, "system_exc_info"): + sys.system_exc_info = system_exc_info + + +def patched_reload(orig_reload): + def pydev_debugger_reload(module): + orig_reload(module) + if module.__name__ == "sys": + # if sys module was reloaded we should patch it again + patch_sys_module() + + return pydev_debugger_reload + + +def patch_reload(): + import builtins # Py3 + + if hasattr(builtins, "reload"): + sys.builtin_orig_reload = builtins.reload + builtins.reload = patched_reload(sys.builtin_orig_reload) # @UndefinedVariable + try: + import imp + + sys.imp_orig_reload = imp.reload + imp.reload = patched_reload(sys.imp_orig_reload) # @UndefinedVariable + except ImportError: + pass # Ok, imp not available on Python 3.12. + else: + try: + import importlib + + sys.importlib_orig_reload = importlib.reload # @UndefinedVariable + importlib.reload = patched_reload(sys.importlib_orig_reload) # @UndefinedVariable + except: + pass + + del builtins + + +def cancel_patches_in_sys_module(): + sys.exc_info = sys.system_exc_info # @UndefinedVariable + import builtins # Py3 + + if hasattr(sys, "builtin_orig_reload"): + builtins.reload = sys.builtin_orig_reload + + if hasattr(sys, "imp_orig_reload"): + try: + import imp + + imp.reload = sys.imp_orig_reload + except ImportError: + pass # Ok, imp not available in Python 3.12. + + if hasattr(sys, "importlib_orig_reload"): + import importlib + + importlib.reload = sys.importlib_orig_reload + + del builtins diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_tipper_common.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_tipper_common.py new file mode 100644 index 0000000..25c0f6f --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_tipper_common.py @@ -0,0 +1,53 @@ +import inspect +import re + + +def do_find(f, mod): + import linecache + + if inspect.ismodule(mod): + return f, 0, 0 + + lines = linecache.getlines(f) + + if inspect.isclass(mod): + name = mod.__name__ + pat = re.compile(r"^\s*class\s*" + name + r"\b") + for i in range(len(lines)): + if pat.match(lines[i]): + return f, i, 0 + + return f, 0, 0 + + if inspect.ismethod(mod): + mod = mod.im_func + + if inspect.isfunction(mod): + try: + mod = mod.func_code + except AttributeError: + mod = mod.__code__ # python 3k + + if inspect.istraceback(mod): + mod = mod.tb_frame + + if inspect.isframe(mod): + mod = mod.f_code + + if inspect.iscode(mod): + if not hasattr(mod, "co_filename"): + return None, 0, 0 + + if not hasattr(mod, "co_firstlineno"): + return mod.co_filename, 0, 0 + + lnum = mod.co_firstlineno + pat = re.compile(r"^(\s*def\s)|(.*(? 0: + if pat.match(lines[lnum]): + break + lnum -= 1 + + return f, lnum, 0 + + raise RuntimeError("Do not know about: " + f + " " + str(mod)) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__init__.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__init__.py new file mode 100644 index 0000000..c661b40 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__init__.py @@ -0,0 +1,349 @@ +""" +Sample usage to track changes in a thread. + + import threading + import time + watcher = fsnotify.Watcher() + watcher.accepted_file_extensions = {'.py', '.pyw'} + + # Configure target values to compute throttling. + # Note: internal sleep times will be updated based on + # profiling the actual application runtime to match + # those values. + + watcher.target_time_for_single_scan = 2. + watcher.target_time_for_notification = 4. + + watcher.set_tracked_paths([target_dir]) + + def start_watching(): # Called from thread + for change_enum, change_path in watcher.iter_changes(): + if change_enum == fsnotify.Change.added: + print('Added: ', change_path) + elif change_enum == fsnotify.Change.modified: + print('Modified: ', change_path) + elif change_enum == fsnotify.Change.deleted: + print('Deleted: ', change_path) + + t = threading.Thread(target=start_watching) + t.daemon = True + t.start() + + try: + ... + finally: + watcher.dispose() + + +Note: changes are only reported for files (added/modified/deleted), not directories. +""" +import sys +from os.path import basename +from _pydev_bundle import pydev_log, _pydev_saved_modules +from os import scandir + +try: + from enum import IntEnum +except: + + class IntEnum(object): + pass + + +import time + +__author__ = "Fabio Zadrozny" +__email__ = "fabiofz@gmail.com" +__version__ = "0.1.5" # Version here and in setup.py + + +class Change(IntEnum): + added = 1 + modified = 2 + deleted = 3 + + +class _SingleVisitInfo(object): + def __init__(self): + self.count = 0 + self.visited_dirs = set() + self.file_to_mtime = {} + self.last_sleep_time = time.time() + + +class _PathWatcher(object): + """ + Helper to watch a single path. + """ + + def __init__(self, root_path, accept_directory, accept_file, single_visit_info, max_recursion_level, sleep_time=0.0): + """ + :type root_path: str + :type accept_directory: Callback[str, bool] + :type accept_file: Callback[str, bool] + :type max_recursion_level: int + :type sleep_time: float + """ + self.accept_directory = accept_directory + self.accept_file = accept_file + self._max_recursion_level = max_recursion_level + + self._root_path = root_path + + # Initial sleep value for throttling, it'll be auto-updated based on the + # Watcher.target_time_for_single_scan. + self.sleep_time = sleep_time + + self.sleep_at_elapsed = 1.0 / 30.0 + + # When created, do the initial snapshot right away! + old_file_to_mtime = {} + self._check(single_visit_info, lambda _change: None, old_file_to_mtime) + + def __eq__(self, o): + if isinstance(o, _PathWatcher): + return self._root_path == o._root_path + + return False + + def __ne__(self, o): + return not self == o + + def __hash__(self): + return hash(self._root_path) + + def _check_dir(self, dir_path, single_visit_info, append_change, old_file_to_mtime, level): + # This is the actual poll loop + if dir_path in single_visit_info.visited_dirs or level > self._max_recursion_level: + return + single_visit_info.visited_dirs.add(dir_path) + try: + if isinstance(dir_path, bytes): + try: + dir_path = dir_path.decode(sys.getfilesystemencoding()) + except UnicodeDecodeError: + try: + dir_path = dir_path.decode("utf-8") + except UnicodeDecodeError: + return # Ignore if we can't deal with the path. + + new_files = single_visit_info.file_to_mtime + + for entry in scandir(dir_path): + single_visit_info.count += 1 + + # Throttle if needed inside the loop + # to avoid consuming too much CPU. + if single_visit_info.count % 300 == 0: + if self.sleep_time > 0: + t = time.time() + diff = t - single_visit_info.last_sleep_time + if diff > self.sleep_at_elapsed: + time.sleep(self.sleep_time) + single_visit_info.last_sleep_time = time.time() + + if entry.is_dir(): + if self.accept_directory(entry.path): + self._check_dir(entry.path, single_visit_info, append_change, old_file_to_mtime, level + 1) + + elif self.accept_file(entry.path): + stat = entry.stat() + mtime = (stat.st_mtime_ns, stat.st_size) + path = entry.path + new_files[path] = mtime + + old_mtime = old_file_to_mtime.pop(path, None) + if not old_mtime: + append_change((Change.added, path)) + elif old_mtime != mtime: + append_change((Change.modified, path)) + + except OSError: + pass # Directory was removed in the meanwhile. + + def _check(self, single_visit_info, append_change, old_file_to_mtime): + self._check_dir(self._root_path, single_visit_info, append_change, old_file_to_mtime, 0) + + +class Watcher(object): + # By default (if accept_directory is not specified), these will be the + # ignored directories. + ignored_dirs = {".git", "__pycache__", ".idea", "node_modules", ".metadata"} + + # By default (if accept_file is not specified), these will be the + # accepted files. + accepted_file_extensions = () + + # Set to the target value for doing full scan of all files (adds a sleep inside the poll loop + # which processes files to reach the target time). + # Lower values will consume more CPU + # Set to 0.0 to have no sleeps (which will result in a higher cpu load). + target_time_for_single_scan = 2.0 + + # Set the target value from the start of one scan to the start of another scan (adds a + # sleep after a full poll is done to reach the target time). + # Lower values will consume more CPU. + # Set to 0.0 to have a new scan start right away without any sleeps. + target_time_for_notification = 4.0 + + # Set to True to print the time for a single poll through all the paths. + print_poll_time = False + + # This is the maximum recursion level. + max_recursion_level = 10 + + def __init__(self, accept_directory=None, accept_file=None): + """ + :param Callable[str, bool] accept_directory: + Callable that returns whether a directory should be watched. + Note: if passed it'll override the `ignored_dirs` + + :param Callable[str, bool] accept_file: + Callable that returns whether a file should be watched. + Note: if passed it'll override the `accepted_file_extensions`. + """ + self._path_watchers = set() + self._disposed = _pydev_saved_modules.ThreadingEvent() + + if accept_directory is None: + accept_directory = lambda dir_path: basename(dir_path) not in self.ignored_dirs + if accept_file is None: + accept_file = lambda path_name: not self.accepted_file_extensions or path_name.endswith(self.accepted_file_extensions) + self.accept_file = accept_file + self.accept_directory = accept_directory + self._single_visit_info = _SingleVisitInfo() + + @property + def accept_directory(self): + return self._accept_directory + + @accept_directory.setter + def accept_directory(self, accept_directory): + self._accept_directory = accept_directory + for path_watcher in self._path_watchers: + path_watcher.accept_directory = accept_directory + + @property + def accept_file(self): + return self._accept_file + + @accept_file.setter + def accept_file(self, accept_file): + self._accept_file = accept_file + for path_watcher in self._path_watchers: + path_watcher.accept_file = accept_file + + def dispose(self): + self._disposed.set() + + @property + def path_watchers(self): + return tuple(self._path_watchers) + + def set_tracked_paths(self, paths): + """ + Note: always resets all path trackers to track the passed paths. + """ + if not isinstance(paths, (list, tuple, set)): + paths = (paths,) + + # Sort by the path len so that the bigger paths come first (so, + # if there's any nesting we want the nested paths to be visited + # before the parent paths so that the max_recursion_level is correct). + paths = sorted(set(paths), key=lambda path: -len(path)) + path_watchers = set() + + self._single_visit_info = _SingleVisitInfo() + + initial_time = time.time() + for path in paths: + sleep_time = 0.0 # When collecting the first time, sleep_time should be 0! + path_watcher = _PathWatcher( + path, + self.accept_directory, + self.accept_file, + self._single_visit_info, + max_recursion_level=self.max_recursion_level, + sleep_time=sleep_time, + ) + + path_watchers.add(path_watcher) + + actual_time = time.time() - initial_time + + pydev_log.debug("Tracking the following paths for changes: %s", paths) + pydev_log.debug("Time to track: %.2fs", actual_time) + pydev_log.debug("Folders found: %s", len(self._single_visit_info.visited_dirs)) + pydev_log.debug("Files found: %s", len(self._single_visit_info.file_to_mtime)) + self._path_watchers = path_watchers + + def iter_changes(self): + """ + Continuously provides changes (until dispose() is called). + + Changes provided are tuples with the Change enum and filesystem path. + + :rtype: Iterable[Tuple[Change, str]] + """ + while not self._disposed.is_set(): + initial_time = time.time() + + old_visit_info = self._single_visit_info + old_file_to_mtime = old_visit_info.file_to_mtime + changes = [] + append_change = changes.append + + self._single_visit_info = single_visit_info = _SingleVisitInfo() + for path_watcher in self._path_watchers: + path_watcher._check(single_visit_info, append_change, old_file_to_mtime) + + # Note that we pop entries while visiting, so, what remained is what's deleted. + for entry in old_file_to_mtime: + append_change((Change.deleted, entry)) + + for change in changes: + yield change + + actual_time = time.time() - initial_time + if self.print_poll_time: + print("--- Total poll time: %.3fs" % actual_time) + + if actual_time > 0: + if self.target_time_for_single_scan <= 0.0: + for path_watcher in self._path_watchers: + path_watcher.sleep_time = 0.0 + else: + perc = self.target_time_for_single_scan / actual_time + + # Prevent from changing the values too much (go slowly into the right + # direction). + # (to prevent from cases where the user puts the machine on sleep and + # values become too skewed). + if perc > 2.0: + perc = 2.0 + elif perc < 0.5: + perc = 0.5 + + for path_watcher in self._path_watchers: + if path_watcher.sleep_time <= 0.0: + path_watcher.sleep_time = 0.001 + new_sleep_time = path_watcher.sleep_time * perc + + # Prevent from changing the values too much (go slowly into the right + # direction). + # (to prevent from cases where the user puts the machine on sleep and + # values become too skewed). + diff_sleep_time = new_sleep_time - path_watcher.sleep_time + path_watcher.sleep_time += diff_sleep_time / (3.0 * len(self._path_watchers)) + + if actual_time > 0: + self._disposed.wait(actual_time) + + if path_watcher.sleep_time < 0.001: + path_watcher.sleep_time = 0.001 + + # print('new sleep time: %s' % path_watcher.sleep_time) + + diff = self.target_time_for_notification - actual_time + if diff > 0.0: + self._disposed.wait(diff) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..2d43aee Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py new file mode 100644 index 0000000..780ff5e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py @@ -0,0 +1,641 @@ +import os +import sys +import traceback +from _pydev_bundle.pydev_imports import xmlrpclib, _queue, Exec +from _pydev_bundle._pydev_calltip_util import get_description +from _pydevd_bundle import pydevd_vars +from _pydevd_bundle import pydevd_xml +from _pydevd_bundle.pydevd_constants import IS_JYTHON, NEXT_VALUE_SEPARATOR, get_global_debugger, silence_warnings_decorator +from contextlib import contextmanager +from _pydev_bundle import pydev_log +from _pydevd_bundle.pydevd_utils import interrupt_main_thread + +from io import StringIO + + +# ======================================================================================================================= +# BaseStdIn +# ======================================================================================================================= +class BaseStdIn: + def __init__(self, original_stdin=sys.stdin, *args, **kwargs): + try: + self.encoding = sys.stdin.encoding + except: + # Not sure if it's available in all Python versions... + pass + self.original_stdin = original_stdin + + try: + self.errors = sys.stdin.errors # Who knew? sys streams have an errors attribute! + except: + # Not sure if it's available in all Python versions... + pass + + def readline(self, *args, **kwargs): + # sys.stderr.write('Cannot readline out of the console evaluation\n') -- don't show anything + # This could happen if the user had done input('enter number).<-- upon entering this, that message would appear, + # which is not something we want. + return "\n" + + def write(self, *args, **kwargs): + pass # not available StdIn (but it can be expected to be in the stream interface) + + def flush(self, *args, **kwargs): + pass # not available StdIn (but it can be expected to be in the stream interface) + + def read(self, *args, **kwargs): + # in the interactive interpreter, a read and a readline are the same. + return self.readline() + + def close(self, *args, **kwargs): + pass # expected in StdIn + + def __iter__(self): + # BaseStdIn would not be considered as Iterable in Python 3 without explicit `__iter__` implementation + return self.original_stdin.__iter__() + + def __getattr__(self, item): + # it's called if the attribute wasn't found + if hasattr(self.original_stdin, item): + return getattr(self.original_stdin, item) + raise AttributeError("%s has no attribute %s" % (self.original_stdin, item)) + + +# ======================================================================================================================= +# StdIn +# ======================================================================================================================= +class StdIn(BaseStdIn): + """ + Object to be added to stdin (to emulate it as non-blocking while the next line arrives) + """ + + def __init__(self, interpreter, host, client_port, original_stdin=sys.stdin): + BaseStdIn.__init__(self, original_stdin) + self.interpreter = interpreter + self.client_port = client_port + self.host = host + + def readline(self, *args, **kwargs): + # Ok, callback into the client to get the new input + try: + server = xmlrpclib.Server("http://%s:%s" % (self.host, self.client_port)) + requested_input = server.RequestInput() + if not requested_input: + return "\n" # Yes, a readline must return something (otherwise we can get an EOFError on the input() call). + else: + # readline should end with '\n' (not doing so makes IPython 5 remove the last *valid* character). + requested_input += "\n" + return requested_input + except KeyboardInterrupt: + raise # Let KeyboardInterrupt go through -- #PyDev-816: Interrupting infinite loop in the Interactive Console + except: + return "\n" + + def close(self, *args, **kwargs): + pass # expected in StdIn + + +# ======================================================================================================================= +# DebugConsoleStdIn +# ======================================================================================================================= +class DebugConsoleStdIn(BaseStdIn): + """ + Object to be added to stdin (to emulate it as non-blocking while the next line arrives) + """ + + def __init__(self, py_db, original_stdin): + """ + :param py_db: + If None, get_global_debugger() is used. + """ + BaseStdIn.__init__(self, original_stdin) + self._py_db = py_db + self._in_notification = 0 + + def __send_input_requested_message(self, is_started): + try: + py_db = self._py_db + if py_db is None: + py_db = get_global_debugger() + + if py_db is None: + return + + cmd = py_db.cmd_factory.make_input_requested_message(is_started) + py_db.writer.add_command(cmd) + except Exception: + pydev_log.exception() + + @contextmanager + def notify_input_requested(self): + self._in_notification += 1 + if self._in_notification == 1: + self.__send_input_requested_message(True) + try: + yield + finally: + self._in_notification -= 1 + if self._in_notification == 0: + self.__send_input_requested_message(False) + + def readline(self, *args, **kwargs): + with self.notify_input_requested(): + return self.original_stdin.readline(*args, **kwargs) + + def read(self, *args, **kwargs): + with self.notify_input_requested(): + return self.original_stdin.read(*args, **kwargs) + + +class CodeFragment: + def __init__(self, text, is_single_line=True): + self.text = text + self.is_single_line = is_single_line + + def append(self, code_fragment): + self.text = self.text + "\n" + code_fragment.text + if not code_fragment.is_single_line: + self.is_single_line = False + + +# ======================================================================================================================= +# BaseInterpreterInterface +# ======================================================================================================================= +class BaseInterpreterInterface: + def __init__(self, mainThread, connect_status_queue=None): + self.mainThread = mainThread + self.interruptable = False + self.exec_queue = _queue.Queue(0) + self.buffer = None + self.banner_shown = False + self.connect_status_queue = connect_status_queue + self.mpl_modules_for_patching = {} + self.init_mpl_modules_for_patching() + + def build_banner(self): + return "print({0})\n".format(repr(self.get_greeting_msg())) + + def get_greeting_msg(self): + return "PyDev console: starting.\n" + + def init_mpl_modules_for_patching(self): + from pydev_ipython.matplotlibtools import activate_matplotlib, activate_pylab, activate_pyplot + + self.mpl_modules_for_patching = { + "matplotlib": lambda: activate_matplotlib(self.enableGui), + "matplotlib.pyplot": activate_pyplot, + "pylab": activate_pylab, + } + + def need_more_for_code(self, source): + # PyDev-502: PyDev 3.9 F2 doesn't support backslash continuations + + # Strangely even the IPython console is_complete said it was complete + # even with a continuation char at the end. + if source.endswith("\\"): + return True + + if hasattr(self.interpreter, "is_complete"): + return not self.interpreter.is_complete(source) + try: + # At this point, it should always be single. + # If we don't do this, things as: + # + # for i in range(10): print(i) + # + # (in a single line) don't work. + # Note that it won't give an error and code will be None (so, it'll + # use execMultipleLines in the next call in this case). + symbol = "single" + code = self.interpreter.compile(source, "", symbol) + except (OverflowError, SyntaxError, ValueError): + # Case 1 + return False + if code is None: + # Case 2 + return True + + # Case 3 + return False + + def need_more(self, code_fragment): + if self.buffer is None: + self.buffer = code_fragment + else: + self.buffer.append(code_fragment) + + return self.need_more_for_code(self.buffer.text) + + def create_std_in(self, debugger=None, original_std_in=None): + if debugger is None: + return StdIn(self, self.host, self.client_port, original_stdin=original_std_in) + else: + return DebugConsoleStdIn(py_db=debugger, original_stdin=original_std_in) + + def add_exec(self, code_fragment, debugger=None): + # In case sys.excepthook called, use original excepthook #PyDev-877: Debug console freezes with Python 3.5+ + # (showtraceback does it on python 3.5 onwards) + sys.excepthook = sys.__excepthook__ + try: + original_in = sys.stdin + try: + help = None + if "pydoc" in sys.modules: + pydoc = sys.modules["pydoc"] # Don't import it if it still is not there. + + if hasattr(pydoc, "help"): + # You never know how will the API be changed, so, let's code defensively here + help = pydoc.help + if not hasattr(help, "input"): + help = None + except: + # Just ignore any error here + pass + + more = False + try: + sys.stdin = self.create_std_in(debugger, original_in) + try: + if help is not None: + # This will enable the help() function to work. + try: + try: + help.input = sys.stdin + except AttributeError: + help._input = sys.stdin + except: + help = None + if not self._input_error_printed: + self._input_error_printed = True + sys.stderr.write("\nError when trying to update pydoc.help.input\n") + sys.stderr.write("(help() may not work -- please report this as a bug in the pydev bugtracker).\n\n") + traceback.print_exc() + + try: + self.start_exec() + if hasattr(self, "debugger"): + self.debugger.enable_tracing() + + more = self.do_add_exec(code_fragment) + + if hasattr(self, "debugger"): + self.debugger.disable_tracing() + + self.finish_exec(more) + finally: + if help is not None: + try: + try: + help.input = original_in + except AttributeError: + help._input = original_in + except: + pass + + finally: + sys.stdin = original_in + except SystemExit: + raise + except: + traceback.print_exc() + finally: + sys.__excepthook__ = sys.excepthook + + return more + + def do_add_exec(self, codeFragment): + """ + Subclasses should override. + + @return: more (True if more input is needed to complete the statement and False if the statement is complete). + """ + raise NotImplementedError() + + def get_namespace(self): + """ + Subclasses should override. + + @return: dict with namespace. + """ + raise NotImplementedError() + + def __resolve_reference__(self, text): + """ + + :type text: str + """ + obj = None + if "." not in text: + try: + obj = self.get_namespace()[text] + except KeyError: + pass + + if obj is None: + try: + obj = self.get_namespace()["__builtins__"][text] + except: + pass + + if obj is None: + try: + obj = getattr(self.get_namespace()["__builtins__"], text, None) + except: + pass + + else: + try: + last_dot = text.rindex(".") + parent_context = text[0:last_dot] + res = pydevd_vars.eval_in_context(parent_context, self.get_namespace(), self.get_namespace()) + obj = getattr(res, text[last_dot + 1 :]) + except: + pass + return obj + + def getDescription(self, text): + try: + obj = self.__resolve_reference__(text) + if obj is None: + return "" + return get_description(obj) + except: + return "" + + def do_exec_code(self, code, is_single_line): + try: + code_fragment = CodeFragment(code, is_single_line) + more = self.need_more(code_fragment) + if not more: + code_fragment = self.buffer + self.buffer = None + self.exec_queue.put(code_fragment) + + return more + except: + traceback.print_exc() + return False + + def execLine(self, line): + return self.do_exec_code(line, True) + + def execMultipleLines(self, lines): + if IS_JYTHON: + more = False + for line in lines.split("\n"): + more = self.do_exec_code(line, True) + return more + else: + return self.do_exec_code(lines, False) + + def interrupt(self): + self.buffer = None # Also clear the buffer when it's interrupted. + try: + if self.interruptable: + # Fix for #PyDev-500: Console interrupt can't interrupt on sleep + interrupt_main_thread(self.mainThread) + + self.finish_exec(False) + return True + except: + traceback.print_exc() + return False + + def close(self): + sys.exit(0) + + def start_exec(self): + self.interruptable = True + + def get_server(self): + if getattr(self, "host", None) is not None: + return xmlrpclib.Server("http://%s:%s" % (self.host, self.client_port)) + else: + return None + + server = property(get_server) + + def ShowConsole(self): + server = self.get_server() + if server is not None: + server.ShowConsole() + + def finish_exec(self, more): + self.interruptable = False + + server = self.get_server() + + if server is not None: + return server.NotifyFinished(more) + else: + return True + + def getFrame(self): + xml = StringIO() + hidden_ns = self.get_ipython_hidden_vars_dict() + xml.write("") + xml.write(pydevd_xml.frame_vars_to_xml(self.get_namespace(), hidden_ns)) + xml.write("") + + return xml.getvalue() + + @silence_warnings_decorator + def getVariable(self, attributes): + xml = StringIO() + xml.write("") + val_dict = pydevd_vars.resolve_compound_var_object_fields(self.get_namespace(), attributes) + if val_dict is None: + val_dict = {} + + for k, val in val_dict.items(): + val = val_dict[k] + evaluate_full_value = pydevd_xml.should_evaluate_full_value(val) + xml.write(pydevd_vars.var_to_xml(val, k, evaluate_full_value=evaluate_full_value)) + + xml.write("") + + return xml.getvalue() + + def getArray(self, attr, roffset, coffset, rows, cols, format): + name = attr.split("\t")[-1] + array = pydevd_vars.eval_in_context(name, self.get_namespace(), self.get_namespace()) + return pydevd_vars.table_like_struct_to_xml(array, name, roffset, coffset, rows, cols, format) + + def evaluate(self, expression): + xml = StringIO() + xml.write("") + result = pydevd_vars.eval_in_context(expression, self.get_namespace(), self.get_namespace()) + xml.write(pydevd_vars.var_to_xml(result, expression)) + xml.write("") + return xml.getvalue() + + @silence_warnings_decorator + def loadFullValue(self, seq, scope_attrs): + """ + Evaluate full value for async Console variables in a separate thread and send results to IDE side + :param seq: id of command + :param scope_attrs: a sequence of variables with their attributes separated by NEXT_VALUE_SEPARATOR + (i.e.: obj\tattr1\tattr2NEXT_VALUE_SEPARATORobj2\attr1\tattr2) + :return: + """ + frame_variables = self.get_namespace() + var_objects = [] + vars = scope_attrs.split(NEXT_VALUE_SEPARATOR) + for var_attrs in vars: + if "\t" in var_attrs: + name, attrs = var_attrs.split("\t", 1) + + else: + name = var_attrs + attrs = None + if name in frame_variables: + var_object = pydevd_vars.resolve_var_object(frame_variables[name], attrs) + var_objects.append((var_object, name)) + else: + var_object = pydevd_vars.eval_in_context(name, frame_variables, frame_variables) + var_objects.append((var_object, name)) + + from _pydevd_bundle.pydevd_comm import GetValueAsyncThreadConsole + + py_db = getattr(self, "debugger", None) + + if py_db is None: + py_db = get_global_debugger() + + if py_db is None: + from pydevd import PyDB + + py_db = PyDB() + + t = GetValueAsyncThreadConsole(py_db, self.get_server(), seq, var_objects) + t.start() + + def changeVariable(self, attr, value): + def do_change_variable(): + Exec("%s=%s" % (attr, value), self.get_namespace(), self.get_namespace()) + + # Important: it has to be really enabled in the main thread, so, schedule + # it to run in the main thread. + self.exec_queue.put(do_change_variable) + + def connectToDebugger(self, debuggerPort, debugger_options=None): + """ + Used to show console with variables connection. + Mainly, monkey-patches things in the debugger structure so that the debugger protocol works. + """ + + if debugger_options is None: + debugger_options = {} + env_key = "PYDEVD_EXTRA_ENVS" + if env_key in debugger_options: + for env_name, value in debugger_options[env_key].items(): + existing_value = os.environ.get(env_name, None) + if existing_value: + os.environ[env_name] = "%s%c%s" % (existing_value, os.path.pathsep, value) + else: + os.environ[env_name] = value + if env_name == "PYTHONPATH": + sys.path.append(value) + + del debugger_options[env_key] + + def do_connect_to_debugger(): + try: + # Try to import the packages needed to attach the debugger + import pydevd + from _pydev_bundle._pydev_saved_modules import threading + except: + # This happens on Jython embedded in host eclipse + traceback.print_exc() + sys.stderr.write("pydevd is not available, cannot connect\n") + + from _pydevd_bundle.pydevd_constants import set_thread_id + from _pydev_bundle import pydev_localhost + + set_thread_id(threading.current_thread(), "console_main") + + VIRTUAL_FRAME_ID = "1" # matches PyStackFrameConsole.java + VIRTUAL_CONSOLE_ID = "console_main" # matches PyThreadConsole.java + f = FakeFrame() + f.f_back = None + f.f_globals = {} # As globals=locals here, let's simply let it empty (and save a bit of network traffic). + f.f_locals = self.get_namespace() + + self.debugger = pydevd.PyDB() + self.debugger.add_fake_frame(thread_id=VIRTUAL_CONSOLE_ID, frame_id=VIRTUAL_FRAME_ID, frame=f) + try: + pydevd.apply_debugger_options(debugger_options) + self.debugger.connect(pydev_localhost.get_localhost(), debuggerPort) + self.debugger.prepare_to_run() + self.debugger.disable_tracing() + except: + traceback.print_exc() + sys.stderr.write("Failed to connect to target debugger.\n") + + # Register to process commands when idle + self.debugrunning = False + try: + import pydevconsole + + pydevconsole.set_debug_hook(self.debugger.process_internal_commands) + except: + traceback.print_exc() + sys.stderr.write("Version of Python does not support debuggable Interactive Console.\n") + + # Important: it has to be really enabled in the main thread, so, schedule + # it to run in the main thread. + self.exec_queue.put(do_connect_to_debugger) + + return ("connect complete",) + + def handshake(self): + if self.connect_status_queue is not None: + self.connect_status_queue.put(True) + return "PyCharm" + + def get_connect_status_queue(self): + return self.connect_status_queue + + def hello(self, input_str): + # Don't care what the input string is + return ("Hello eclipse",) + + def enableGui(self, guiname): + """Enable the GUI specified in guiname (see inputhook for list). + As with IPython, enabling multiple GUIs isn't an error, but + only the last one's main loop runs and it may not work + """ + + def do_enable_gui(): + from _pydev_bundle.pydev_versioncheck import versionok_for_gui + + if versionok_for_gui(): + try: + from pydev_ipython.inputhook import enable_gui + + enable_gui(guiname) + except: + sys.stderr.write("Failed to enable GUI event loop integration for '%s'\n" % guiname) + traceback.print_exc() + elif guiname not in ["none", "", None]: + # Only print a warning if the guiname was going to do something + sys.stderr.write("PyDev console: Python version does not support GUI event loop integration for '%s'\n" % guiname) + # Return value does not matter, so return back what was sent + return guiname + + # Important: it has to be really enabled in the main thread, so, schedule + # it to run in the main thread. + self.exec_queue.put(do_enable_gui) + + def get_ipython_hidden_vars_dict(self): + return None + + +# ======================================================================================================================= +# FakeFrame +# ======================================================================================================================= +class FakeFrame: + """ + Used to show console with variables connection. + A class to be used as a mock of a frame. + """ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_import_hook.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_import_hook.py new file mode 100644 index 0000000..4dd9136 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_import_hook.py @@ -0,0 +1,38 @@ +import sys +import traceback +from types import ModuleType +from _pydevd_bundle.pydevd_constants import DebugInfoHolder + +import builtins + + +class ImportHookManager(ModuleType): + def __init__(self, name, system_import): + ModuleType.__init__(self, name) + self._system_import = system_import + self._modules_to_patch = {} + + def add_module_name(self, module_name, activate_function): + self._modules_to_patch[module_name] = activate_function + + def do_import(self, name, *args, **kwargs): + module = self._system_import(name, *args, **kwargs) + try: + activate_func = self._modules_to_patch.pop(name, None) + if activate_func: + activate_func() # call activate function + except: + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 2: + traceback.print_exc() + + # Restore normal system importer to reduce performance impact + # of calling this method every time an import statement is invoked + if not self._modules_to_patch: + builtins.__import__ = self._system_import + + return module + + +import_hook_manager = ImportHookManager(__name__ + ".import_hook", builtins.__import__) +builtins.__import__ = import_hook_manager.do_import +sys.modules[import_hook_manager.__name__] = import_hook_manager diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_imports.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_imports.py new file mode 100644 index 0000000..4ee2868 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_imports.py @@ -0,0 +1,12 @@ +from _pydev_bundle._pydev_saved_modules import xmlrpclib +from _pydev_bundle._pydev_saved_modules import xmlrpcserver + +SimpleXMLRPCServer = xmlrpcserver.SimpleXMLRPCServer + +from _pydev_bundle._pydev_execfile import execfile + +from _pydev_bundle._pydev_saved_modules import _queue + +from _pydevd_bundle.pydevd_exec2 import Exec + +from urllib.parse import quote, quote_plus, unquote_plus # @UnresolvedImport diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console.py new file mode 100644 index 0000000..72b1679 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console.py @@ -0,0 +1,95 @@ +import sys +from _pydev_bundle.pydev_console_utils import BaseInterpreterInterface + +import traceback + +# Uncomment to force PyDev standard shell. +# raise ImportError() + +from _pydev_bundle.pydev_ipython_console_011 import get_pydev_frontend + + +# ======================================================================================================================= +# InterpreterInterface +# ======================================================================================================================= +class InterpreterInterface(BaseInterpreterInterface): + """ + The methods in this class should be registered in the xml-rpc server. + """ + + def __init__(self, host, client_port, main_thread, show_banner=True, connect_status_queue=None): + BaseInterpreterInterface.__init__(self, main_thread, connect_status_queue) + self.client_port = client_port + self.host = host + self.interpreter = get_pydev_frontend(host, client_port) + self._input_error_printed = False + self.notification_succeeded = False + self.notification_tries = 0 + self.notification_max_tries = 3 + self.show_banner = show_banner + + self.notify_about_magic() + + def get_greeting_msg(self): + if self.show_banner: + self.interpreter.show_banner() + return self.interpreter.get_greeting_msg() + + def do_add_exec(self, code_fragment): + self.notify_about_magic() + if code_fragment.text.rstrip().endswith("??"): + print("IPython-->") + try: + res = bool(self.interpreter.add_exec(code_fragment.text)) + finally: + if code_fragment.text.rstrip().endswith("??"): + print("<--IPython") + + return res + + def get_namespace(self): + return self.interpreter.get_namespace() + + def getCompletions(self, text, act_tok): + return self.interpreter.getCompletions(text, act_tok) + + def close(self): + sys.exit(0) + + def notify_about_magic(self): + if not self.notification_succeeded: + self.notification_tries += 1 + if self.notification_tries > self.notification_max_tries: + return + completions = self.getCompletions("%", "%") + magic_commands = [x[0] for x in completions] + + server = self.get_server() + + if server is not None: + try: + server.NotifyAboutMagic(magic_commands, self.interpreter.is_automagic()) + self.notification_succeeded = True + except: + self.notification_succeeded = False + + def get_ipython_hidden_vars_dict(self): + try: + if hasattr(self.interpreter, "ipython") and hasattr(self.interpreter.ipython, "user_ns_hidden"): + user_ns_hidden = self.interpreter.ipython.user_ns_hidden + if isinstance(user_ns_hidden, dict): + # Since IPython 2 dict `user_ns_hidden` contains hidden variables and values + user_hidden_dict = user_ns_hidden.copy() + else: + # In IPython 1.x `user_ns_hidden` used to be a set with names of hidden variables + user_hidden_dict = dict([(key, val) for key, val in self.interpreter.ipython.user_ns.items() if key in user_ns_hidden]) + + # while `_`, `__` and `___` were not initialized, they are not presented in `user_ns_hidden` + user_hidden_dict.setdefault("_", "") + user_hidden_dict.setdefault("__", "") + user_hidden_dict.setdefault("___", "") + + return user_hidden_dict + except: + # Getting IPython variables shouldn't break loading frame variables + traceback.print_exc() diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console_011.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console_011.py new file mode 100644 index 0000000..dabf1f3 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console_011.py @@ -0,0 +1,504 @@ +# TODO that would make IPython integration better +# - show output other times then when enter was pressed +# - support proper exit to allow IPython to cleanup (e.g. temp files created with %edit) +# - support Ctrl-D (Ctrl-Z on Windows) +# - use IPython (numbered) prompts in PyDev +# - better integration of IPython and PyDev completions +# - some of the semantics on handling the code completion are not correct: +# eg: Start a line with % and then type c should give %cd as a completion by it doesn't +# however type %c and request completions and %cd is given as an option +# eg: Completing a magic when user typed it without the leading % causes the % to be inserted +# to the left of what should be the first colon. +"""Interface to TerminalInteractiveShell for PyDev Interactive Console frontend + for IPython 0.11 to 1.0+. +""" + +from __future__ import print_function + +import os +import sys +import codeop +import traceback + +from IPython.core.error import UsageError +from IPython.core.completer import IPCompleter +from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC +from IPython.core.usage import default_banner_parts +from IPython.utils.strdispatch import StrDispatch +import IPython.core.release as IPythonRelease +from IPython.terminal.interactiveshell import TerminalInteractiveShell + +try: + from traitlets import CBool, Unicode +except ImportError: + from IPython.utils.traitlets import CBool, Unicode +from IPython.core import release + +from _pydev_bundle.pydev_imports import xmlrpclib + +default_pydev_banner_parts = default_banner_parts + +default_pydev_banner = "".join(default_pydev_banner_parts) + + +def show_in_pager(self, strng, *args, **kwargs): + """Run a string through pager""" + # On PyDev we just output the string, there are scroll bars in the console + # to handle "paging". This is the same behaviour as when TERM==dump (see + # page.py) + # for compatibility with mime-bundle form: + if isinstance(strng, dict): + strng = strng.get("text/plain", strng) + print(strng) + + +def create_editor_hook(pydev_host, pydev_client_port): + def call_editor(filename, line=0, wait=True): + """Open an editor in PyDev""" + if line is None: + line = 0 + + # Make sure to send an absolution path because unlike most editor hooks + # we don't launch a process. This is more like what happens in the zmqshell + filename = os.path.abspath(filename) + + # import sys + # sys.__stderr__.write('Calling editor at: %s:%s\n' % (pydev_host, pydev_client_port)) + + # Tell PyDev to open the editor + server = xmlrpclib.Server("http://%s:%s" % (pydev_host, pydev_client_port)) + server.IPythonEditor(filename, str(line)) + + if wait: + input("Press Enter when done editing:") + + return call_editor + + +class PyDevIPCompleter(IPCompleter): + def __init__(self, *args, **kwargs): + """Create a Completer that reuses the advanced completion support of PyDev + in addition to the completion support provided by IPython""" + IPCompleter.__init__(self, *args, **kwargs) + # Use PyDev for python matches, see getCompletions below + if self.python_matches in self.matchers: + # `self.python_matches` matches attributes or global python names + self.matchers.remove(self.python_matches) + + +class PyDevIPCompleter6(IPCompleter): + def __init__(self, *args, **kwargs): + """Create a Completer that reuses the advanced completion support of PyDev + in addition to the completion support provided by IPython""" + IPCompleter.__init__(self, *args, **kwargs) + + @property + def matchers(self): + """All active matcher routines for completion""" + # To remove python_matches we now have to override it as it's now a property in the superclass. + return [ + self.file_matches, + self.magic_matches, + self.python_func_kw_matches, + self.dict_key_matches, + ] + + @matchers.setter + def matchers(self, value): + # To stop the init in IPCompleter raising an AttributeError we now have to specify a setter as it's now a property in the superclass. + return + + +class PyDevTerminalInteractiveShell(TerminalInteractiveShell): + banner1 = Unicode(default_pydev_banner, config=True, help="""The part of the banner to be printed before the profile""") + + # TODO term_title: (can PyDev's title be changed???, see terminal.py for where to inject code, in particular set_term_title as used by %cd) + # for now, just disable term_title + term_title = CBool(False) + + # Note in version 0.11 there is no guard in the IPython code about displaying a + # warning, so with 0.11 you get: + # WARNING: Readline services not available or not loaded. + # WARNING: The auto-indent feature requires the readline library + # Disable readline, readline type code is all handled by PyDev (on Java side) + readline_use = CBool(False) + # autoindent has no meaning in PyDev (PyDev always handles that on the Java side), + # and attempting to enable it will print a warning in the absence of readline. + autoindent = CBool(False) + # Force console to not give warning about color scheme choice and default to NoColor. + # TODO It would be nice to enable colors in PyDev but: + # - The PyDev Console (Eclipse Console) does not support the full range of colors, so the + # effect isn't as nice anyway at the command line + # - If done, the color scheme should default to LightBG, but actually be dependent on + # any settings the user has (such as if a dark theme is in use, then Linux is probably + # a better theme). + colors_force = CBool(True) + colors = Unicode("NoColor") + # Since IPython 5 the terminal interface is not compatible with Emacs `inferior-shell` and + # the `simple_prompt` flag is needed + simple_prompt = CBool(True) + + # In the PyDev Console, GUI control is done via hookable XML-RPC server + @staticmethod + def enable_gui(gui=None, app=None): + """Switch amongst GUI input hooks by name.""" + # Deferred import + from pydev_ipython.inputhook import enable_gui as real_enable_gui + + try: + return real_enable_gui(gui, app) + except ValueError as e: + raise UsageError("%s" % e) + + # ------------------------------------------------------------------------- + # Things related to hooks + # ------------------------------------------------------------------------- + + def init_history(self): + # Disable history so that we don't have an additional thread for that + # (and we don't use the history anyways). + self.config.HistoryManager.enabled = False + super(PyDevTerminalInteractiveShell, self).init_history() + + def init_hooks(self): + super(PyDevTerminalInteractiveShell, self).init_hooks() + self.set_hook("show_in_pager", show_in_pager) + + # ------------------------------------------------------------------------- + # Things related to exceptions + # ------------------------------------------------------------------------- + + def showtraceback(self, exc_tuple=None, *args, **kwargs): + # IPython does a lot of clever stuff with Exceptions. However mostly + # it is related to IPython running in a terminal instead of an IDE. + # (e.g. it prints out snippets of code around the stack trace) + # PyDev does a lot of clever stuff too, so leave exception handling + # with default print_exc that PyDev can parse and do its clever stuff + # with (e.g. it puts links back to the original source code) + try: + if exc_tuple is None: + etype, value, tb = sys.exc_info() + else: + etype, value, tb = exc_tuple + except ValueError: + return + + if tb is not None: + traceback.print_exception(etype, value, tb) + + # ------------------------------------------------------------------------- + # Things related to text completion + # ------------------------------------------------------------------------- + + # The way to construct an IPCompleter changed in most versions, + # so we have a custom, per version implementation of the construction + + def _new_completer_100(self): + completer = PyDevIPCompleter( + shell=self, + namespace=self.user_ns, + global_namespace=self.user_global_ns, + alias_table=self.alias_manager.alias_table, + use_readline=self.has_readline, + parent=self, + ) + return completer + + def _new_completer_234(self): + # correct for IPython versions 2.x, 3.x, 4.x + completer = PyDevIPCompleter( + shell=self, + namespace=self.user_ns, + global_namespace=self.user_global_ns, + use_readline=self.has_readline, + parent=self, + ) + return completer + + def _new_completer_500(self): + completer = PyDevIPCompleter( + shell=self, namespace=self.user_ns, global_namespace=self.user_global_ns, use_readline=False, parent=self + ) + return completer + + def _new_completer_600(self): + completer = PyDevIPCompleter6( + shell=self, namespace=self.user_ns, global_namespace=self.user_global_ns, use_readline=False, parent=self + ) + return completer + + def add_completer_hooks(self): + from IPython.core.completerlib import module_completer, magic_run_completer, cd_completer + + try: + from IPython.core.completerlib import reset_completer + except ImportError: + # reset_completer was added for rel-0.13 + reset_completer = None + self.configurables.append(self.Completer) + + # Add custom completers to the basic ones built into IPCompleter + sdisp = self.strdispatchers.get("complete_command", StrDispatch()) + self.strdispatchers["complete_command"] = sdisp + self.Completer.custom_completers = sdisp + + self.set_hook("complete_command", module_completer, str_key="import") + self.set_hook("complete_command", module_completer, str_key="from") + self.set_hook("complete_command", magic_run_completer, str_key="%run") + self.set_hook("complete_command", cd_completer, str_key="%cd") + if reset_completer: + self.set_hook("complete_command", reset_completer, str_key="%reset") + + def init_completer(self): + """Initialize the completion machinery. + + This creates a completer that provides the completions that are + IPython specific. We use this to supplement PyDev's core code + completions. + """ + # PyDev uses its own completer and custom hooks so that it uses + # most completions from PyDev's core completer which provides + # extra information. + # See getCompletions for where the two sets of results are merged + + if IPythonRelease._version_major >= 6: + self.Completer = self._new_completer_600() + elif IPythonRelease._version_major >= 5: + self.Completer = self._new_completer_500() + elif IPythonRelease._version_major >= 2: + self.Completer = self._new_completer_234() + elif IPythonRelease._version_major >= 1: + self.Completer = self._new_completer_100() + + if hasattr(self.Completer, "use_jedi"): + self.Completer.use_jedi = False + + self.add_completer_hooks() + + if IPythonRelease._version_major <= 3: + # Only configure readline if we truly are using readline. IPython can + # do tab-completion over the network, in GUIs, etc, where readline + # itself may be absent + if self.has_readline: + self.set_readline_completer() + + # ------------------------------------------------------------------------- + # Things related to aliases + # ------------------------------------------------------------------------- + + def init_alias(self): + # InteractiveShell defines alias's we want, but TerminalInteractiveShell defines + # ones we don't. So don't use super and instead go right to InteractiveShell + InteractiveShell.init_alias(self) + + # ------------------------------------------------------------------------- + # Things related to exiting + # ------------------------------------------------------------------------- + def ask_exit(self): + """Ask the shell to exit. Can be overiden and used as a callback.""" + # TODO PyDev's console does not have support from the Python side to exit + # the console. If user forces the exit (with sys.exit()) then the console + # simply reports errors. e.g.: + # >>> import sys + # >>> sys.exit() + # Failed to create input stream: Connection refused + # >>> + # Console already exited with value: 0 while waiting for an answer. + # Error stream: + # Output stream: + # >>> + # + # Alternatively if you use the non-IPython shell this is what happens + # >>> exit() + # :None + # >>> + # :None + # >>> + # + super(PyDevTerminalInteractiveShell, self).ask_exit() + print("To exit the PyDev Console, terminate the console within IDE.") + + # ------------------------------------------------------------------------- + # Things related to magics + # ------------------------------------------------------------------------- + + def init_magics(self): + super(PyDevTerminalInteractiveShell, self).init_magics() + # TODO Any additional magics for PyDev? + + +InteractiveShellABC.register(PyDevTerminalInteractiveShell) # @UndefinedVariable + + +# ======================================================================================================================= +# _PyDevFrontEnd +# ======================================================================================================================= +class _PyDevFrontEnd: + version = release.__version__ + + def __init__(self): + # Create and initialize our IPython instance. + if hasattr(PyDevTerminalInteractiveShell, "_instance") and PyDevTerminalInteractiveShell._instance is not None: + self.ipython = PyDevTerminalInteractiveShell._instance + else: + self.ipython = PyDevTerminalInteractiveShell.instance() + + self._curr_exec_line = 0 + self._curr_exec_lines = [] + + def show_banner(self): + self.ipython.show_banner() + + def update(self, globals, locals): + ns = self.ipython.user_ns + + for key, value in list(ns.items()): + if key not in locals: + locals[key] = value + + self.ipython.user_global_ns.clear() + self.ipython.user_global_ns.update(globals) + self.ipython.user_ns = locals + + if hasattr(self.ipython, "history_manager") and hasattr(self.ipython.history_manager, "save_thread"): + self.ipython.history_manager.save_thread.pydev_do_not_trace = True # don't trace ipython history saving thread + + def complete(self, string): + try: + if string: + return self.ipython.complete(None, line=string, cursor_pos=string.__len__()) + else: + return self.ipython.complete(string, string, 0) + except: + # Silence completer exceptions + pass + + def is_complete(self, string): + # Based on IPython 0.10.1 + + if string in ("", "\n"): + # Prefiltering, eg through ipython0, may return an empty + # string although some operations have been accomplished. We + # thus want to consider an empty string as a complete + # statement. + return True + else: + try: + # Add line returns here, to make sure that the statement is + # complete (except if '\' was used). + # This should probably be done in a different place (like + # maybe 'prefilter_input' method? For now, this works. + clean_string = string.rstrip("\n") + if not clean_string.endswith("\\"): + clean_string += "\n\n" + + is_complete = codeop.compile_command(clean_string, "", "exec") + except Exception: + # XXX: Hack: return True so that the + # code gets executed and the error captured. + is_complete = True + return is_complete + + def getCompletions(self, text, act_tok): + # Get completions from IPython and from PyDev and merge the results + # IPython only gives context free list of completions, while PyDev + # gives detailed information about completions. + try: + TYPE_IPYTHON = "11" + TYPE_IPYTHON_MAGIC = "12" + _line, ipython_completions = self.complete(text) + + from _pydev_bundle._pydev_completer import Completer + + completer = Completer(self.get_namespace(), None) + ret = completer.complete(act_tok) + append = ret.append + ip = self.ipython + pydev_completions = set([f[0] for f in ret]) + for ipython_completion in ipython_completions: + # PyCharm was not expecting completions with '%'... + # Could be fixed in the backend, but it's probably better + # fixing it at PyCharm. + # if ipython_completion.startswith('%'): + # ipython_completion = ipython_completion[1:] + + if ipython_completion not in pydev_completions: + pydev_completions.add(ipython_completion) + inf = ip.object_inspect(ipython_completion) + if inf["type_name"] == "Magic function": + pydev_type = TYPE_IPYTHON_MAGIC + else: + pydev_type = TYPE_IPYTHON + pydev_doc = inf["docstring"] + if pydev_doc is None: + pydev_doc = "" + append((ipython_completion, pydev_doc, "", pydev_type)) + return ret + except: + import traceback + + traceback.print_exc() + return [] + + def get_namespace(self): + return self.ipython.user_ns + + def clear_buffer(self): + del self._curr_exec_lines[:] + + def add_exec(self, line): + if self._curr_exec_lines: + self._curr_exec_lines.append(line) + + buf = "\n".join(self._curr_exec_lines) + + if self.is_complete(buf): + self._curr_exec_line += 1 + self.ipython.run_cell(buf) + del self._curr_exec_lines[:] + return False # execute complete (no more) + + return True # needs more + else: + if not self.is_complete(line): + # Did not execute + self._curr_exec_lines.append(line) + return True # needs more + else: + self._curr_exec_line += 1 + self.ipython.run_cell(line, store_history=True) + # hist = self.ipython.history_manager.output_hist_reprs + # rep = hist.get(self._curr_exec_line, None) + # if rep is not None: + # print(rep) + return False # execute complete (no more) + + def is_automagic(self): + return self.ipython.automagic + + def get_greeting_msg(self): + return "PyDev console: using IPython %s\n" % self.version + + +class _PyDevFrontEndContainer: + _instance = None + _last_host_port = None + + +def get_pydev_frontend(pydev_host, pydev_client_port): + if _PyDevFrontEndContainer._instance is None: + _PyDevFrontEndContainer._instance = _PyDevFrontEnd() + + if _PyDevFrontEndContainer._last_host_port != (pydev_host, pydev_client_port): + _PyDevFrontEndContainer._last_host_port = pydev_host, pydev_client_port + + # Back channel to PyDev to open editors (in the future other + # info may go back this way. This is the same channel that is + # used to get stdin, see StdIn in pydev_console_utils) + _PyDevFrontEndContainer._instance.ipython.hooks["editor"] = create_editor_hook(pydev_host, pydev_client_port) + + # Note: setting the callback directly because setting it with set_hook would actually create a chain instead + # of ovewriting at each new call). + # _PyDevFrontEndContainer._instance.ipython.set_hook('editor', create_editor_hook(pydev_host, pydev_client_port)) + + return _PyDevFrontEndContainer._instance diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_is_thread_alive.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_is_thread_alive.py new file mode 100644 index 0000000..3f2483a --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_is_thread_alive.py @@ -0,0 +1,30 @@ +from _pydev_bundle._pydev_saved_modules import threading + +# Hack for https://www.brainwy.com/tracker/PyDev/363 (i.e.: calling is_alive() can throw AssertionError under some +# circumstances). +# It is required to debug threads started by start_new_thread in Python 3.4 +_temp = threading.Thread() + +if hasattr(_temp, "_handle") and hasattr(_temp, "_started"): # Python 3.13 and later has this + + def is_thread_alive(t): + return not t._handle.is_done() + + +elif hasattr(_temp, "_is_stopped"): # Python 3.12 and earlier has this + + def is_thread_alive(t): + return not t._is_stopped + +elif hasattr(_temp, "_Thread__stopped"): # Python 2.x has this + + def is_thread_alive(t): + return not t._Thread__stopped + +else: + # Jython wraps a native java thread and thus only obeys the public API. + def is_thread_alive(t): + return t.is_alive() + + +del _temp diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_localhost.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_localhost.py new file mode 100644 index 0000000..d258092 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_localhost.py @@ -0,0 +1,68 @@ +from _pydev_bundle._pydev_saved_modules import socket +import sys + +IS_JYTHON = sys.platform.find("java") != -1 + +_cache = None + + +def get_localhost(): + """ + Should return 127.0.0.1 in ipv4 and ::1 in ipv6 + + localhost is not used because on windows vista/windows 7, there can be issues where the resolving doesn't work + properly and takes a lot of time (had this issue on the pyunit server). + + Using the IP directly solves the problem. + """ + # TODO: Needs better investigation! + + global _cache + if _cache is None: + try: + for addr_info in socket.getaddrinfo("localhost", 80, 0, 0, socket.SOL_TCP): + config = addr_info[4] + if config[0] == "127.0.0.1": + _cache = "127.0.0.1" + return _cache + except: + # Ok, some versions of Python don't have getaddrinfo or SOL_TCP... Just consider it 127.0.0.1 in this case. + _cache = "127.0.0.1" + else: + _cache = "localhost" + + return _cache + + +def get_socket_names(n_sockets, close=False): + socket_names = [] + sockets = [] + for _ in range(n_sockets): + if IS_JYTHON: + # Although the option which would be pure java *should* work for Jython, the socket being returned is still 0 + # (i.e.: it doesn't give the local port bound, only the original port, which was 0). + from java.net import ServerSocket + + sock = ServerSocket(0) + socket_name = get_localhost(), sock.getLocalPort() + else: + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + sock.bind((get_localhost(), 0)) + socket_name = sock.getsockname() + + sockets.append(sock) + socket_names.append(socket_name) + + if close: + for s in sockets: + s.close() + return socket_names + + +def get_socket_name(close=False): + return get_socket_names(1, close)[0] + + +if __name__ == "__main__": + print(get_socket_name()) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_log.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_log.py new file mode 100644 index 0000000..2fb0fc2 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_log.py @@ -0,0 +1,284 @@ +from _pydevd_bundle.pydevd_constants import DebugInfoHolder, SHOW_COMPILE_CYTHON_COMMAND_LINE, NULL, LOG_TIME, ForkSafeLock +from contextlib import contextmanager +import traceback +import os +import sys + + +class _LoggingGlobals(object): + _warn_once_map = {} + _debug_stream_filename = None + _debug_stream = NULL + _debug_stream_initialized = False + _initialize_lock = ForkSafeLock() + + +def initialize_debug_stream(reinitialize=False): + """ + :param bool reinitialize: + Reinitialize is used to update the debug stream after a fork (thus, if it wasn't + initialized, we don't need to do anything, just wait for the first regular log call + to initialize). + """ + if reinitialize: + if not _LoggingGlobals._debug_stream_initialized: + return + else: + if _LoggingGlobals._debug_stream_initialized: + return + + with _LoggingGlobals._initialize_lock: + # Initialization is done lazilly, so, it's possible that multiple threads try to initialize + # logging. + + # Check initial conditions again after obtaining the lock. + if reinitialize: + if not _LoggingGlobals._debug_stream_initialized: + return + else: + if _LoggingGlobals._debug_stream_initialized: + return + + _LoggingGlobals._debug_stream_initialized = True + + # Note: we cannot initialize with sys.stderr because when forking we may end up logging things in 'os' calls. + _LoggingGlobals._debug_stream = NULL + _LoggingGlobals._debug_stream_filename = None + + if not DebugInfoHolder.PYDEVD_DEBUG_FILE: + _LoggingGlobals._debug_stream = sys.stderr + else: + # Add pid to the filename. + try: + target_file = DebugInfoHolder.PYDEVD_DEBUG_FILE + debug_file = _compute_filename_with_pid(target_file) + _LoggingGlobals._debug_stream = open(debug_file, "w") + _LoggingGlobals._debug_stream_filename = debug_file + except Exception: + _LoggingGlobals._debug_stream = sys.stderr + # Don't fail when trying to setup logging, just show the exception. + traceback.print_exc() + + +def _compute_filename_with_pid(target_file, pid=None): + # Note: used in tests. + dirname = os.path.dirname(target_file) + basename = os.path.basename(target_file) + try: + os.makedirs(dirname) + except Exception: + pass # Ignore error if it already exists. + + name, ext = os.path.splitext(basename) + if pid is None: + pid = os.getpid() + return os.path.join(dirname, "%s.%s%s" % (name, pid, ext)) + + +def log_to(log_file: str, log_level: int = 3) -> None: + with _LoggingGlobals._initialize_lock: + # Can be set directly. + DebugInfoHolder.DEBUG_TRACE_LEVEL = log_level + + if DebugInfoHolder.PYDEVD_DEBUG_FILE != log_file: + # Note that we don't need to reset it unless it actually changed + # (would be the case where it's set as an env var in a new process + # and a subprocess initializes logging to the same value). + _LoggingGlobals._debug_stream = NULL + _LoggingGlobals._debug_stream_filename = None + + DebugInfoHolder.PYDEVD_DEBUG_FILE = log_file + + _LoggingGlobals._debug_stream_initialized = False + + +def list_log_files(pydevd_debug_file): + log_files = [] + dirname = os.path.dirname(pydevd_debug_file) + basename = os.path.basename(pydevd_debug_file) + if os.path.isdir(dirname): + name, ext = os.path.splitext(basename) + for f in os.listdir(dirname): + if f.startswith(name) and f.endswith(ext): + log_files.append(os.path.join(dirname, f)) + return log_files + + +@contextmanager +def log_context(trace_level, stream): + """ + To be used to temporarily change the logging settings. + """ + with _LoggingGlobals._initialize_lock: + original_trace_level = DebugInfoHolder.DEBUG_TRACE_LEVEL + original_debug_stream = _LoggingGlobals._debug_stream + original_pydevd_debug_file = DebugInfoHolder.PYDEVD_DEBUG_FILE + original_debug_stream_filename = _LoggingGlobals._debug_stream_filename + original_initialized = _LoggingGlobals._debug_stream_initialized + + DebugInfoHolder.DEBUG_TRACE_LEVEL = trace_level + _LoggingGlobals._debug_stream = stream + _LoggingGlobals._debug_stream_initialized = True + try: + yield + finally: + with _LoggingGlobals._initialize_lock: + DebugInfoHolder.DEBUG_TRACE_LEVEL = original_trace_level + _LoggingGlobals._debug_stream = original_debug_stream + DebugInfoHolder.PYDEVD_DEBUG_FILE = original_pydevd_debug_file + _LoggingGlobals._debug_stream_filename = original_debug_stream_filename + _LoggingGlobals._debug_stream_initialized = original_initialized + + +import time + +_last_log_time = time.time() + +# Set to True to show pid in each logged message (usually the file has it, but sometimes it's handy). +_LOG_PID = False + + +def _pydevd_log(level, msg, *args): + """ + Levels are: + + 0 most serious warnings/errors (always printed) + 1 warnings/significant events + 2 informational trace + 3 verbose mode + """ + if level <= DebugInfoHolder.DEBUG_TRACE_LEVEL: + # yes, we can have errors printing if the console of the program has been finished (and we're still trying to print something) + try: + try: + if args: + msg = msg % args + except: + msg = "%s - %s" % (msg, args) + + if LOG_TIME: + global _last_log_time + new_log_time = time.time() + time_diff = new_log_time - _last_log_time + _last_log_time = new_log_time + msg = "%.2fs - %s\n" % ( + time_diff, + msg, + ) + else: + msg = "%s\n" % (msg,) + + if _LOG_PID: + msg = "<%s> - %s\n" % ( + os.getpid(), + msg, + ) + + try: + try: + initialize_debug_stream() # Do it as late as possible + _LoggingGlobals._debug_stream.write(msg) + except TypeError: + if isinstance(msg, bytes): + # Depending on the StringIO flavor, it may only accept unicode. + msg = msg.decode("utf-8", "replace") + _LoggingGlobals._debug_stream.write(msg) + except UnicodeEncodeError: + # When writing to the stream it's possible that the string can't be represented + # in the encoding expected (in this case, convert it to the stream encoding + # or ascii if we can't find one suitable using a suitable replace). + encoding = getattr(_LoggingGlobals._debug_stream, "encoding", "ascii") + msg = msg.encode(encoding, "backslashreplace") + msg = msg.decode(encoding) + _LoggingGlobals._debug_stream.write(msg) + + _LoggingGlobals._debug_stream.flush() + except: + pass + return True + + +def _pydevd_log_exception(msg="", *args): + if msg or args: + _pydevd_log(0, msg, *args) + try: + initialize_debug_stream() # Do it as late as possible + traceback.print_exc(file=_LoggingGlobals._debug_stream) + _LoggingGlobals._debug_stream.flush() + except: + raise + + +def verbose(msg, *args): + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 3: + _pydevd_log(3, msg, *args) + + +def debug(msg, *args): + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 2: + _pydevd_log(2, msg, *args) + + +def info(msg, *args): + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 1: + _pydevd_log(1, msg, *args) + + +warn = info + + +def critical(msg, *args): + _pydevd_log(0, msg, *args) + + +def exception(msg="", *args): + try: + _pydevd_log_exception(msg, *args) + except: + pass # Should never fail (even at interpreter shutdown). + + +error = exception + + +def error_once(msg, *args): + try: + if args: + message = msg % args + else: + message = str(msg) + except: + message = "%s - %s" % (msg, args) + + if message not in _LoggingGlobals._warn_once_map: + _LoggingGlobals._warn_once_map[message] = True + critical(message) + + +def exception_once(msg, *args): + try: + if args: + message = msg % args + else: + message = str(msg) + except: + message = "%s - %s" % (msg, args) + + if message not in _LoggingGlobals._warn_once_map: + _LoggingGlobals._warn_once_map[message] = True + exception(message) + + +def debug_once(msg, *args): + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 3: + error_once(msg, *args) + + +def show_compile_cython_command_line(): + if SHOW_COMPILE_CYTHON_COMMAND_LINE: + dirname = os.path.dirname(os.path.dirname(__file__)) + error_once( + 'warning: Debugger speedups using cython not found. Run \'"%s" "%s" build_ext --inplace\' to build.', + sys.executable, + os.path.join(dirname, "setup_pydevd_cython.py"), + ) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py new file mode 100644 index 0000000..4c63c95 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py @@ -0,0 +1,1293 @@ +# License: EPL +import os +import re +import sys +from _pydev_bundle._pydev_saved_modules import threading +from _pydevd_bundle.pydevd_constants import ( + get_global_debugger, + IS_WINDOWS, + IS_JYTHON, + get_current_thread_id, + sorted_dict_repr, + set_global_debugger, + DebugInfoHolder, + PYDEVD_USE_SYS_MONITORING, + IS_PY313_OR_GREATER, +) +from _pydev_bundle import pydev_log +from contextlib import contextmanager +from _pydevd_bundle import pydevd_constants, pydevd_defaults +from _pydevd_bundle.pydevd_defaults import PydevdCustomization +import ast +from pathlib import Path + +# =============================================================================== +# Things that are dependent on having the pydevd debugger +# =============================================================================== + +pydev_src_dir = os.path.dirname(os.path.dirname(__file__)) + +_arg_patch = threading.local() + + +@contextmanager +def skip_subprocess_arg_patch(): + _arg_patch.apply_arg_patching = False + try: + yield + finally: + _arg_patch.apply_arg_patching = True + + +def _get_apply_arg_patching(): + return getattr(_arg_patch, "apply_arg_patching", True) + + +def _get_setup_updated_with_protocol_and_ppid(setup, is_exec=False): + if setup is None: + setup = {} + setup = setup.copy() + # Discard anything related to the protocol (we'll set the the protocol based on the one + # currently set). + setup.pop(pydevd_constants.ARGUMENT_HTTP_JSON_PROTOCOL, None) + setup.pop(pydevd_constants.ARGUMENT_JSON_PROTOCOL, None) + setup.pop(pydevd_constants.ARGUMENT_QUOTED_LINE_PROTOCOL, None) + + if not is_exec: + # i.e.: The ppid for the subprocess is the current pid. + # If it's an exec, keep it what it was. + setup[pydevd_constants.ARGUMENT_PPID] = os.getpid() + + protocol = pydevd_constants.get_protocol() + if protocol == pydevd_constants.HTTP_JSON_PROTOCOL: + setup[pydevd_constants.ARGUMENT_HTTP_JSON_PROTOCOL] = True + + elif protocol == pydevd_constants.JSON_PROTOCOL: + setup[pydevd_constants.ARGUMENT_JSON_PROTOCOL] = True + + elif protocol == pydevd_constants.QUOTED_LINE_PROTOCOL: + setup[pydevd_constants.ARGUMENT_QUOTED_LINE_PROTOCOL] = True + + elif protocol == pydevd_constants.HTTP_PROTOCOL: + setup[pydevd_constants.ARGUMENT_HTTP_PROTOCOL] = True + + else: + pydev_log.debug("Unexpected protocol: %s", protocol) + + mode = pydevd_defaults.PydevdCustomization.DEBUG_MODE + if mode: + setup["debug-mode"] = mode + + preimport = pydevd_defaults.PydevdCustomization.PREIMPORT + if preimport: + setup["preimport"] = preimport + + if DebugInfoHolder.PYDEVD_DEBUG_FILE: + setup["log-file"] = DebugInfoHolder.PYDEVD_DEBUG_FILE + + if DebugInfoHolder.DEBUG_TRACE_LEVEL: + setup["log-level"] = DebugInfoHolder.DEBUG_TRACE_LEVEL + + return setup + + +class _LastFutureImportFinder(ast.NodeVisitor): + def __init__(self): + self.last_future_import_found = None + + def visit_ImportFrom(self, node): + if node.module == "__future__": + self.last_future_import_found = node + + +def _get_offset_from_line_col(code, line, col): + offset = 0 + for i, line_contents in enumerate(code.splitlines(True)): + if i == line: + offset += col + return offset + else: + offset += len(line_contents) + + return -1 + + +def _separate_future_imports(code): + """ + :param code: + The code from where we want to get the __future__ imports (note that it's possible that + there's no such entry). + + :return tuple(str, str): + The return is a tuple(future_import, code). + + If the future import is not available a return such as ('', code) is given, otherwise, the + future import will end with a ';' (so that it can be put right before the pydevd attach + code). + """ + try: + node = ast.parse(code, "", "exec") + visitor = _LastFutureImportFinder() + visitor.visit(node) + + if visitor.last_future_import_found is None: + return "", code + + node = visitor.last_future_import_found + offset = -1 + if hasattr(node, "end_lineno") and hasattr(node, "end_col_offset"): + # Python 3.8 onwards has these (so, use when possible). + line, col = node.end_lineno, node.end_col_offset + offset = _get_offset_from_line_col(code, line - 1, col) # ast lines are 1-based, make it 0-based. + + else: + # end line/col not available, let's just find the offset and then search + # for the alias from there. + line, col = node.lineno, node.col_offset + offset = _get_offset_from_line_col(code, line - 1, col) # ast lines are 1-based, make it 0-based. + if offset >= 0 and node.names: + from_future_import_name = node.names[-1].name + i = code.find(from_future_import_name, offset) + if i < 0: + offset = -1 + else: + offset = i + len(from_future_import_name) + + if offset >= 0: + for i in range(offset, len(code)): + if code[i] in (" ", "\t", ";", ")", "\n"): + offset += 1 + else: + break + + future_import = code[:offset] + code_remainder = code[offset:] + + # Now, put '\n' lines back into the code remainder (we had to search for + # `\n)`, but in case we just got the `\n`, it should be at the remainder, + # not at the future import. + while future_import.endswith("\n"): + future_import = future_import[:-1] + code_remainder = "\n" + code_remainder + + if not future_import.endswith(";"): + future_import += ";" + return future_import, code_remainder + + # This shouldn't happen... + pydev_log.info("Unable to find line %s in code:\n%r", line, code) + return "", code + + except: + pydev_log.exception("Error getting from __future__ imports from: %r", code) + return "", code + + +def _get_python_c_args(host, port, code, args, setup): + setup = _get_setup_updated_with_protocol_and_ppid(setup) + + # i.e.: We want to make the repr sorted so that it works in tests. + setup_repr = setup if setup is None else (sorted_dict_repr(setup)) + + future_imports = "" + if "__future__" in code: + # If the code has a __future__ import, we need to be able to strip the __future__ + # imports from the code and add them to the start of our code snippet. + future_imports, code = _separate_future_imports(code) + + return ( + "%simport sys; sys.path.insert(0, r'%s'); import pydevd; pydevd.config(%r, %r); " + "pydevd.settrace(host=%r, port=%s, suspend=False, trace_only_current_thread=False, patch_multiprocessing=True, access_token=%r, client_access_token=%r, __setup_holder__=%s); " + "%s" + ) % ( + future_imports, + pydev_src_dir, + pydevd_constants.get_protocol(), + PydevdCustomization.DEBUG_MODE, + host, + port, + setup.get("access-token"), + setup.get("client-access-token"), + setup_repr, + code, + ) + + +def _get_host_port(): + import pydevd + + host, port = pydevd.dispatch() + return host, port + + +def _is_managed_arg(arg): + pydevd_py = _get_str_type_compatible(arg, "pydevd.py") + if arg.endswith(pydevd_py): + return True + return False + + +def _on_forked_process(setup_tracing=True): + pydevd_constants.after_fork() + pydev_log.initialize_debug_stream(reinitialize=True) + + if setup_tracing: + pydev_log.debug("pydevd on forked process: %s", os.getpid()) + + import pydevd + + pydevd.threadingCurrentThread().__pydevd_main_thread = True + pydevd.settrace_forked(setup_tracing=setup_tracing) + + +def _on_set_trace_for_new_thread(global_debugger): + if global_debugger is not None: + if not PYDEVD_USE_SYS_MONITORING: + global_debugger.enable_tracing() + + +def _get_str_type_compatible(s, args): + """ + This method converts `args` to byte/unicode based on the `s' type. + """ + if isinstance(args, (list, tuple)): + ret = [] + for arg in args: + if type(s) == type(arg): + ret.append(arg) + else: + if isinstance(s, bytes): + ret.append(arg.encode("utf-8")) + else: + ret.append(arg.decode("utf-8")) + return ret + else: + if type(s) == type(args): + return args + else: + if isinstance(s, bytes): + return args.encode("utf-8") + else: + return args.decode("utf-8") + + +# =============================================================================== +# Things related to monkey-patching +# =============================================================================== +def is_python(path): + single_quote, double_quote = _get_str_type_compatible(path, ["'", '"']) + + if path.endswith(single_quote) or path.endswith(double_quote): + path = path[1 : len(path) - 1] + filename = os.path.basename(path).lower() + for name in _get_str_type_compatible(filename, ["python", "jython", "pypy"]): + if filename.find(name) != -1: + return True + + return False + + +class InvalidTypeInArgsException(Exception): + pass + + +def remove_quotes_from_args(args): + if sys.platform == "win32": + new_args = [] + + for x in args: + if isinstance(x, Path): + x = str(x) + else: + if not isinstance(x, (bytes, str)): + raise InvalidTypeInArgsException(str(type(x))) + + double_quote, two_double_quotes = _get_str_type_compatible(x, ['"', '""']) + + if x != two_double_quotes: + if len(x) > 1 and x.startswith(double_quote) and x.endswith(double_quote): + x = x[1:-1] + + new_args.append(x) + return new_args + else: + new_args = [] + for x in args: + if isinstance(x, Path): + x = x.as_posix() + else: + if not isinstance(x, (bytes, str)): + raise InvalidTypeInArgsException(str(type(x))) + new_args.append(x) + + return new_args + + +def quote_arg_win32(arg): + fix_type = lambda x: _get_str_type_compatible(arg, x) + + # See if we need to quote at all - empty strings need quoting, as do strings + # with whitespace or quotes in them. Backslashes do not need quoting. + if arg and not set(arg).intersection(fix_type(' "\t\n\v')): + return arg + + # Per https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-commandlinetoargvw, + # the standard way to interpret arguments in double quotes is as follows: + # + # 2N backslashes followed by a quotation mark produce N backslashes followed by + # begin/end quote. This does not become part of the parsed argument, but toggles + # the "in quotes" mode. + # + # 2N+1 backslashes followed by a quotation mark again produce N backslashes followed + # by a quotation mark literal ("). This does not toggle the "in quotes" mode. + # + # N backslashes not followed by a quotation mark simply produce N backslashes. + # + # This code needs to do the reverse transformation, thus: + # + # N backslashes followed by " produce 2N+1 backslashes followed by " + # + # N backslashes at the end (i.e. where the closing " goes) produce 2N backslashes. + # + # N backslashes in any other position remain as is. + + arg = re.sub(fix_type(r"(\\*)\""), fix_type(r'\1\1\\"'), arg) + arg = re.sub(fix_type(r"(\\*)$"), fix_type(r"\1\1"), arg) + return fix_type('"') + arg + fix_type('"') + + +def quote_args(args): + if sys.platform == "win32": + return list(map(quote_arg_win32, args)) + else: + return args + + +def patch_args(args, is_exec=False): + """ + :param list args: + Arguments to patch. + + :param bool is_exec: + If it's an exec, the current process will be replaced (this means we have + to keep the same ppid). + """ + try: + pydev_log.debug("Patching args: %s", args) + original_args = args + try: + unquoted_args = remove_quotes_from_args(args) + except InvalidTypeInArgsException as e: + pydev_log.info("Unable to monkey-patch subprocess arguments because a type found in the args is invalid: %s", e) + return original_args + + # Internally we should reference original_args (if we want to return them) or unquoted_args + # to add to the list which will be then quoted in the end. + del args + + from pydevd import SetupHolder + + if not unquoted_args: + return original_args + + if not is_python(unquoted_args[0]): + pydev_log.debug("Process is not python, returning.") + return original_args + + # Note: we create a copy as string to help with analyzing the arguments, but + # the final list should have items from the unquoted_args as they were initially. + args_as_str = _get_str_type_compatible("", unquoted_args) + + params_with_value_in_separate_arg = ( + "--check-hash-based-pycs", + "--jit", # pypy option + ) + + # All short switches may be combined together. The ones below require a value and the + # value itself may be embedded in the arg. + # + # i.e.: Python accepts things as: + # + # python -OQold -qmtest + # + # Which is the same as: + # + # python -O -Q old -q -m test + # + # or even: + # + # python -OQold "-vcimport sys;print(sys)" + # + # Which is the same as: + # + # python -O -Q old -v -c "import sys;print(sys)" + + params_with_combinable_arg = set(("W", "X", "Q", "c", "m")) + + module_name = None + before_module_flag = "" + module_name_i_start = -1 + module_name_i_end = -1 + + code = None + code_i = -1 + code_i_end = -1 + code_flag = "" + + filename = None + filename_i = -1 + + ignore_next = True # start ignoring the first (the first entry is the python executable) + for i, arg_as_str in enumerate(args_as_str): + if ignore_next: + ignore_next = False + continue + + if arg_as_str.startswith("-"): + if arg_as_str == "-": + # Contents will be read from the stdin. This is not currently handled. + pydev_log.debug('Unable to fix arguments to attach debugger on subprocess when reading from stdin ("python ... -").') + return original_args + + if arg_as_str.startswith(params_with_value_in_separate_arg): + if arg_as_str in params_with_value_in_separate_arg: + ignore_next = True + continue + + break_out = False + for j, c in enumerate(arg_as_str): + # i.e.: Python supports -X faulthandler as well as -Xfaulthandler + # (in one case we have to ignore the next and in the other we don't + # have to ignore it). + if c in params_with_combinable_arg: + remainder = arg_as_str[j + 1 :] + if not remainder: + ignore_next = True + + if c == "m": + # i.e.: Something as + # python -qm test + # python -m test + # python -qmtest + before_module_flag = arg_as_str[:j] # before_module_flag would then be "-q" + if before_module_flag == "-": + before_module_flag = "" + module_name_i_start = i + if not remainder: + module_name = unquoted_args[i + 1] + module_name_i_end = i + 1 + else: + # i.e.: python -qmtest should provide 'test' as the module_name + module_name = unquoted_args[i][j + 1 :] + module_name_i_end = module_name_i_start + break_out = True + break + + elif c == "c": + # i.e.: Something as + # python -qc "import sys" + # python -c "import sys" + # python "-qcimport sys" + code_flag = arg_as_str[: j + 1] # code_flag would then be "-qc" + + if not remainder: + # arg_as_str is something as "-qc", "import sys" + code = unquoted_args[i + 1] + code_i_end = i + 2 + else: + # if arg_as_str is something as "-qcimport sys" + code = remainder # code would be "import sys" + code_i_end = i + 1 + code_i = i + break_out = True + break + + else: + break + + if break_out: + break + + else: + # It doesn't start with '-' and we didn't ignore this entry: + # this means that this is the file to be executed. + filename = unquoted_args[i] + + # Note that the filename is not validated here. + # There are cases where even a .exe is valid (xonsh.exe): + # https://github.com/microsoft/debugpy/issues/945 + # So, we should support whatever runpy.run_path + # supports in this case. + + filename_i = i + + if _is_managed_arg(filename): # no need to add pydevd twice + pydev_log.debug("Skipped monkey-patching as pydevd.py is in args already.") + return original_args + + break + else: + # We didn't find the filename (something is unexpected). + pydev_log.debug("Unable to fix arguments to attach debugger on subprocess (filename not found).") + return original_args + + if code_i != -1: + host, port = _get_host_port() + + if port is not None: + new_args = [] + new_args.extend(unquoted_args[:code_i]) + new_args.append(code_flag) + new_args.append(_get_python_c_args(host, port, code, unquoted_args, SetupHolder.setup)) + new_args.extend(unquoted_args[code_i_end:]) + + return quote_args(new_args) + + first_non_vm_index = max(filename_i, module_name_i_start) + if first_non_vm_index == -1: + pydev_log.debug("Unable to fix arguments to attach debugger on subprocess (could not resolve filename nor module name).") + return original_args + + # Original args should be something as: + # ['X:\\pysrc\\pydevd.py', '--multiprocess', '--print-in-debugger-startup', + # '--vm_type', 'python', '--client', '127.0.0.1', '--port', '56352', '--file', 'x:\\snippet1.py'] + from _pydevd_bundle.pydevd_command_line_handling import setup_to_argv + + new_args = [] + new_args.extend(unquoted_args[:first_non_vm_index]) + if before_module_flag: + new_args.append(before_module_flag) + + add_module_at = len(new_args) + 1 + + new_args.extend( + setup_to_argv( + _get_setup_updated_with_protocol_and_ppid(SetupHolder.setup, is_exec=is_exec), skip_names=set(("module", "cmd-line")) + ) + ) + new_args.append("--file") + + if module_name is not None: + assert module_name_i_start != -1 + assert module_name_i_end != -1 + # Always after 'pydevd' (i.e.: pydevd "--module" --multiprocess ...) + new_args.insert(add_module_at, "--module") + new_args.append(module_name) + new_args.extend(unquoted_args[module_name_i_end + 1 :]) + + elif filename is not None: + assert filename_i != -1 + new_args.append(filename) + new_args.extend(unquoted_args[filename_i + 1 :]) + + else: + raise AssertionError("Internal error (unexpected condition)") + + return quote_args(new_args) + except: + pydev_log.exception("Error patching args (debugger not attached to subprocess).") + return original_args + + +def str_to_args_windows(args): + # See https://docs.microsoft.com/en-us/cpp/c-language/parsing-c-command-line-arguments. + # + # Implemetation ported from DebugPlugin.parseArgumentsWindows: + # https://github.com/eclipse/eclipse.platform.debug/blob/master/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java + + result = [] + + DEFAULT = 0 + ARG = 1 + IN_DOUBLE_QUOTE = 2 + + state = DEFAULT + backslashes = 0 + buf = "" + + args_len = len(args) + for i in range(args_len): + ch = args[i] + if ch == "\\": + backslashes += 1 + continue + elif backslashes != 0: + if ch == '"': + while backslashes >= 2: + backslashes -= 2 + buf += "\\" + if backslashes == 1: + if state == DEFAULT: + state = ARG + + buf += '"' + backslashes = 0 + continue + # else fall through to switch + else: + # false alarm, treat passed backslashes literally... + if state == DEFAULT: + state = ARG + + while backslashes > 0: + backslashes -= 1 + buf += "\\" + # fall through to switch + if ch in (" ", "\t"): + if state == DEFAULT: + # skip + continue + elif state == ARG: + state = DEFAULT + result.append(buf) + buf = "" + continue + + if state in (DEFAULT, ARG): + if ch == '"': + state = IN_DOUBLE_QUOTE + else: + state = ARG + buf += ch + + elif state == IN_DOUBLE_QUOTE: + if ch == '"': + if i + 1 < args_len and args[i + 1] == '"': + # Undocumented feature in Windows: + # Two consecutive double quotes inside a double-quoted argument are interpreted as + # a single double quote. + buf += '"' + i += 1 + else: + state = ARG + else: + buf += ch + + else: + raise RuntimeError("Illegal condition") + + if len(buf) > 0 or state != DEFAULT: + result.append(buf) + + return result + + +def patch_arg_str_win(arg_str): + args = str_to_args_windows(arg_str) + # Fix https://youtrack.jetbrains.com/issue/PY-9767 (args may be empty) + if not args or not is_python(args[0]): + return arg_str + arg_str = " ".join(patch_args(args)) + pydev_log.debug("New args: %s", arg_str) + return arg_str + + +def monkey_patch_module(module, funcname, create_func): + if hasattr(module, funcname): + original_name = "original_" + funcname + if not hasattr(module, original_name): + setattr(module, original_name, getattr(module, funcname)) + setattr(module, funcname, create_func(original_name)) + + +def monkey_patch_os(funcname, create_func): + monkey_patch_module(os, funcname, create_func) + + +def warn_multiproc(): + pass # TODO: Provide logging as messages to the IDE. + # pydev_log.error_once( + # "pydev debugger: New process is launching (breakpoints won't work in the new process).\n" + # "pydev debugger: To debug that process please enable 'Attach to subprocess automatically while debugging?' option in the debugger settings.\n") + # + + +def create_warn_multiproc(original_name): + def new_warn_multiproc(*args, **kwargs): + import os + + warn_multiproc() + + return getattr(os, original_name)(*args, **kwargs) + + return new_warn_multiproc + + +def create_execl(original_name): + def new_execl(path, *args): + """ + os.execl(path, arg0, arg1, ...) + os.execle(path, arg0, arg1, ..., env) + os.execlp(file, arg0, arg1, ...) + os.execlpe(file, arg0, arg1, ..., env) + """ + if _get_apply_arg_patching(): + args = patch_args(args, is_exec=True) + send_process_created_message() + send_process_about_to_be_replaced() + + return getattr(os, original_name)(path, *args) + + return new_execl + + +def create_execv(original_name): + def new_execv(path, args): + """ + os.execv(path, args) + os.execvp(file, args) + """ + if _get_apply_arg_patching(): + args = patch_args(args, is_exec=True) + send_process_created_message() + send_process_about_to_be_replaced() + + return getattr(os, original_name)(path, args) + + return new_execv + + +def create_execve(original_name): + """ + os.execve(path, args, env) + os.execvpe(file, args, env) + """ + + def new_execve(path, args, env): + if _get_apply_arg_patching(): + args = patch_args(args, is_exec=True) + send_process_created_message() + send_process_about_to_be_replaced() + + return getattr(os, original_name)(path, args, env) + + return new_execve + + +def create_spawnl(original_name): + def new_spawnl(mode, path, *args): + """ + os.spawnl(mode, path, arg0, arg1, ...) + os.spawnlp(mode, file, arg0, arg1, ...) + """ + if _get_apply_arg_patching(): + args = patch_args(args) + send_process_created_message() + + return getattr(os, original_name)(mode, path, *args) + + return new_spawnl + + +def create_spawnv(original_name): + def new_spawnv(mode, path, args): + """ + os.spawnv(mode, path, args) + os.spawnvp(mode, file, args) + """ + if _get_apply_arg_patching(): + args = patch_args(args) + send_process_created_message() + + return getattr(os, original_name)(mode, path, args) + + return new_spawnv + + +def create_spawnve(original_name): + """ + os.spawnve(mode, path, args, env) + os.spawnvpe(mode, file, args, env) + """ + + def new_spawnve(mode, path, args, env): + if _get_apply_arg_patching(): + args = patch_args(args) + send_process_created_message() + + return getattr(os, original_name)(mode, path, args, env) + + return new_spawnve + + +def create_posix_spawn(original_name): + """ + os.posix_spawn(executable, args, env, **kwargs) + """ + + def new_posix_spawn(executable, args, env, **kwargs): + if _get_apply_arg_patching(): + args = patch_args(args) + send_process_created_message() + + return getattr(os, original_name)(executable, args, env, **kwargs) + + return new_posix_spawn + + +def create_fork_exec(original_name): + """ + _posixsubprocess.fork_exec(args, executable_list, close_fds, ... (13 more)) + """ + + def new_fork_exec(args, *other_args): + import _posixsubprocess # @UnresolvedImport + + if _get_apply_arg_patching(): + args = patch_args(args) + send_process_created_message() + + return getattr(_posixsubprocess, original_name)(args, *other_args) + + return new_fork_exec + + +def create_warn_fork_exec(original_name): + """ + _posixsubprocess.fork_exec(args, executable_list, close_fds, ... (13 more)) + """ + + def new_warn_fork_exec(*args): + try: + import _posixsubprocess + + warn_multiproc() + return getattr(_posixsubprocess, original_name)(*args) + except: + pass + + return new_warn_fork_exec + + +def create_subprocess_fork_exec(original_name): + """ + subprocess._fork_exec(args, executable_list, close_fds, ... (13 more)) + """ + + def new_fork_exec(args, *other_args): + import subprocess + + if _get_apply_arg_patching(): + args = patch_args(args) + send_process_created_message() + + return getattr(subprocess, original_name)(args, *other_args) + + return new_fork_exec + + +def create_subprocess_warn_fork_exec(original_name): + """ + subprocess._fork_exec(args, executable_list, close_fds, ... (13 more)) + """ + + def new_warn_fork_exec(*args): + try: + import subprocess + + warn_multiproc() + return getattr(subprocess, original_name)(*args) + except: + pass + + return new_warn_fork_exec + + +def create_CreateProcess(original_name): + """ + CreateProcess(*args, **kwargs) + """ + + def new_CreateProcess(app_name, cmd_line, *args): + try: + import _subprocess + except ImportError: + import _winapi as _subprocess + + if _get_apply_arg_patching(): + cmd_line = patch_arg_str_win(cmd_line) + send_process_created_message() + + return getattr(_subprocess, original_name)(app_name, cmd_line, *args) + + return new_CreateProcess + + +def create_CreateProcessWarnMultiproc(original_name): + """ + CreateProcess(*args, **kwargs) + """ + + def new_CreateProcess(*args): + try: + import _subprocess + except ImportError: + import _winapi as _subprocess + warn_multiproc() + return getattr(_subprocess, original_name)(*args) + + return new_CreateProcess + + +def create_fork(original_name): + def new_fork(): + # A simple fork will result in a new python process + is_new_python_process = True + frame = sys._getframe() + + apply_arg_patch = _get_apply_arg_patching() + + is_subprocess_fork = False + while frame is not None: + if frame.f_code.co_name == "_execute_child" and "subprocess" in frame.f_code.co_filename: + is_subprocess_fork = True + # If we're actually in subprocess.Popen creating a child, it may + # result in something which is not a Python process, (so, we + # don't want to connect with it in the forked version). + executable = frame.f_locals.get("executable") + if executable is not None: + is_new_python_process = False + if is_python(executable): + is_new_python_process = True + break + + frame = frame.f_back + frame = None # Just make sure we don't hold on to it. + + protocol = pydevd_constants.get_protocol() + debug_mode = PydevdCustomization.DEBUG_MODE + + child_process = getattr(os, original_name)() # fork + if not child_process: + if is_new_python_process: + PydevdCustomization.DEFAULT_PROTOCOL = protocol + PydevdCustomization.DEBUG_MODE = debug_mode + _on_forked_process(setup_tracing=apply_arg_patch and not is_subprocess_fork) + else: + set_global_debugger(None) + else: + if is_new_python_process: + send_process_created_message() + return child_process + + return new_fork + + +def send_process_created_message(): + py_db = get_global_debugger() + if py_db is not None: + py_db.send_process_created_message() + + +def send_process_about_to_be_replaced(): + py_db = get_global_debugger() + if py_db is not None: + py_db.send_process_about_to_be_replaced() + + +def patch_new_process_functions(): + # os.execl(path, arg0, arg1, ...) + # os.execle(path, arg0, arg1, ..., env) + # os.execlp(file, arg0, arg1, ...) + # os.execlpe(file, arg0, arg1, ..., env) + # os.execv(path, args) + # os.execve(path, args, env) + # os.execvp(file, args) + # os.execvpe(file, args, env) + monkey_patch_os("execl", create_execl) + monkey_patch_os("execle", create_execl) + monkey_patch_os("execlp", create_execl) + monkey_patch_os("execlpe", create_execl) + monkey_patch_os("execv", create_execv) + monkey_patch_os("execve", create_execve) + monkey_patch_os("execvp", create_execv) + monkey_patch_os("execvpe", create_execve) + + # os.spawnl(mode, path, ...) + # os.spawnle(mode, path, ..., env) + # os.spawnlp(mode, file, ...) + # os.spawnlpe(mode, file, ..., env) + # os.spawnv(mode, path, args) + # os.spawnve(mode, path, args, env) + # os.spawnvp(mode, file, args) + # os.spawnvpe(mode, file, args, env) + + monkey_patch_os("spawnl", create_spawnl) + monkey_patch_os("spawnle", create_spawnl) + monkey_patch_os("spawnlp", create_spawnl) + monkey_patch_os("spawnlpe", create_spawnl) + monkey_patch_os("spawnv", create_spawnv) + monkey_patch_os("spawnve", create_spawnve) + monkey_patch_os("spawnvp", create_spawnv) + monkey_patch_os("spawnvpe", create_spawnve) + monkey_patch_os("posix_spawn", create_posix_spawn) + + if not IS_JYTHON: + if not IS_WINDOWS: + monkey_patch_os("fork", create_fork) + try: + import _posixsubprocess + + monkey_patch_module(_posixsubprocess, "fork_exec", create_fork_exec) + except ImportError: + pass + + try: + import subprocess + + monkey_patch_module(subprocess, "_fork_exec", create_subprocess_fork_exec) + except AttributeError: + pass + else: + # Windows + try: + import _subprocess + except ImportError: + import _winapi as _subprocess + monkey_patch_module(_subprocess, "CreateProcess", create_CreateProcess) + + +def patch_new_process_functions_with_warning(): + monkey_patch_os("execl", create_warn_multiproc) + monkey_patch_os("execle", create_warn_multiproc) + monkey_patch_os("execlp", create_warn_multiproc) + monkey_patch_os("execlpe", create_warn_multiproc) + monkey_patch_os("execv", create_warn_multiproc) + monkey_patch_os("execve", create_warn_multiproc) + monkey_patch_os("execvp", create_warn_multiproc) + monkey_patch_os("execvpe", create_warn_multiproc) + monkey_patch_os("spawnl", create_warn_multiproc) + monkey_patch_os("spawnle", create_warn_multiproc) + monkey_patch_os("spawnlp", create_warn_multiproc) + monkey_patch_os("spawnlpe", create_warn_multiproc) + monkey_patch_os("spawnv", create_warn_multiproc) + monkey_patch_os("spawnve", create_warn_multiproc) + monkey_patch_os("spawnvp", create_warn_multiproc) + monkey_patch_os("spawnvpe", create_warn_multiproc) + monkey_patch_os("posix_spawn", create_warn_multiproc) + + if not IS_JYTHON: + if not IS_WINDOWS: + monkey_patch_os("fork", create_warn_multiproc) + try: + import _posixsubprocess + + monkey_patch_module(_posixsubprocess, "fork_exec", create_warn_fork_exec) + except ImportError: + pass + + try: + import subprocess + + monkey_patch_module(subprocess, "_fork_exec", create_subprocess_warn_fork_exec) + except AttributeError: + pass + + else: + # Windows + try: + import _subprocess + except ImportError: + import _winapi as _subprocess + monkey_patch_module(_subprocess, "CreateProcess", create_CreateProcessWarnMultiproc) + + +class _NewThreadStartupWithTrace: + def __init__(self, original_func, args, kwargs): + self.original_func = original_func + self.args = args + self.kwargs = kwargs + + def __call__(self): + # We monkey-patch the thread creation so that this function is called in the new thread. At this point + # we notify of its creation and start tracing it. + py_db = get_global_debugger() + + thread_id = None + if py_db is not None: + # Note: if this is a thread from threading.py, we're too early in the boostrap process (because we mocked + # the start_new_thread internal machinery and thread._bootstrap has not finished), so, the code below needs + # to make sure that we use the current thread bound to the original function and not use + # threading.current_thread() unless we're sure it's a dummy thread. + t = getattr(self.original_func, "__self__", getattr(self.original_func, "im_self", None)) + if not isinstance(t, threading.Thread): + # This is not a threading.Thread but a Dummy thread (so, get it as a dummy thread using + # currentThread). + t = threading.current_thread() + + if not getattr(t, "is_pydev_daemon_thread", False): + thread_id = get_current_thread_id(t) + py_db.notify_thread_created(thread_id, t) + _on_set_trace_for_new_thread(py_db) + + if getattr(py_db, "thread_analyser", None) is not None: + try: + from _pydevd_bundle.pydevd_concurrency_analyser.pydevd_concurrency_logger import log_new_thread + + log_new_thread(py_db, t) + except: + sys.stderr.write("Failed to detect new thread for visualization") + try: + ret = self.original_func(*self.args, **self.kwargs) + finally: + if thread_id is not None: + if py_db is not None: + # At thread shutdown we only have pydevd-related code running (which shouldn't + # be tracked). + py_db.disable_tracing() + py_db.notify_thread_not_alive(thread_id) + + return ret + + +class _NewThreadStartupWithoutTrace: + def __init__(self, original_func, args, kwargs): + self.original_func = original_func + self.args = args + self.kwargs = kwargs + + def __call__(self): + return self.original_func(*self.args, **self.kwargs) + + +_UseNewThreadStartup = _NewThreadStartupWithTrace + + +def _get_threading_modules_to_patch(): + threading_modules_to_patch = [] + + try: + import thread as _thread + except: + import _thread + threading_modules_to_patch.append(_thread) + threading_modules_to_patch.append(threading) + + return threading_modules_to_patch + + +threading_modules_to_patch = _get_threading_modules_to_patch() + + +def patch_thread_module(thread_module): + # Note: this is needed not just for the tracing, but to have an early way to + # notify that a thread was created (i.e.: tests_python.test_debugger_json.test_case_started_exited_threads_protocol) + start_thread_attrs = ["_start_new_thread", "start_new_thread", "start_new"] + start_joinable_attrs = ["start_joinable_thread", "_start_joinable_thread"] + check = start_thread_attrs + start_joinable_attrs + + replace_attrs = [] + for attr in check: + if hasattr(thread_module, attr): + replace_attrs.append(attr) + + if not replace_attrs: + return + + for attr in replace_attrs: + if attr in start_joinable_attrs: + if getattr(thread_module, "_original_start_joinable_thread", None) is None: + _original_start_joinable_thread = thread_module._original_start_joinable_thread = getattr(thread_module, attr) + else: + _original_start_joinable_thread = thread_module._original_start_joinable_thread + else: + if getattr(thread_module, "_original_start_new_thread", None) is None: + _original_start_new_thread = thread_module._original_start_new_thread = getattr(thread_module, attr) + else: + _original_start_new_thread = thread_module._original_start_new_thread + + class ClassWithPydevStartNewThread: + def pydev_start_new_thread(self, function, args=(), kwargs={}): + """ + We need to replace the original thread_module.start_new_thread with this function so that threads started + through it and not through the threading module are properly traced. + """ + return _original_start_new_thread(_UseNewThreadStartup(function, args, kwargs), ()) + + class ClassWithPydevStartJoinableThread: + def pydev_start_joinable_thread(self, function, *args, **kwargs): + """ + We need to replace the original thread_module._start_joinable_thread with this function so that threads started + through it and not through the threading module are properly traced. + """ + # Note: only handling the case from threading.py where the handle + # and daemon flags are passed explicitly. This will fail if some user library + # actually passes those without being a keyword argument! + handle = kwargs.pop("handle", None) + daemon = kwargs.pop("daemon", True) + return _original_start_joinable_thread(_UseNewThreadStartup(function, args, kwargs), handle=handle, daemon=daemon) + + # This is a hack for the situation where the thread_module.start_new_thread is declared inside a class, such as the one below + # class F(object): + # start_new_thread = thread_module.start_new_thread + # + # def start_it(self): + # self.start_new_thread(self.function, args, kwargs) + # So, if it's an already bound method, calling self.start_new_thread won't really receive a different 'self' -- it + # does work in the default case because in builtins self isn't passed either. + pydev_start_new_thread = ClassWithPydevStartNewThread().pydev_start_new_thread + pydev_start_joinable_thread = ClassWithPydevStartJoinableThread().pydev_start_joinable_thread + + # We need to replace the original thread_module.start_new_thread with this function so that threads started through + # it and not through the threading module are properly traced. + for attr in replace_attrs: + if attr in start_joinable_attrs: + setattr(thread_module, attr, pydev_start_joinable_thread) + else: + setattr(thread_module, attr, pydev_start_new_thread) + + +def patch_thread_modules(): + for t in threading_modules_to_patch: + patch_thread_module(t) + + +def undo_patch_thread_modules(): + for t in threading_modules_to_patch: + try: + t.start_new_thread = t._original_start_new_thread + except: + pass + + try: + t.start_new = t._original_start_new_thread + except: + pass + + try: + t._start_new_thread = t._original_start_new_thread + except: + pass + + try: + t._start_joinable_thread = t._original_start_joinable_thread + except: + pass + + try: + t.start_joinable_thread = t._original_start_joinable_thread + except: + pass + + +def disable_trace_thread_modules(): + """ + Can be used to temporarily stop tracing threads created with thread.start_new_thread. + """ + global _UseNewThreadStartup + _UseNewThreadStartup = _NewThreadStartupWithoutTrace + + +def enable_trace_thread_modules(): + """ + Can be used to start tracing threads created with thread.start_new_thread again. + """ + global _UseNewThreadStartup + _UseNewThreadStartup = _NewThreadStartupWithTrace + + +def get_original_start_new_thread(threading_module): + try: + return threading_module._original_start_new_thread + except: + return threading_module.start_new_thread diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey_qt.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey_qt.py new file mode 100644 index 0000000..5864e3c --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey_qt.py @@ -0,0 +1,220 @@ +from __future__ import nested_scopes + +from _pydev_bundle._pydev_saved_modules import threading +import os +from _pydev_bundle import pydev_log + + +def set_trace_in_qt(): + from _pydevd_bundle.pydevd_comm import get_global_debugger + + py_db = get_global_debugger() + if py_db is not None: + threading.current_thread() # Create the dummy thread for qt. + py_db.enable_tracing() + + +_patched_qt = False + + +def patch_qt(qt_support_mode): + """ + This method patches qt (PySide2, PySide, PyQt4, PyQt5) so that we have hooks to set the tracing for QThread. + """ + if not qt_support_mode: + return + + if qt_support_mode is True or qt_support_mode == "True": + # do not break backward compatibility + qt_support_mode = "auto" + + if qt_support_mode == "auto": + qt_support_mode = os.getenv("PYDEVD_PYQT_MODE", "auto") + + # Avoid patching more than once + global _patched_qt + if _patched_qt: + return + + pydev_log.debug("Qt support mode: %s", qt_support_mode) + + _patched_qt = True + + if qt_support_mode == "auto": + patch_qt_on_import = None + try: + import PySide2 # @UnresolvedImport @UnusedImport + + qt_support_mode = "pyside2" + except: + try: + import Pyside # @UnresolvedImport @UnusedImport + + qt_support_mode = "pyside" + except: + try: + import PyQt5 # @UnresolvedImport @UnusedImport + + qt_support_mode = "pyqt5" + except: + try: + import PyQt4 # @UnresolvedImport @UnusedImport + + qt_support_mode = "pyqt4" + except: + return + + if qt_support_mode == "pyside2": + try: + import PySide2.QtCore # @UnresolvedImport + + _internal_patch_qt(PySide2.QtCore, qt_support_mode) + except: + return + + elif qt_support_mode == "pyside": + try: + import PySide.QtCore # @UnresolvedImport + + _internal_patch_qt(PySide.QtCore, qt_support_mode) + except: + return + + elif qt_support_mode == "pyqt5": + try: + import PyQt5.QtCore # @UnresolvedImport + + _internal_patch_qt(PyQt5.QtCore) + except: + return + + elif qt_support_mode == "pyqt4": + # Ok, we have an issue here: + # PyDev-452: Selecting PyQT API version using sip.setapi fails in debug mode + # http://pyqt.sourceforge.net/Docs/PyQt4/incompatible_apis.html + # Mostly, if the user uses a different API version (i.e.: v2 instead of v1), + # that has to be done before importing PyQt4 modules (PySide/PyQt5 don't have this issue + # as they only implements v2). + patch_qt_on_import = "PyQt4" + + def get_qt_core_module(): + import PyQt4.QtCore # @UnresolvedImport + + return PyQt4.QtCore + + _patch_import_to_patch_pyqt_on_import(patch_qt_on_import, get_qt_core_module) + + else: + raise ValueError("Unexpected qt support mode: %s" % (qt_support_mode,)) + + +def _patch_import_to_patch_pyqt_on_import(patch_qt_on_import, get_qt_core_module): + # I don't like this approach very much as we have to patch __import__, but I like even less + # asking the user to configure something in the client side... + # So, our approach is to patch PyQt4 right before the user tries to import it (at which + # point he should've set the sip api version properly already anyways). + + pydev_log.debug("Setting up Qt post-import monkeypatch.") + + dotted = patch_qt_on_import + "." + original_import = __import__ + + from _pydev_bundle._pydev_sys_patch import patch_sys_module, patch_reload, cancel_patches_in_sys_module + + patch_sys_module() + patch_reload() + + def patched_import(name, *args, **kwargs): + if patch_qt_on_import == name or name.startswith(dotted): + builtins.__import__ = original_import + cancel_patches_in_sys_module() + _internal_patch_qt(get_qt_core_module()) # Patch it only when the user would import the qt module + return original_import(name, *args, **kwargs) + + import builtins # Py3 + + builtins.__import__ = patched_import + + +def _internal_patch_qt(QtCore, qt_support_mode="auto"): + pydev_log.debug("Patching Qt: %s", QtCore) + + _original_thread_init = QtCore.QThread.__init__ + _original_runnable_init = QtCore.QRunnable.__init__ + _original_QThread = QtCore.QThread + + class FuncWrapper: + def __init__(self, original): + self._original = original + + def __call__(self, *args, **kwargs): + set_trace_in_qt() + return self._original(*args, **kwargs) + + class StartedSignalWrapper(QtCore.QObject): # Wrapper for the QThread.started signal + try: + _signal = QtCore.Signal() # @UndefinedVariable + except: + _signal = QtCore.pyqtSignal() # @UndefinedVariable + + def __init__(self, thread, original_started): + QtCore.QObject.__init__(self) + self.thread = thread + self.original_started = original_started + if qt_support_mode in ("pyside", "pyside2"): + self._signal = original_started + else: + self._signal.connect(self._on_call) + self.original_started.connect(self._signal) + + def connect(self, func, *args, **kwargs): + if qt_support_mode in ("pyside", "pyside2"): + return self._signal.connect(FuncWrapper(func), *args, **kwargs) + else: + return self._signal.connect(func, *args, **kwargs) + + def disconnect(self, *args, **kwargs): + return self._signal.disconnect(*args, **kwargs) + + def emit(self, *args, **kwargs): + return self._signal.emit(*args, **kwargs) + + def _on_call(self, *args, **kwargs): + set_trace_in_qt() + + class ThreadWrapper(QtCore.QThread): # Wrapper for QThread + def __init__(self, *args, **kwargs): + _original_thread_init(self, *args, **kwargs) + + # In PyQt5 the program hangs when we try to call original run method of QThread class. + # So we need to distinguish instances of QThread class and instances of QThread inheritors. + if self.__class__.run == _original_QThread.run: + self.run = self._exec_run + else: + self._original_run = self.run + self.run = self._new_run + self._original_started = self.started + self.started = StartedSignalWrapper(self, self.started) + + def _exec_run(self): + set_trace_in_qt() + self.exec_() + return None + + def _new_run(self): + set_trace_in_qt() + return self._original_run() + + class RunnableWrapper(QtCore.QRunnable): # Wrapper for QRunnable + def __init__(self, *args, **kwargs): + _original_runnable_init(self, *args, **kwargs) + + self._original_run = self.run + self.run = self._new_run + + def _new_run(self): + set_trace_in_qt() + return self._original_run() + + QtCore.QThread = ThreadWrapper + QtCore.QRunnable = RunnableWrapper diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_override.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_override.py new file mode 100644 index 0000000..ecf377e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_override.py @@ -0,0 +1,37 @@ +def overrides(method): + """ + Meant to be used as + + class B: + @overrides(A.m1) + def m1(self): + pass + """ + + def wrapper(func): + if func.__name__ != method.__name__: + msg = "Wrong @override: %r expected, but overwriting %r." + msg = msg % (func.__name__, method.__name__) + raise AssertionError(msg) + + if func.__doc__ is None: + func.__doc__ = method.__doc__ + + return func + + return wrapper + + +def implements(method): + def wrapper(func): + if func.__name__ != method.__name__: + msg = "Wrong @implements: %r expected, but implementing %r." + msg = msg % (func.__name__, method.__name__) + raise AssertionError(msg) + + if func.__doc__ is None: + func.__doc__ = method.__doc__ + + return func + + return wrapper diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_umd.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_umd.py new file mode 100644 index 0000000..d830491 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_umd.py @@ -0,0 +1,181 @@ +""" +The UserModuleDeleter and runfile methods are copied from +Spyder and carry their own license agreement. +http://code.google.com/p/spyderlib/source/browse/spyderlib/widgets/externalshell/sitecustomize.py + +Spyder License Agreement (MIT License) +-------------------------------------- + +Copyright (c) 2009-2012 Pierre Raybaut + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +""" + +import sys +import os +from _pydev_bundle._pydev_execfile import execfile + + +# The following classes and functions are mainly intended to be used from +# an interactive Python session +class UserModuleDeleter: + """ + User Module Deleter (UMD) aims at deleting user modules + to force Python to deeply reload them during import + + pathlist [list]: ignore list in terms of module path + namelist [list]: ignore list in terms of module name + """ + + def __init__(self, namelist=None, pathlist=None): + if namelist is None: + namelist = [] + self.namelist = namelist + if pathlist is None: + pathlist = [] + self.pathlist = pathlist + try: + # ignore all files in org.python.pydev/pysrc + import pydev_pysrc, inspect + + self.pathlist.append(os.path.dirname(pydev_pysrc.__file__)) + except: + pass + self.previous_modules = list(sys.modules.keys()) + + def is_module_ignored(self, modname, modpath): + for path in [sys.prefix] + self.pathlist: + if modpath.startswith(path): + return True + else: + return set(modname.split(".")) & set(self.namelist) + + def run(self, verbose=False): + """ + Del user modules to force Python to deeply reload them + + Do not del modules which are considered as system modules, i.e. + modules installed in subdirectories of Python interpreter's binary + Do not del C modules + """ + log = [] + modules_copy = dict(sys.modules) + for modname, module in modules_copy.items(): + if modname == "aaaaa": + print(modname, module) + print(self.previous_modules) + if modname not in self.previous_modules: + modpath = getattr(module, "__file__", None) + if modpath is None: + # *module* is a C module that is statically linked into the + # interpreter. There is no way to know its path, so we + # choose to ignore it. + continue + if not self.is_module_ignored(modname, modpath): + log.append(modname) + del sys.modules[modname] + if verbose and log: + print("\x1b[4;33m%s\x1b[24m%s\x1b[0m" % ("UMD has deleted", ": " + ", ".join(log))) + + +__umd__ = None + +_get_globals_callback = None + + +def _set_globals_function(get_globals): + global _get_globals_callback + _get_globals_callback = get_globals + + +def _get_globals(): + """Return current Python interpreter globals namespace""" + if _get_globals_callback is not None: + return _get_globals_callback() + else: + try: + from __main__ import __dict__ as namespace + except ImportError: + try: + # The import fails on IronPython + import __main__ + + namespace = __main__.__dict__ + except: + namespace + shell = namespace.get("__ipythonshell__") + if shell is not None and hasattr(shell, "user_ns"): + # IPython 0.12+ kernel + return shell.user_ns + else: + # Python interpreter + return namespace + return namespace + + +def runfile(filename, args=None, wdir=None, namespace=None): + """ + Run filename + args: command line arguments (string) + wdir: working directory + """ + try: + if hasattr(filename, "decode"): + filename = filename.decode("utf-8") + except (UnicodeError, TypeError): + pass + global __umd__ + if os.environ.get("PYDEV_UMD_ENABLED", "").lower() == "true": + if __umd__ is None: + namelist = os.environ.get("PYDEV_UMD_NAMELIST", None) + if namelist is not None: + namelist = namelist.split(",") + __umd__ = UserModuleDeleter(namelist=namelist) + else: + verbose = os.environ.get("PYDEV_UMD_VERBOSE", "").lower() == "true" + __umd__.run(verbose=verbose) + if args is not None and not isinstance(args, (bytes, str)): + raise TypeError("expected a character buffer object") + if namespace is None: + namespace = _get_globals() + if "__file__" in namespace: + old_file = namespace["__file__"] + else: + old_file = None + namespace["__file__"] = filename + sys.argv = [filename] + if args is not None: + for arg in args.split(): + sys.argv.append(arg) + if wdir is not None: + try: + if hasattr(wdir, "decode"): + wdir = wdir.decode("utf-8") + except (UnicodeError, TypeError): + pass + os.chdir(wdir) + execfile(filename, namespace) + sys.argv = [""] + if old_file is None: + del namespace["__file__"] + else: + namespace["__file__"] = old_file diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_versioncheck.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_versioncheck.py new file mode 100644 index 0000000..fb7372d --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_bundle/pydev_versioncheck.py @@ -0,0 +1,16 @@ +import sys + + +def versionok_for_gui(): + """Return True if running Python is suitable for GUI Event Integration and deeper IPython integration""" + # We require Python 2.6+ ... + if sys.hexversion < 0x02060000: + return False + # Or Python 3.2+ + if sys.hexversion >= 0x03000000 and sys.hexversion < 0x03020000: + return False + # Not supported under Jython nor IronPython + if sys.platform.startswith("java") or sys.platform.startswith("cli"): + return False + + return True diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__init__.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..7e78351 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles.cpython-312.pyc new file mode 100644 index 0000000..79d7fa5 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_coverage.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_coverage.cpython-312.pyc new file mode 100644 index 0000000..6acb9a4 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_coverage.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_nose.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_nose.cpython-312.pyc new file mode 100644 index 0000000..20663e1 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_nose.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_parallel.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_parallel.cpython-312.pyc new file mode 100644 index 0000000..7f79f75 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_parallel.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_parallel_client.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_parallel_client.cpython-312.pyc new file mode 100644 index 0000000..8ce4a67 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_parallel_client.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_pytest2.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_pytest2.cpython-312.pyc new file mode 100644 index 0000000..a552732 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_pytest2.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_unittest.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_unittest.cpython-312.pyc new file mode 100644 index 0000000..2e7b77d Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_unittest.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_xml_rpc.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_xml_rpc.cpython-312.pyc new file mode 100644 index 0000000..bea77ad Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/__pycache__/pydev_runfiles_xml_rpc.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles.py new file mode 100644 index 0000000..5d49d18 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles.py @@ -0,0 +1,884 @@ +from __future__ import nested_scopes + +import fnmatch +import os.path +from _pydev_runfiles.pydev_runfiles_coverage import start_coverage_support +from _pydevd_bundle.pydevd_constants import * # @UnusedWildImport +import re +import time +import json + + +# ======================================================================================================================= +# Configuration +# ======================================================================================================================= +class Configuration: + def __init__( + self, + files_or_dirs="", + verbosity=2, + include_tests=None, + tests=None, + port=None, + files_to_tests=None, + jobs=1, + split_jobs="tests", + coverage_output_dir=None, + coverage_include=None, + coverage_output_file=None, + exclude_files=None, + exclude_tests=None, + include_files=None, + django=False, + ): + self.files_or_dirs = files_or_dirs + self.verbosity = verbosity + self.include_tests = include_tests + self.tests = tests + self.port = port + self.files_to_tests = files_to_tests + self.jobs = jobs + self.split_jobs = split_jobs + self.django = django + + if include_tests: + assert isinstance(include_tests, (list, tuple)) + + if exclude_files: + assert isinstance(exclude_files, (list, tuple)) + + if exclude_tests: + assert isinstance(exclude_tests, (list, tuple)) + + self.exclude_files = exclude_files + self.include_files = include_files + self.exclude_tests = exclude_tests + + self.coverage_output_dir = coverage_output_dir + self.coverage_include = coverage_include + self.coverage_output_file = coverage_output_file + + def __str__(self): + return """Configuration + - files_or_dirs: %s + - verbosity: %s + - tests: %s + - port: %s + - files_to_tests: %s + - jobs: %s + - split_jobs: %s + + - include_files: %s + - include_tests: %s + + - exclude_files: %s + - exclude_tests: %s + + - coverage_output_dir: %s + - coverage_include_dir: %s + - coverage_output_file: %s + + - django: %s +""" % ( + self.files_or_dirs, + self.verbosity, + self.tests, + self.port, + self.files_to_tests, + self.jobs, + self.split_jobs, + self.include_files, + self.include_tests, + self.exclude_files, + self.exclude_tests, + self.coverage_output_dir, + self.coverage_include, + self.coverage_output_file, + self.django, + ) + + +# ======================================================================================================================= +# parse_cmdline +# ======================================================================================================================= +def parse_cmdline(argv=None): + """ + Parses command line and returns test directories, verbosity, test filter and test suites + + usage: + runfiles.py -v|--verbosity -t|--tests dirs|files + + Multiprocessing options: + jobs=number (with the number of jobs to be used to run the tests) + split_jobs='module'|'tests' + if == module, a given job will always receive all the tests from a module + if == tests, the tests will be split independently of their originating module (default) + + --exclude_files = comma-separated list of patterns with files to exclude (fnmatch style) + --include_files = comma-separated list of patterns with files to include (fnmatch style) + --exclude_tests = comma-separated list of patterns with test names to exclude (fnmatch style) + + Note: if --tests is given, --exclude_files, --include_files and --exclude_tests are ignored! + """ + if argv is None: + argv = sys.argv + + verbosity = 2 + include_tests = None + tests = None + port = None + jobs = 1 + split_jobs = "tests" + files_to_tests = {} + coverage_output_dir = None + coverage_include = None + exclude_files = None + exclude_tests = None + include_files = None + django = False + + from _pydev_bundle._pydev_getopt import gnu_getopt + + optlist, dirs = gnu_getopt( + argv[1:], + "", + [ + "verbosity=", + "tests=", + "port=", + "config_file=", + "jobs=", + "split_jobs=", + "include_tests=", + "include_files=", + "exclude_files=", + "exclude_tests=", + "coverage_output_dir=", + "coverage_include=", + "django=", + ], + ) + + for opt, value in optlist: + if opt in ("-v", "--verbosity"): + verbosity = value + + elif opt in ("-p", "--port"): + port = int(value) + + elif opt in ("-j", "--jobs"): + jobs = int(value) + + elif opt in ("-s", "--split_jobs"): + split_jobs = value + if split_jobs not in ("module", "tests"): + raise AssertionError('Expected split to be either "module" or "tests". Was :%s' % (split_jobs,)) + + elif opt in ( + "-d", + "--coverage_output_dir", + ): + coverage_output_dir = value.strip() + + elif opt in ( + "-i", + "--coverage_include", + ): + coverage_include = value.strip() + + elif opt in ("-I", "--include_tests"): + include_tests = value.split(",") + + elif opt in ("-E", "--exclude_files"): + exclude_files = value.split(",") + + elif opt in ("-F", "--include_files"): + include_files = value.split(",") + + elif opt in ("-e", "--exclude_tests"): + exclude_tests = value.split(",") + + elif opt in ("-t", "--tests"): + tests = value.split(",") + + elif opt in ("--django",): + django = value.strip() in ["true", "True", "1"] + + elif opt in ("-c", "--config_file"): + config_file = value.strip() + if os.path.exists(config_file): + f = open(config_file, "r") + try: + config_file_contents = f.read() + finally: + f.close() + + if config_file_contents: + config_file_contents = config_file_contents.strip() + + if config_file_contents: + for line in config_file_contents.splitlines(): + file_and_test = line.split("|") + if len(file_and_test) == 2: + file, test = file_and_test + if file in files_to_tests: + files_to_tests[file].append(test) + else: + files_to_tests[file] = [test] + + else: + sys.stderr.write("Could not find config file: %s\n" % (config_file,)) + + filter_tests_env_var = os.environ.get("PYDEV_RUNFILES_FILTER_TESTS", None) + if filter_tests_env_var: + loaded = json.loads(filter_tests_env_var) + include = loaded["include"] + for path, name in include: + existing = files_to_tests.get(path) + if not existing: + existing = files_to_tests[path] = [] + existing.append(name) + # Note: at this point exclude or `*` is not handled. + # Clients need to do all the filtering on their side (could + # change to have `exclude` and support `*` entries). + + if type([]) != type(dirs): + dirs = [dirs] + + ret_dirs = [] + for d in dirs: + if "|" in d: + # paths may come from the ide separated by | + ret_dirs.extend(d.split("|")) + else: + ret_dirs.append(d) + + verbosity = int(verbosity) + + if tests: + if verbosity > 4: + sys.stdout.write("--tests provided. Ignoring --exclude_files, --exclude_tests and --include_files\n") + exclude_files = exclude_tests = include_files = None + + config = Configuration( + ret_dirs, + verbosity, + include_tests, + tests, + port, + files_to_tests, + jobs, + split_jobs, + coverage_output_dir, + coverage_include, + exclude_files=exclude_files, + exclude_tests=exclude_tests, + include_files=include_files, + django=django, + ) + + if verbosity > 5: + sys.stdout.write(str(config) + "\n") + return config + + +# ======================================================================================================================= +# PydevTestRunner +# ======================================================================================================================= +class PydevTestRunner(object): + """finds and runs a file or directory of files as a unit test""" + + __py_extensions = ["*.py", "*.pyw"] + __exclude_files = ["__init__.*"] + + # Just to check that only this attributes will be written to this file + __slots__ = [ + "verbosity", # Always used + "files_to_tests", # If this one is given, the ones below are not used + "files_or_dirs", # Files or directories received in the command line + "include_tests", # The filter used to collect the tests + "tests", # Strings with the tests to be run + "jobs", # Integer with the number of jobs that should be used to run the test cases + "split_jobs", # String with 'tests' or 'module' (how should the jobs be split) + "configuration", + "coverage", + ] + + def __init__(self, configuration): + self.verbosity = configuration.verbosity + + self.jobs = configuration.jobs + self.split_jobs = configuration.split_jobs + + files_to_tests = configuration.files_to_tests + if files_to_tests: + self.files_to_tests = files_to_tests + self.files_or_dirs = list(files_to_tests.keys()) + self.tests = None + else: + self.files_to_tests = {} + self.files_or_dirs = configuration.files_or_dirs + self.tests = configuration.tests + + self.configuration = configuration + self.__adjust_path() + + def __adjust_path(self): + """add the current file or directory to the python path""" + path_to_append = None + for n in range(len(self.files_or_dirs)): + dir_name = self.__unixify(self.files_or_dirs[n]) + if os.path.isdir(dir_name): + if not dir_name.endswith("/"): + self.files_or_dirs[n] = dir_name + "/" + path_to_append = os.path.normpath(dir_name) + elif os.path.isfile(dir_name): + path_to_append = os.path.dirname(dir_name) + else: + if not os.path.exists(dir_name): + block_line = "*" * 120 + sys.stderr.write("\n%s\n* PyDev test runner error: %s does not exist.\n%s\n" % (block_line, dir_name, block_line)) + return + msg = "unknown type. \n%s\nshould be file or a directory.\n" % (dir_name) + raise RuntimeError(msg) + if path_to_append is not None: + # Add it as the last one (so, first things are resolved against the default dirs and + # if none resolves, then we try a relative import). + sys.path.append(path_to_append) + + def __is_valid_py_file(self, fname): + """tests that a particular file contains the proper file extension + and is not in the list of files to exclude""" + is_valid_fname = 0 + for invalid_fname in self.__class__.__exclude_files: + is_valid_fname += int(not fnmatch.fnmatch(fname, invalid_fname)) + if_valid_ext = 0 + for ext in self.__class__.__py_extensions: + if_valid_ext += int(fnmatch.fnmatch(fname, ext)) + return is_valid_fname > 0 and if_valid_ext > 0 + + def __unixify(self, s): + """stupid windows. converts the backslash to forwardslash for consistency""" + return os.path.normpath(s).replace(os.sep, "/") + + def __importify(self, s, dir=False): + """turns directory separators into dots and removes the ".py*" extension + so the string can be used as import statement""" + if not dir: + dirname, fname = os.path.split(s) + + if fname.count(".") > 1: + # if there's a file named xxx.xx.py, it is not a valid module, so, let's not load it... + return + + imp_stmt_pieces = [dirname.replace("\\", "/").replace("/", "."), os.path.splitext(fname)[0]] + + if len(imp_stmt_pieces[0]) == 0: + imp_stmt_pieces = imp_stmt_pieces[1:] + + return ".".join(imp_stmt_pieces) + + else: # handle dir + return s.replace("\\", "/").replace("/", ".") + + def __add_files(self, pyfiles, root, files): + """if files match, appends them to pyfiles. used by os.path.walk fcn""" + for fname in files: + if self.__is_valid_py_file(fname): + name_without_base_dir = self.__unixify(os.path.join(root, fname)) + pyfiles.append(name_without_base_dir) + + def find_import_files(self): + """return a list of files to import""" + if self.files_to_tests: + pyfiles = self.files_to_tests.keys() + else: + pyfiles = [] + + for base_dir in self.files_or_dirs: + if os.path.isdir(base_dir): + for root, dirs, files in os.walk(base_dir): + # Note: handling directories that should be excluded from the search because + # they don't have __init__.py + exclude = {} + for d in dirs: + for init in ["__init__.py", "__init__.pyo", "__init__.pyc", "__init__.pyw", "__init__$py.class"]: + if os.path.exists(os.path.join(root, d, init).replace("\\", "/")): + break + else: + exclude[d] = 1 + + if exclude: + new = [] + for d in dirs: + if d not in exclude: + new.append(d) + + dirs[:] = new + + self.__add_files(pyfiles, root, files) + + elif os.path.isfile(base_dir): + pyfiles.append(base_dir) + + if self.configuration.exclude_files or self.configuration.include_files: + ret = [] + for f in pyfiles: + add = True + basename = os.path.basename(f) + if self.configuration.include_files: + add = False + + for pat in self.configuration.include_files: + if fnmatch.fnmatchcase(basename, pat): + add = True + break + + if not add: + if self.verbosity > 3: + sys.stdout.write( + "Skipped file: %s (did not match any include_files pattern: %s)\n" % (f, self.configuration.include_files) + ) + + elif self.configuration.exclude_files: + for pat in self.configuration.exclude_files: + if fnmatch.fnmatchcase(basename, pat): + if self.verbosity > 3: + sys.stdout.write("Skipped file: %s (matched exclude_files pattern: %s)\n" % (f, pat)) + + elif self.verbosity > 2: + sys.stdout.write("Skipped file: %s\n" % (f,)) + + add = False + break + + if add: + if self.verbosity > 3: + sys.stdout.write("Adding file: %s for test discovery.\n" % (f,)) + ret.append(f) + + pyfiles = ret + + return pyfiles + + def __get_module_from_str(self, modname, print_exception, pyfile): + """Import the module in the given import path. + * Returns the "final" module, so importing "coilib40.subject.visu" + returns the "visu" module, not the "coilib40" as returned by __import__""" + try: + mod = __import__(modname) + for part in modname.split(".")[1:]: + mod = getattr(mod, part) + return mod + except: + if print_exception: + from _pydev_runfiles import pydev_runfiles_xml_rpc + from _pydevd_bundle import pydevd_io + + buf_err = pydevd_io.start_redirect(keep_original_redirection=True, std="stderr") + buf_out = pydevd_io.start_redirect(keep_original_redirection=True, std="stdout") + try: + import traceback + + traceback.print_exc() + sys.stderr.write("ERROR: Module: %s could not be imported (file: %s).\n" % (modname, pyfile)) + finally: + pydevd_io.end_redirect("stderr") + pydevd_io.end_redirect("stdout") + + pydev_runfiles_xml_rpc.notifyTest("error", buf_out.getvalue(), buf_err.getvalue(), pyfile, modname, 0) + + return None + + def remove_duplicates_keeping_order(self, seq): + seen = set() + seen_add = seen.add + return [x for x in seq if not (x in seen or seen_add(x))] + + def find_modules_from_files(self, pyfiles): + """returns a list of modules given a list of files""" + # let's make sure that the paths we want are in the pythonpath... + imports = [(s, self.__importify(s)) for s in pyfiles] + + sys_path = [os.path.normpath(path) for path in sys.path] + sys_path = self.remove_duplicates_keeping_order(sys_path) + + system_paths = [] + for s in sys_path: + system_paths.append(self.__importify(s, True)) + + ret = [] + for pyfile, imp in imports: + if imp is None: + continue # can happen if a file is not a valid module + choices = [] + for s in system_paths: + if imp.startswith(s): + add = imp[len(s) + 1 :] + if add: + choices.append(add) + # sys.stdout.write(' ' + add + ' ') + + if not choices: + sys.stdout.write("PYTHONPATH not found for file: %s\n" % imp) + else: + for i, import_str in enumerate(choices): + print_exception = i == len(choices) - 1 + mod = self.__get_module_from_str(import_str, print_exception, pyfile) + if mod is not None: + ret.append((pyfile, mod, import_str)) + break + + return ret + + # =================================================================================================================== + # GetTestCaseNames + # =================================================================================================================== + class GetTestCaseNames: + """Yes, we need a class for that (cannot use outer context on jython 2.1)""" + + def __init__(self, accepted_classes, accepted_methods): + self.accepted_classes = accepted_classes + self.accepted_methods = accepted_methods + + def __call__(self, testCaseClass): + """Return a sorted sequence of method names found within testCaseClass""" + testFnNames = [] + className = testCaseClass.__name__ + + if className in self.accepted_classes: + for attrname in dir(testCaseClass): + # If a class is chosen, we select all the 'test' methods' + if attrname.startswith("test") and hasattr(getattr(testCaseClass, attrname), "__call__"): + testFnNames.append(attrname) + + else: + for attrname in dir(testCaseClass): + # If we have the class+method name, we must do a full check and have an exact match. + if className + "." + attrname in self.accepted_methods: + if hasattr(getattr(testCaseClass, attrname), "__call__"): + testFnNames.append(attrname) + + # sorted() is not available in jython 2.1 + testFnNames.sort() + return testFnNames + + def _decorate_test_suite(self, suite, pyfile, module_name): + import unittest + + if isinstance(suite, unittest.TestSuite): + add = False + suite.__pydev_pyfile__ = pyfile + suite.__pydev_module_name__ = module_name + + for t in suite._tests: + t.__pydev_pyfile__ = pyfile + t.__pydev_module_name__ = module_name + if self._decorate_test_suite(t, pyfile, module_name): + add = True + + return add + + elif isinstance(suite, unittest.TestCase): + return True + + else: + return False + + def find_tests_from_modules(self, file_and_modules_and_module_name): + """returns the unittests given a list of modules""" + # Use our own suite! + from _pydev_runfiles import pydev_runfiles_unittest + import unittest + + unittest.TestLoader.suiteClass = pydev_runfiles_unittest.PydevTestSuite + loader = unittest.TestLoader() + + ret = [] + if self.files_to_tests: + for pyfile, m, module_name in file_and_modules_and_module_name: + accepted_classes = {} + accepted_methods = {} + tests = self.files_to_tests[pyfile] + for t in tests: + accepted_methods[t] = t + + loader.getTestCaseNames = self.GetTestCaseNames(accepted_classes, accepted_methods) + + suite = loader.loadTestsFromModule(m) + if self._decorate_test_suite(suite, pyfile, module_name): + ret.append(suite) + return ret + + if self.tests: + accepted_classes = {} + accepted_methods = {} + + for t in self.tests: + splitted = t.split(".") + if len(splitted) == 1: + accepted_classes[t] = t + + elif len(splitted) == 2: + accepted_methods[t] = t + + loader.getTestCaseNames = self.GetTestCaseNames(accepted_classes, accepted_methods) + + for pyfile, m, module_name in file_and_modules_and_module_name: + suite = loader.loadTestsFromModule(m) + if self._decorate_test_suite(suite, pyfile, module_name): + ret.append(suite) + + return ret + + def filter_tests(self, test_objs, internal_call=False): + """based on a filter name, only return those tests that have + the test case names that match""" + import unittest + + if not internal_call: + if not self.configuration.include_tests and not self.tests and not self.configuration.exclude_tests: + # No need to filter if we have nothing to filter! + return test_objs + + if self.verbosity > 1: + if self.configuration.include_tests: + sys.stdout.write("Tests to include: %s\n" % (self.configuration.include_tests,)) + + if self.tests: + sys.stdout.write("Tests to run: %s\n" % (self.tests,)) + + if self.configuration.exclude_tests: + sys.stdout.write("Tests to exclude: %s\n" % (self.configuration.exclude_tests,)) + + test_suite = [] + for test_obj in test_objs: + if isinstance(test_obj, unittest.TestSuite): + # Note: keep the suites as they are and just 'fix' the tests (so, don't use the iter_tests). + if test_obj._tests: + test_obj._tests = self.filter_tests(test_obj._tests, True) + if test_obj._tests: # Only add the suite if we still have tests there. + test_suite.append(test_obj) + + elif isinstance(test_obj, unittest.TestCase): + try: + testMethodName = test_obj._TestCase__testMethodName + except AttributeError: + # changed in python 2.5 + testMethodName = test_obj._testMethodName + + add = True + if self.configuration.exclude_tests: + for pat in self.configuration.exclude_tests: + if fnmatch.fnmatchcase(testMethodName, pat): + if self.verbosity > 3: + sys.stdout.write("Skipped test: %s (matched exclude_tests pattern: %s)\n" % (testMethodName, pat)) + + elif self.verbosity > 2: + sys.stdout.write("Skipped test: %s\n" % (testMethodName,)) + + add = False + break + + if add: + if self.__match_tests(self.tests, test_obj, testMethodName): + include = True + if self.configuration.include_tests: + include = False + for pat in self.configuration.include_tests: + if fnmatch.fnmatchcase(testMethodName, pat): + include = True + break + if include: + test_suite.append(test_obj) + else: + if self.verbosity > 3: + sys.stdout.write( + "Skipped test: %s (did not match any include_tests pattern %s)\n" + % ( + testMethodName, + self.configuration.include_tests, + ) + ) + return test_suite + + def iter_tests(self, test_objs): + # Note: not using yield because of Jython 2.1. + import unittest + + tests = [] + for test_obj in test_objs: + if isinstance(test_obj, unittest.TestSuite): + tests.extend(self.iter_tests(test_obj._tests)) + + elif isinstance(test_obj, unittest.TestCase): + tests.append(test_obj) + return tests + + def list_test_names(self, test_objs): + names = [] + for tc in self.iter_tests(test_objs): + try: + testMethodName = tc._TestCase__testMethodName + except AttributeError: + # changed in python 2.5 + testMethodName = tc._testMethodName + names.append(testMethodName) + return names + + def __match_tests(self, tests, test_case, test_method_name): + if not tests: + return 1 + + for t in tests: + class_and_method = t.split(".") + if len(class_and_method) == 1: + # only class name + if class_and_method[0] == test_case.__class__.__name__: + return 1 + + elif len(class_and_method) == 2: + if class_and_method[0] == test_case.__class__.__name__ and class_and_method[1] == test_method_name: + return 1 + + return 0 + + def __match(self, filter_list, name): + """returns whether a test name matches the test filter""" + if filter_list is None: + return 1 + for f in filter_list: + if re.match(f, name): + return 1 + return 0 + + def run_tests(self, handle_coverage=True): + """runs all tests""" + sys.stdout.write("Finding files... ") + files = self.find_import_files() + if self.verbosity > 3: + sys.stdout.write("%s ... done.\n" % (self.files_or_dirs)) + else: + sys.stdout.write("done.\n") + sys.stdout.write("Importing test modules ... ") + + if self.configuration.django: + import django + + if hasattr(django, "setup"): + django.setup() + + if handle_coverage: + coverage_files, coverage = start_coverage_support(self.configuration) + + file_and_modules_and_module_name = self.find_modules_from_files(files) + sys.stdout.write("done.\n") + + all_tests = self.find_tests_from_modules(file_and_modules_and_module_name) + all_tests = self.filter_tests(all_tests) + + from _pydev_runfiles import pydev_runfiles_unittest + + test_suite = pydev_runfiles_unittest.PydevTestSuite(all_tests) + from _pydev_runfiles import pydev_runfiles_xml_rpc + + pydev_runfiles_xml_rpc.notifyTestsCollected(test_suite.countTestCases()) + + start_time = time.time() + + def run_tests(): + executed_in_parallel = False + if self.jobs > 1: + from _pydev_runfiles import pydev_runfiles_parallel + + # What may happen is that the number of jobs needed is lower than the number of jobs requested + # (e.g.: 2 jobs were requested for running 1 test) -- in which case execute_tests_in_parallel will + # return False and won't run any tests. + executed_in_parallel = pydev_runfiles_parallel.execute_tests_in_parallel( + all_tests, self.jobs, self.split_jobs, self.verbosity, coverage_files, self.configuration.coverage_include + ) + + if not executed_in_parallel: + # If in coverage, we don't need to pass anything here (coverage is already enabled for this execution). + runner = pydev_runfiles_unittest.PydevTextTestRunner(stream=sys.stdout, descriptions=1, verbosity=self.verbosity) + sys.stdout.write("\n") + runner.run(test_suite) + + if self.configuration.django: + get_django_test_suite_runner()(run_tests).run_tests([]) + else: + run_tests() + + if handle_coverage: + coverage.stop() + coverage.save() + + total_time = "Finished in: %.2f secs." % (time.time() - start_time,) + pydev_runfiles_xml_rpc.notifyTestRunFinished(total_time) + + +DJANGO_TEST_SUITE_RUNNER = None + + +def get_django_test_suite_runner(): + global DJANGO_TEST_SUITE_RUNNER + if DJANGO_TEST_SUITE_RUNNER: + return DJANGO_TEST_SUITE_RUNNER + try: + # django >= 1.8 + import django + from django.test.runner import DiscoverRunner + + class MyDjangoTestSuiteRunner(DiscoverRunner): + def __init__(self, on_run_suite): + django.setup() + DiscoverRunner.__init__(self) + self.on_run_suite = on_run_suite + + def build_suite(self, *args, **kwargs): + pass + + def suite_result(self, *args, **kwargs): + pass + + def run_suite(self, *args, **kwargs): + self.on_run_suite() + + except: + # django < 1.8 + try: + from django.test.simple import DjangoTestSuiteRunner + except: + + class DjangoTestSuiteRunner: + def __init__(self): + pass + + def run_tests(self, *args, **kwargs): + raise AssertionError( + "Unable to run suite with django.test.runner.DiscoverRunner nor django.test.simple.DjangoTestSuiteRunner because it couldn't be imported." + ) + + class MyDjangoTestSuiteRunner(DjangoTestSuiteRunner): + def __init__(self, on_run_suite): + DjangoTestSuiteRunner.__init__(self) + self.on_run_suite = on_run_suite + + def build_suite(self, *args, **kwargs): + pass + + def suite_result(self, *args, **kwargs): + pass + + def run_suite(self, *args, **kwargs): + self.on_run_suite() + + DJANGO_TEST_SUITE_RUNNER = MyDjangoTestSuiteRunner + return DJANGO_TEST_SUITE_RUNNER + + +# ======================================================================================================================= +# main +# ======================================================================================================================= +def main(configuration): + PydevTestRunner(configuration).run_tests() diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py new file mode 100644 index 0000000..a088b42 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py @@ -0,0 +1,77 @@ +import os.path +import sys +from _pydevd_bundle.pydevd_constants import Null + + +# ======================================================================================================================= +# get_coverage_files +# ======================================================================================================================= +def get_coverage_files(coverage_output_dir, number_of_files): + base_dir = coverage_output_dir + ret = [] + i = 0 + while len(ret) < number_of_files: + while True: + f = os.path.join(base_dir, ".coverage.%s" % i) + i += 1 + if not os.path.exists(f): + ret.append(f) + break # Break only inner for. + return ret + + +# ======================================================================================================================= +# start_coverage_support +# ======================================================================================================================= +def start_coverage_support(configuration): + return start_coverage_support_from_params( + configuration.coverage_output_dir, + configuration.coverage_output_file, + configuration.jobs, + configuration.coverage_include, + ) + + +# ======================================================================================================================= +# start_coverage_support_from_params +# ======================================================================================================================= +def start_coverage_support_from_params(coverage_output_dir, coverage_output_file, jobs, coverage_include): + coverage_files = [] + coverage_instance = Null() + if coverage_output_dir or coverage_output_file: + try: + import coverage # @UnresolvedImport + except: + sys.stderr.write("Error: coverage module could not be imported\n") + sys.stderr.write("Please make sure that the coverage module (http://nedbatchelder.com/code/coverage/)\n") + sys.stderr.write("is properly installed in your interpreter: %s\n" % (sys.executable,)) + + import traceback + + traceback.print_exc() + else: + if coverage_output_dir: + if not os.path.exists(coverage_output_dir): + sys.stderr.write("Error: directory for coverage output (%s) does not exist.\n" % (coverage_output_dir,)) + + elif not os.path.isdir(coverage_output_dir): + sys.stderr.write("Error: expected (%s) to be a directory.\n" % (coverage_output_dir,)) + + else: + n = jobs + if n <= 0: + n += 1 + n += 1 # Add 1 more for the current process (which will do the initial import). + coverage_files = get_coverage_files(coverage_output_dir, n) + os.environ["COVERAGE_FILE"] = coverage_files.pop(0) + + coverage_instance = coverage.coverage(source=[coverage_include]) + coverage_instance.start() + + elif coverage_output_file: + # Client of parallel run. + os.environ["COVERAGE_FILE"] = coverage_output_file + coverage_instance = coverage.coverage(source=[coverage_include]) + coverage_instance.start() + + return coverage_files, coverage_instance diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_nose.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_nose.py new file mode 100644 index 0000000..13a01b2 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_nose.py @@ -0,0 +1,206 @@ +from nose.plugins.multiprocess import MultiProcessTestRunner # @UnresolvedImport +from nose.plugins.base import Plugin # @UnresolvedImport +import sys +from _pydev_runfiles import pydev_runfiles_xml_rpc +import time +from _pydev_runfiles.pydev_runfiles_coverage import start_coverage_support +from contextlib import contextmanager +from io import StringIO +import traceback + + +# ======================================================================================================================= +# PydevPlugin +# ======================================================================================================================= +class PydevPlugin(Plugin): + def __init__(self, configuration): + self.configuration = configuration + Plugin.__init__(self) + + def begin(self): + # Called before any test is run (it's always called, with multiprocess or not) + self.start_time = time.time() + self.coverage_files, self.coverage = start_coverage_support(self.configuration) + + def finalize(self, result): + # Called after all tests are run (it's always called, with multiprocess or not) + self.coverage.stop() + self.coverage.save() + + pydev_runfiles_xml_rpc.notifyTestRunFinished("Finished in: %.2f secs." % (time.time() - self.start_time,)) + + # =================================================================================================================== + # Methods below are not called with multiprocess (so, we monkey-patch MultiProcessTestRunner.consolidate + # so that they're called, but unfortunately we loose some info -- i.e.: the time for each test in this + # process). + # =================================================================================================================== + + class Sentinel(object): + pass + + @contextmanager + def _without_user_address(self, test): + # #PyDev-1095: Conflict between address in test and test.address() in PydevPlugin().report_cond() + user_test_instance = test.test + user_address = self.Sentinel + user_class_address = self.Sentinel + try: + if "address" in user_test_instance.__dict__: + user_address = user_test_instance.__dict__.pop("address") + except: + # Just ignore anything here. + pass + try: + user_class_address = user_test_instance.__class__.address + del user_test_instance.__class__.address + except: + # Just ignore anything here. + pass + + try: + yield + finally: + if user_address is not self.Sentinel: + user_test_instance.__dict__["address"] = user_address + + if user_class_address is not self.Sentinel: + user_test_instance.__class__.address = user_class_address + + def _get_test_address(self, test): + try: + if hasattr(test, "address"): + with self._without_user_address(test): + address = test.address() + + # test.address() is something as: + # ('D:\\workspaces\\temp\\test_workspace\\pytesting1\\src\\mod1\\hello.py', 'mod1.hello', 'TestCase.testMet1') + # + # and we must pass: location, test + # E.g.: ['D:\\src\\mod1\\hello.py', 'TestCase.testMet1'] + address = address[0], address[2] + else: + # multiprocess + try: + address = test[0], test[1] + except TypeError: + # It may be an error at setup, in which case it's not really a test, but a Context object. + f = test.context.__file__ + if f.endswith(".pyc"): + f = f[:-1] + elif f.endswith("$py.class"): + f = f[: -len("$py.class")] + ".py" + address = f, "?" + except: + sys.stderr.write("PyDev: Internal pydev error getting test address. Please report at the pydev bug tracker\n") + traceback.print_exc() + sys.stderr.write("\n\n\n") + address = "?", "?" + return address + + def report_cond(self, cond, test, captured_output, error=""): + """ + @param cond: fail, error, ok + """ + + address = self._get_test_address(test) + + error_contents = self.get_io_from_error(error) + try: + time_str = "%.2f" % (time.time() - test._pydev_start_time) + except: + time_str = "?" + + pydev_runfiles_xml_rpc.notifyTest(cond, captured_output, error_contents, address[0], address[1], time_str) + + def startTest(self, test): + test._pydev_start_time = time.time() + file, test = self._get_test_address(test) + pydev_runfiles_xml_rpc.notifyStartTest(file, test) + + def get_io_from_error(self, err): + if type(err) == type(()): + if len(err) != 3: + if len(err) == 2: + return err[1] # multiprocess + s = StringIO() + etype, value, tb = err + if isinstance(value, str): + return value + traceback.print_exception(etype, value, tb, file=s) + return s.getvalue() + return err + + def get_captured_output(self, test): + if hasattr(test, "capturedOutput") and test.capturedOutput: + return test.capturedOutput + return "" + + def addError(self, test, err): + self.report_cond( + "error", + test, + self.get_captured_output(test), + err, + ) + + def addFailure(self, test, err): + self.report_cond( + "fail", + test, + self.get_captured_output(test), + err, + ) + + def addSuccess(self, test): + self.report_cond( + "ok", + test, + self.get_captured_output(test), + "", + ) + + +PYDEV_NOSE_PLUGIN_SINGLETON = None + + +def start_pydev_nose_plugin_singleton(configuration): + global PYDEV_NOSE_PLUGIN_SINGLETON + PYDEV_NOSE_PLUGIN_SINGLETON = PydevPlugin(configuration) + return PYDEV_NOSE_PLUGIN_SINGLETON + + +original = MultiProcessTestRunner.consolidate + + +# ======================================================================================================================= +# new_consolidate +# ======================================================================================================================= +def new_consolidate(self, result, batch_result): + """ + Used so that it can work with the multiprocess plugin. + Monkeypatched because nose seems a bit unsupported at this time (ideally + the plugin would have this support by default). + """ + ret = original(self, result, batch_result) + + parent_frame = sys._getframe().f_back + # addr is something as D:\pytesting1\src\mod1\hello.py:TestCase.testMet4 + # so, convert it to what report_cond expects + addr = parent_frame.f_locals["addr"] + i = addr.rindex(":") + addr = [addr[:i], addr[i + 1 :]] + + output, testsRun, failures, errors, errorClasses = batch_result + if failures or errors: + for failure in failures: + PYDEV_NOSE_PLUGIN_SINGLETON.report_cond("fail", addr, output, failure) + + for error in errors: + PYDEV_NOSE_PLUGIN_SINGLETON.report_cond("error", addr, output, error) + else: + PYDEV_NOSE_PLUGIN_SINGLETON.report_cond("ok", addr, output) + + return ret + + +MultiProcessTestRunner.consolidate = new_consolidate diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel.py new file mode 100644 index 0000000..55a2134 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel.py @@ -0,0 +1,266 @@ +import unittest +from _pydev_bundle._pydev_saved_modules import thread +import queue as Queue +from _pydev_runfiles import pydev_runfiles_xml_rpc +import time +import os +import threading +import sys + + +# ======================================================================================================================= +# flatten_test_suite +# ======================================================================================================================= +def flatten_test_suite(test_suite, ret): + if isinstance(test_suite, unittest.TestSuite): + for t in test_suite._tests: + flatten_test_suite(t, ret) + + elif isinstance(test_suite, unittest.TestCase): + ret.append(test_suite) + + +# ======================================================================================================================= +# execute_tests_in_parallel +# ======================================================================================================================= +def execute_tests_in_parallel(tests, jobs, split, verbosity, coverage_files, coverage_include): + """ + @param tests: list(PydevTestSuite) + A list with the suites to be run + + @param split: str + Either 'module' or the number of tests that should be run in each batch + + @param coverage_files: list(file) + A list with the files that should be used for giving coverage information (if empty, coverage information + should not be gathered). + + @param coverage_include: str + The pattern that should be included in the coverage. + + @return: bool + Returns True if the tests were actually executed in parallel. If the tests were not executed because only 1 + should be used (e.g.: 2 jobs were requested for running 1 test), False will be returned and no tests will be + run. + + It may also return False if in debug mode (in which case, multi-processes are not accepted) + """ + try: + from _pydevd_bundle.pydevd_comm import get_global_debugger + + if get_global_debugger() is not None: + return False + except: + pass # Ignore any error here. + + # This queue will receive the tests to be run. Each entry in a queue is a list with the tests to be run together When + # split == 'tests', each list will have a single element, when split == 'module', each list will have all the tests + # from a given module. + tests_queue = [] + + queue_elements = [] + if split == "module": + module_to_tests = {} + for test in tests: + lst = [] + flatten_test_suite(test, lst) + for test in lst: + key = (test.__pydev_pyfile__, test.__pydev_module_name__) + module_to_tests.setdefault(key, []).append(test) + + for key, tests in module_to_tests.items(): + queue_elements.append(tests) + + if len(queue_elements) < jobs: + # Don't create jobs we will never use. + jobs = len(queue_elements) + + elif split == "tests": + for test in tests: + lst = [] + flatten_test_suite(test, lst) + for test in lst: + queue_elements.append([test]) + + if len(queue_elements) < jobs: + # Don't create jobs we will never use. + jobs = len(queue_elements) + + else: + raise AssertionError("Do not know how to handle: %s" % (split,)) + + for test_cases in queue_elements: + test_queue_elements = [] + for test_case in test_cases: + try: + test_name = test_case.__class__.__name__ + "." + test_case._testMethodName + except AttributeError: + # Support for jython 2.1 (__testMethodName is pseudo-private in the test case) + test_name = test_case.__class__.__name__ + "." + test_case._TestCase__testMethodName + + test_queue_elements.append(test_case.__pydev_pyfile__ + "|" + test_name) + + tests_queue.append(test_queue_elements) + + if jobs < 2: + return False + + sys.stdout.write("Running tests in parallel with: %s jobs.\n" % (jobs,)) + + queue = Queue.Queue() + for item in tests_queue: + queue.put(item, block=False) + + providers = [] + clients = [] + for i in range(jobs): + test_cases_provider = CommunicationThread(queue) + providers.append(test_cases_provider) + + test_cases_provider.start() + port = test_cases_provider.port + + if coverage_files: + clients.append(ClientThread(i, port, verbosity, coverage_files.pop(0), coverage_include)) + else: + clients.append(ClientThread(i, port, verbosity)) + + for client in clients: + client.start() + + client_alive = True + while client_alive: + client_alive = False + for client in clients: + # Wait for all the clients to exit. + if not client.finished: + client_alive = True + time.sleep(0.2) + break + + for provider in providers: + provider.shutdown() + + return True + + +# ======================================================================================================================= +# CommunicationThread +# ======================================================================================================================= +class CommunicationThread(threading.Thread): + def __init__(self, tests_queue): + threading.Thread.__init__(self) + self.daemon = True + self.queue = tests_queue + self.finished = False + from _pydev_bundle.pydev_imports import SimpleXMLRPCServer + from _pydev_bundle import pydev_localhost + + # Create server + server = SimpleXMLRPCServer((pydev_localhost.get_localhost(), 0), logRequests=False) + server.register_function(self.GetTestsToRun) + server.register_function(self.notifyStartTest) + server.register_function(self.notifyTest) + server.register_function(self.notifyCommands) + self.port = server.socket.getsockname()[1] + self.server = server + + def GetTestsToRun(self, job_id): + """ + @param job_id: + + @return: list(str) + Each entry is a string in the format: filename|Test.testName + """ + try: + ret = self.queue.get(block=False) + return ret + except: # Any exception getting from the queue (empty or not) means we finished our work on providing the tests. + self.finished = True + return [] + + def notifyCommands(self, job_id, commands): + # Batch notification. + for command in commands: + getattr(self, command[0])(job_id, *command[1], **command[2]) + + return True + + def notifyStartTest(self, job_id, *args, **kwargs): + pydev_runfiles_xml_rpc.notifyStartTest(*args, **kwargs) + return True + + def notifyTest(self, job_id, *args, **kwargs): + pydev_runfiles_xml_rpc.notifyTest(*args, **kwargs) + return True + + def shutdown(self): + if hasattr(self.server, "shutdown"): + self.server.shutdown() + else: + self._shutdown = True + + def run(self): + if hasattr(self.server, "shutdown"): + self.server.serve_forever() + else: + self._shutdown = False + while not self._shutdown: + self.server.handle_request() + + +# ======================================================================================================================= +# Client +# ======================================================================================================================= +class ClientThread(threading.Thread): + def __init__(self, job_id, port, verbosity, coverage_output_file=None, coverage_include=None): + threading.Thread.__init__(self) + self.daemon = True + self.port = port + self.job_id = job_id + self.verbosity = verbosity + self.finished = False + self.coverage_output_file = coverage_output_file + self.coverage_include = coverage_include + + def _reader_thread(self, pipe, target): + while True: + target.write(pipe.read(1)) + + def run(self): + try: + from _pydev_runfiles import pydev_runfiles_parallel_client + # TODO: Support Jython: + # + # For jython, instead of using sys.executable, we should use: + # r'D:\bin\jdk_1_5_09\bin\java.exe', + # '-classpath', + # 'D:/bin/jython-2.2.1/jython.jar', + # 'org.python.util.jython', + + args = [ + sys.executable, + pydev_runfiles_parallel_client.__file__, + str(self.job_id), + str(self.port), + str(self.verbosity), + ] + + if self.coverage_output_file and self.coverage_include: + args.append(self.coverage_output_file) + args.append(self.coverage_include) + + import subprocess + + if False: + proc = subprocess.Popen(args, env=os.environ, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + thread.start_new_thread(self._reader_thread, (proc.stdout, sys.stdout)) + + thread.start_new_thread(target=self._reader_thread, args=(proc.stderr, sys.stderr)) + else: + proc = subprocess.Popen(args, env=os.environ, shell=False) + proc.wait() + + finally: + self.finished = True diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel_client.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel_client.py new file mode 100644 index 0000000..0132b06 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel_client.py @@ -0,0 +1,194 @@ +from _pydev_bundle.pydev_imports import xmlrpclib, _queue + +Queue = _queue.Queue +import traceback +import sys +from _pydev_runfiles.pydev_runfiles_coverage import start_coverage_support_from_params +import threading + + +# ======================================================================================================================= +# ParallelNotification +# ======================================================================================================================= +class ParallelNotification(object): + def __init__(self, method, args, kwargs): + self.method = method + self.args = args + self.kwargs = kwargs + + def to_tuple(self): + return self.method, self.args, self.kwargs + + +# ======================================================================================================================= +# KillServer +# ======================================================================================================================= +class KillServer(object): + pass + + +# ======================================================================================================================= +# ServerComm +# ======================================================================================================================= +class ServerComm(threading.Thread): + def __init__(self, job_id, server): + self.notifications_queue = Queue() + threading.Thread.__init__(self) + self.setDaemon(False) # Wait for all the notifications to be passed before exiting! + assert job_id is not None + assert port is not None + self.job_id = job_id + + self.finished = False + self.server = server + + def run(self): + while True: + kill_found = False + commands = [] + command = self.notifications_queue.get(block=True) + if isinstance(command, KillServer): + kill_found = True + else: + assert isinstance(command, ParallelNotification) + commands.append(command.to_tuple()) + + try: + while True: + command = self.notifications_queue.get(block=False) # No block to create a batch. + if isinstance(command, KillServer): + kill_found = True + else: + assert isinstance(command, ParallelNotification) + commands.append(command.to_tuple()) + except: + pass # That's OK, we're getting it until it becomes empty so that we notify multiple at once. + + if commands: + try: + # Batch notification. + self.server.lock.acquire() + try: + self.server.notifyCommands(self.job_id, commands) + finally: + self.server.lock.release() + except: + traceback.print_exc() + + if kill_found: + self.finished = True + return + + +# ======================================================================================================================= +# ServerFacade +# ======================================================================================================================= +class ServerFacade(object): + def __init__(self, notifications_queue): + self.notifications_queue = notifications_queue + + def notifyTestsCollected(self, *args, **kwargs): + pass # This notification won't be passed + + def notifyTestRunFinished(self, *args, **kwargs): + pass # This notification won't be passed + + def notifyStartTest(self, *args, **kwargs): + self.notifications_queue.put_nowait(ParallelNotification("notifyStartTest", args, kwargs)) + + def notifyTest(self, *args, **kwargs): + self.notifications_queue.put_nowait(ParallelNotification("notifyTest", args, kwargs)) + + +# ======================================================================================================================= +# run_client +# ======================================================================================================================= +def run_client(job_id, port, verbosity, coverage_output_file, coverage_include): + job_id = int(job_id) + + from _pydev_bundle import pydev_localhost + + server = xmlrpclib.Server("http://%s:%s" % (pydev_localhost.get_localhost(), port)) + server.lock = threading.Lock() + + server_comm = ServerComm(job_id, server) + server_comm.start() + + try: + server_facade = ServerFacade(server_comm.notifications_queue) + from _pydev_runfiles import pydev_runfiles + from _pydev_runfiles import pydev_runfiles_xml_rpc + + pydev_runfiles_xml_rpc.set_server(server_facade) + + # Starts None and when the 1st test is gotten, it's started (because a server may be initiated and terminated + # before receiving any test -- which would mean a different process got all the tests to run). + coverage = None + + try: + tests_to_run = [1] + while tests_to_run: + # Investigate: is it dangerous to use the same xmlrpclib server from different threads? + # It seems it should be, as it creates a new connection for each request... + server.lock.acquire() + try: + tests_to_run = server.GetTestsToRun(job_id) + finally: + server.lock.release() + + if not tests_to_run: + break + + if coverage is None: + _coverage_files, coverage = start_coverage_support_from_params(None, coverage_output_file, 1, coverage_include) + + files_to_tests = {} + for test in tests_to_run: + filename_and_test = test.split("|") + if len(filename_and_test) == 2: + files_to_tests.setdefault(filename_and_test[0], []).append(filename_and_test[1]) + + configuration = pydev_runfiles.Configuration( + "", + verbosity, + None, + None, + None, + files_to_tests, + 1, # Always single job here + None, + # The coverage is handled in this loop. + coverage_output_file=None, + coverage_include=None, + ) + test_runner = pydev_runfiles.PydevTestRunner(configuration) + sys.stdout.flush() + test_runner.run_tests(handle_coverage=False) + finally: + if coverage is not None: + coverage.stop() + coverage.save() + + except: + traceback.print_exc() + server_comm.notifications_queue.put_nowait(KillServer()) + + +# ======================================================================================================================= +# main +# ======================================================================================================================= +if __name__ == "__main__": + if len(sys.argv) - 1 == 3: + job_id, port, verbosity = sys.argv[1:] + coverage_output_file, coverage_include = None, None + + elif len(sys.argv) - 1 == 5: + job_id, port, verbosity, coverage_output_file, coverage_include = sys.argv[1:] + + else: + raise AssertionError("Could not find out how to handle the parameters: " + sys.argv[1:]) + + job_id = int(job_id) + port = int(port) + verbosity = int(verbosity) + run_client(job_id, port, verbosity, coverage_output_file, coverage_include) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_pytest2.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_pytest2.py new file mode 100644 index 0000000..acd99c3 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_pytest2.py @@ -0,0 +1,308 @@ +import base64 +import os +import pickle +import sys +import time +import zlib +from pathlib import Path + +import pytest +from pydevd_file_utils import canonical_normalized_path + +from _pydev_runfiles import pydev_runfiles_xml_rpc + +# ========================================================================= +# Load filters with tests we should skip +# ========================================================================= +py_test_accept_filter = None + + +def _load_filters(): + global py_test_accept_filter + if py_test_accept_filter is None: + py_test_accept_filter = os.environ.get("PYDEV_PYTEST_SKIP") + if py_test_accept_filter: + py_test_accept_filter = pickle.loads(zlib.decompress(base64.b64decode(py_test_accept_filter))) + + # Newer versions of pytest resolve symlinks, so, we + # may need to filter with a resolved path too. + new_dct = {} + for filename, value in py_test_accept_filter.items(): + new_dct[canonical_normalized_path(str(Path(filename).resolve()))] = value + + py_test_accept_filter.update(new_dct) + + else: + py_test_accept_filter = {} + + +def is_in_xdist_node(): + main_pid = os.environ.get("PYDEV_MAIN_PID") + if main_pid and main_pid != str(os.getpid()): + return True + return False + + +connected = False + + +def connect_to_server_for_communication_to_xml_rpc_on_xdist(): + global connected + if connected: + return + connected = True + if is_in_xdist_node(): + port = os.environ.get("PYDEV_PYTEST_SERVER") + if port == "None": + pass + elif not port: + sys.stderr.write("Error: no PYDEV_PYTEST_SERVER environment variable defined.\n") + else: + pydev_runfiles_xml_rpc.initialize_server(int(port), daemon=True) + + +PY2 = sys.version_info[0] <= 2 +PY3 = not PY2 + + +class State: + start_time = time.time() + buf_err = None + buf_out = None + + +def start_redirect(): + if State.buf_out is not None: + return + from _pydevd_bundle import pydevd_io + + State.buf_err = pydevd_io.start_redirect(keep_original_redirection=True, std="stderr") + State.buf_out = pydevd_io.start_redirect(keep_original_redirection=True, std="stdout") + + +def get_curr_output(): + buf_out = State.buf_out + buf_err = State.buf_err + return buf_out.getvalue() if buf_out is not None else "", buf_err.getvalue() if buf_err is not None else "" + + +def pytest_unconfigure(): + if is_in_xdist_node(): + return + # Only report that it finished when on the main node (we don't want to report + # the finish on each separate node). + pydev_runfiles_xml_rpc.notifyTestRunFinished("Finished in: %.2f secs." % (time.time() - State.start_time,)) + + +def pytest_collection_modifyitems(session, config, items): + # A note: in xdist, this is not called on the main process, only in the + # secondary nodes, so, we'll actually make the filter and report it multiple + # times. + connect_to_server_for_communication_to_xml_rpc_on_xdist() + + _load_filters() + if not py_test_accept_filter: + pydev_runfiles_xml_rpc.notifyTestsCollected(len(items)) + return # Keep on going (nothing to filter) + + new_items = [] + for item in items: + f = canonical_normalized_path(str(item.parent.fspath)) + name = item.name + + if f not in py_test_accept_filter: + # print('Skip file: %s' % (f,)) + continue # Skip the file + + i = name.find("[") + name_without_parametrize = None + if i > 0: + name_without_parametrize = name[:i] + + accept_tests = py_test_accept_filter[f] + + if item.cls is not None: + class_name = item.cls.__name__ + else: + class_name = None + for test in accept_tests: + if test == name: + # Direct match of the test (just go on with the default + # loading) + new_items.append(item) + break + + if name_without_parametrize is not None and test == name_without_parametrize: + # This happens when parameterizing pytest tests on older versions + # of pytest where the test name doesn't include the fixture name + # in it. + new_items.append(item) + break + + if class_name is not None: + if test == class_name + "." + name: + new_items.append(item) + break + + if name_without_parametrize is not None and test == class_name + "." + name_without_parametrize: + new_items.append(item) + break + + if class_name == test: + new_items.append(item) + break + else: + pass + # print('Skip test: %s.%s. Accept: %s' % (class_name, name, accept_tests)) + + # Modify the original list + items[:] = new_items + pydev_runfiles_xml_rpc.notifyTestsCollected(len(items)) + + +try: + """ + pytest > 5.4 uses own version of TerminalWriter based on py.io.TerminalWriter + and assumes there is a specific method TerminalWriter._write_source + so try load pytest version first or fallback to default one + """ + from _pytest._io import TerminalWriter +except ImportError: + from py.io import TerminalWriter + + +def _get_error_contents_from_report(report): + if report.longrepr is not None: + try: + tw = TerminalWriter(stringio=True) + stringio = tw.stringio + except TypeError: + import io + + stringio = io.StringIO() + tw = TerminalWriter(file=stringio) + tw.hasmarkup = False + report.toterminal(tw) + exc = stringio.getvalue() + s = exc.strip() + if s: + return s + + return "" + + +def pytest_collectreport(report): + error_contents = _get_error_contents_from_report(report) + if error_contents: + report_test("fail", "", "", "", error_contents, 0.0) + + +def append_strings(s1, s2): + if s1.__class__ == s2.__class__: + return s1 + s2 + + # Prefer str + if isinstance(s1, bytes): + s1 = s1.decode("utf-8", "replace") + + if isinstance(s2, bytes): + s2 = s2.decode("utf-8", "replace") + + return s1 + s2 + + +def pytest_runtest_logreport(report): + if is_in_xdist_node(): + # When running with xdist, we don't want the report to be called from the node, only + # from the main process. + return + report_duration = report.duration + report_when = report.when + report_outcome = report.outcome + + if hasattr(report, "wasxfail"): + if report_outcome != "skipped": + report_outcome = "passed" + + if report_outcome == "passed": + # passed on setup/teardown: no need to report if in setup or teardown + # (only on the actual test if it passed). + if report_when in ("setup", "teardown"): + return + + status = "ok" + + elif report_outcome == "skipped": + status = "skip" + + else: + # It has only passed, skipped and failed (no error), so, let's consider + # error if not on call. + if report_when in ("setup", "teardown"): + status = "error" + + else: + # any error in the call (not in setup or teardown) is considered a + # regular failure. + status = "fail" + + # This will work if pytest is not capturing it, if it is, nothing will + # come from here... + captured_output, error_contents = getattr(report, "pydev_captured_output", ""), getattr(report, "pydev_error_contents", "") + for type_section, value in report.sections: + if value: + if type_section in ("err", "stderr", "Captured stderr call"): + error_contents = append_strings(error_contents, value) + else: + captured_output = append_strings(error_contents, value) + + filename = getattr(report, "pydev_fspath_strpath", "") + test = report.location[2] + + if report_outcome != "skipped": + # On skipped, we'll have a traceback for the skip, which is not what we + # want. + exc = _get_error_contents_from_report(report) + if exc: + if error_contents: + error_contents = append_strings(error_contents, "----------------------------- Exceptions -----------------------------\n") + error_contents = append_strings(error_contents, exc) + + report_test(status, filename, test, captured_output, error_contents, report_duration) + + +def report_test(status, filename, test, captured_output, error_contents, duration): + """ + @param filename: 'D:\\src\\mod1\\hello.py' + @param test: 'TestCase.testMet1' + @param status: fail, error, ok + """ + time_str = "%.2f" % (duration,) + pydev_runfiles_xml_rpc.notifyTest(status, captured_output, error_contents, filename, test, time_str) + + +if not hasattr(pytest, "hookimpl"): + raise AssertionError("Please upgrade pytest (the current version of pytest: %s is unsupported)" % (pytest.__version__,)) + + +@pytest.hookimpl(hookwrapper=True) +def pytest_runtest_makereport(item, call): + outcome = yield + report = outcome.get_result() + report.pydev_fspath_strpath = item.fspath.strpath + report.pydev_captured_output, report.pydev_error_contents = get_curr_output() + + +@pytest.mark.tryfirst +def pytest_runtest_setup(item): + """ + Note: with xdist will be on a secondary process. + """ + # We have our own redirection: if xdist does its redirection, we'll have + # nothing in our contents (which is OK), but if it does, we'll get nothing + # from pytest but will get our own here. + start_redirect() + filename = item.fspath.strpath + test = item.location[2] + + pydev_runfiles_xml_rpc.notifyStartTest(filename, test) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_unittest.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_unittest.py new file mode 100644 index 0000000..67f6a25 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_unittest.py @@ -0,0 +1,141 @@ +import unittest as python_unittest +from _pydev_runfiles import pydev_runfiles_xml_rpc +import time +from _pydevd_bundle import pydevd_io +import traceback +from _pydevd_bundle.pydevd_constants import * # @UnusedWildImport +from io import StringIO + + +# ======================================================================================================================= +# PydevTextTestRunner +# ======================================================================================================================= +class PydevTextTestRunner(python_unittest.TextTestRunner): + def _makeResult(self): + return PydevTestResult(self.stream, self.descriptions, self.verbosity) + + +_PythonTextTestResult = python_unittest.TextTestRunner()._makeResult().__class__ + + +# ======================================================================================================================= +# PydevTestResult +# ======================================================================================================================= +class PydevTestResult(_PythonTextTestResult): + def addSubTest(self, test, subtest, err): + """Called at the end of a subtest. + 'err' is None if the subtest ended successfully, otherwise it's a + tuple of values as returned by sys.exc_info(). + """ + _PythonTextTestResult.addSubTest(self, test, subtest, err) + if err is not None: + subdesc = subtest._subDescription() + error = (test, self._exc_info_to_string(err, test)) + self._reportErrors([error], [], "", "%s %s" % (self.get_test_name(test), subdesc)) + + def startTest(self, test): + _PythonTextTestResult.startTest(self, test) + self.buf = pydevd_io.start_redirect(keep_original_redirection=True, std="both") + self.start_time = time.time() + self._current_errors_stack = [] + self._current_failures_stack = [] + + try: + test_name = test.__class__.__name__ + "." + test._testMethodName + except AttributeError: + # Support for jython 2.1 (__testMethodName is pseudo-private in the test case) + test_name = test.__class__.__name__ + "." + test._TestCase__testMethodName + + pydev_runfiles_xml_rpc.notifyStartTest(test.__pydev_pyfile__, test_name) + + def get_test_name(self, test): + try: + try: + test_name = test.__class__.__name__ + "." + test._testMethodName + except AttributeError: + # Support for jython 2.1 (__testMethodName is pseudo-private in the test case) + try: + test_name = test.__class__.__name__ + "." + test._TestCase__testMethodName + # Support for class/module exceptions (test is instance of _ErrorHolder) + except: + test_name = test.description.split()[1][1:-1] + " <" + test.description.split()[0] + ">" + except: + traceback.print_exc() + return "" + return test_name + + def stopTest(self, test): + end_time = time.time() + pydevd_io.end_redirect(std="both") + + _PythonTextTestResult.stopTest(self, test) + + captured_output = self.buf.getvalue() + del self.buf + error_contents = "" + test_name = self.get_test_name(test) + + diff_time = "%.2f" % (end_time - self.start_time) + + skipped = False + outcome = getattr(test, "_outcome", None) + if outcome is not None: + skipped = bool(getattr(outcome, "skipped", None)) + + if skipped: + pydev_runfiles_xml_rpc.notifyTest("skip", captured_output, error_contents, test.__pydev_pyfile__, test_name, diff_time) + elif not self._current_errors_stack and not self._current_failures_stack: + pydev_runfiles_xml_rpc.notifyTest("ok", captured_output, error_contents, test.__pydev_pyfile__, test_name, diff_time) + else: + self._reportErrors(self._current_errors_stack, self._current_failures_stack, captured_output, test_name) + + def _reportErrors(self, errors, failures, captured_output, test_name, diff_time=""): + error_contents = [] + for test, s in errors + failures: + if type(s) == type((1,)): # If it's a tuple (for jython 2.1) + sio = StringIO() + traceback.print_exception(s[0], s[1], s[2], file=sio) + s = sio.getvalue() + error_contents.append(s) + + sep = "\n" + self.separator1 + error_contents = sep.join(error_contents) + + if errors and not failures: + try: + pydev_runfiles_xml_rpc.notifyTest("error", captured_output, error_contents, test.__pydev_pyfile__, test_name, diff_time) + except: + file_start = error_contents.find('File "') + file_end = error_contents.find('", ', file_start) + if file_start != -1 and file_end != -1: + file = error_contents[file_start + 6 : file_end] + else: + file = "" + pydev_runfiles_xml_rpc.notifyTest("error", captured_output, error_contents, file, test_name, diff_time) + + elif failures and not errors: + pydev_runfiles_xml_rpc.notifyTest("fail", captured_output, error_contents, test.__pydev_pyfile__, test_name, diff_time) + + else: # Ok, we got both, errors and failures. Let's mark it as an error in the end. + pydev_runfiles_xml_rpc.notifyTest("error", captured_output, error_contents, test.__pydev_pyfile__, test_name, diff_time) + + def addError(self, test, err): + _PythonTextTestResult.addError(self, test, err) + # Support for class/module exceptions (test is instance of _ErrorHolder) + if not hasattr(self, "_current_errors_stack") or test.__class__.__name__ == "_ErrorHolder": + # Not in start...end, so, report error now (i.e.: django pre/post-setup) + self._reportErrors([self.errors[-1]], [], "", self.get_test_name(test)) + else: + self._current_errors_stack.append(self.errors[-1]) + + def addFailure(self, test, err): + _PythonTextTestResult.addFailure(self, test, err) + if not hasattr(self, "_current_failures_stack"): + # Not in start...end, so, report error now (i.e.: django pre/post-setup) + self._reportErrors([], [self.failures[-1]], "", self.get_test_name(test)) + else: + self._current_failures_stack.append(self.failures[-1]) + + +class PydevTestSuite(python_unittest.TestSuite): + pass diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_xml_rpc.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_xml_rpc.py new file mode 100644 index 0000000..1ce2249 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_xml_rpc.py @@ -0,0 +1,260 @@ +import sys +import threading +import traceback +import warnings + +from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding +from _pydev_bundle.pydev_imports import _queue, xmlrpclib +from _pydevd_bundle.pydevd_constants import Null + +Queue = _queue.Queue + +# This may happen in IronPython (in Python it shouldn't happen as there are +# 'fast' replacements that are used in xmlrpclib.py) +warnings.filterwarnings("ignore", "The xmllib module is obsolete.*", DeprecationWarning) + +file_system_encoding = getfilesystemencoding() + + +# ======================================================================================================================= +# _ServerHolder +# ======================================================================================================================= +class _ServerHolder: + """ + Helper so that we don't have to use a global here. + """ + + SERVER = None + + +# ======================================================================================================================= +# set_server +# ======================================================================================================================= +def set_server(server): + _ServerHolder.SERVER = server + + +# ======================================================================================================================= +# ParallelNotification +# ======================================================================================================================= +class ParallelNotification(object): + def __init__(self, method, args): + self.method = method + self.args = args + + def to_tuple(self): + return self.method, self.args + + +# ======================================================================================================================= +# KillServer +# ======================================================================================================================= +class KillServer(object): + pass + + +# ======================================================================================================================= +# ServerFacade +# ======================================================================================================================= +class ServerFacade(object): + def __init__(self, notifications_queue): + self.notifications_queue = notifications_queue + + def notifyTestsCollected(self, *args): + self.notifications_queue.put_nowait(ParallelNotification("notifyTestsCollected", args)) + + def notifyConnected(self, *args): + self.notifications_queue.put_nowait(ParallelNotification("notifyConnected", args)) + + def notifyTestRunFinished(self, *args): + self.notifications_queue.put_nowait(ParallelNotification("notifyTestRunFinished", args)) + + def notifyStartTest(self, *args): + self.notifications_queue.put_nowait(ParallelNotification("notifyStartTest", args)) + + def notifyTest(self, *args): + new_args = [] + for arg in args: + new_args.append(_encode_if_needed(arg)) + args = tuple(new_args) + self.notifications_queue.put_nowait(ParallelNotification("notifyTest", args)) + + +# ======================================================================================================================= +# ServerComm +# ======================================================================================================================= +class ServerComm(threading.Thread): + def __init__(self, notifications_queue, port, daemon=False): + # If daemon is False, wait for all the notifications to be passed before exiting! + threading.Thread.__init__(self, daemon=daemon) + self.finished = False + self.notifications_queue = notifications_queue + + from _pydev_bundle import pydev_localhost + + # It is necessary to specify an encoding, that matches + # the encoding of all bytes-strings passed into an + # XMLRPC call: "All 8-bit strings in the data structure are assumed to use the + # packet encoding. Unicode strings are automatically converted, + # where necessary." + # Byte strings most likely come from file names. + encoding = file_system_encoding + if encoding == "mbcs": + # Windos symbolic name for the system encoding CP_ACP. + # We need to convert it into a encoding that is recognized by Java. + # Unfortunately this is not always possible. You could use + # GetCPInfoEx and get a name similar to "windows-1251". Then + # you need a table to translate on a best effort basis. Much to complicated. + # ISO-8859-1 is good enough. + encoding = "ISO-8859-1" + + self.server = xmlrpclib.Server("http://%s:%s" % (pydev_localhost.get_localhost(), port), encoding=encoding) + + def run(self): + while True: + kill_found = False + commands = [] + command = self.notifications_queue.get(block=True) + if isinstance(command, KillServer): + kill_found = True + else: + assert isinstance(command, ParallelNotification) + commands.append(command.to_tuple()) + + try: + while True: + command = self.notifications_queue.get(block=False) # No block to create a batch. + if isinstance(command, KillServer): + kill_found = True + else: + assert isinstance(command, ParallelNotification) + commands.append(command.to_tuple()) + except: + pass # That's OK, we're getting it until it becomes empty so that we notify multiple at once. + + if commands: + try: + self.server.notifyCommands(commands) + except: + traceback.print_exc() + + if kill_found: + self.finished = True + return + + +# ======================================================================================================================= +# initialize_server +# ======================================================================================================================= +def initialize_server(port, daemon=False): + if _ServerHolder.SERVER is None: + if port is not None: + notifications_queue = Queue() + _ServerHolder.SERVER = ServerFacade(notifications_queue) + _ServerHolder.SERVER_COMM = ServerComm(notifications_queue, port, daemon) + _ServerHolder.SERVER_COMM.start() + else: + # Create a null server, so that we keep the interface even without any connection. + _ServerHolder.SERVER = Null() + _ServerHolder.SERVER_COMM = Null() + + try: + if _ServerHolder.SERVER is not None: + _ServerHolder.SERVER.notifyConnected() + except: + traceback.print_exc() + + +# ======================================================================================================================= +# notifyTest +# ======================================================================================================================= +def notifyTestsCollected(tests_count): + assert tests_count is not None + try: + if _ServerHolder.SERVER is not None: + _ServerHolder.SERVER.notifyTestsCollected(tests_count) + except: + traceback.print_exc() + + +# ======================================================================================================================= +# notifyStartTest +# ======================================================================================================================= +def notifyStartTest(file, test): + """ + @param file: the tests file (c:/temp/test.py) + @param test: the test ran (i.e.: TestCase.test1) + """ + assert file is not None + if test is None: + test = "" # Could happen if we have an import error importing module. + + try: + if _ServerHolder.SERVER is not None: + _ServerHolder.SERVER.notifyStartTest(file, test) + except: + traceback.print_exc() + + +def _encode_if_needed(obj): + # In the java side we expect strings to be ISO-8859-1 (org.python.pydev.debug.pyunit.PyUnitServer.initializeDispatches().new Dispatch() {...}.getAsStr(Object)) + if isinstance(obj, str): # Unicode in py3 + return xmlrpclib.Binary(obj.encode("ISO-8859-1", "xmlcharrefreplace")) + + elif isinstance(obj, bytes): + try: + return xmlrpclib.Binary(obj.decode(sys.stdin.encoding, "replace").encode("ISO-8859-1", "xmlcharrefreplace")) + except: + return xmlrpclib.Binary(obj) # bytes already + + return obj + + +# ======================================================================================================================= +# notifyTest +# ======================================================================================================================= +def notifyTest(cond, captured_output, error_contents, file, test, time): + """ + @param cond: ok, fail, error + @param captured_output: output captured from stdout + @param captured_output: output captured from stderr + @param file: the tests file (c:/temp/test.py) + @param test: the test ran (i.e.: TestCase.test1) + @param time: float with the number of seconds elapsed + """ + if _ServerHolder.SERVER is None: + return + + assert cond is not None + assert captured_output is not None + assert error_contents is not None + assert file is not None + if test is None: + test = "" # Could happen if we have an import error importing module. + assert time is not None + try: + captured_output = _encode_if_needed(captured_output) + error_contents = _encode_if_needed(error_contents) + + _ServerHolder.SERVER.notifyTest(cond, captured_output, error_contents, file, test, time) + except: + traceback.print_exc() + + +# ======================================================================================================================= +# notifyTestRunFinished +# ======================================================================================================================= +def notifyTestRunFinished(total_time): + assert total_time is not None + try: + if _ServerHolder.SERVER is not None: + _ServerHolder.SERVER.notifyTestRunFinished(total_time) + except: + traceback.print_exc() + + +# ======================================================================================================================= +# force_server_kill +# ======================================================================================================================= +def force_server_kill(): + _ServerHolder.SERVER_COMM.notifications_queue.put_nowait(KillServer()) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__init__.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..d861c3b Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevconsole_code.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevconsole_code.cpython-312.pyc new file mode 100644 index 0000000..64049cd Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevconsole_code.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_additional_thread_info.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_additional_thread_info.cpython-312.pyc new file mode 100644 index 0000000..982f10a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_additional_thread_info.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_additional_thread_info_regular.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_additional_thread_info_regular.cpython-312.pyc new file mode 100644 index 0000000..1b59c78 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_additional_thread_info_regular.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_api.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_api.cpython-312.pyc new file mode 100644 index 0000000..f6e5329 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_api.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_breakpoints.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_breakpoints.cpython-312.pyc new file mode 100644 index 0000000..ba7c0be Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_breakpoints.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_bytecode_utils.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_bytecode_utils.cpython-312.pyc new file mode 100644 index 0000000..03e3dc3 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_bytecode_utils.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_bytecode_utils_py311.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_bytecode_utils_py311.cpython-312.pyc new file mode 100644 index 0000000..7d2ba83 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_bytecode_utils_py311.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_code_to_source.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_code_to_source.cpython-312.pyc new file mode 100644 index 0000000..a9c3e21 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_code_to_source.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_collect_bytecode_info.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_collect_bytecode_info.cpython-312.pyc new file mode 100644 index 0000000..6af44e3 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_collect_bytecode_info.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_comm.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_comm.cpython-312.pyc new file mode 100644 index 0000000..5a3a748 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_comm.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_comm_constants.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_comm_constants.cpython-312.pyc new file mode 100644 index 0000000..10e7b76 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_comm_constants.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_command_line_handling.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_command_line_handling.cpython-312.pyc new file mode 100644 index 0000000..00c0e11 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_command_line_handling.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_console.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_console.cpython-312.pyc new file mode 100644 index 0000000..1e6b77c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_console.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_constants.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_constants.cpython-312.pyc new file mode 100644 index 0000000..df1f66a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_constants.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_custom_frames.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_custom_frames.cpython-312.pyc new file mode 100644 index 0000000..355bc81 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_custom_frames.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_cython_wrapper.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_cython_wrapper.cpython-312.pyc new file mode 100644 index 0000000..3c446d3 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_cython_wrapper.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_daemon_thread.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_daemon_thread.cpython-312.pyc new file mode 100644 index 0000000..fc98dde Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_daemon_thread.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_defaults.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_defaults.cpython-312.pyc new file mode 100644 index 0000000..0ca2f4d Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_defaults.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_dont_trace.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_dont_trace.cpython-312.pyc new file mode 100644 index 0000000..c52e98c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_dont_trace.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_dont_trace_files.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_dont_trace_files.cpython-312.pyc new file mode 100644 index 0000000..73bd95f Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_dont_trace_files.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_exec2.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_exec2.cpython-312.pyc new file mode 100644 index 0000000..39904a4 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_exec2.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_extension_api.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_extension_api.cpython-312.pyc new file mode 100644 index 0000000..5d975aa Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_extension_api.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_extension_utils.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_extension_utils.cpython-312.pyc new file mode 100644 index 0000000..9c00367 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_extension_utils.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_filtering.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_filtering.cpython-312.pyc new file mode 100644 index 0000000..2bfe41f Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_filtering.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_frame.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_frame.cpython-312.pyc new file mode 100644 index 0000000..3f176e6 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_frame.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_frame_utils.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_frame_utils.cpython-312.pyc new file mode 100644 index 0000000..ca224b8 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_frame_utils.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_gevent_integration.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_gevent_integration.cpython-312.pyc new file mode 100644 index 0000000..30860f7 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_gevent_integration.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_import_class.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_import_class.cpython-312.pyc new file mode 100644 index 0000000..e7d35b4 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_import_class.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_io.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_io.cpython-312.pyc new file mode 100644 index 0000000..00ffdcb Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_io.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_json_debug_options.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_json_debug_options.cpython-312.pyc new file mode 100644 index 0000000..a136a39 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_json_debug_options.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_net_command.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_net_command.cpython-312.pyc new file mode 100644 index 0000000..34f6028 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_net_command.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_net_command_factory_json.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_net_command_factory_json.cpython-312.pyc new file mode 100644 index 0000000..82a1484 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_net_command_factory_json.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_net_command_factory_xml.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_net_command_factory_xml.cpython-312.pyc new file mode 100644 index 0000000..f8d0d4b Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_net_command_factory_xml.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_plugin_utils.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_plugin_utils.cpython-312.pyc new file mode 100644 index 0000000..625befa Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_plugin_utils.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_process_net_command.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_process_net_command.cpython-312.pyc new file mode 100644 index 0000000..ce8a41a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_process_net_command.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_process_net_command_json.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_process_net_command_json.cpython-312.pyc new file mode 100644 index 0000000..31ce81e Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_process_net_command_json.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_referrers.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_referrers.cpython-312.pyc new file mode 100644 index 0000000..37379c9 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_referrers.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_reload.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_reload.cpython-312.pyc new file mode 100644 index 0000000..d4332d8 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_reload.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_resolver.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_resolver.cpython-312.pyc new file mode 100644 index 0000000..65f1b55 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_resolver.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_runpy.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_runpy.cpython-312.pyc new file mode 100644 index 0000000..a3aba3f Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_runpy.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_safe_repr.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_safe_repr.cpython-312.pyc new file mode 100644 index 0000000..03ab8f4 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_safe_repr.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_save_locals.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_save_locals.cpython-312.pyc new file mode 100644 index 0000000..3fc417b Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_save_locals.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_signature.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_signature.cpython-312.pyc new file mode 100644 index 0000000..26c27ac Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_signature.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_source_mapping.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_source_mapping.cpython-312.pyc new file mode 100644 index 0000000..c2eccc4 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_source_mapping.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_stackless.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_stackless.cpython-312.pyc new file mode 100644 index 0000000..3971b9c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_stackless.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_suspended_frames.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_suspended_frames.cpython-312.pyc new file mode 100644 index 0000000..78784cc Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_suspended_frames.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_thread_lifecycle.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_thread_lifecycle.cpython-312.pyc new file mode 100644 index 0000000..5a32071 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_thread_lifecycle.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_timeout.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_timeout.cpython-312.pyc new file mode 100644 index 0000000..6fe9179 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_timeout.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_trace_dispatch.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_trace_dispatch.cpython-312.pyc new file mode 100644 index 0000000..4446839 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_trace_dispatch.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_trace_dispatch_regular.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_trace_dispatch_regular.cpython-312.pyc new file mode 100644 index 0000000..a436c5e Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_trace_dispatch_regular.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_traceproperty.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_traceproperty.cpython-312.pyc new file mode 100644 index 0000000..1226694 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_traceproperty.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_utils.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_utils.cpython-312.pyc new file mode 100644 index 0000000..6162ab2 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_utils.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_vars.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_vars.cpython-312.pyc new file mode 100644 index 0000000..6c0786a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_vars.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_vm_type.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_vm_type.cpython-312.pyc new file mode 100644 index 0000000..267223a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_vm_type.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_xml.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_xml.cpython-312.pyc new file mode 100644 index 0000000..fcab68d Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/__pycache__/pydevd_xml.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__init__.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py new file mode 100644 index 0000000..e2672a3 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py @@ -0,0 +1,606 @@ +""" +Run this module to regenerate the `pydevd_schema.py` file. + +Note that it'll generate it based on the current debugProtocol.json. Erase it and rerun +to download the latest version. +""" + + +def is_variable_to_translate(cls_name, var_name): + if var_name in ("variablesReference", "frameId", "threadId"): + return True + + if cls_name == "StackFrame" and var_name == "id": + # It's frameId everywhere except on StackFrame. + return True + + if cls_name == "Thread" and var_name == "id": + # It's threadId everywhere except on Thread. + return True + + return False + + +def _get_noqa_for_var(prop_name): + return " # noqa (assign to builtin)" if prop_name in ("type", "format", "id", "hex", "breakpoint", "filter") else "" + + +class _OrderedSet(object): + # Not a good ordered set (just something to be small without adding any deps) + + def __init__(self, initial_contents=None): + self._contents = [] + self._contents_as_set = set() + if initial_contents is not None: + for x in initial_contents: + self.add(x) + + def add(self, x): + if x not in self._contents_as_set: + self._contents_as_set.add(x) + self._contents.append(x) + + def discard(self, x): + if x in self._contents_as_set: + self._contents_as_set.remove(x) + self._contents.remove(x) + + def copy(self): + return _OrderedSet(self._contents) + + def update(self, contents): + for x in contents: + self.add(x) + + def __iter__(self): + return iter(self._contents) + + def __contains__(self, item): + return item in self._contents_as_set + + def __len__(self): + return len(self._contents) + + def set_repr(self): + if len(self) == 0: + return "set()" + + lst = [repr(x) for x in self] + return "set([" + ", ".join(lst) + "])" + + +class Ref(object): + def __init__(self, ref, ref_data): + self.ref = ref + self.ref_data = ref_data + + def __str__(self): + return self.ref + + +def load_schema_data(): + import os.path + import json + + json_file = os.path.join(os.path.dirname(__file__), "debugProtocol.json") + if not os.path.exists(json_file): + import requests + + req = requests.get("https://raw.githubusercontent.com/microsoft/debug-adapter-protocol/gh-pages/debugAdapterProtocol.json") + assert req.status_code == 200 + with open(json_file, "wb") as stream: + stream.write(req.content) + + with open(json_file, "rb") as json_contents: + json_schema_data = json.loads(json_contents.read()) + return json_schema_data + + +def load_custom_schema_data(): + import os.path + import json + + json_file = os.path.join(os.path.dirname(__file__), "debugProtocolCustom.json") + + with open(json_file, "rb") as json_contents: + json_schema_data = json.loads(json_contents.read()) + return json_schema_data + + +def create_classes_to_generate_structure(json_schema_data): + definitions = json_schema_data["definitions"] + + class_to_generatees = {} + + for name, definition in definitions.items(): + all_of = definition.get("allOf") + description = definition.get("description") + is_enum = definition.get("type") == "string" and "enum" in definition + enum_values = None + if is_enum: + enum_values = definition["enum"] + properties = {} + properties.update(definition.get("properties", {})) + required = _OrderedSet(definition.get("required", _OrderedSet())) + base_definitions = [] + + if all_of is not None: + for definition in all_of: + ref = definition.get("$ref") + if ref is not None: + assert ref.startswith("#/definitions/") + ref = ref[len("#/definitions/") :] + base_definitions.append(ref) + else: + if not description: + description = definition.get("description") + properties.update(definition.get("properties", {})) + required.update(_OrderedSet(definition.get("required", _OrderedSet()))) + + if isinstance(description, (list, tuple)): + description = "\n".join(description) + + if name == "ModulesRequest": # Hack to accept modules request without arguments (ptvsd: 2050). + required.discard("arguments") + class_to_generatees[name] = dict( + name=name, + properties=properties, + base_definitions=base_definitions, + description=description, + required=required, + is_enum=is_enum, + enum_values=enum_values, + ) + return class_to_generatees + + +def collect_bases(curr_class, classes_to_generate, memo=None): + ret = [] + if memo is None: + memo = {} + + base_definitions = curr_class["base_definitions"] + for base_definition in base_definitions: + if base_definition not in memo: + ret.append(base_definition) + ret.extend(collect_bases(classes_to_generate[base_definition], classes_to_generate, memo)) + + return ret + + +def fill_properties_and_required_from_base(classes_to_generate): + # Now, resolve properties based on refs + for class_to_generate in classes_to_generate.values(): + dct = {} + s = _OrderedSet() + + for base_definition in reversed(collect_bases(class_to_generate, classes_to_generate)): + # Note: go from base to current so that the initial order of the properties has that + # same order. + dct.update(classes_to_generate[base_definition].get("properties", {})) + s.update(classes_to_generate[base_definition].get("required", _OrderedSet())) + + dct.update(class_to_generate["properties"]) + class_to_generate["properties"] = dct + + s.update(class_to_generate["required"]) + class_to_generate["required"] = s + + return class_to_generate + + +def update_class_to_generate_description(class_to_generate): + import textwrap + + description = class_to_generate["description"] + lines = [] + for line in description.splitlines(): + wrapped = textwrap.wrap(line.strip(), 100) + lines.extend(wrapped) + lines.append("") + + while lines and lines[-1] == "": + lines = lines[:-1] + + class_to_generate["description"] = " " + ("\n ".join(lines)) + + +def update_class_to_generate_type(classes_to_generate, class_to_generate): + properties = class_to_generate.get("properties") + for _prop_name, prop_val in properties.items(): + prop_type = prop_val.get("type", "") + if not prop_type: + prop_type = prop_val.pop("$ref", "") + if prop_type: + assert prop_type.startswith("#/definitions/") + prop_type = prop_type[len("#/definitions/") :] + prop_val["type"] = Ref(prop_type, classes_to_generate[prop_type]) + + +def update_class_to_generate_register_dec(classes_to_generate, class_to_generate): + # Default + class_to_generate["register_request"] = "" + class_to_generate["register_dec"] = "@register" + + properties = class_to_generate.get("properties") + enum_type = properties.get("type", {}).get("enum") + command = None + event = None + if enum_type and len(enum_type) == 1 and next(iter(enum_type)) in ("request", "response", "event"): + msg_type = next(iter(enum_type)) + if msg_type == "response": + # The actual command is typed in the request + response_name = class_to_generate["name"] + request_name = response_name[: -len("Response")] + "Request" + if request_name in classes_to_generate: + command = classes_to_generate[request_name]["properties"].get("command") + else: + if response_name == "ErrorResponse": + command = {"enum": ["error"]} + else: + raise AssertionError("Unhandled: %s" % (response_name,)) + + elif msg_type == "request": + command = properties.get("command") + + elif msg_type == "event": + command = properties.get("event") + + else: + raise AssertionError("Unexpected condition.") + + if command: + enum = command.get("enum") + if enum and len(enum) == 1: + class_to_generate["register_request"] = "@register_%s(%r)\n" % (msg_type, enum[0]) + + +def extract_prop_name_and_prop(class_to_generate): + properties = class_to_generate.get("properties") + required = _OrderedSet(class_to_generate.get("required", _OrderedSet())) + + # Sort so that required come first + prop_name_and_prop = list(properties.items()) + + def compute_sort_key(x): + key = x[0] + if key in required: + if key == "seq": + return 0.5 # seq when required is after the other required keys (to have a default of -1). + return 0 + return 1 + + prop_name_and_prop.sort(key=compute_sort_key) + + return prop_name_and_prop + + +def update_class_to_generate_to_json(class_to_generate): + required = _OrderedSet(class_to_generate.get("required", _OrderedSet())) + prop_name_and_prop = extract_prop_name_and_prop(class_to_generate) + + to_dict_body = ["def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused)"] + + translate_prop_names = [] + for prop_name, prop in prop_name_and_prop: + if is_variable_to_translate(class_to_generate["name"], prop_name): + translate_prop_names.append(prop_name) + + for prop_name, prop in prop_name_and_prop: + namespace = dict(prop_name=prop_name, noqa=_get_noqa_for_var(prop_name)) + to_dict_body.append(" %(prop_name)s = self.%(prop_name)s%(noqa)s" % namespace) + + if prop.get("type") == "array": + to_dict_body.append(' if %(prop_name)s and hasattr(%(prop_name)s[0], "to_dict"):' % namespace) + to_dict_body.append(" %(prop_name)s = [x.to_dict() for x in %(prop_name)s]" % namespace) + + if translate_prop_names: + to_dict_body.append(" if update_ids_to_dap:") + for prop_name in translate_prop_names: + namespace = dict(prop_name=prop_name, noqa=_get_noqa_for_var(prop_name)) + to_dict_body.append(" if %(prop_name)s is not None:" % namespace) + to_dict_body.append(" %(prop_name)s = self._translate_id_to_dap(%(prop_name)s)%(noqa)s" % namespace) + + if not translate_prop_names: + update_dict_ids_from_dap_body = [] + else: + update_dict_ids_from_dap_body = ["", "", "@classmethod", "def update_dict_ids_from_dap(cls, dct):"] + for prop_name in translate_prop_names: + namespace = dict(prop_name=prop_name) + update_dict_ids_from_dap_body.append(" if %(prop_name)r in dct:" % namespace) + update_dict_ids_from_dap_body.append(" dct[%(prop_name)r] = cls._translate_id_from_dap(dct[%(prop_name)r])" % namespace) + update_dict_ids_from_dap_body.append(" return dct") + + class_to_generate["update_dict_ids_from_dap"] = _indent_lines("\n".join(update_dict_ids_from_dap_body)) + + to_dict_body.append(" dct = {") + first_not_required = False + + for prop_name, prop in prop_name_and_prop: + use_to_dict = prop["type"].__class__ == Ref and not prop["type"].ref_data.get("is_enum", False) + is_array = prop["type"] == "array" + ref_array_cls_name = "" + if is_array: + ref = prop["items"].get("$ref") + if ref is not None: + ref_array_cls_name = ref.split("/")[-1] + + namespace = dict(prop_name=prop_name, ref_array_cls_name=ref_array_cls_name) + if prop_name in required: + if use_to_dict: + to_dict_body.append(" %(prop_name)r: %(prop_name)s.to_dict(update_ids_to_dap=update_ids_to_dap)," % namespace) + else: + if ref_array_cls_name: + to_dict_body.append( + " %(prop_name)r: [%(ref_array_cls_name)s.update_dict_ids_to_dap(o) for o in %(prop_name)s] if (update_ids_to_dap and %(prop_name)s) else %(prop_name)s," + % namespace + ) + else: + to_dict_body.append(" %(prop_name)r: %(prop_name)s," % namespace) + else: + if not first_not_required: + first_not_required = True + to_dict_body.append(" }") + + to_dict_body.append(" if %(prop_name)s is not None:" % namespace) + if use_to_dict: + to_dict_body.append(" dct[%(prop_name)r] = %(prop_name)s.to_dict(update_ids_to_dap=update_ids_to_dap)" % namespace) + else: + if ref_array_cls_name: + to_dict_body.append( + " dct[%(prop_name)r] = [%(ref_array_cls_name)s.update_dict_ids_to_dap(o) for o in %(prop_name)s] if (update_ids_to_dap and %(prop_name)s) else %(prop_name)s" + % namespace + ) + else: + to_dict_body.append(" dct[%(prop_name)r] = %(prop_name)s" % namespace) + + if not first_not_required: + first_not_required = True + to_dict_body.append(" }") + + to_dict_body.append(" dct.update(self.kwargs)") + to_dict_body.append(" return dct") + + class_to_generate["to_dict"] = _indent_lines("\n".join(to_dict_body)) + + if not translate_prop_names: + update_dict_ids_to_dap_body = [] + else: + update_dict_ids_to_dap_body = ["", "", "@classmethod", "def update_dict_ids_to_dap(cls, dct):"] + for prop_name in translate_prop_names: + namespace = dict(prop_name=prop_name) + update_dict_ids_to_dap_body.append(" if %(prop_name)r in dct:" % namespace) + update_dict_ids_to_dap_body.append(" dct[%(prop_name)r] = cls._translate_id_to_dap(dct[%(prop_name)r])" % namespace) + update_dict_ids_to_dap_body.append(" return dct") + + class_to_generate["update_dict_ids_to_dap"] = _indent_lines("\n".join(update_dict_ids_to_dap_body)) + + +def update_class_to_generate_init(class_to_generate): + args = [] + init_body = [] + docstring = [] + + required = _OrderedSet(class_to_generate.get("required", _OrderedSet())) + prop_name_and_prop = extract_prop_name_and_prop(class_to_generate) + + translate_prop_names = [] + for prop_name, prop in prop_name_and_prop: + if is_variable_to_translate(class_to_generate["name"], prop_name): + translate_prop_names.append(prop_name) + + enum = prop.get("enum") + if enum and len(enum) == 1: + init_body.append(" self.%(prop_name)s = %(enum)r" % dict(prop_name=prop_name, enum=next(iter(enum)))) + else: + if prop_name in required: + if prop_name == "seq": + args.append(prop_name + "=-1") + else: + args.append(prop_name) + else: + args.append(prop_name + "=None") + + if prop["type"].__class__ == Ref: + ref = prop["type"] + ref_data = ref.ref_data + if ref_data.get("is_enum", False): + init_body.append(" if %s is not None:" % (prop_name,)) + init_body.append(" assert %s in %s.VALID_VALUES" % (prop_name, str(ref))) + init_body.append(" self.%(prop_name)s = %(prop_name)s" % dict(prop_name=prop_name)) + else: + namespace = dict(prop_name=prop_name, ref_name=str(ref)) + init_body.append(" if %(prop_name)s is None:" % namespace) + init_body.append(" self.%(prop_name)s = %(ref_name)s()" % namespace) + init_body.append(" else:") + init_body.append( + " self.%(prop_name)s = %(ref_name)s(update_ids_from_dap=update_ids_from_dap, **%(prop_name)s) if %(prop_name)s.__class__ != %(ref_name)s else %(prop_name)s" + % namespace + ) + + else: + init_body.append(" self.%(prop_name)s = %(prop_name)s" % dict(prop_name=prop_name)) + + if prop["type"] == "array": + ref = prop["items"].get("$ref") + if ref is not None: + ref_array_cls_name = ref.split("/")[-1] + init_body.append(" if update_ids_from_dap and self.%(prop_name)s:" % dict(prop_name=prop_name)) + init_body.append(" for o in self.%(prop_name)s:" % dict(prop_name=prop_name)) + init_body.append( + " %(ref_array_cls_name)s.update_dict_ids_from_dap(o)" % dict(ref_array_cls_name=ref_array_cls_name) + ) + + prop_type = prop["type"] + prop_description = prop.get("description", "") + + if isinstance(prop_description, (list, tuple)): + prop_description = "\n ".join(prop_description) + + docstring.append( + ":param %(prop_type)s %(prop_name)s: %(prop_description)s" + % dict(prop_type=prop_type, prop_name=prop_name, prop_description=prop_description) + ) + + if translate_prop_names: + init_body.append(" if update_ids_from_dap:") + for prop_name in translate_prop_names: + init_body.append(" self.%(prop_name)s = self._translate_id_from_dap(self.%(prop_name)s)" % dict(prop_name=prop_name)) + + docstring = _indent_lines("\n".join(docstring)) + init_body = "\n".join(init_body) + + # Actually bundle the whole __init__ from the parts. + args = ", ".join(args) + if args: + args = ", " + args + + # Note: added kwargs because some messages are expected to be extended by the user (so, we'll actually + # make all extendable so that we don't have to worry about which ones -- we loose a little on typing, + # but may be better than doing a allow list based on something only pointed out in the documentation). + class_to_generate[ + "init" + ] = '''def __init__(self%(args)s, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ +%(docstring)s + """ +%(init_body)s + self.kwargs = kwargs +''' % dict(args=args, init_body=init_body, docstring=docstring) + + class_to_generate["init"] = _indent_lines(class_to_generate["init"]) + + +def update_class_to_generate_props(class_to_generate): + import json + + def default(o): + if isinstance(o, Ref): + return o.ref + raise AssertionError("Unhandled: %s" % (o,)) + + properties = class_to_generate["properties"] + class_to_generate["props"] = ( + " __props__ = %s" % _indent_lines(json.dumps(properties, indent=4, default=default).replace("true", "True")).strip() + ) + + +def update_class_to_generate_refs(class_to_generate): + properties = class_to_generate["properties"] + class_to_generate["refs"] = ( + " __refs__ = %s" % _OrderedSet(key for (key, val) in properties.items() if val["type"].__class__ == Ref).set_repr() + ) + + +def update_class_to_generate_enums(class_to_generate): + class_to_generate["enums"] = "" + if class_to_generate.get("is_enum", False): + enums = "" + for enum in class_to_generate["enum_values"]: + enums += " %s = %r\n" % (enum.upper(), enum) + enums += "\n" + enums += " VALID_VALUES = %s\n\n" % _OrderedSet(class_to_generate["enum_values"]).set_repr() + class_to_generate["enums"] = enums + + +def update_class_to_generate_objects(classes_to_generate, class_to_generate): + properties = class_to_generate["properties"] + for key, val in properties.items(): + if "type" not in val: + val["type"] = "TypeNA" + continue + + if val["type"] == "object": + create_new = val.copy() + create_new.update( + { + "name": "%s%s" % (class_to_generate["name"], key.title()), + "description": ' "%s" of %s' % (key, class_to_generate["name"]), + } + ) + if "properties" not in create_new: + create_new["properties"] = {} + + assert create_new["name"] not in classes_to_generate + classes_to_generate[create_new["name"]] = create_new + + update_class_to_generate_type(classes_to_generate, create_new) + update_class_to_generate_props(create_new) + + # Update nested object types + update_class_to_generate_objects(classes_to_generate, create_new) + + val["type"] = Ref(create_new["name"], classes_to_generate[create_new["name"]]) + val.pop("properties", None) + + +def gen_debugger_protocol(): + import os.path + import sys + + if sys.version_info[:2] < (3, 6): + raise AssertionError("Must be run with Python 3.6 onwards (to keep dict order).") + + classes_to_generate = create_classes_to_generate_structure(load_schema_data()) + classes_to_generate.update(create_classes_to_generate_structure(load_custom_schema_data())) + + class_to_generate = fill_properties_and_required_from_base(classes_to_generate) + + for class_to_generate in list(classes_to_generate.values()): + update_class_to_generate_description(class_to_generate) + update_class_to_generate_type(classes_to_generate, class_to_generate) + update_class_to_generate_props(class_to_generate) + update_class_to_generate_objects(classes_to_generate, class_to_generate) + + for class_to_generate in classes_to_generate.values(): + update_class_to_generate_refs(class_to_generate) + update_class_to_generate_init(class_to_generate) + update_class_to_generate_enums(class_to_generate) + update_class_to_generate_to_json(class_to_generate) + update_class_to_generate_register_dec(classes_to_generate, class_to_generate) + + class_template = ''' +%(register_request)s%(register_dec)s +class %(name)s(BaseSchema): + """ +%(description)s + + Note: automatically generated code. Do not edit manually. + """ + +%(enums)s%(props)s +%(refs)s + + __slots__ = list(__props__.keys()) + ['kwargs'] + +%(init)s%(update_dict_ids_from_dap)s + +%(to_dict)s%(update_dict_ids_to_dap)s +''' + + contents = [] + contents.append("# coding: utf-8") + contents.append("# Automatically generated code.") + contents.append("# Do not edit manually.") + contents.append("# Generated by running: %s" % os.path.basename(__file__)) + contents.append("from .pydevd_base_schema import BaseSchema, register, register_request, register_response, register_event") + contents.append("") + for class_to_generate in classes_to_generate.values(): + contents.append(class_template % class_to_generate) + + parent_dir = os.path.dirname(__file__) + schema = os.path.join(parent_dir, "pydevd_schema.py") + with open(schema, "w", encoding="utf-8") as stream: + stream.write("\n".join(contents)) + + +def _indent_lines(lines, indent=" "): + out_lines = [] + for line in lines.splitlines(keepends=True): + out_lines.append(indent + line) + + return "".join(out_lines) + + +if __name__ == "__main__": + gen_debugger_protocol() diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..6e0dbeb Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/__main__pydevd_gen_debug_adapter_protocol.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/__main__pydevd_gen_debug_adapter_protocol.cpython-312.pyc new file mode 100644 index 0000000..7de7a24 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/__main__pydevd_gen_debug_adapter_protocol.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/pydevd_base_schema.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/pydevd_base_schema.cpython-312.pyc new file mode 100644 index 0000000..b9f73e9 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/pydevd_base_schema.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/pydevd_schema.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/pydevd_schema.cpython-312.pyc new file mode 100644 index 0000000..0e730f6 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/pydevd_schema.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/pydevd_schema_log.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/pydevd_schema_log.cpython-312.pyc new file mode 100644 index 0000000..1abe626 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__pycache__/pydevd_schema_log.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json new file mode 100644 index 0000000..406edfc --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json @@ -0,0 +1,4190 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Debug Adapter Protocol", + "description": "The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime.", + "type": "object", + + + "definitions": { + + "ProtocolMessage": { + "type": "object", + "title": "Base Protocol", + "description": "Base class of requests, responses, and events.", + "properties": { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "description": "Message type.", + "_enum": [ "request", "response", "event" ] + } + }, + "required": [ "seq", "type" ] + }, + + "Request": { + "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { + "type": "object", + "description": "A client or debug adapter initiated request.", + "properties": { + "type": { + "type": "string", + "enum": [ "request" ] + }, + "command": { + "type": "string", + "description": "The command to execute." + }, + "arguments": { + "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], + "description": "Object containing arguments for the command." + } + }, + "required": [ "type", "command" ] + }] + }, + + "Event": { + "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { + "type": "object", + "description": "A debug adapter initiated event.", + "properties": { + "type": { + "type": "string", + "enum": [ "event" ] + }, + "event": { + "type": "string", + "description": "Type of event." + }, + "body": { + "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], + "description": "Event-specific information." + } + }, + "required": [ "type", "event" ] + }] + }, + + "Response": { + "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { + "type": "object", + "description": "Response for a request.", + "properties": { + "type": { + "type": "string", + "enum": [ "response" ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." + }, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf true, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." + }, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": [ "cancelled", "notStopped" ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] + }, + "body": { + "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], + "description": "Contains request result if success is true and error details if success is false." + } + }, + "required": [ "type", "request_seq", "success", "command" ] + }] + }, + + "ErrorResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "On error (whenever `success` is false), the body can provide more details.", + "properties": { + "body": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Message", + "description": "A structured error message." + } + } + } + }, + "required": [ "body" ] + }] + }, + + "CancelRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The `cancel` request is used by the client in two situations:\n- to indicate that it is no longer interested in the result produced by a specific request issued earlier\n- to cancel a progress sequence.\nClients should only call this request if the corresponding capability `supportsCancelRequest` is true.\nThis request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honoring this request but there are no guarantees.\nThe `cancel` request may return an error if it could not cancel an operation but a client should refrain from presenting this error to end users.\nThe request that got cancelled still needs to send a response back. This can either be a normal result (`success` attribute true) or an error response (`success` attribute false and the `message` set to `cancelled`).\nReturning partial results from a cancelled request is possible but please note that a client has no generic way for detecting that a response is partial or not.\nThe progress that got cancelled still needs to send a `progressEnd` event back.\n A client should not assume that progress just got cancelled after sending the `cancel` request.", + "properties": { + "command": { + "type": "string", + "enum": [ "cancel" ] + }, + "arguments": { + "$ref": "#/definitions/CancelArguments" + } + }, + "required": [ "command" ] + }] + }, + "CancelArguments": { + "type": "object", + "description": "Arguments for `cancel` request.", + "properties": { + "requestId": { + "type": "integer", + "description": "The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request." + }, + "progressId": { + "type": "string", + "description": "The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request." + } + } + }, + "CancelResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `cancel` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "InitializedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "title": "Events", + "description": "This event indicates that the debug adapter is ready to accept configuration requests (e.g. `setBreakpoints`, `setExceptionBreakpoints`).\nA debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the `initialize` request has finished).\nThe sequence of events/requests is as follows:\n- adapters sends `initialized` event (after the `initialize` request has returned)\n- client sends zero or more `setBreakpoints` requests\n- client sends one `setFunctionBreakpoints` request (if corresponding capability `supportsFunctionBreakpoints` is true)\n- client sends a `setExceptionBreakpoints` request if one or more `exceptionBreakpointFilters` have been defined (or if `supportsConfigurationDoneRequest` is not true)\n- client sends other future configuration requests\n- client sends one `configurationDone` request to indicate the end of the configuration.", + "properties": { + "event": { + "type": "string", + "enum": [ "initialized" ] + } + }, + "required": [ "event" ] + }] + }, + + "StoppedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that the execution of the debuggee has stopped due to some condition.\nThis can be caused by a breakpoint previously set, a stepping request has completed, by executing a debugger statement etc.", + "properties": { + "event": { + "type": "string", + "enum": [ "stopped" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.\nFor backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated).", + "_enum": [ "step", "breakpoint", "exception", "pause", "entry", "goto", "function breakpoint", "data breakpoint", "instruction breakpoint" ] + }, + "description": { + "type": "string", + "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated." + }, + "threadId": { + "type": "integer", + "description": "The thread which was stopped." + }, + "preserveFocusHint": { + "type": "boolean", + "description": "A value of true hints to the client that this event should not change the focus." + }, + "text": { + "type": "string", + "description": "Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI." + }, + "allThreadsStopped": { + "type": "boolean", + "description": "If `allThreadsStopped` is true, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given `threadId` can be expanded." + }, + "hitBreakpointIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location." + } + }, + "required": [ "reason" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ContinuedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that the execution of the debuggee has continued.\nPlease note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. `launch` or `continue`.\nIt is only necessary to send a `continued` event if there was no previous request that implied this.", + "properties": { + "event": { + "type": "string", + "enum": [ "continued" ] + }, + "body": { + "type": "object", + "properties": { + "threadId": { + "type": "integer", + "description": "The thread which was continued." + }, + "allThreadsContinued": { + "type": "boolean", + "description": "If `allThreadsContinued` is true, a debug adapter can announce that all threads have continued." + } + }, + "required": [ "threadId" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ExitedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that the debuggee has exited and returns its exit code.", + "properties": { + "event": { + "type": "string", + "enum": [ "exited" ] + }, + "body": { + "type": "object", + "properties": { + "exitCode": { + "type": "integer", + "description": "The exit code returned from the debuggee." + } + }, + "required": [ "exitCode" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "TerminatedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.", + "properties": { + "event": { + "type": "string", + "enum": [ "terminated" ] + }, + "body": { + "type": "object", + "properties": { + "restart": { + "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], + "description": "A debug adapter may set `restart` to true (or to an arbitrary object) to request that the client restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests." + } + } + } + }, + "required": [ "event" ] + }] + }, + + "ThreadEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that a thread has started or exited.", + "properties": { + "event": { + "type": "string", + "enum": [ "thread" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": [ "started", "exited" ] + }, + "threadId": { + "type": "integer", + "description": "The identifier of the thread." + } + }, + "required": ["reason", "threadId"] + } + }, + "required": [ "event", "body" ] + }] + }, + + "OutputEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that the target has produced some output.", + "properties": { + "event": { + "type": "string", + "enum": [ "output" ] + }, + "body": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "The output category. If not specified or if the category is not understood by the client, `console` is assumed.", + "_enum": [ "console", "important", "stdout", "stderr", "telemetry" ], + "enumDescriptions": [ + "Show the output in the client's default message UI, e.g. a 'debug console'. This category should only be used for informational output from the debugger (as opposed to the debuggee).", + "A hint for the client to show the output in the client's UI for important and highly visible information, e.g. as a popup notification. This category should only be used for important messages from the debugger (as opposed to the debuggee). Since this category value is a hint, clients might ignore the hint and assume the `console` category.", + "Show the output as normal program output from the debuggee.", + "Show the output as error program output from the debuggee.", + "Send the output to telemetry instead of showing it to the user." + ] + }, + "output": { + "type": "string", + "description": "The output to report." + }, + "group": { + "type": "string", + "description": "Support for keeping an output log organized by grouping related messages.", + "enum": [ "start", "startCollapsed", "end" ], + "enumDescriptions": [ + "Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe `output` attribute becomes the name of the group and is not indented.", + "Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe `output` attribute becomes the name of the group and is not indented.", + "End the current group and decrease the indentation of subsequent output events.\nA non-empty `output` attribute is shown as the unindented end of the group." + ] + }, + "variablesReference": { + "type": "integer", + "description": "If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The source location where the output was produced." + }, + "line": { + "type": "integer", + "description": "The source location's line where the output was produced." + }, + "column": { + "type": "integer", + "description": "The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "data": { + "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], + "description": "Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format." + } + }, + "required": ["output"] + } + }, + "required": [ "event", "body" ] + }] + }, + + "BreakpointEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that some information about a breakpoint has changed.", + "properties": { + "event": { + "type": "string", + "enum": [ "breakpoint" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": [ "changed", "new", "removed" ] + }, + "breakpoint": { + "$ref": "#/definitions/Breakpoint", + "description": "The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values." + } + }, + "required": [ "reason", "breakpoint" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ModuleEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that some information about a module has changed.", + "properties": { + "event": { + "type": "string", + "enum": [ "module" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": [ "new", "changed", "removed" ] + }, + "module": { + "$ref": "#/definitions/Module", + "description": "The new, changed, or removed module. In case of `removed` only the module id is used." + } + }, + "required": [ "reason", "module" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "LoadedSourceEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that some source has been added, changed, or removed from the set of all loaded sources.", + "properties": { + "event": { + "type": "string", + "enum": [ "loadedSource" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": [ "new", "changed", "removed" ] + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The new, changed, or removed source." + } + }, + "required": [ "reason", "source" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProcessEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.", + "properties": { + "event": { + "type": "string", + "enum": [ "process" ] + }, + "body": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js." + }, + "systemProcessId": { + "type": "integer", + "description": "The system process id of the debugged process. This property is missing for non-system processes." + }, + "isLocalProcess": { + "type": "boolean", + "description": "If true, the process is running on the same computer as the debug adapter." + }, + "startMethod": { + "type": "string", + "enum": [ "launch", "attach", "attachForSuspendedLaunch" ], + "description": "Describes how the debug engine started debugging this process.", + "enumDescriptions": [ + "Process was launched under the debugger.", + "Debugger attached to an existing process.", + "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach." + ] + }, + "pointerSize": { + "type": "integer", + "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display." + } + }, + "required": [ "name" ] + } + }, + "required": [ "event", "body" ] + } + ] + }, + + "CapabilitiesEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that one or more capabilities have changed.\nSince the capabilities are dependent on the client and its UI, it might not be possible to change that at random times (or too late).\nConsequently this event has a hint characteristic: a client can only be expected to make a 'best effort' in honoring individual capabilities but there are no guarantees.\nOnly changed capabilities need to be included, all other capabilities keep their values.", + "properties": { + "event": { + "type": "string", + "enum": [ "capabilities" ] + }, + "body": { + "type": "object", + "properties": { + "capabilities": { + "$ref": "#/definitions/Capabilities", + "description": "The set of updated capabilities." + } + }, + "required": [ "capabilities" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProgressStartEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event signals that a long running operation is about to start and provides additional information for the client to set up a corresponding progress and cancellation UI.\nThe client is free to delay the showing of the UI in order to reduce flicker.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.", + "properties": { + "event": { + "type": "string", + "enum": [ "progressStart" ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.\nIDs must be unique within a debug session." + }, + "title": { + "type": "string", + "description": "Short title of the progress reporting. Shown in the UI to describe the long running operation." + }, + "requestId": { + "type": "integer", + "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter." + }, + "cancellable": { + "type": "boolean", + "description": "If true, the request that reports progress may be cancelled with a `cancel` request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting." + }, + "message": { + "type": "string", + "description": "More detailed progress message." + }, + "percentage": { + "type": "number", + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown." + } + }, + "required": [ "progressId", "title" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProgressUpdateEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event signals that the progress reporting needs to be updated with a new message and/or percentage.\nThe client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.", + "properties": { + "event": { + "type": "string", + "enum": [ "progressUpdate" ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial `progressStart` event." + }, + "message": { + "type": "string", + "description": "More detailed progress message. If omitted, the previous message (if any) is used." + }, + "percentage": { + "type": "number", + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown." + } + }, + "required": [ "progressId" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProgressEndEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event signals the end of the progress reporting with a final message.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.", + "properties": { + "event": { + "type": "string", + "enum": [ "progressEnd" ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial `ProgressStartEvent`." + }, + "message": { + "type": "string", + "description": "More detailed progress message. If omitted, the previous message (if any) is used." + } + }, + "required": [ "progressId" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "InvalidatedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.\nDebug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter.\nThis event should only be sent if the corresponding capability `supportsInvalidatedEvent` is true.", + "properties": { + "event": { + "type": "string", + "enum": [ "invalidated" ] + }, + "body": { + "type": "object", + "properties": { + "areas": { + "type": "array", + "description": "Set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honoring the areas but there are no guarantees. If this property is missing, empty, or if values are not understood, the client should assume a single value `all`.", + "items": { + "$ref": "#/definitions/InvalidatedAreas" + } + }, + "threadId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this thread." + }, + "stackFrameId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored)." + } + } + } + }, + "required": [ "event", "body" ] + }] + }, + + "MemoryEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "This event indicates that some memory range has been updated. It should only be sent if the corresponding capability `supportsMemoryEvent` is true.\nClients typically react to the event by re-issuing a `readMemory` request if they show the memory identified by the `memoryReference` and if the updated memory range overlaps the displayed range. Clients should not make assumptions how individual memory references relate to each other, so they should not assume that they are part of a single continuous address range and might overlap.\nDebug adapters can use this event to indicate that the contents of a memory range has changed due to some other request like `setVariable` or `setExpression`. Debug adapters are not expected to emit this event for each and every memory change of a running program, because that information is typically not available from debuggers and it would flood clients with too many events.", + "properties": { + "event": { + "type": "string", + "enum": [ "memory" ] + }, + "body": { + "type": "object", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference of a memory range that has been updated." + }, + "offset": { + "type": "integer", + "description": "Starting offset in bytes where memory has been updated. Can be negative." + }, + "count": { + "type": "integer", + "description": "Number of bytes updated." + } + }, + "required": [ "memoryReference", "offset", "count" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "RunInTerminalRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "title": "Reverse Requests", + "description": "This request is sent from the debug adapter to the client to run a command in a terminal.\nThis is typically used to launch the debuggee in a terminal provided by the client.\nThis request should only be called if the corresponding client capability `supportsRunInTerminalRequest` is true.\nClient implementations of `runInTerminal` are free to run the command however they choose including issuing the command to a command line interpreter (aka 'shell'). Argument strings passed to the `runInTerminal` request must arrive verbatim in the command to be run. As a consequence, clients which use a shell are responsible for escaping any special shell characters in the argument strings to prevent them from being interpreted (and modified) by the shell.\nSome users may wish to take advantage of shell processing in the argument strings. For clients which implement `runInTerminal` using an intermediary shell, the `argsCanBeInterpretedByShell` property can be set to true. In this case the client is requested not to escape any special shell characters in the argument strings.", + "properties": { + "command": { + "type": "string", + "enum": [ "runInTerminal" ] + }, + "arguments": { + "$ref": "#/definitions/RunInTerminalRequestArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "RunInTerminalRequestArguments": { + "type": "object", + "description": "Arguments for `runInTerminal` request.", + "properties": { + "kind": { + "type": "string", + "enum": [ "integrated", "external" ], + "description": "What kind of terminal to launch. Defaults to `integrated` if not specified." + }, + "title": { + "type": "string", + "description": "Title of the terminal." + }, + "cwd": { + "type": "string", + "description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command." + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of arguments. The first argument is the command to run." + }, + "env": { + "type": "object", + "description": "Environment key-value pairs that are added to or removed from the default environment.", + "additionalProperties": { + "type": [ "string", "null" ], + "description": "A string is a proper value for an environment variable. The value `null` removes the variable from the environment." + } + }, + "argsCanBeInterpretedByShell": { + "type": "boolean", + "description": "This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells." + } + }, + "required": [ "args", "cwd" ] + }, + "RunInTerminalResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `runInTerminal` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "processId": { + "type": "integer", + "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)." + }, + "shellProcessId": { + "type": "integer", + "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)." + } + } + } + }, + "required": [ "body" ] + }] + }, + "StartDebuggingRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "This request is sent from the debug adapter to the client to start a new debug session of the same type as the caller.\nThis request should only be sent if the corresponding client capability `supportsStartDebuggingRequest` is true.\nA client implementation of `startDebugging` should start a new debug session (of the same type as the caller) in the same way that the caller's session was started. If the client supports hierarchical debug sessions, the newly created session can be treated as a child of the caller session.", + "properties": { + "command": { + "type": "string", + "enum": [ + "startDebugging" + ] + }, + "arguments": { + "$ref": "#/definitions/StartDebuggingRequestArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "StartDebuggingRequestArguments": { + "type": "object", + "description": "Arguments for `startDebugging` request.", + "properties": { + "configuration": { + "type": "object", + "additionalProperties": true, + "description": "Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables')." + }, + "request": { + "type": "string", + "enum": [ + "launch", + "attach" + ], + "description": "Indicates whether the new debug session should be started with a `launch` or `attach` request." + } + }, + "required": [ + "configuration", + "request" + ] + }, + "StartDebuggingResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to `startDebugging` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + + "InitializeRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "title": "Requests", + "description": "The `initialize` request is sent as the first request from the client to the debug adapter in order to configure it with client capabilities and to retrieve capabilities from the debug adapter.\nUntil the debug adapter has responded with an `initialize` response, the client must not send any additional requests or events to the debug adapter.\nIn addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an `initialize` response.\nThe `initialize` request may only be sent once.", + "properties": { + "command": { + "type": "string", + "enum": [ "initialize" ] + }, + "arguments": { + "$ref": "#/definitions/InitializeRequestArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "InitializeRequestArguments": { + "type": "object", + "description": "Arguments for `initialize` request.", + "properties": { + "clientID": { + "type": "string", + "description": "The ID of the client using this adapter." + }, + "clientName": { + "type": "string", + "description": "The human-readable name of the client using this adapter." + }, + "adapterID": { + "type": "string", + "description": "The ID of the debug adapter." + }, + "locale": { + "type": "string", + "description": "The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH." + }, + "linesStartAt1": { + "type": "boolean", + "description": "If true all line numbers are 1-based (default)." + }, + "columnsStartAt1": { + "type": "boolean", + "description": "If true all column numbers are 1-based (default)." + }, + "pathFormat": { + "type": "string", + "_enum": [ "path", "uri" ], + "description": "Determines in what format paths are specified. The default is `path`, which is the native format." + }, + "supportsVariableType": { + "type": "boolean", + "description": "Client supports the `type` attribute for variables." + }, + "supportsVariablePaging": { + "type": "boolean", + "description": "Client supports the paging of variables." + }, + "supportsRunInTerminalRequest": { + "type": "boolean", + "description": "Client supports the `runInTerminal` request." + }, + "supportsMemoryReferences": { + "type": "boolean", + "description": "Client supports memory references." + }, + "supportsProgressReporting": { + "type": "boolean", + "description": "Client supports progress reporting." + }, + "supportsInvalidatedEvent": { + "type": "boolean", + "description": "Client supports the `invalidated` event." + }, + "supportsMemoryEvent": { + "type": "boolean", + "description": "Client supports the `memory` event." + }, + "supportsArgsCanBeInterpretedByShell": { + "type": "boolean", + "description": "Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request." + }, + "supportsStartDebuggingRequest": { + "type": "boolean", + "description": "Client supports the `startDebugging` request." + } + }, + "required": [ "adapterID" ] + }, + "InitializeResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `initialize` request.", + "properties": { + "body": { + "$ref": "#/definitions/Capabilities", + "description": "The capabilities of this debug adapter." + } + } + }] + }, + + "ConfigurationDoneRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "This request indicates that the client has finished initialization of the debug adapter.\nSo it is the last request in the sequence of configuration requests (which was started by the `initialized` event).\nClients should only call this request if the corresponding capability `supportsConfigurationDoneRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "configurationDone" ] + }, + "arguments": { + "$ref": "#/definitions/ConfigurationDoneArguments" + } + }, + "required": [ "command" ] + }] + }, + "ConfigurationDoneArguments": { + "type": "object", + "description": "Arguments for `configurationDone` request." + }, + "ConfigurationDoneResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `configurationDone` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "LaunchRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if `noDebug` is true).\nSince launching is debugger/runtime specific, the arguments for this request are not part of this specification.", + "properties": { + "command": { + "type": "string", + "enum": [ "launch" ] + }, + "arguments": { + "$ref": "#/definitions/LaunchRequestArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "LaunchRequestArguments": { + "type": "object", + "description": "Arguments for `launch` request. Additional attributes are implementation specific.", + "properties": { + "noDebug": { + "type": "boolean", + "description": "If true, the launch request should launch the program without enabling debugging." + }, + "__restart": { + "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], + "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact." + } + } + }, + "LaunchResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `launch` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "AttachRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The `attach` request is sent from the client to the debug adapter to attach to a debuggee that is already running.\nSince attaching is debugger/runtime specific, the arguments for this request are not part of this specification.", + "properties": { + "command": { + "type": "string", + "enum": [ "attach" ] + }, + "arguments": { + "$ref": "#/definitions/AttachRequestArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "AttachRequestArguments": { + "type": "object", + "description": "Arguments for `attach` request. Additional attributes are implementation specific.", + "properties": { + "__restart": { + "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], + "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact." + } + } + }, + "AttachResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `attach` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "RestartRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Restarts a debug session. Clients should only call this request if the corresponding capability `supportsRestartRequest` is true.\nIf the capability is missing or has the value false, a typical client emulates `restart` by terminating the debug adapter first and then launching it anew.", + "properties": { + "command": { + "type": "string", + "enum": [ "restart" ] + }, + "arguments": { + "$ref": "#/definitions/RestartArguments" + } + }, + "required": [ "command" ] + }] + }, + "RestartArguments": { + "type": "object", + "description": "Arguments for `restart` request.", + "properties": { + "arguments": { + "oneOf": [ + { "$ref": "#/definitions/LaunchRequestArguments" }, + { "$ref": "#/definitions/AttachRequestArguments" } + ], + "description": "The latest version of the `launch` or `attach` configuration." + } + } + }, + "RestartResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `restart` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "DisconnectRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The `disconnect` request asks the debug adapter to disconnect from the debuggee (thus ending the debug session) and then to shut down itself (the debug adapter).\nIn addition, the debug adapter must terminate the debuggee if it was started with the `launch` request. If an `attach` request was used to connect to the debuggee, then the debug adapter must not terminate the debuggee.\nThis implicit behavior of when to terminate the debuggee can be overridden with the `terminateDebuggee` argument (which is only supported by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true).", + "properties": { + "command": { + "type": "string", + "enum": [ "disconnect" ] + }, + "arguments": { + "$ref": "#/definitions/DisconnectArguments" + } + }, + "required": [ "command" ] + }] + }, + "DisconnectArguments": { + "type": "object", + "description": "Arguments for `disconnect` request.", + "properties": { + "restart": { + "type": "boolean", + "description": "A value of true indicates that this `disconnect` request is part of a restart sequence." + }, + "terminateDebuggee": { + "type": "boolean", + "description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true." + }, + "suspendDebuggee": { + "type": "boolean", + "description": "Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true." + } + } + }, + "DisconnectResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `disconnect` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "TerminateRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The `terminate` request is sent from the client to the debug adapter in order to shut down the debuggee gracefully. Clients should only call this request if the capability `supportsTerminateRequest` is true.\nTypically a debug adapter implements `terminate` by sending a software signal which the debuggee intercepts in order to clean things up properly before terminating itself.\nPlease note that this request does not directly affect the state of the debug session: if the debuggee decides to veto the graceful shutdown for any reason by not terminating itself, then the debug session just continues.\nClients can surface the `terminate` request as an explicit command or they can integrate it into a two stage Stop command that first sends `terminate` to request a graceful shutdown, and if that fails uses `disconnect` for a forceful shutdown.", + "properties": { + "command": { + "type": "string", + "enum": [ "terminate" ] + }, + "arguments": { + "$ref": "#/definitions/TerminateArguments" + } + }, + "required": [ "command" ] + }] + }, + "TerminateArguments": { + "type": "object", + "description": "Arguments for `terminate` request.", + "properties": { + "restart": { + "type": "boolean", + "description": "A value of true indicates that this `terminate` request is part of a restart sequence." + } + } + }, + "TerminateResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `terminate` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "BreakpointLocationsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The `breakpointLocations` request returns all possible locations for source breakpoints in a given range.\nClients should only call this request if the corresponding capability `supportsBreakpointLocationsRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "breakpointLocations" ] + }, + "arguments": { + "$ref": "#/definitions/BreakpointLocationsArguments" + } + }, + "required": [ "command" ] + }] + + }, + "BreakpointLocationsArguments": { + "type": "object", + "description": "Arguments for `breakpointLocations` request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified." + }, + "line": { + "type": "integer", + "description": "Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line." + }, + "column": { + "type": "integer", + "description": "Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed." + }, + "endLine": { + "type": "integer", + "description": "End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line." + }, + "endColumn": { + "type": "integer", + "description": "End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed." + } + }, + "required": [ "source", "line" ] + }, + "BreakpointLocationsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `breakpointLocations` request.\nContains possible locations for source breakpoints.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/BreakpointLocation" + }, + "description": "Sorted set of possible breakpoint locations." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetBreakpointsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.\nTo clear all breakpoint for a source, specify an empty array.\nWhen a breakpoint is hit, a `stopped` event (with reason `breakpoint`) is generated.", + "properties": { + "command": { + "type": "string", + "enum": [ "setBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setBreakpoints` request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified." + }, + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/SourceBreakpoint" + }, + "description": "The code locations of the breakpoints." + }, + "lines": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Deprecated: The code locations of the breakpoints." + }, + "sourceModified": { + "type": "boolean", + "description": "A value of true indicates that the underlying source has been modified which results in new breakpoint locations." + } + }, + "required": [ "source" ] + }, + "SetBreakpointsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `setBreakpoints` request.\nReturned is information about each breakpoint created by this request.\nThis includes the actual code location and whether the breakpoint could be verified.\nThe breakpoints returned are in the same order as the elements of the `breakpoints`\n(or the deprecated `lines`) array in the arguments.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetFunctionBreakpointsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Replaces all existing function breakpoints with new function breakpoints.\nTo clear all function breakpoints, specify an empty array.\nWhen a function breakpoint is hit, a `stopped` event (with reason `function breakpoint`) is generated.\nClients should only call this request if the corresponding capability `supportsFunctionBreakpoints` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "setFunctionBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetFunctionBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetFunctionBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setFunctionBreakpoints` request.", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/FunctionBreakpoint" + }, + "description": "The function names of the breakpoints." + } + }, + "required": [ "breakpoints" ] + }, + "SetFunctionBreakpointsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `setFunctionBreakpoints` request.\nReturned is information about each breakpoint created by this request.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetExceptionBreakpointsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request configures the debugger's response to thrown exceptions.\nIf an exception is configured to break, a `stopped` event is fired (with reason `exception`).\nClients should only call this request if the corresponding capability `exceptionBreakpointFilters` returns one or more filters.", + "properties": { + "command": { + "type": "string", + "enum": [ "setExceptionBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetExceptionBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetExceptionBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setExceptionBreakpoints` request.", + "properties": { + "filters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive." + }, + "filterOptions": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionFilterOptions" + }, + "description": "Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive." + }, + "exceptionOptions": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionOptions" + }, + "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true." + } + }, + "required": [ "filters" ] + }, + "SetExceptionBreakpointsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `setExceptionBreakpoints` request.\nThe response contains an array of `Breakpoint` objects with information about each exception breakpoint or filter. The `Breakpoint` objects are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays given as arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information.\nThe `verified` property of a `Breakpoint` object signals whether the exception breakpoint or filter could be successfully created and whether the condition is valid. In case of an error the `message` property explains the problem. The `id` property can be used to introduce a unique ID for the exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events.\nFor backward compatibility both the `breakpoints` array and the enclosing `body` are optional. If these elements are missing a client is not able to show problems for individual exception breakpoints or filters.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information." + } + } + } + } + }] + }, + + "DataBreakpointInfoRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Obtains information on a possible data breakpoint that could be set on an expression or variable.\nClients should only call this request if the corresponding capability `supportsDataBreakpoints` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "dataBreakpointInfo" ] + }, + "arguments": { + "$ref": "#/definitions/DataBreakpointInfoArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "DataBreakpointInfoArguments": { + "type": "object", + "description": "Arguments for `dataBreakpointInfo` request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + }, + "name": { + "type": "string", + "description": "The name of the variable's child to obtain data breakpoint information for.\nIf `variablesReference` isn't specified, this can be an expression." + }, + "frameId": { + "type": "integer", + "description": "When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect." + } + }, + "required": [ "name" ] + }, + "DataBreakpointInfoResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `dataBreakpointInfo` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "dataId": { + "type": [ "string", "null" ], + "description": "An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`." + }, + "description": { + "type": "string", + "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available." + }, + "accessTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/DataBreakpointAccessType" + }, + "description": "Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information." + }, + "canPersist": { + "type": "boolean", + "description": "Attribute indicates that a potential data breakpoint could be persisted across sessions." + } + }, + "required": [ "dataId", "description" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetDataBreakpointsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Replaces all existing data breakpoints with new data breakpoints.\nTo clear all data breakpoints, specify an empty array.\nWhen a data breakpoint is hit, a `stopped` event (with reason `data breakpoint`) is generated.\nClients should only call this request if the corresponding capability `supportsDataBreakpoints` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "setDataBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetDataBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetDataBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setDataBreakpoints` request.", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/DataBreakpoint" + }, + "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints." + } + }, + "required": [ "breakpoints" ] + }, + "SetDataBreakpointsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `setDataBreakpoints` request.\nReturned is information about each breakpoint created by this request.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetInstructionBreakpointsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a disassembly window. \nTo clear all instruction breakpoints, specify an empty array.\nWhen an instruction breakpoint is hit, a `stopped` event (with reason `instruction breakpoint`) is generated.\nClients should only call this request if the corresponding capability `supportsInstructionBreakpoints` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "setInstructionBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetInstructionBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetInstructionBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setInstructionBreakpoints` request", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/InstructionBreakpoint" + }, + "description": "The instruction references of the breakpoints" + } + }, + "required": ["breakpoints"] + }, + "SetInstructionBreakpointsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `setInstructionBreakpoints` request", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "ContinueRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request resumes execution of all threads. If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true resumes only the specified thread. If not all threads were resumed, the `allThreadsContinued` attribute of the response should be set to false.", + "properties": { + "command": { + "type": "string", + "enum": [ "continue" ] + }, + "arguments": { + "$ref": "#/definitions/ContinueArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ContinueArguments": { + "type": "object", + "description": "Arguments for `continue` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, execution is resumed only for the thread with given `threadId`." + } + }, + "required": [ "threadId" ] + }, + "ContinueResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `continue` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "allThreadsContinued": { + "type": "boolean", + "description": "The value true (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed." + } + } + } + }, + "required": [ "body" ] + }] + }, + + "NextRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request executes one step (in the given granularity) for the specified thread and allows all other threads to run freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.", + "properties": { + "command": { + "type": "string", + "enum": [ "next" ] + }, + "arguments": { + "$ref": "#/definitions/NextArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "NextArguments": { + "type": "object", + "description": "Arguments for `next` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, all other suspended threads are not resumed." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed." + } + }, + "required": [ "threadId" ] + }, + "NextResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `next` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "StepInRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request resumes the given thread to step into a function/method and allows all other threads to run freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nIf the request cannot step into a target, `stepIn` behaves like the `next` request.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.\nIf there are multiple function/method calls (or other targets) on the source line,\nthe argument `targetId` can be used to control into which target the `stepIn` should occur.\nThe list of possible targets for a given source line can be retrieved via the `stepInTargets` request.", + "properties": { + "command": { + "type": "string", + "enum": [ "stepIn" ] + }, + "arguments": { + "$ref": "#/definitions/StepInArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StepInArguments": { + "type": "object", + "description": "Arguments for `stepIn` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step-into (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, all other suspended threads are not resumed." + }, + "targetId": { + "type": "integer", + "description": "Id of the target to step into." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed." + } + }, + "required": [ "threadId" ] + }, + "StepInResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `stepIn` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "StepOutRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request resumes the given thread to step out (return) from a function/method and allows all other threads to run freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.", + "properties": { + "command": { + "type": "string", + "enum": [ "stepOut" ] + }, + "arguments": { + "$ref": "#/definitions/StepOutArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StepOutArguments": { + "type": "object", + "description": "Arguments for `stepOut` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step-out (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, all other suspended threads are not resumed." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed." + } + }, + "required": [ "threadId" ] + }, + "StepOutResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `stepOut` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "StepBackRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request executes one backward step (in the given granularity) for the specified thread and allows all other threads to run backward freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.\nClients should only call this request if the corresponding capability `supportsStepBack` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "stepBack" ] + }, + "arguments": { + "$ref": "#/definitions/StepBackArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StepBackArguments": { + "type": "object", + "description": "Arguments for `stepBack` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step backwards (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, all other suspended threads are not resumed." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Stepping granularity to step. If no granularity is specified, a granularity of `statement` is assumed." + } + }, + "required": [ "threadId" ] + }, + "StepBackResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `stepBack` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "ReverseContinueRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request resumes backward execution of all threads. If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true resumes only the specified thread. If not all threads were resumed, the `allThreadsContinued` attribute of the response should be set to false.\nClients should only call this request if the corresponding capability `supportsStepBack` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "reverseContinue" ] + }, + "arguments": { + "$ref": "#/definitions/ReverseContinueArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ReverseContinueArguments": { + "type": "object", + "description": "Arguments for `reverseContinue` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, backward execution is resumed only for the thread with given `threadId`." + } + + }, + "required": [ "threadId" ] + }, + "ReverseContinueResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `reverseContinue` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "RestartFrameRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request restarts execution of the specified stack frame.\nThe debug adapter first sends the response and then a `stopped` event (with reason `restart`) after the restart has completed.\nClients should only call this request if the corresponding capability `supportsRestartFrame` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "restartFrame" ] + }, + "arguments": { + "$ref": "#/definitions/RestartFrameArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "RestartFrameArguments": { + "type": "object", + "description": "Arguments for `restartFrame` request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + } + }, + "required": [ "frameId" ] + }, + "RestartFrameResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `restartFrame` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "GotoRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request sets the location where the debuggee will continue to run.\nThis makes it possible to skip the execution of code or to execute code again.\nThe code between the current location and the goto target is not executed but skipped.\nThe debug adapter first sends the response and then a `stopped` event with reason `goto`.\nClients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true (because only then goto targets exist that can be passed as arguments).", + "properties": { + "command": { + "type": "string", + "enum": [ "goto" ] + }, + "arguments": { + "$ref": "#/definitions/GotoArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "GotoArguments": { + "type": "object", + "description": "Arguments for `goto` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Set the goto target for this thread." + }, + "targetId": { + "type": "integer", + "description": "The location where the debuggee will continue to run." + } + }, + "required": [ "threadId", "targetId" ] + }, + "GotoResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `goto` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "PauseRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request suspends the debuggee.\nThe debug adapter first sends the response and then a `stopped` event (with reason `pause`) after the thread has been paused successfully.", + "properties": { + "command": { + "type": "string", + "enum": [ "pause" ] + }, + "arguments": { + "$ref": "#/definitions/PauseArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "PauseArguments": { + "type": "object", + "description": "Arguments for `pause` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Pause execution for this thread." + } + }, + "required": [ "threadId" ] + }, + "PauseResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `pause` request. This is just an acknowledgement, so no body field is required." + }] + }, + + "StackTraceRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request returns a stacktrace from the current execution state of a given thread.\nA client can request all stack frames by omitting the startFrame and levels arguments. For performance-conscious clients and if the corresponding capability `supportsDelayedStackTraceLoading` is true, stack frames can be retrieved in a piecemeal way with the `startFrame` and `levels` arguments. The response of the `stackTrace` request may contain a `totalFrames` property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of `totalFrames` decide how to proceed. In any case a client should be prepared to receive fewer frames than requested, which is an indication that the end of the stack has been reached.", + "properties": { + "command": { + "type": "string", + "enum": [ "stackTrace" ] + }, + "arguments": { + "$ref": "#/definitions/StackTraceArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StackTraceArguments": { + "type": "object", + "description": "Arguments for `stackTrace` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Retrieve the stacktrace for this thread." + }, + "startFrame": { + "type": "integer", + "description": "The index of the first frame to return; if omitted frames start at 0." + }, + "levels": { + "type": "integer", + "description": "The maximum number of frames to return. If levels is not specified or 0, all frames are returned." + }, + "format": { + "$ref": "#/definitions/StackFrameFormat", + "description": "Specifies details on how to format the stack frames.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true." + } + }, + "required": [ "threadId" ] + }, + "StackTraceResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `stackTrace` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "stackFrames": { + "type": "array", + "items": { + "$ref": "#/definitions/StackFrame" + }, + "description": "The frames of the stack frame. If the array has length zero, there are no stack frames available.\nThis means that there is no location information available." + }, + "totalFrames": { + "type": "integer", + "description": "The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client." + } + }, + "required": [ "stackFrames" ] + } + }, + "required": [ "body" ] + }] + }, + + "ScopesRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request returns the variable scopes for a given stack frame ID.", + "properties": { + "command": { + "type": "string", + "enum": [ "scopes" ] + }, + "arguments": { + "$ref": "#/definitions/ScopesArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ScopesArguments": { + "type": "object", + "description": "Arguments for `scopes` request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + } + }, + "required": [ "frameId" ] + }, + "ScopesResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `scopes` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "items": { + "$ref": "#/definitions/Scope" + }, + "description": "The scopes of the stack frame. If the array has length zero, there are no scopes available." + } + }, + "required": [ "scopes" ] + } + }, + "required": [ "body" ] + }] + }, + + "VariablesRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Retrieves all child variables for the given variable reference.\nA filter can be used to limit the fetched children to either named or indexed children.", + "properties": { + "command": { + "type": "string", + "enum": [ "variables" ] + }, + "arguments": { + "$ref": "#/definitions/VariablesArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "VariablesArguments": { + "type": "object", + "description": "Arguments for `variables` request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + }, + "filter": { + "type": "string", + "enum": [ "indexed", "named" ], + "description": "Filter to limit the child variables to either named or indexed. If omitted, both types are fetched." + }, + "start": { + "type": "integer", + "description": "The index of the first variable to return; if omitted children start at 0.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true." + }, + "count": { + "type": "integer", + "description": "The number of variables to return. If count is missing or 0, all variables are returned.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the Variable values.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true." + } + }, + "required": [ "variablesReference" ] + }, + "VariablesResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `variables` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "variables": { + "type": "array", + "items": { + "$ref": "#/definitions/Variable" + }, + "description": "All (or a range) of variables for the given variable reference." + } + }, + "required": [ "variables" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetVariableRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Set the variable with the given name in the variable container to a new value. Clients should only call this request if the corresponding capability `supportsSetVariable` is true.\nIf a debug adapter implements both `setVariable` and `setExpression`, a client will only use `setExpression` if the variable has an `evaluateName` property.", + "properties": { + "command": { + "type": "string", + "enum": [ "setVariable" ] + }, + "arguments": { + "$ref": "#/definitions/SetVariableArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetVariableArguments": { + "type": "object", + "description": "Arguments for `setVariable` request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + }, + "name": { + "type": "string", + "description": "The name of the variable in the container." + }, + "value": { + "type": "string", + "description": "The value of the variable." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the response value." + } + }, + "required": [ "variablesReference", "name", "value" ] + }, + "SetVariableResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `setVariable` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The new value of the variable." + }, + "type": { + "type": "string", + "description": "The type of the new value. Typically shown in the UI when hovering over the value." + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." + } + }, + "required": [ "value" ] + } + }, + "required": [ "body" ] + }] + }, + + "SourceRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request retrieves the source code for a given source reference.", + "properties": { + "command": { + "type": "string", + "enum": [ "source" ] + }, + "arguments": { + "$ref": "#/definitions/SourceArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SourceArguments": { + "type": "object", + "description": "Arguments for `source` request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "Specifies the source content to load. Either `source.path` or `source.sourceReference` must be specified." + }, + "sourceReference": { + "type": "integer", + "description": "The reference to the source. This is the same as `source.sourceReference`.\nThis is provided for backward compatibility since old clients do not understand the `source` attribute." + } + }, + "required": [ "sourceReference" ] + }, + "SourceResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `source` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Content of the source reference." + }, + "mimeType": { + "type": "string", + "description": "Content type (MIME type) of the source." + } + }, + "required": [ "content" ] + } + }, + "required": [ "body" ] + }] + }, + + "ThreadsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request retrieves a list of all threads.", + "properties": { + "command": { + "type": "string", + "enum": [ "threads" ] + } + }, + "required": [ "command" ] + }] + }, + "ThreadsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `threads` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "threads": { + "type": "array", + "items": { + "$ref": "#/definitions/Thread" + }, + "description": "All threads." + } + }, + "required": [ "threads" ] + } + }, + "required": [ "body" ] + }] + }, + + "TerminateThreadsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request terminates the threads with the given ids.\nClients should only call this request if the corresponding capability `supportsTerminateThreadsRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "terminateThreads" ] + }, + "arguments": { + "$ref": "#/definitions/TerminateThreadsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "TerminateThreadsArguments": { + "type": "object", + "description": "Arguments for `terminateThreads` request.", + "properties": { + "threadIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Ids of threads to be terminated." + } + } + }, + "TerminateThreadsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `terminateThreads` request. This is just an acknowledgement, no body field is required." + }] + }, + + "ModulesRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.\nClients should only call this request if the corresponding capability `supportsModulesRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "modules" ] + }, + "arguments": { + "$ref": "#/definitions/ModulesArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ModulesArguments": { + "type": "object", + "description": "Arguments for `modules` request.", + "properties": { + "startModule": { + "type": "integer", + "description": "The index of the first module to return; if omitted modules start at 0." + }, + "moduleCount": { + "type": "integer", + "description": "The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned." + } + } + }, + "ModulesResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `modules` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/Module" + }, + "description": "All modules or range of modules." + }, + "totalModules": { + "type": "integer", + "description": "The total number of modules available." + } + }, + "required": [ "modules" ] + } + }, + "required": [ "body" ] + }] + }, + + "LoadedSourcesRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Retrieves the set of all sources currently loaded by the debugged process.\nClients should only call this request if the corresponding capability `supportsLoadedSourcesRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "loadedSources" ] + }, + "arguments": { + "$ref": "#/definitions/LoadedSourcesArguments" + } + }, + "required": [ "command" ] + }] + }, + "LoadedSourcesArguments": { + "type": "object", + "description": "Arguments for `loadedSources` request." + }, + "LoadedSourcesResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `loadedSources` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/Source" + }, + "description": "Set of loaded sources." + } + }, + "required": [ "sources" ] + } + }, + "required": [ "body" ] + }] + }, + + "EvaluateRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Evaluates the given expression in the context of the topmost stack frame.\nThe expression has access to any variables and arguments that are in scope.", + "properties": { + "command": { + "type": "string", + "enum": [ "evaluate" ] + }, + "arguments": { + "$ref": "#/definitions/EvaluateArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "EvaluateArguments": { + "type": "object", + "description": "Arguments for `evaluate` request.", + "properties": { + "expression": { + "type": "string", + "description": "The expression to evaluate." + }, + "frameId": { + "type": "integer", + "description": "Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope." + }, + "context": { + "type": "string", + "_enum": [ "watch", "repl", "hover", "clipboard", "variables" ], + "enumDescriptions": [ + "evaluate is called from a watch view context.", + "evaluate is called from a REPL context.", + "evaluate is called to generate the debug hover contents.\nThis value should only be used if the corresponding capability `supportsEvaluateForHovers` is true.", + "evaluate is called to generate clipboard contents.\nThis value should only be used if the corresponding capability `supportsClipboardContext` is true.", + "evaluate is called from a variables view context." + ], + "description": "The context in which the evaluate request is used." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the result.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true." + } + }, + "required": [ "expression" ] + }, + "EvaluateResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `evaluate` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "result": { + "type": "string", + "description": "The result of the evaluate request." + }, + "type": { + "type": "string", + "description": "The type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of an evaluate result that can be used to determine how to render the result in the UI." + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." + } + }, + "required": [ "result", "variablesReference" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetExpressionRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Evaluates the given `value` expression and assigns it to the `expression` which must be a modifiable l-value.\nThe expressions have access to any variables and arguments that are in scope of the specified frame.\nClients should only call this request if the corresponding capability `supportsSetExpression` is true.\nIf a debug adapter implements both `setExpression` and `setVariable`, a client uses `setExpression` if the variable has an `evaluateName` property.", + "properties": { + "command": { + "type": "string", + "enum": [ "setExpression" ] + }, + "arguments": { + "$ref": "#/definitions/SetExpressionArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetExpressionArguments": { + "type": "object", + "description": "Arguments for `setExpression` request.", + "properties": { + "expression": { + "type": "string", + "description": "The l-value expression to assign to." + }, + "value": { + "type": "string", + "description": "The value expression to assign to the l-value expression." + }, + "frameId": { + "type": "integer", + "description": "Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies how the resulting value should be formatted." + } + }, + "required": [ "expression", "value" ] + }, + "SetExpressionResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `setExpression` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The new value of the expression." + }, + "type": { + "type": "string", + "description": "The type of the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a value that can be used to determine how to render the result in the UI." + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." + } + }, + "required": [ "value" ] + } + }, + "required": [ "body" ] + }] + }, + + "StepInTargetsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "This request retrieves the possible step-in targets for the specified stack frame.\nThese targets can be used in the `stepIn` request.\nClients should only call this request if the corresponding capability `supportsStepInTargetsRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "stepInTargets" ] + }, + "arguments": { + "$ref": "#/definitions/StepInTargetsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StepInTargetsArguments": { + "type": "object", + "description": "Arguments for `stepInTargets` request.", + "properties": { + "frameId": { + "type": "integer", + "description": "The stack frame for which to retrieve the possible step-in targets." + } + }, + "required": [ "frameId" ] + }, + "StepInTargetsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `stepInTargets` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/StepInTarget" + }, + "description": "The possible step-in targets of the specified source location." + } + }, + "required": [ "targets" ] + } + }, + "required": [ "body" ] + }] + }, + + "GotoTargetsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "This request retrieves the possible goto targets for the specified source location.\nThese targets can be used in the `goto` request.\nClients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "gotoTargets" ] + }, + "arguments": { + "$ref": "#/definitions/GotoTargetsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "GotoTargetsArguments": { + "type": "object", + "description": "Arguments for `gotoTargets` request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location for which the goto targets are determined." + }, + "line": { + "type": "integer", + "description": "The line location for which the goto targets are determined." + }, + "column": { + "type": "integer", + "description": "The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } + }, + "required": [ "source", "line" ] + }, + "GotoTargetsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `gotoTargets` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/GotoTarget" + }, + "description": "The possible goto targets of the specified location." + } + }, + "required": [ "targets" ] + } + }, + "required": [ "body" ] + }] + }, + + "CompletionsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Returns a list of possible completions for a given caret position and text.\nClients should only call this request if the corresponding capability `supportsCompletionsRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "completions" ] + }, + "arguments": { + "$ref": "#/definitions/CompletionsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "CompletionsArguments": { + "type": "object", + "description": "Arguments for `completions` request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope." + }, + "text": { + "type": "string", + "description": "One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion." + }, + "column": { + "type": "integer", + "description": "The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "line": { + "type": "integer", + "description": "A line for which to determine the completion proposals. If missing the first line of the text is assumed." + } + }, + "required": [ "text", "column" ] + }, + "CompletionsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `completions` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/CompletionItem" + }, + "description": "The possible completions for ." + } + }, + "required": [ "targets" ] + } + }, + "required": [ "body" ] + }] + }, + + "ExceptionInfoRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Retrieves the details of the exception that caused this event to be raised.\nClients should only call this request if the corresponding capability `supportsExceptionInfoRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "exceptionInfo" ] + }, + "arguments": { + "$ref": "#/definitions/ExceptionInfoArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ExceptionInfoArguments": { + "type": "object", + "description": "Arguments for `exceptionInfo` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Thread for which exception information should be retrieved." + } + }, + "required": [ "threadId" ] + }, + "ExceptionInfoResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `exceptionInfo` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "exceptionId": { + "type": "string", + "description": "ID of the exception that was thrown." + }, + "description": { + "type": "string", + "description": "Descriptive text for the exception." + }, + "breakMode": { + "$ref": "#/definitions/ExceptionBreakMode", + "description": "Mode that caused the exception notification to be raised." + }, + "details": { + "$ref": "#/definitions/ExceptionDetails", + "description": "Detailed information about the exception." + } + }, + "required": [ "exceptionId", "breakMode" ] + } + }, + "required": [ "body" ] + }] + }, + + "ReadMemoryRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Reads bytes from memory at the provided location.\nClients should only call this request if the corresponding capability `supportsReadMemoryRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "readMemory" ] + }, + "arguments": { + "$ref": "#/definitions/ReadMemoryArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ReadMemoryArguments": { + "type": "object", + "description": "Arguments for `readMemory` request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location from which data should be read." + }, + "offset": { + "type": "integer", + "description": "Offset (in bytes) to be applied to the reference location before reading data. Can be negative." + }, + "count": { + "type": "integer", + "description": "Number of bytes to read at the specified location and offset." + } + }, + "required": [ "memoryReference", "count" ] + }, + "ReadMemoryResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `readMemory` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with `0x`, or as a decimal value otherwise." + }, + "unreadableBytes": { + "type": "integer", + "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds." + }, + "data": { + "type": "string", + "description": "The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory." + } + }, + "required": [ "address" ] + } + } + }] + }, + + "WriteMemoryRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Writes bytes to memory at the provided location.\nClients should only call this request if the corresponding capability `supportsWriteMemoryRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "writeMemory" ] + }, + "arguments": { + "$ref": "#/definitions/WriteMemoryArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "WriteMemoryArguments": { + "type": "object", + "description": "Arguments for `writeMemory` request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location to which data should be written." + }, + "offset": { + "type": "integer", + "description": "Offset (in bytes) to be applied to the reference location before writing data. Can be negative." + }, + "allowPartial": { + "type": "boolean", + "description": "Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties.\nIf false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not." + }, + "data": { + "type": "string", + "description": "Bytes to write, encoded using base64." + } + }, + "required": [ "memoryReference", "data" ] + }, + "WriteMemoryResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `writeMemory` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "offset": { + "type": "integer", + "description": "Property that should be returned when `allowPartial` is true to indicate the offset of the first byte of data successfully written. Can be negative." + }, + "bytesWritten": { + "type": "integer", + "description": "Property that should be returned when `allowPartial` is true to indicate the number of bytes starting from address that were successfully written." + } + } + } + } + }] + }, + + "DisassembleRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Disassembles code stored at the provided location.\nClients should only call this request if the corresponding capability `supportsDisassembleRequest` is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "disassemble" ] + }, + "arguments": { + "$ref": "#/definitions/DisassembleArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "DisassembleArguments": { + "type": "object", + "description": "Arguments for `disassemble` request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location containing the instructions to disassemble." + }, + "offset": { + "type": "integer", + "description": "Offset (in bytes) to be applied to the reference location before disassembling. Can be negative." + }, + "instructionOffset": { + "type": "integer", + "description": "Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative." + }, + "instructionCount": { + "type": "integer", + "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." + }, + "resolveSymbols": { + "type": "boolean", + "description": "If true, the adapter should attempt to resolve memory addresses and other values to symbolic names." + } + }, + "required": [ "memoryReference", "instructionCount" ] + }, + "DisassembleResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to `disassemble` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "instructions": { + "type": "array", + "items": { + "$ref": "#/definitions/DisassembledInstruction" + }, + "description": "The list of disassembled instructions." + } + }, + "required": [ "instructions" ] + } + } + }] + }, + + "Capabilities": { + "type": "object", + "title": "Types", + "description": "Information about the capabilities of a debug adapter.", + "properties": { + "supportsConfigurationDoneRequest": { + "type": "boolean", + "description": "The debug adapter supports the `configurationDone` request." + }, + "supportsFunctionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports function breakpoints." + }, + "supportsConditionalBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports conditional breakpoints." + }, + "supportsHitConditionalBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports breakpoints that break execution after a specified number of hits." + }, + "supportsEvaluateForHovers": { + "type": "boolean", + "description": "The debug adapter supports a (side effect free) `evaluate` request for data hovers." + }, + "exceptionBreakpointFilters": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionBreakpointsFilter" + }, + "description": "Available exception filter options for the `setExceptionBreakpoints` request." + }, + "supportsStepBack": { + "type": "boolean", + "description": "The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests." + }, + "supportsSetVariable": { + "type": "boolean", + "description": "The debug adapter supports setting a variable to a value." + }, + "supportsRestartFrame": { + "type": "boolean", + "description": "The debug adapter supports restarting a frame." + }, + "supportsGotoTargetsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `gotoTargets` request." + }, + "supportsStepInTargetsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `stepInTargets` request." + }, + "supportsCompletionsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `completions` request." + }, + "completionTriggerCharacters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character." + }, + "supportsModulesRequest": { + "type": "boolean", + "description": "The debug adapter supports the `modules` request." + }, + "additionalModuleColumns": { + "type": "array", + "items": { + "$ref": "#/definitions/ColumnDescriptor" + }, + "description": "The set of additional module information exposed by the debug adapter." + }, + "supportedChecksumAlgorithms": { + "type": "array", + "items": { + "$ref": "#/definitions/ChecksumAlgorithm" + }, + "description": "Checksum algorithms supported by the debug adapter." + }, + "supportsRestartRequest": { + "type": "boolean", + "description": "The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request." + }, + "supportsExceptionOptions": { + "type": "boolean", + "description": "The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request." + }, + "supportsValueFormattingOptions": { + "type": "boolean", + "description": "The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests." + }, + "supportsExceptionInfoRequest": { + "type": "boolean", + "description": "The debug adapter supports the `exceptionInfo` request." + }, + "supportTerminateDebuggee": { + "type": "boolean", + "description": "The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request." + }, + "supportSuspendDebuggee": { + "type": "boolean", + "description": "The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request." + }, + "supportsDelayedStackTraceLoading": { + "type": "boolean", + "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported." + }, + "supportsLoadedSourcesRequest": { + "type": "boolean", + "description": "The debug adapter supports the `loadedSources` request." + }, + "supportsLogPoints": { + "type": "boolean", + "description": "The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`." + }, + "supportsTerminateThreadsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `terminateThreads` request." + }, + "supportsSetExpression": { + "type": "boolean", + "description": "The debug adapter supports the `setExpression` request." + }, + "supportsTerminateRequest": { + "type": "boolean", + "description": "The debug adapter supports the `terminate` request." + }, + "supportsDataBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports data breakpoints." + }, + "supportsReadMemoryRequest": { + "type": "boolean", + "description": "The debug adapter supports the `readMemory` request." + }, + "supportsWriteMemoryRequest": { + "type": "boolean", + "description": "The debug adapter supports the `writeMemory` request." + }, + "supportsDisassembleRequest": { + "type": "boolean", + "description": "The debug adapter supports the `disassemble` request." + }, + "supportsCancelRequest": { + "type": "boolean", + "description": "The debug adapter supports the `cancel` request." + }, + "supportsBreakpointLocationsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `breakpointLocations` request." + }, + "supportsClipboardContext": { + "type": "boolean", + "description": "The debug adapter supports the `clipboard` context value in the `evaluate` request." + }, + "supportsSteppingGranularity": { + "type": "boolean", + "description": "The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests." + }, + "supportsInstructionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports adding breakpoints based on instruction references." + }, + "supportsExceptionFilterOptions": { + "type": "boolean", + "description": "The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request." + }, + "supportsSingleThreadExecutionRequests": { + "type": "boolean", + "description": "The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`)." + } + } + }, + + "ExceptionBreakpointsFilter": { + "type": "object", + "description": "An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with.", + "properties": { + "filter": { + "type": "string", + "description": "The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request." + }, + "label": { + "type": "string", + "description": "The name of the filter option. This is shown in the UI." + }, + "description": { + "type": "string", + "description": "A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated." + }, + "default": { + "type": "boolean", + "description": "Initial value of the filter option. If not specified a value false is assumed." + }, + "supportsCondition": { + "type": "boolean", + "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set." + }, + "conditionDescription": { + "type": "string", + "description": "A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated." + } + }, + "required": [ "filter", "label" ] + }, + + "Message": { + "type": "object", + "description": "A structured message object. Used to return errors from requests.", + "properties": { + "id": { + "type": "integer", + "description": "Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily." + }, + "format": { + "type": "string", + "description": "A format string for the message. Embedded variables have the form `{name}`.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes." + }, + "variables": { + "type": "object", + "description": "An object used as a dictionary for looking up the variables in the format string.", + "additionalProperties": { + "type": "string", + "description": "All dictionary values must be strings." + } + }, + "sendTelemetry": { + "type": "boolean", + "description": "If true send to telemetry." + }, + "showUser": { + "type": "boolean", + "description": "If true show user." + }, + "url": { + "type": "string", + "description": "A url where additional information about this message can be found." + }, + "urlLabel": { + "type": "string", + "description": "A label that is presented to the user as the UI for opening the url." + } + }, + "required": [ "id", "format" ] + }, + + "Module": { + "type": "object", + "description": "A Module object represents a row in the modules view.\nThe `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting.\nThe `name` attribute is used to minimally render the module in the UI.\n\nAdditional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`.\n\nTo avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.", + "properties": { + "id": { + "type": ["integer", "string"], + "description": "Unique identifier for the module." + }, + "name": { + "type": "string", + "description": "A name of the module." + }, + "path": { + "type": "string", + "description": "Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module." + }, + "isOptimized": { + "type": "boolean", + "description": "True if the module is optimized." + }, + "isUserCode": { + "type": "boolean", + "description": "True if the module is considered 'user code' by a debugger that supports 'Just My Code'." + }, + "version": { + "type": "string", + "description": "Version of Module." + }, + "symbolStatus": { + "type": "string", + "description": "User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.)" + }, + "symbolFilePath": { + "type": "string", + "description": "Logical full path to the symbol file. The exact definition is implementation defined." + }, + "dateTimeStamp": { + "type": "string", + "description": "Module created or modified, encoded as a RFC 3339 timestamp." + }, + "addressRange": { + "type": "string", + "description": "Address range covered by this module." + } + }, + "required": [ "id", "name" ] + }, + + "ColumnDescriptor": { + "type": "object", + "description": "A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it,\nand what the column's label should be.\nIt is only used if the underlying UI actually supports this level of customization.", + "properties": { + "attributeName": { + "type": "string", + "description": "Name of the attribute rendered in this column." + }, + "label": { + "type": "string", + "description": "Header UI label of column." + }, + "format": { + "type": "string", + "description": "Format to use for the rendered values in this column. TBD how the format strings looks like." + }, + "type": { + "type": "string", + "enum": [ "string", "number", "boolean", "unixTimestampUTC" ], + "description": "Datatype of values in this column. Defaults to `string` if not specified." + }, + "width": { + "type": "integer", + "description": "Width of this column in characters (hint only)." + } + }, + "required": [ "attributeName", "label"] + }, + + "Thread": { + "type": "object", + "description": "A Thread", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for the thread." + }, + "name": { + "type": "string", + "description": "The name of the thread." + } + }, + "required": [ "id", "name" ] + }, + + "Source": { + "type": "object", + "description": "A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.", + "properties": { + "name": { + "type": "string", + "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional." + }, + "path": { + "type": "string", + "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0)." + }, + "sourceReference": { + "type": "integer", + "description": "If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified).\nSince a `sourceReference` is only valid for a session, it can not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "presentationHint": { + "type": "string", + "description": "A hint for how to present the source in the UI.\nA value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping.", + "enum": [ "normal", "emphasize", "deemphasize" ] + }, + "origin": { + "type": "string", + "description": "The origin of this source. For example, 'internal module', 'inlined content from source map', etc." + }, + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/Source" + }, + "description": "A list of sources that are related to this source. These may be the source that generated this source." + }, + "adapterData": { + "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], + "description": "Additional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data." + }, + "checksums": { + "type": "array", + "items": { + "$ref": "#/definitions/Checksum" + }, + "description": "The checksums associated with this file." + } + } + }, + + "StackFrame": { + "type": "object", + "description": "A Stackframe contains the source location.", + "properties": { + "id": { + "type": "integer", + "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame." + }, + "name": { + "type": "string", + "description": "The name of the stack frame, typically a method name." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The source of the frame." + }, + "line": { + "type": "integer", + "description": "The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client." + }, + "column": { + "type": "integer", + "description": "Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range covered by the stack frame." + }, + "endColumn": { + "type": "integer", + "description": "End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "canRestart": { + "type": "boolean", + "description": "Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent." + }, + "instructionPointerReference": { + "type": "string", + "description": "A memory reference for the current instruction pointer in this frame." + }, + "moduleId": { + "type": ["integer", "string"], + "description": "The module associated with this frame, if any." + }, + "presentationHint": { + "type": "string", + "enum": [ "normal", "label", "subtle" ], + "description": "A hint for how to present this frame in the UI.\nA value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way." + } + }, + "required": [ "id", "name", "line", "column" ] + }, + + "Scope": { + "type": "object", + "description": "A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source.", + "properties": { + "name": { + "type": "string", + "description": "Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated." + }, + "presentationHint": { + "type": "string", + "description": "A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.", + "_enum": [ "arguments", "locals", "registers" ], + "enumDescriptions": [ + "Scope contains method arguments.", + "Scope contains local variables.", + "Scope contains registers. Only a single `registers` scope should be returned from a `scopes` request." + ] + }, + "variablesReference": { + "type": "integer", + "description": "The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks." + }, + "expensive": { + "type": "boolean", + "description": "If true, the number of variables in this scope is large or expensive to retrieve." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The source for this scope." + }, + "line": { + "type": "integer", + "description": "The start line of the range covered by this scope." + }, + "column": { + "type": "integer", + "description": "Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range covered by this scope." + }, + "endColumn": { + "type": "integer", + "description": "End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } + }, + "required": [ "name", "variablesReference", "expensive" ] + }, + + "Variable": { + "type": "object", + "description": "A Variable is a name/value pair.\nThe `type` attribute is shown if space permits or when hovering over the variable's name.\nThe `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private.\nIf the value is structured (has children), a handle is provided to retrieve the children with the `variables` request.\nIf the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.", + "properties": { + "name": { + "type": "string", + "description": "The variable's name." + }, + "value": { + "type": "string", + "description": "The variable's value.\nThis can be a multi-line text, e.g. for a function the body of a function.\nFor structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible.\nAn empty string can be used if no value should be shown in the UI." + }, + "type": { + "type": "string", + "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a variable that can be used to determine how to render the variable in the UI." + }, + "evaluateName": { + "type": "string", + "description": "The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value." + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks." + }, + "memoryReference": { + "type": "string", + "description": "A memory reference associated with this variable.\nFor pointer type variables, this is generally a reference to the memory address contained in the pointer.\nFor executable data, this reference may later be used in a `disassemble` request.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." + } + }, + "required": [ "name", "value", "variablesReference" ] + }, + + "VariablePresentationHint": { + "type": "object", + "description": "Properties of a variable that can be used to determine how to render the variable in the UI.", + "properties": { + "kind": { + "description": "The kind of variable. Before introducing additional values, try to use the listed values.", + "type": "string", + "_enum": [ "property", "method", "class", "data", "event", "baseClass", "innerClass", "interface", "mostDerivedClass", "virtual", "dataBreakpoint" ], + "enumDescriptions": [ + "Indicates that the object is a property.", + "Indicates that the object is a method.", + "Indicates that the object is a class.", + "Indicates that the object is data.", + "Indicates that the object is an event.", + "Indicates that the object is a base class.", + "Indicates that the object is an inner class.", + "Indicates that the object is an interface.", + "Indicates that the object is the most derived class.", + "Indicates that the object is virtual, that means it is a synthetic object introduced by the adapter for rendering purposes, e.g. an index range for large arrays.", + "Deprecated: Indicates that a data breakpoint is registered for the object. The `hasDataBreakpoint` attribute should generally be used instead." + ] + }, + "attributes": { + "description": "Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.", + "type": "array", + "items": { + "type": "string", + "_enum": [ "static", "constant", "readOnly", "rawString", "hasObjectId", "canHaveObjectId", "hasSideEffects", "hasDataBreakpoint" ], + "enumDescriptions": [ + "Indicates that the object is static.", + "Indicates that the object is a constant.", + "Indicates that the object is read only.", + "Indicates that the object is a raw string.", + "Indicates that the object can have an Object ID created for it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.", + "Indicates that the object has an Object ID associated with it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.", + "Indicates that the evaluation had side effects.", + "Indicates that the object has its value tracked by a data breakpoint." + ] + } + }, + "visibility": { + "description": "Visibility of variable. Before introducing additional values, try to use the listed values.", + "type": "string", + "_enum": [ "public", "private", "protected", "internal", "final" ] + }, + "lazy": { + "description": "If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation.\nThis mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function.\nPlease note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request.", + "type": "boolean" + } + } + }, + + "BreakpointLocation": { + "type": "object", + "description": "Properties of a breakpoint location returned from the `breakpointLocations` request.", + "properties": { + "line": { + "type": "integer", + "description": "Start line of breakpoint location." + }, + "column": { + "type": "integer", + "description": "The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of breakpoint location if the location covers a range." + }, + "endColumn": { + "type": "integer", + "description": "The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } + }, + "required": [ "line" ] + }, + + "SourceBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint or logpoint passed to the `setBreakpoints` request.", + "properties": { + "line": { + "type": "integer", + "description": "The source line of the breakpoint or logpoint." + }, + "column": { + "type": "integer", + "description": "Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "condition": { + "type": "string", + "description": "The expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true." + }, + "hitCondition": { + "type": "string", + "description": "The expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.\nIf both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met." + }, + "logMessage": { + "type": "string", + "description": "If this attribute exists and is non-empty, the debug adapter must not 'break' (stop)\nbut log the message instead. Expressions within `{}` are interpolated.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true.\nIf either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met." + } + }, + "required": [ "line" ] + }, + + "FunctionBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint passed to the `setFunctionBreakpoints` request.", + "properties": { + "name": { + "type": "string", + "description": "The name of the function." + }, + "condition": { + "type": "string", + "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true." + }, + "hitCondition": { + "type": "string", + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true." + } + }, + "required": [ "name" ] + }, + + "DataBreakpointAccessType": { + "type": "string", + "description": "This enumeration defines all possible access types for data breakpoints.", + "enum": [ "read", "write", "readWrite" ] + }, + + "DataBreakpoint": { + "type": "object", + "description": "Properties of a data breakpoint passed to the `setDataBreakpoints` request.", + "properties": { + "dataId": { + "type": "string", + "description": "An id representing the data. This id is returned from the `dataBreakpointInfo` request." + }, + "accessType": { + "$ref": "#/definitions/DataBreakpointAccessType", + "description": "The access type of the data." + }, + "condition": { + "type": "string", + "description": "An expression for conditional breakpoints." + }, + "hitCondition": { + "type": "string", + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed." + } + }, + "required": [ "dataId" ] + }, + + "InstructionBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint passed to the `setInstructionBreakpoints` request", + "properties": { + "instructionReference": { + "type": "string", + "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`." + }, + "offset": { + "type": "integer", + "description": "The offset from the instruction reference in bytes.\nThis can be negative." + }, + "condition": { + "type": "string", + "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true." + }, + "hitCondition": { + "type": "string", + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true." + } + }, + "required": [ "instructionReference" ] + }, + + "Breakpoint": { + "type": "object", + "description": "Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests.", + "properties": { + "id": { + "type": "integer", + "description": "The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints." + }, + "verified": { + "type": "boolean", + "description": "If true, the breakpoint could be set (but not necessarily at the desired location)." + }, + "message": { + "type": "string", + "description": "A message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The source where the breakpoint is located." + }, + "line": { + "type": "integer", + "description": "The start line of the actual range covered by the breakpoint." + }, + "column": { + "type": "integer", + "description": "Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of the actual range covered by the breakpoint." + }, + "endColumn": { + "type": "integer", + "description": "End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.\nIf no end line is given, then the end column is assumed to be in the start line." + }, + "instructionReference": { + "type": "string", + "description": "A memory reference to where the breakpoint is set." + }, + "offset": { + "type": "integer", + "description": "The offset from the instruction reference.\nThis can be negative." + }, + "reason": { + "type": "string", + "description": "A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include:\n\n- `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state.\n - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention.", + "enum": [ "pending", "failed" ] + } + }, + "required": [ "verified" ] + }, + + "SteppingGranularity": { + "type": "string", + "description": "The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.", + "enum": [ "statement", "line", "instruction" ], + "enumDescriptions": [ + "The step should allow the program to run until the current statement has finished executing.\nThe meaning of a statement is determined by the adapter and it may be considered equivalent to a line.\nFor example 'for(int i = 0; i < 10; i++)' could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.", + "The step should allow the program to run until the current source line has executed.", + "The step should allow one instruction to execute (e.g. one x86 instruction)." + ] + }, + + "StepInTarget": { + "type": "object", + "description": "A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step.", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for a step-in target." + }, + "label": { + "type": "string", + "description": "The name of the step-in target (shown in the UI)." + }, + "line": { + "type": "integer", + "description": "The line of the step-in target." + }, + "column": { + "type": "integer", + "description": "Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range covered by the step-in target." + }, + "endColumn": { + "type": "integer", + "description": "End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } + }, + "required": [ "id", "label" ] + }, + + "GotoTarget": { + "type": "object", + "description": "A `GotoTarget` describes a code location that can be used as a target in the `goto` request.\nThe possible goto targets can be determined via the `gotoTargets` request.", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for a goto target. This is used in the `goto` request." + }, + "label": { + "type": "string", + "description": "The name of the goto target (shown in the UI)." + }, + "line": { + "type": "integer", + "description": "The line of the goto target." + }, + "column": { + "type": "integer", + "description": "The column of the goto target." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range covered by the goto target." + }, + "endColumn": { + "type": "integer", + "description": "The end column of the range covered by the goto target." + }, + "instructionPointerReference": { + "type": "string", + "description": "A memory reference for the instruction pointer value represented by this target." + } + }, + "required": [ "id", "label", "line" ] + }, + + "CompletionItem": { + "type": "object", + "description": "`CompletionItems` are the suggestions returned from the `completions` request.", + "properties": { + "label": { + "type": "string", + "description": "The label of this completion item. By default this is also the text that is inserted when selecting this completion." + }, + "text": { + "type": "string", + "description": "If text is returned and not an empty string, then it is inserted instead of the label." + }, + "sortText": { + "type": "string", + "description": "A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead." + }, + "detail": { + "type": "string", + "description": "A human-readable string with additional information about this item, like type or symbol information." + }, + "type": { + "$ref": "#/definitions/CompletionItemType", + "description": "The item's type. Typically the client uses this information to render the item in the UI with an icon." + }, + "start": { + "type": "integer", + "description": "Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request." + }, + "length": { + "type": "integer", + "description": "Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted." + }, + "selectionStart": { + "type": "integer", + "description": "Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text." + }, + "selectionLength": { + "type": "integer", + "description": "Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0." + } + }, + "required": [ "label" ] + }, + + "CompletionItemType": { + "type": "string", + "description": "Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.", + "enum": [ "method", "function", "constructor", "field", "variable", "class", "interface", "module", "property", "unit", "value", "enum", "keyword", "snippet", "text", "color", "file", "reference", "customcolor" ] + }, + + "ChecksumAlgorithm": { + "type": "string", + "description": "Names of checksum algorithms that may be supported by a debug adapter.", + "enum": [ "MD5", "SHA1", "SHA256", "timestamp" ] + }, + + "Checksum": { + "type": "object", + "description": "The checksum of an item calculated by the specified algorithm.", + "properties": { + "algorithm": { + "$ref": "#/definitions/ChecksumAlgorithm", + "description": "The algorithm used to calculate this checksum." + }, + "checksum": { + "type": "string", + "description": "Value of the checksum, encoded as a hexadecimal value." + } + }, + "required": [ "algorithm", "checksum" ] + }, + + "ValueFormat": { + "type": "object", + "description": "Provides formatting information for a value.", + "properties": { + "hex": { + "type": "boolean", + "description": "Display the value in hex." + } + } + }, + + "StackFrameFormat": { + "allOf": [ { "$ref": "#/definitions/ValueFormat" }, { + "type": "object", + "description": "Provides formatting information for a stack frame.", + "properties": { + "parameters": { + "type": "boolean", + "description": "Displays parameters for the stack frame." + }, + "parameterTypes": { + "type": "boolean", + "description": "Displays the types of parameters for the stack frame." + }, + "parameterNames": { + "type": "boolean", + "description": "Displays the names of parameters for the stack frame." + }, + "parameterValues": { + "type": "boolean", + "description": "Displays the values of parameters for the stack frame." + }, + "line": { + "type": "boolean", + "description": "Displays the line number of the stack frame." + }, + "module": { + "type": "boolean", + "description": "Displays the module of the stack frame." + }, + "includeAll": { + "type": "boolean", + "description": "Includes all stack frames, including those the debug adapter might otherwise hide." + } + } + }] + }, + + "ExceptionFilterOptions": { + "type": "object", + "description": "An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request.", + "properties": { + "filterId": { + "type": "string", + "description": "ID of an exception filter returned by the `exceptionBreakpointFilters` capability." + }, + "condition": { + "type": "string", + "description": "An expression for conditional exceptions.\nThe exception breaks into the debugger if the result of the condition is true." + } + }, + "required": [ "filterId" ] + }, + + "ExceptionOptions": { + "type": "object", + "description": "An `ExceptionOptions` assigns configuration options to a set of exceptions.", + "properties": { + "path": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionPathSegment" + }, + "description": "A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI." + }, + "breakMode": { + "$ref": "#/definitions/ExceptionBreakMode", + "description": "Condition when a thrown exception should result in a break." + } + }, + "required": [ "breakMode" ] + }, + + "ExceptionBreakMode": { + "type": "string", + "description": "This enumeration defines all possible conditions when a thrown exception should result in a break.\nnever: never breaks,\nalways: always breaks,\nunhandled: breaks when exception unhandled,\nuserUnhandled: breaks if the exception is not handled by user code.", + "enum": [ "never", "always", "unhandled", "userUnhandled" ] + }, + + "ExceptionPathSegment": { + "type": "object", + "description": "An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.\nIf a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true.", + "properties": { + "negate": { + "type": "boolean", + "description": "If false or missing this segment matches the names provided, otherwise it matches anything except the names provided." + }, + "names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Depending on the value of `negate` the names that should match or not match." + } + }, + "required": [ "names" ] + }, + + "ExceptionDetails": { + "type": "object", + "description": "Detailed information about an exception that has occurred.", + "properties": { + "message": { + "type": "string", + "description": "Message contained in the exception." + }, + "typeName": { + "type": "string", + "description": "Short type name of the exception object." + }, + "fullTypeName": { + "type": "string", + "description": "Fully-qualified type name of the exception object." + }, + "evaluateName": { + "type": "string", + "description": "An expression that can be evaluated in the current scope to obtain the exception object." + }, + "stackTrace": { + "type": "string", + "description": "Stack trace at the time the exception was thrown." + }, + "innerException": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionDetails" + }, + "description": "Details of the exception contained by this exception, if any." + } + } + }, + + "DisassembledInstruction": { + "type": "object", + "description": "Represents a single disassembled instruction.", + "properties": { + "address": { + "type": "string", + "description": "The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise." + }, + "instructionBytes": { + "type": "string", + "description": "Raw bytes representing the instruction and its operands, in an implementation-defined format." + }, + "instruction": { + "type": "string", + "description": "Text representing the instruction and its operands, in an implementation-defined format." + }, + "symbol": { + "type": "string", + "description": "Name of the symbol that corresponds with the location of this instruction, if any." + }, + "location": { + "$ref": "#/definitions/Source", + "description": "Source location that corresponds to this instruction, if any.\nShould always be set (if available) on the first instruction returned,\nbut can be omitted afterwards if this instruction maps to the same source file as the previous instruction." + }, + "line": { + "type": "integer", + "description": "The line within the source location that corresponds to this instruction, if any." + }, + "column": { + "type": "integer", + "description": "The column within the line that corresponds to this instruction, if any." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range that corresponds to this instruction, if any." + }, + "endColumn": { + "type": "integer", + "description": "The end column of the range that corresponds to this instruction, if any." + }, + "presentationHint": { + "type": "string", + "description": "A hint for how to present the instruction in the UI.\n\nA value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.'", + "enum": [ "normal", "invalid" ] + } + }, + "required": [ "address", "instruction" ] + }, + + "InvalidatedAreas": { + "type": "string", + "description": "Logical areas that can be invalidated by the `invalidated` event.", + "_enum": [ "all", "stacks", "threads", "variables" ], + "enumDescriptions": [ + "All previously fetched data has become invalid and needs to be refetched.", + "Previously fetched stack related data has become invalid and needs to be refetched.", + "Previously fetched thread related data has become invalid and needs to be refetched.", + "Previously fetched variable data has become invalid and needs to be refetched." + ] + } + + } +} diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocolCustom.json b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocolCustom.json new file mode 100644 index 0000000..a0a9b87 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocolCustom.json @@ -0,0 +1,325 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Custom Debug Adapter Protocol", + "description": "Extension to the DAP to support additional features.", + "type": "object", + + + "definitions": { + + "SetDebuggerPropertyRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request can be used to enable or disable debugger features.", + "properties": { + "command": { + "type": "string", + "enum": [ "setDebuggerProperty" ] + }, + "arguments": { + "$ref": "#/definitions/SetDebuggerPropertyArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetDebuggerPropertyArguments": { + "type": "object", + "description": "Arguments for 'setDebuggerProperty' request.", + "properties": { + "ideOS": { + "type": [ "string" ], + "description": "OS where the ide is running. Supported values [Windows, Linux]" + }, + "dontTraceStartPatterns": { + "type": [ "array" ], + "description": "Patterns to match with the start of the file paths. Matching paths will be added to a list of file where trace is ignored." + }, + "dontTraceEndPatterns": { + "type": [ "array" ], + "description": "Patterns to match with the end of the file paths. Matching paths will be added to a list of file where trace is ignored." + }, + "skipSuspendOnBreakpointException": { + "type": [ "array" ], + "description": "List of exceptions that should be skipped when doing condition evaluations." + }, + "skipPrintBreakpointException": { + "type": [ "array" ], + "description": "List of exceptions that should skip printing to stderr when doing condition evaluations." + }, + "multiThreadsSingleNotification": { + "type": [ "boolean" ], + "description": "If false then a notification is generated for each thread event. If true a single event is gnenerated, and all threads follow that behavior." + } + } + }, + "SetDebuggerPropertyResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'setDebuggerProperty' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "PydevdInputRequestedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates input was requested by debuggee.", + "properties": { + "event": { + "type": "string", + "enum": [ "pydevdInputRequested" ] + } + }, + "required": [ "event" ] + }] + }, + + "SetPydevdSourceMapRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": [ + "Sets multiple PydevdSourceMap for a single source and clears all previous PydevdSourceMap in that source.", + "i.e.: Maps paths and lines in a 1:N mapping (use case: map a single file in the IDE to multiple IPython cells).", + "To clear all PydevdSourceMap for a source, specify an empty array.", + "Interaction with breakpoints: When a new mapping is sent, breakpoints that match the source (or previously matched a source) are reapplied.", + "Interaction with launch pathMapping: both mappings are independent. This mapping is applied after the launch pathMapping." + ], + "properties": { + "command": { + "type": "string", + "enum": [ "setPydevdSourceMap" ] + }, + "arguments": { + "$ref": "#/definitions/SetPydevdSourceMapArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetPydevdSourceMapArguments": { + "type": "object", + "description": "Arguments for 'setPydevdSourceMap' request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location of the PydevdSourceMap; 'source.path' must be specified (e.g.: for an ipython notebook this could be something as /home/notebook/note.py)." + }, + "pydevdSourceMaps": { + "type": "array", + "items": { + "$ref": "#/definitions/PydevdSourceMap" + }, + "description": "The PydevdSourceMaps to be set to the given source (provide an empty array to clear the source mappings for a given path)." + } + }, + "required": [ "source", "pydevdSourceMap" ] + }, + "SetPydevdSourceMapResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'setPydevdSourceMap' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "PydevdSourceMap": { + "type": "object", + "description": "Information that allows mapping a local line to a remote source/line.", + "properties": { + "line": { + "type": "integer", + "description": "The local line to which the mapping should map to (e.g.: for an ipython notebook this would be the first line of the cell in the file)." + }, + "endLine": { + "type": "integer", + "description": "The end line." + }, + "runtimeSource": { + "$ref": "#/definitions/Source", + "description": "The path that the user has remotely -- 'source.path' must be specified (e.g.: for an ipython notebook this could be something as '')" + }, + "runtimeLine": { + "type": "integer", + "description": "The remote line to which the mapping should map to (e.g.: for an ipython notebook this would be always 1 as it'd map the start of the cell)." + } + }, + "required": ["line", "endLine", "runtimeSource", "runtimeLine"] + }, + + "PydevdSystemInfoRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request can be used retrieve system information, python version, etc.", + "properties": { + "command": { + "type": "string", + "enum": [ "pydevdSystemInfo" ] + }, + "arguments": { + "$ref": "#/definitions/PydevdSystemInfoArguments" + } + }, + "required": [ "command" ] + }] + }, + "PydevdSystemInfoArguments": { + "type": "object", + "description": "Arguments for 'pydevdSystemInfo' request." + }, + "PydevdSystemInfoResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'pydevdSystemInfo' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "python": { + "$ref": "#/definitions/PydevdPythonInfo", + "description": "Information about the python version running in the current process." + }, + "platform": { + "$ref": "#/definitions/PydevdPlatformInfo", + "description": "Information about the plarforn on which the current process is running." + }, + "process": { + "$ref": "#/definitions/PydevdProcessInfo", + "description": "Information about the current process." + }, + "pydevd": { + "$ref": "#/definitions/PydevdInfo", + "description": "Information about pydevd." + } + }, + "required": [ "python", "platform", "process", "pydevd" ] + } + }, + "required": [ "body" ] + }] + }, + + "PydevdPythonInfo": { + "type": "object", + "description": "This object contains python version and implementation details.", + "properties": { + "version": { + "type": "string", + "description": "Python version as a string in semver format: ..." + }, + "implementation": { + "$ref": "#/definitions/PydevdPythonImplementationInfo", + "description": "Python version as a string in this format ..." + } + } + }, + "PydevdPythonImplementationInfo": { + "type": "object", + "description": "This object contains python implementation details.", + "properties": { + "name": { + "type": "string", + "description": "Python implementation name." + }, + "version": { + "type": "string", + "description": "Python version as a string in semver format: ..." + }, + "description": { + "type": "string", + "description": "Optional description for this python implementation." + } + } + }, + "PydevdPlatformInfo": { + "type": "object", + "description": "This object contains python version and implementation details.", + "properties": { + "name": { + "type": "string", + "description": "Name of the platform as returned by 'sys.platform'." + } + } + }, + "PydevdProcessInfo": { + "type": "object", + "description": "This object contains python process details.", + "properties": { + "pid": { + "type": "integer", + "description": "Process ID for the current process." + }, + "ppid": { + "type": "integer", + "description": "Parent Process ID for the current process." + }, + "executable": { + "type": "string", + "description": "Path to the executable as returned by 'sys.executable'." + }, + "bitness": { + "type": "integer", + "description": "Integer value indicating the bitness of the current process." + } + } + }, + "PydevdInfo": { + "type": "object", + "description": "This object contains details on pydevd.", + "properties": { + "usingCython": { + "type": "boolean", + "description": "Specifies whether the cython native module is being used." + }, + "usingFrameEval": { + "type": "boolean", + "description": "Specifies whether the frame eval native module is being used." + } + } + }, + "PydevdAuthorizeRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "A request to authorize the ide to start accepting commands.", + "properties": { + "command": { + "type": "string", + "enum": [ "pydevdAuthorize" ] + }, + "arguments": { + "$ref": "#/definitions/PydevdAuthorizeArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "PydevdAuthorizeArguments": { + "type": "object", + "description": "Arguments for 'pydevdAuthorize' request.", + "properties": { + "debugServerAccessToken": { + "type": "string" , + "description": "The access token to access the debug server." + } + }, + "required": [ "command" ] + }, + "PydevdAuthorizeResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'pydevdAuthorize' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "clientAccessToken": { + "type": "string", + "description": "The access token to access the client (i.e.: usually the IDE)." + } + }, + "required": [ "clientAccessToken" ] + } + }, + "required": [ "body" ] + }] + } + } +} \ No newline at end of file diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_base_schema.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_base_schema.py new file mode 100644 index 0000000..e5078f0 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_base_schema.py @@ -0,0 +1,143 @@ +from _pydevd_bundle._debug_adapter.pydevd_schema_log import debug_exception +import json +import itertools +from functools import partial + + +class BaseSchema(object): + @staticmethod + def initialize_ids_translation(): + BaseSchema._dap_id_to_obj_id = {0: 0, None: None} + BaseSchema._obj_id_to_dap_id = {0: 0, None: None} + BaseSchema._next_dap_id = partial(next, itertools.count(1)) + + def to_json(self): + return json.dumps(self.to_dict()) + + @staticmethod + def _translate_id_to_dap(obj_id): + if obj_id == "*": + return "*" + # Note: we don't invalidate ids, so, if some object starts using the same id + # of another object, the same id will be used. + dap_id = BaseSchema._obj_id_to_dap_id.get(obj_id) + if dap_id is None: + dap_id = BaseSchema._obj_id_to_dap_id[obj_id] = BaseSchema._next_dap_id() + BaseSchema._dap_id_to_obj_id[dap_id] = obj_id + return dap_id + + @staticmethod + def _translate_id_from_dap(dap_id): + if dap_id == "*": + return "*" + try: + return BaseSchema._dap_id_to_obj_id[dap_id] + except: + raise KeyError("Wrong ID sent from the client: %s" % (dap_id,)) + + @staticmethod + def update_dict_ids_to_dap(dct): + return dct + + @staticmethod + def update_dict_ids_from_dap(dct): + return dct + + +BaseSchema.initialize_ids_translation() + +_requests_to_types = {} +_responses_to_types = {} +_event_to_types = {} +_all_messages = {} + + +def register(cls): + _all_messages[cls.__name__] = cls + return cls + + +def register_request(command): + def do_register(cls): + _requests_to_types[command] = cls + return cls + + return do_register + + +def register_response(command): + def do_register(cls): + _responses_to_types[command] = cls + return cls + + return do_register + + +def register_event(event): + def do_register(cls): + _event_to_types[event] = cls + return cls + + return do_register + + +def from_dict(dct, update_ids_from_dap=False): + msg_type = dct.get("type") + if msg_type is None: + raise ValueError("Unable to make sense of message: %s" % (dct,)) + + if msg_type == "request": + to_type = _requests_to_types + use = dct["command"] + + elif msg_type == "response": + to_type = _responses_to_types + use = dct["command"] + + else: + to_type = _event_to_types + use = dct["event"] + + cls = to_type.get(use) + if cls is None: + raise ValueError("Unable to create message from dict: %s. %s not in %s" % (dct, use, sorted(to_type.keys()))) + try: + return cls(update_ids_from_dap=update_ids_from_dap, **dct) + except: + msg = "Error creating %s from %s" % (cls, dct) + debug_exception(msg) + raise + + +def from_json(json_msg, update_ids_from_dap=False, on_dict_loaded=lambda dct: None): + if isinstance(json_msg, bytes): + json_msg = json_msg.decode("utf-8") + + as_dict = json.loads(json_msg) + on_dict_loaded(as_dict) + try: + return from_dict(as_dict, update_ids_from_dap=update_ids_from_dap) + except: + if as_dict.get("type") == "response" and not as_dict.get("success"): + # Error messages may not have required body (return as a generic Response). + Response = _all_messages["Response"] + return Response(**as_dict) + else: + raise + + +def get_response_class(request): + if request.__class__ == dict: + return _responses_to_types[request["command"]] + return _responses_to_types[request.command] + + +def build_response(request, kwargs=None): + if kwargs is None: + kwargs = {"success": True} + else: + if "success" not in kwargs: + kwargs["success"] = True + response_class = _responses_to_types[request.command] + kwargs.setdefault("seq", -1) # To be overwritten before sending + return response_class(command=request.command, request_seq=request.seq, **kwargs) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py new file mode 100644 index 0000000..bdb66e1 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py @@ -0,0 +1,17458 @@ +# coding: utf-8 +# Automatically generated code. +# Do not edit manually. +# Generated by running: __main__pydevd_gen_debug_adapter_protocol.py +from .pydevd_base_schema import BaseSchema, register, register_request, register_response, register_event + + +@register +class ProtocolMessage(BaseSchema): + """ + Base class of requests, responses, and events. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "description": "Message type.", "_enum": ["request", "response", "event"]}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, type, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: Message type. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = type + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + seq = self.seq + dct = { + "type": type, + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class Request(BaseSchema): + """ + A client or debug adapter initiated request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "description": "The command to execute."}, + "arguments": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Object containing arguments for the command.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, command, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: The command to execute. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] arguments: Object containing arguments for the command. + """ + self.type = "request" + self.command = command + self.seq = seq + self.arguments = arguments + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + seq = self.seq + arguments = self.arguments + dct = { + "type": type, + "command": command, + "seq": seq, + } + if arguments is not None: + dct["arguments"] = arguments + dct.update(self.kwargs) + return dct + + +@register +class Event(BaseSchema): + """ + A debug adapter initiated event. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "description": "Type of event."}, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Event-specific information.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, event, seq=-1, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: Type of event. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Event-specific information. + """ + self.type = "event" + self.event = event + self.seq = seq + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + seq = self.seq + body = self.body + dct = { + "type": type, + "event": event, + "seq": seq, + } + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register +class Response(BaseSchema): + """ + Response for a request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_response("error") +@register +class ErrorResponse(BaseSchema): + """ + On error (whenever `success` is false), the body can provide more details. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": {"error": {"$ref": "#/definitions/Message", "description": "A structured error message."}}, + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param ErrorResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = ErrorResponseBody() + else: + self.body = ErrorResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ErrorResponseBody else body + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("cancel") +@register +class CancelRequest(BaseSchema): + """ + The `cancel` request is used by the client in two situations: + + - to indicate that it is no longer interested in the result produced by a specific request issued + earlier + + - to cancel a progress sequence. + + Clients should only call this request if the corresponding capability `supportsCancelRequest` is + true. + + This request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' + in honoring this request but there are no guarantees. + + The `cancel` request may return an error if it could not cancel an operation but a client should + refrain from presenting this error to end users. + + The request that got cancelled still needs to send a response back. This can either be a normal + result (`success` attribute true) or an error response (`success` attribute false and the `message` + set to `cancelled`). + + Returning partial results from a cancelled request is possible but please note that a client has no + generic way for detecting that a response is partial or not. + + The progress that got cancelled still needs to send a `progressEnd` event back. + + A client should not assume that progress just got cancelled after sending the `cancel` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["cancel"]}, + "arguments": {"type": "CancelArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param CancelArguments arguments: + """ + self.type = "request" + self.command = "cancel" + self.seq = seq + if arguments is None: + self.arguments = CancelArguments() + else: + self.arguments = ( + CancelArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != CancelArguments + else arguments + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + seq = self.seq + arguments = self.arguments + dct = { + "type": type, + "command": command, + "seq": seq, + } + if arguments is not None: + dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class CancelArguments(BaseSchema): + """ + Arguments for `cancel` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "requestId": { + "type": "integer", + "description": "The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request.", + }, + "progressId": { + "type": "string", + "description": "The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, requestId=None, progressId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer requestId: The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled. + Both a `requestId` and a `progressId` can be specified in one request. + :param string progressId: The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled. + Both a `requestId` and a `progressId` can be specified in one request. + """ + self.requestId = requestId + self.progressId = progressId + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + requestId = self.requestId + progressId = self.progressId + dct = {} + if requestId is not None: + dct["requestId"] = requestId + if progressId is not None: + dct["progressId"] = progressId + dct.update(self.kwargs) + return dct + + +@register_response("cancel") +@register +class CancelResponse(BaseSchema): + """ + Response to `cancel` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_event("initialized") +@register +class InitializedEvent(BaseSchema): + """ + This event indicates that the debug adapter is ready to accept configuration requests (e.g. + `setBreakpoints`, `setExceptionBreakpoints`). + + A debug adapter is expected to send this event when it is ready to accept configuration requests + (but not before the `initialize` request has finished). + + The sequence of events/requests is as follows: + + - adapters sends `initialized` event (after the `initialize` request has returned) + + - client sends zero or more `setBreakpoints` requests + + - client sends one `setFunctionBreakpoints` request (if corresponding capability + `supportsFunctionBreakpoints` is true) + + - client sends a `setExceptionBreakpoints` request if one or more `exceptionBreakpointFilters` have + been defined (or if `supportsConfigurationDoneRequest` is not true) + + - client sends other future configuration requests + + - client sends one `configurationDone` request to indicate the end of the configuration. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["initialized"]}, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Event-specific information.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Event-specific information. + """ + self.type = "event" + self.event = "initialized" + self.seq = seq + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + seq = self.seq + body = self.body + dct = { + "type": type, + "event": event, + "seq": seq, + } + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_event("stopped") +@register +class StoppedEvent(BaseSchema): + """ + The event indicates that the execution of the debuggee has stopped due to some condition. + + This can be caused by a breakpoint previously set, a stepping request has completed, by executing a + debugger statement etc. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["stopped"]}, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.\nFor backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated).", + "_enum": [ + "step", + "breakpoint", + "exception", + "pause", + "entry", + "goto", + "function breakpoint", + "data breakpoint", + "instruction breakpoint", + ], + }, + "description": { + "type": "string", + "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated.", + }, + "threadId": {"type": "integer", "description": "The thread which was stopped."}, + "preserveFocusHint": { + "type": "boolean", + "description": "A value of True hints to the client that this event should not change the focus.", + }, + "text": { + "type": "string", + "description": "Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI.", + }, + "allThreadsStopped": { + "type": "boolean", + "description": "If `allThreadsStopped` is True, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given `threadId` can be expanded.", + }, + "hitBreakpointIds": { + "type": "array", + "items": {"type": "integer"}, + "description": "Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location.", + }, + }, + "required": ["reason"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param StoppedEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "stopped" + if body is None: + self.body = StoppedEventBody() + else: + self.body = StoppedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != StoppedEventBody else body + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("continued") +@register +class ContinuedEvent(BaseSchema): + """ + The event indicates that the execution of the debuggee has continued. + + Please note: a debug adapter is not expected to send this event in response to a request that + implies that execution continues, e.g. `launch` or `continue`. + + It is only necessary to send a `continued` event if there was no previous request that implied this. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["continued"]}, + "body": { + "type": "object", + "properties": { + "threadId": {"type": "integer", "description": "The thread which was continued."}, + "allThreadsContinued": { + "type": "boolean", + "description": "If `allThreadsContinued` is True, a debug adapter can announce that all threads have continued.", + }, + }, + "required": ["threadId"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param ContinuedEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "continued" + if body is None: + self.body = ContinuedEventBody() + else: + self.body = ( + ContinuedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ContinuedEventBody else body + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("exited") +@register +class ExitedEvent(BaseSchema): + """ + The event indicates that the debuggee has exited and returns its exit code. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["exited"]}, + "body": { + "type": "object", + "properties": {"exitCode": {"type": "integer", "description": "The exit code returned from the debuggee."}}, + "required": ["exitCode"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param ExitedEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "exited" + if body is None: + self.body = ExitedEventBody() + else: + self.body = ExitedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ExitedEventBody else body + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("terminated") +@register +class TerminatedEvent(BaseSchema): + """ + The event indicates that debugging of the debuggee has terminated. This does **not** mean that the + debuggee itself has exited. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["terminated"]}, + "body": { + "type": "object", + "properties": { + "restart": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "A debug adapter may set `restart` to True (or to an arbitrary object) to request that the client restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests.", + } + }, + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param TerminatedEventBody body: + """ + self.type = "event" + self.event = "terminated" + self.seq = seq + if body is None: + self.body = TerminatedEventBody() + else: + self.body = ( + TerminatedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != TerminatedEventBody else body + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + seq = self.seq + body = self.body + dct = { + "type": type, + "event": event, + "seq": seq, + } + if body is not None: + dct["body"] = body.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register_event("thread") +@register +class ThreadEvent(BaseSchema): + """ + The event indicates that a thread has started or exited. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["thread"]}, + "body": { + "type": "object", + "properties": { + "reason": {"type": "string", "description": "The reason for the event.", "_enum": ["started", "exited"]}, + "threadId": {"type": "integer", "description": "The identifier of the thread."}, + }, + "required": ["reason", "threadId"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param ThreadEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "thread" + if body is None: + self.body = ThreadEventBody() + else: + self.body = ThreadEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ThreadEventBody else body + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("output") +@register +class OutputEvent(BaseSchema): + """ + The event indicates that the target has produced some output. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["output"]}, + "body": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "The output category. If not specified or if the category is not understood by the client, `console` is assumed.", + "_enum": ["console", "important", "stdout", "stderr", "telemetry"], + "enumDescriptions": [ + "Show the output in the client's default message UI, e.g. a 'debug console'. This category should only be used for informational output from the debugger (as opposed to the debuggee).", + "A hint for the client to show the output in the client's UI for important and highly visible information, e.g. as a popup notification. This category should only be used for important messages from the debugger (as opposed to the debuggee). Since this category value is a hint, clients might ignore the hint and assume the `console` category.", + "Show the output as normal program output from the debuggee.", + "Show the output as error program output from the debuggee.", + "Send the output to telemetry instead of showing it to the user.", + ], + }, + "output": {"type": "string", "description": "The output to report."}, + "group": { + "type": "string", + "description": "Support for keeping an output log organized by grouping related messages.", + "enum": ["start", "startCollapsed", "end"], + "enumDescriptions": [ + "Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe `output` attribute becomes the name of the group and is not indented.", + "Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe `output` attribute becomes the name of the group and is not indented.", + "End the current group and decrease the indentation of subsequent output events.\nA non-empty `output` attribute is shown as the unindented end of the group.", + ], + }, + "variablesReference": { + "type": "integer", + "description": "If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + }, + "source": {"$ref": "#/definitions/Source", "description": "The source location where the output was produced."}, + "line": {"type": "integer", "description": "The source location's line where the output was produced."}, + "column": { + "type": "integer", + "description": "The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + "data": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format.", + }, + }, + "required": ["output"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param OutputEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "output" + if body is None: + self.body = OutputEventBody() + else: + self.body = OutputEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != OutputEventBody else body + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("breakpoint") +@register +class BreakpointEvent(BaseSchema): + """ + The event indicates that some information about a breakpoint has changed. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["breakpoint"]}, + "body": { + "type": "object", + "properties": { + "reason": {"type": "string", "description": "The reason for the event.", "_enum": ["changed", "new", "removed"]}, + "breakpoint": { + "$ref": "#/definitions/Breakpoint", + "description": "The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values.", + }, + }, + "required": ["reason", "breakpoint"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param BreakpointEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "breakpoint" + if body is None: + self.body = BreakpointEventBody() + else: + self.body = ( + BreakpointEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != BreakpointEventBody else body + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("module") +@register +class ModuleEvent(BaseSchema): + """ + The event indicates that some information about a module has changed. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["module"]}, + "body": { + "type": "object", + "properties": { + "reason": {"type": "string", "description": "The reason for the event.", "enum": ["new", "changed", "removed"]}, + "module": { + "$ref": "#/definitions/Module", + "description": "The new, changed, or removed module. In case of `removed` only the module id is used.", + }, + }, + "required": ["reason", "module"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param ModuleEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "module" + if body is None: + self.body = ModuleEventBody() + else: + self.body = ModuleEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ModuleEventBody else body + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("loadedSource") +@register +class LoadedSourceEvent(BaseSchema): + """ + The event indicates that some source has been added, changed, or removed from the set of all loaded + sources. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["loadedSource"]}, + "body": { + "type": "object", + "properties": { + "reason": {"type": "string", "description": "The reason for the event.", "enum": ["new", "changed", "removed"]}, + "source": {"$ref": "#/definitions/Source", "description": "The new, changed, or removed source."}, + }, + "required": ["reason", "source"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param LoadedSourceEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "loadedSource" + if body is None: + self.body = LoadedSourceEventBody() + else: + self.body = ( + LoadedSourceEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != LoadedSourceEventBody else body + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("process") +@register +class ProcessEvent(BaseSchema): + """ + The event indicates that the debugger has begun debugging a new process. Either one that it has + launched, or one that it has attached to. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["process"]}, + "body": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js.", + }, + "systemProcessId": { + "type": "integer", + "description": "The system process id of the debugged process. This property is missing for non-system processes.", + }, + "isLocalProcess": { + "type": "boolean", + "description": "If True, the process is running on the same computer as the debug adapter.", + }, + "startMethod": { + "type": "string", + "enum": ["launch", "attach", "attachForSuspendedLaunch"], + "description": "Describes how the debug engine started debugging this process.", + "enumDescriptions": [ + "Process was launched under the debugger.", + "Debugger attached to an existing process.", + "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach.", + ], + }, + "pointerSize": { + "type": "integer", + "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display.", + }, + }, + "required": ["name"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param ProcessEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "process" + if body is None: + self.body = ProcessEventBody() + else: + self.body = ProcessEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ProcessEventBody else body + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("capabilities") +@register +class CapabilitiesEvent(BaseSchema): + """ + The event indicates that one or more capabilities have changed. + + Since the capabilities are dependent on the client and its UI, it might not be possible to change + that at random times (or too late). + + Consequently this event has a hint characteristic: a client can only be expected to make a 'best + effort' in honoring individual capabilities but there are no guarantees. + + Only changed capabilities need to be included, all other capabilities keep their values. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["capabilities"]}, + "body": { + "type": "object", + "properties": {"capabilities": {"$ref": "#/definitions/Capabilities", "description": "The set of updated capabilities."}}, + "required": ["capabilities"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param CapabilitiesEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "capabilities" + if body is None: + self.body = CapabilitiesEventBody() + else: + self.body = ( + CapabilitiesEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != CapabilitiesEventBody else body + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("progressStart") +@register +class ProgressStartEvent(BaseSchema): + """ + The event signals that a long running operation is about to start and provides additional + information for the client to set up a corresponding progress and cancellation UI. + + The client is free to delay the showing of the UI in order to reduce flicker. + + This event should only be sent if the corresponding capability `supportsProgressReporting` is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["progressStart"]}, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.\nIDs must be unique within a debug session.", + }, + "title": { + "type": "string", + "description": "Short title of the progress reporting. Shown in the UI to describe the long running operation.", + }, + "requestId": { + "type": "integer", + "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter.", + }, + "cancellable": { + "type": "boolean", + "description": "If True, the request that reports progress may be cancelled with a `cancel` request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting.", + }, + "message": {"type": "string", "description": "More detailed progress message."}, + "percentage": { + "type": "number", + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown.", + }, + }, + "required": ["progressId", "title"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param ProgressStartEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "progressStart" + if body is None: + self.body = ProgressStartEventBody() + else: + self.body = ( + ProgressStartEventBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != ProgressStartEventBody + else body + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("progressUpdate") +@register +class ProgressUpdateEvent(BaseSchema): + """ + The event signals that the progress reporting needs to be updated with a new message and/or + percentage. + + The client does not have to update the UI immediately, but the clients needs to keep track of the + message and/or percentage values. + + This event should only be sent if the corresponding capability `supportsProgressReporting` is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["progressUpdate"]}, + "body": { + "type": "object", + "properties": { + "progressId": {"type": "string", "description": "The ID that was introduced in the initial `progressStart` event."}, + "message": { + "type": "string", + "description": "More detailed progress message. If omitted, the previous message (if any) is used.", + }, + "percentage": { + "type": "number", + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown.", + }, + }, + "required": ["progressId"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param ProgressUpdateEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "progressUpdate" + if body is None: + self.body = ProgressUpdateEventBody() + else: + self.body = ( + ProgressUpdateEventBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != ProgressUpdateEventBody + else body + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("progressEnd") +@register +class ProgressEndEvent(BaseSchema): + """ + The event signals the end of the progress reporting with a final message. + + This event should only be sent if the corresponding capability `supportsProgressReporting` is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["progressEnd"]}, + "body": { + "type": "object", + "properties": { + "progressId": {"type": "string", "description": "The ID that was introduced in the initial `ProgressStartEvent`."}, + "message": { + "type": "string", + "description": "More detailed progress message. If omitted, the previous message (if any) is used.", + }, + }, + "required": ["progressId"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param ProgressEndEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "progressEnd" + if body is None: + self.body = ProgressEndEventBody() + else: + self.body = ( + ProgressEndEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ProgressEndEventBody else body + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("invalidated") +@register +class InvalidatedEvent(BaseSchema): + """ + This event signals that some state in the debug adapter has changed and requires that the client + needs to re-render the data snapshot previously requested. + + Debug adapters do not have to emit this event for runtime changes like stopped or thread events + because in that case the client refetches the new state anyway. But the event can be used for + example to refresh the UI after rendering formatting has changed in the debug adapter. + + This event should only be sent if the corresponding capability `supportsInvalidatedEvent` is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["invalidated"]}, + "body": { + "type": "object", + "properties": { + "areas": { + "type": "array", + "description": "Set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honoring the areas but there are no guarantees. If this property is missing, empty, or if values are not understood, the client should assume a single value `all`.", + "items": {"$ref": "#/definitions/InvalidatedAreas"}, + }, + "threadId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this thread.", + }, + "stackFrameId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored).", + }, + }, + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param InvalidatedEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "invalidated" + if body is None: + self.body = InvalidatedEventBody() + else: + self.body = ( + InvalidatedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != InvalidatedEventBody else body + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_event("memory") +@register +class MemoryEvent(BaseSchema): + """ + This event indicates that some memory range has been updated. It should only be sent if the + corresponding capability `supportsMemoryEvent` is true. + + Clients typically react to the event by re-issuing a `readMemory` request if they show the memory + identified by the `memoryReference` and if the updated memory range overlaps the displayed range. + Clients should not make assumptions how individual memory references relate to each other, so they + should not assume that they are part of a single continuous address range and might overlap. + + Debug adapters can use this event to indicate that the contents of a memory range has changed due to + some other request like `setVariable` or `setExpression`. Debug adapters are not expected to emit + this event for each and every memory change of a running program, because that information is + typically not available from debuggers and it would flood clients with too many events. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["memory"]}, + "body": { + "type": "object", + "properties": { + "memoryReference": {"type": "string", "description": "Memory reference of a memory range that has been updated."}, + "offset": {"type": "integer", "description": "Starting offset in bytes where memory has been updated. Can be negative."}, + "count": {"type": "integer", "description": "Number of bytes updated."}, + }, + "required": ["memoryReference", "offset", "count"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param MemoryEventBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "event" + self.event = "memory" + if body is None: + self.body = MemoryEventBody() + else: + self.body = MemoryEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != MemoryEventBody else body + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + "type": type, + "event": event, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register_request("runInTerminal") +@register +class RunInTerminalRequest(BaseSchema): + """ + This request is sent from the debug adapter to the client to run a command in a terminal. + + This is typically used to launch the debuggee in a terminal provided by the client. + + This request should only be called if the corresponding client capability + `supportsRunInTerminalRequest` is true. + + Client implementations of `runInTerminal` are free to run the command however they choose including + issuing the command to a command line interpreter (aka 'shell'). Argument strings passed to the + `runInTerminal` request must arrive verbatim in the command to be run. As a consequence, clients + which use a shell are responsible for escaping any special shell characters in the argument strings + to prevent them from being interpreted (and modified) by the shell. + + Some users may wish to take advantage of shell processing in the argument strings. For clients which + implement `runInTerminal` using an intermediary shell, the `argsCanBeInterpretedByShell` property + can be set to true. In this case the client is requested not to escape any special shell characters + in the argument strings. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["runInTerminal"]}, + "arguments": {"type": "RunInTerminalRequestArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param RunInTerminalRequestArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "runInTerminal" + if arguments is None: + self.arguments = RunInTerminalRequestArguments() + else: + self.arguments = ( + RunInTerminalRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != RunInTerminalRequestArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class RunInTerminalRequestArguments(BaseSchema): + """ + Arguments for `runInTerminal` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "kind": { + "type": "string", + "enum": ["integrated", "external"], + "description": "What kind of terminal to launch. Defaults to `integrated` if not specified.", + }, + "title": {"type": "string", "description": "Title of the terminal."}, + "cwd": { + "type": "string", + "description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command.", + }, + "args": { + "type": "array", + "items": {"type": "string"}, + "description": "List of arguments. The first argument is the command to run.", + }, + "env": { + "type": "object", + "description": "Environment key-value pairs that are added to or removed from the default environment.", + "additionalProperties": { + "type": ["string", "null"], + "description": "A string is a proper value for an environment variable. The value `null` removes the variable from the environment.", + }, + }, + "argsCanBeInterpretedByShell": { + "type": "boolean", + "description": "This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is True. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells.", + }, + } + __refs__ = set(["env"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, cwd, args, kind=None, title=None, env=None, argsCanBeInterpretedByShell=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string cwd: Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command. + :param array args: List of arguments. The first argument is the command to run. + :param string kind: What kind of terminal to launch. Defaults to `integrated` if not specified. + :param string title: Title of the terminal. + :param RunInTerminalRequestArgumentsEnv env: Environment key-value pairs that are added to or removed from the default environment. + :param boolean argsCanBeInterpretedByShell: This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells. + """ + self.cwd = cwd + self.args = args + self.kind = kind + self.title = title + if env is None: + self.env = RunInTerminalRequestArgumentsEnv() + else: + self.env = ( + RunInTerminalRequestArgumentsEnv(update_ids_from_dap=update_ids_from_dap, **env) + if env.__class__ != RunInTerminalRequestArgumentsEnv + else env + ) + self.argsCanBeInterpretedByShell = argsCanBeInterpretedByShell + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + cwd = self.cwd + args = self.args + if args and hasattr(args[0], "to_dict"): + args = [x.to_dict() for x in args] + kind = self.kind + title = self.title + env = self.env + argsCanBeInterpretedByShell = self.argsCanBeInterpretedByShell + dct = { + "cwd": cwd, + "args": args, + } + if kind is not None: + dct["kind"] = kind + if title is not None: + dct["title"] = title + if env is not None: + dct["env"] = env.to_dict(update_ids_to_dap=update_ids_to_dap) + if argsCanBeInterpretedByShell is not None: + dct["argsCanBeInterpretedByShell"] = argsCanBeInterpretedByShell + dct.update(self.kwargs) + return dct + + +@register_response("runInTerminal") +@register +class RunInTerminalResponse(BaseSchema): + """ + Response to `runInTerminal` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "processId": { + "type": "integer", + "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1).", + }, + "shellProcessId": { + "type": "integer", + "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1).", + }, + }, + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param RunInTerminalResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = RunInTerminalResponseBody() + else: + self.body = ( + RunInTerminalResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != RunInTerminalResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("startDebugging") +@register +class StartDebuggingRequest(BaseSchema): + """ + This request is sent from the debug adapter to the client to start a new debug session of the same + type as the caller. + + This request should only be sent if the corresponding client capability + `supportsStartDebuggingRequest` is true. + + A client implementation of `startDebugging` should start a new debug session (of the same type as + the caller) in the same way that the caller's session was started. If the client supports + hierarchical debug sessions, the newly created session can be treated as a child of the caller + session. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["startDebugging"]}, + "arguments": {"type": "StartDebuggingRequestArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param StartDebuggingRequestArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "startDebugging" + if arguments is None: + self.arguments = StartDebuggingRequestArguments() + else: + self.arguments = ( + StartDebuggingRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != StartDebuggingRequestArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class StartDebuggingRequestArguments(BaseSchema): + """ + Arguments for `startDebugging` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "configuration": { + "type": "object", + "additionalProperties": True, + "description": "Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables').", + }, + "request": { + "type": "string", + "enum": ["launch", "attach"], + "description": "Indicates whether the new debug session should be started with a `launch` or `attach` request.", + }, + } + __refs__ = set(["configuration"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, configuration, request, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param StartDebuggingRequestArgumentsConfiguration configuration: Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables'). + :param string request: Indicates whether the new debug session should be started with a `launch` or `attach` request. + """ + if configuration is None: + self.configuration = StartDebuggingRequestArgumentsConfiguration() + else: + self.configuration = ( + StartDebuggingRequestArgumentsConfiguration(update_ids_from_dap=update_ids_from_dap, **configuration) + if configuration.__class__ != StartDebuggingRequestArgumentsConfiguration + else configuration + ) + self.request = request + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + configuration = self.configuration + request = self.request + dct = { + "configuration": configuration.to_dict(update_ids_to_dap=update_ids_to_dap), + "request": request, + } + dct.update(self.kwargs) + return dct + + +@register_response("startDebugging") +@register +class StartDebuggingResponse(BaseSchema): + """ + Response to `startDebugging` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("initialize") +@register +class InitializeRequest(BaseSchema): + """ + The `initialize` request is sent as the first request from the client to the debug adapter in order + to configure it with client capabilities and to retrieve capabilities from the debug adapter. + + Until the debug adapter has responded with an `initialize` response, the client must not send any + additional requests or events to the debug adapter. + + In addition the debug adapter is not allowed to send any requests or events to the client until it + has responded with an `initialize` response. + + The `initialize` request may only be sent once. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["initialize"]}, + "arguments": {"type": "InitializeRequestArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param InitializeRequestArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "initialize" + if arguments is None: + self.arguments = InitializeRequestArguments() + else: + self.arguments = ( + InitializeRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != InitializeRequestArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class InitializeRequestArguments(BaseSchema): + """ + Arguments for `initialize` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "clientID": {"type": "string", "description": "The ID of the client using this adapter."}, + "clientName": {"type": "string", "description": "The human-readable name of the client using this adapter."}, + "adapterID": {"type": "string", "description": "The ID of the debug adapter."}, + "locale": {"type": "string", "description": "The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH."}, + "linesStartAt1": {"type": "boolean", "description": "If True all line numbers are 1-based (default)."}, + "columnsStartAt1": {"type": "boolean", "description": "If True all column numbers are 1-based (default)."}, + "pathFormat": { + "type": "string", + "_enum": ["path", "uri"], + "description": "Determines in what format paths are specified. The default is `path`, which is the native format.", + }, + "supportsVariableType": {"type": "boolean", "description": "Client supports the `type` attribute for variables."}, + "supportsVariablePaging": {"type": "boolean", "description": "Client supports the paging of variables."}, + "supportsRunInTerminalRequest": {"type": "boolean", "description": "Client supports the `runInTerminal` request."}, + "supportsMemoryReferences": {"type": "boolean", "description": "Client supports memory references."}, + "supportsProgressReporting": {"type": "boolean", "description": "Client supports progress reporting."}, + "supportsInvalidatedEvent": {"type": "boolean", "description": "Client supports the `invalidated` event."}, + "supportsMemoryEvent": {"type": "boolean", "description": "Client supports the `memory` event."}, + "supportsArgsCanBeInterpretedByShell": { + "type": "boolean", + "description": "Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request.", + }, + "supportsStartDebuggingRequest": {"type": "boolean", "description": "Client supports the `startDebugging` request."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + adapterID, + clientID=None, + clientName=None, + locale=None, + linesStartAt1=None, + columnsStartAt1=None, + pathFormat=None, + supportsVariableType=None, + supportsVariablePaging=None, + supportsRunInTerminalRequest=None, + supportsMemoryReferences=None, + supportsProgressReporting=None, + supportsInvalidatedEvent=None, + supportsMemoryEvent=None, + supportsArgsCanBeInterpretedByShell=None, + supportsStartDebuggingRequest=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string adapterID: The ID of the debug adapter. + :param string clientID: The ID of the client using this adapter. + :param string clientName: The human-readable name of the client using this adapter. + :param string locale: The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH. + :param boolean linesStartAt1: If true all line numbers are 1-based (default). + :param boolean columnsStartAt1: If true all column numbers are 1-based (default). + :param string pathFormat: Determines in what format paths are specified. The default is `path`, which is the native format. + :param boolean supportsVariableType: Client supports the `type` attribute for variables. + :param boolean supportsVariablePaging: Client supports the paging of variables. + :param boolean supportsRunInTerminalRequest: Client supports the `runInTerminal` request. + :param boolean supportsMemoryReferences: Client supports memory references. + :param boolean supportsProgressReporting: Client supports progress reporting. + :param boolean supportsInvalidatedEvent: Client supports the `invalidated` event. + :param boolean supportsMemoryEvent: Client supports the `memory` event. + :param boolean supportsArgsCanBeInterpretedByShell: Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request. + :param boolean supportsStartDebuggingRequest: Client supports the `startDebugging` request. + """ + self.adapterID = adapterID + self.clientID = clientID + self.clientName = clientName + self.locale = locale + self.linesStartAt1 = linesStartAt1 + self.columnsStartAt1 = columnsStartAt1 + self.pathFormat = pathFormat + self.supportsVariableType = supportsVariableType + self.supportsVariablePaging = supportsVariablePaging + self.supportsRunInTerminalRequest = supportsRunInTerminalRequest + self.supportsMemoryReferences = supportsMemoryReferences + self.supportsProgressReporting = supportsProgressReporting + self.supportsInvalidatedEvent = supportsInvalidatedEvent + self.supportsMemoryEvent = supportsMemoryEvent + self.supportsArgsCanBeInterpretedByShell = supportsArgsCanBeInterpretedByShell + self.supportsStartDebuggingRequest = supportsStartDebuggingRequest + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + adapterID = self.adapterID + clientID = self.clientID + clientName = self.clientName + locale = self.locale + linesStartAt1 = self.linesStartAt1 + columnsStartAt1 = self.columnsStartAt1 + pathFormat = self.pathFormat + supportsVariableType = self.supportsVariableType + supportsVariablePaging = self.supportsVariablePaging + supportsRunInTerminalRequest = self.supportsRunInTerminalRequest + supportsMemoryReferences = self.supportsMemoryReferences + supportsProgressReporting = self.supportsProgressReporting + supportsInvalidatedEvent = self.supportsInvalidatedEvent + supportsMemoryEvent = self.supportsMemoryEvent + supportsArgsCanBeInterpretedByShell = self.supportsArgsCanBeInterpretedByShell + supportsStartDebuggingRequest = self.supportsStartDebuggingRequest + dct = { + "adapterID": adapterID, + } + if clientID is not None: + dct["clientID"] = clientID + if clientName is not None: + dct["clientName"] = clientName + if locale is not None: + dct["locale"] = locale + if linesStartAt1 is not None: + dct["linesStartAt1"] = linesStartAt1 + if columnsStartAt1 is not None: + dct["columnsStartAt1"] = columnsStartAt1 + if pathFormat is not None: + dct["pathFormat"] = pathFormat + if supportsVariableType is not None: + dct["supportsVariableType"] = supportsVariableType + if supportsVariablePaging is not None: + dct["supportsVariablePaging"] = supportsVariablePaging + if supportsRunInTerminalRequest is not None: + dct["supportsRunInTerminalRequest"] = supportsRunInTerminalRequest + if supportsMemoryReferences is not None: + dct["supportsMemoryReferences"] = supportsMemoryReferences + if supportsProgressReporting is not None: + dct["supportsProgressReporting"] = supportsProgressReporting + if supportsInvalidatedEvent is not None: + dct["supportsInvalidatedEvent"] = supportsInvalidatedEvent + if supportsMemoryEvent is not None: + dct["supportsMemoryEvent"] = supportsMemoryEvent + if supportsArgsCanBeInterpretedByShell is not None: + dct["supportsArgsCanBeInterpretedByShell"] = supportsArgsCanBeInterpretedByShell + if supportsStartDebuggingRequest is not None: + dct["supportsStartDebuggingRequest"] = supportsStartDebuggingRequest + dct.update(self.kwargs) + return dct + + +@register_response("initialize") +@register +class InitializeResponse(BaseSchema): + """ + Response to `initialize` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": {"description": "The capabilities of this debug adapter.", "type": "Capabilities"}, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param Capabilities body: The capabilities of this debug adapter. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + if body is None: + self.body = Capabilities() + else: + self.body = Capabilities(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != Capabilities else body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register_request("configurationDone") +@register +class ConfigurationDoneRequest(BaseSchema): + """ + This request indicates that the client has finished initialization of the debug adapter. + + So it is the last request in the sequence of configuration requests (which was started by the + `initialized` event). + + Clients should only call this request if the corresponding capability + `supportsConfigurationDoneRequest` is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["configurationDone"]}, + "arguments": {"type": "ConfigurationDoneArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param ConfigurationDoneArguments arguments: + """ + self.type = "request" + self.command = "configurationDone" + self.seq = seq + if arguments is None: + self.arguments = ConfigurationDoneArguments() + else: + self.arguments = ( + ConfigurationDoneArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != ConfigurationDoneArguments + else arguments + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + seq = self.seq + arguments = self.arguments + dct = { + "type": type, + "command": command, + "seq": seq, + } + if arguments is not None: + dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class ConfigurationDoneArguments(BaseSchema): + """ + Arguments for `configurationDone` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ """ + + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = {} + dct.update(self.kwargs) + return dct + + +@register_response("configurationDone") +@register +class ConfigurationDoneResponse(BaseSchema): + """ + Response to `configurationDone` request. This is just an acknowledgement, so no body field is + required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("launch") +@register +class LaunchRequest(BaseSchema): + """ + This launch request is sent from the client to the debug adapter to start the debuggee with or + without debugging (if `noDebug` is true). + + Since launching is debugger/runtime specific, the arguments for this request are not part of this + specification. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["launch"]}, + "arguments": {"type": "LaunchRequestArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param LaunchRequestArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "launch" + if arguments is None: + self.arguments = LaunchRequestArguments() + else: + self.arguments = ( + LaunchRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != LaunchRequestArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class LaunchRequestArguments(BaseSchema): + """ + Arguments for `launch` request. Additional attributes are implementation specific. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "noDebug": {"type": "boolean", "description": "If True, the launch request should launch the program without enabling debugging."}, + "__restart": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, noDebug=None, __restart=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param boolean noDebug: If true, the launch request should launch the program without enabling debugging. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] __restart: Arbitrary data from the previous, restarted session. + The data is sent as the `restart` attribute of the `terminated` event. + The client should leave the data intact. + """ + self.noDebug = noDebug + self.__restart = __restart + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + noDebug = self.noDebug + __restart = self.__restart + dct = {} + if noDebug is not None: + dct["noDebug"] = noDebug + if __restart is not None: + dct["__restart"] = __restart + dct.update(self.kwargs) + return dct + + +@register_response("launch") +@register +class LaunchResponse(BaseSchema): + """ + Response to `launch` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("attach") +@register +class AttachRequest(BaseSchema): + """ + The `attach` request is sent from the client to the debug adapter to attach to a debuggee that is + already running. + + Since attaching is debugger/runtime specific, the arguments for this request are not part of this + specification. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["attach"]}, + "arguments": {"type": "AttachRequestArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param AttachRequestArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "attach" + if arguments is None: + self.arguments = AttachRequestArguments() + else: + self.arguments = ( + AttachRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != AttachRequestArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class AttachRequestArguments(BaseSchema): + """ + Arguments for `attach` request. Additional attributes are implementation specific. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "__restart": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, __restart=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] __restart: Arbitrary data from the previous, restarted session. + The data is sent as the `restart` attribute of the `terminated` event. + The client should leave the data intact. + """ + self.__restart = __restart + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + __restart = self.__restart + dct = {} + if __restart is not None: + dct["__restart"] = __restart + dct.update(self.kwargs) + return dct + + +@register_response("attach") +@register +class AttachResponse(BaseSchema): + """ + Response to `attach` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("restart") +@register +class RestartRequest(BaseSchema): + """ + Restarts a debug session. Clients should only call this request if the corresponding capability + `supportsRestartRequest` is true. + + If the capability is missing or has the value false, a typical client emulates `restart` by + terminating the debug adapter first and then launching it anew. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["restart"]}, + "arguments": {"type": "RestartArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param RestartArguments arguments: + """ + self.type = "request" + self.command = "restart" + self.seq = seq + if arguments is None: + self.arguments = RestartArguments() + else: + self.arguments = ( + RestartArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != RestartArguments + else arguments + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + seq = self.seq + arguments = self.arguments + dct = { + "type": type, + "command": command, + "seq": seq, + } + if arguments is not None: + dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class RestartArguments(BaseSchema): + """ + Arguments for `restart` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "arguments": { + "oneOf": [{"$ref": "#/definitions/LaunchRequestArguments"}, {"$ref": "#/definitions/AttachRequestArguments"}], + "description": "The latest version of the `launch` or `attach` configuration.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param TypeNA arguments: The latest version of the `launch` or `attach` configuration. + """ + self.arguments = arguments + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + arguments = self.arguments + dct = {} + if arguments is not None: + dct["arguments"] = arguments + dct.update(self.kwargs) + return dct + + +@register_response("restart") +@register +class RestartResponse(BaseSchema): + """ + Response to `restart` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("disconnect") +@register +class DisconnectRequest(BaseSchema): + """ + The `disconnect` request asks the debug adapter to disconnect from the debuggee (thus ending the + debug session) and then to shut down itself (the debug adapter). + + In addition, the debug adapter must terminate the debuggee if it was started with the `launch` + request. If an `attach` request was used to connect to the debuggee, then the debug adapter must not + terminate the debuggee. + + This implicit behavior of when to terminate the debuggee can be overridden with the + `terminateDebuggee` argument (which is only supported by a debug adapter if the corresponding + capability `supportTerminateDebuggee` is true). + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["disconnect"]}, + "arguments": {"type": "DisconnectArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param DisconnectArguments arguments: + """ + self.type = "request" + self.command = "disconnect" + self.seq = seq + if arguments is None: + self.arguments = DisconnectArguments() + else: + self.arguments = ( + DisconnectArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != DisconnectArguments + else arguments + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + seq = self.seq + arguments = self.arguments + dct = { + "type": type, + "command": command, + "seq": seq, + } + if arguments is not None: + dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class DisconnectArguments(BaseSchema): + """ + Arguments for `disconnect` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "restart": { + "type": "boolean", + "description": "A value of True indicates that this `disconnect` request is part of a restart sequence.", + }, + "terminateDebuggee": { + "type": "boolean", + "description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is True.", + }, + "suspendDebuggee": { + "type": "boolean", + "description": "Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is True.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, restart=None, terminateDebuggee=None, suspendDebuggee=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param boolean restart: A value of true indicates that this `disconnect` request is part of a restart sequence. + :param boolean terminateDebuggee: Indicates whether the debuggee should be terminated when the debugger is disconnected. + If unspecified, the debug adapter is free to do whatever it thinks is best. + The attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true. + :param boolean suspendDebuggee: Indicates whether the debuggee should stay suspended when the debugger is disconnected. + If unspecified, the debuggee should resume execution. + The attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true. + """ + self.restart = restart + self.terminateDebuggee = terminateDebuggee + self.suspendDebuggee = suspendDebuggee + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + restart = self.restart + terminateDebuggee = self.terminateDebuggee + suspendDebuggee = self.suspendDebuggee + dct = {} + if restart is not None: + dct["restart"] = restart + if terminateDebuggee is not None: + dct["terminateDebuggee"] = terminateDebuggee + if suspendDebuggee is not None: + dct["suspendDebuggee"] = suspendDebuggee + dct.update(self.kwargs) + return dct + + +@register_response("disconnect") +@register +class DisconnectResponse(BaseSchema): + """ + Response to `disconnect` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("terminate") +@register +class TerminateRequest(BaseSchema): + """ + The `terminate` request is sent from the client to the debug adapter in order to shut down the + debuggee gracefully. Clients should only call this request if the capability + `supportsTerminateRequest` is true. + + Typically a debug adapter implements `terminate` by sending a software signal which the debuggee + intercepts in order to clean things up properly before terminating itself. + + Please note that this request does not directly affect the state of the debug session: if the + debuggee decides to veto the graceful shutdown for any reason by not terminating itself, then the + debug session just continues. + + Clients can surface the `terminate` request as an explicit command or they can integrate it into a + two stage Stop command that first sends `terminate` to request a graceful shutdown, and if that + fails uses `disconnect` for a forceful shutdown. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["terminate"]}, + "arguments": {"type": "TerminateArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param TerminateArguments arguments: + """ + self.type = "request" + self.command = "terminate" + self.seq = seq + if arguments is None: + self.arguments = TerminateArguments() + else: + self.arguments = ( + TerminateArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != TerminateArguments + else arguments + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + seq = self.seq + arguments = self.arguments + dct = { + "type": type, + "command": command, + "seq": seq, + } + if arguments is not None: + dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class TerminateArguments(BaseSchema): + """ + Arguments for `terminate` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "restart": { + "type": "boolean", + "description": "A value of True indicates that this `terminate` request is part of a restart sequence.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, restart=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param boolean restart: A value of true indicates that this `terminate` request is part of a restart sequence. + """ + self.restart = restart + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + restart = self.restart + dct = {} + if restart is not None: + dct["restart"] = restart + dct.update(self.kwargs) + return dct + + +@register_response("terminate") +@register +class TerminateResponse(BaseSchema): + """ + Response to `terminate` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("breakpointLocations") +@register +class BreakpointLocationsRequest(BaseSchema): + """ + The `breakpointLocations` request returns all possible locations for source breakpoints in a given + range. + + Clients should only call this request if the corresponding capability + `supportsBreakpointLocationsRequest` is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["breakpointLocations"]}, + "arguments": {"type": "BreakpointLocationsArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param BreakpointLocationsArguments arguments: + """ + self.type = "request" + self.command = "breakpointLocations" + self.seq = seq + if arguments is None: + self.arguments = BreakpointLocationsArguments() + else: + self.arguments = ( + BreakpointLocationsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != BreakpointLocationsArguments + else arguments + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + seq = self.seq + arguments = self.arguments + dct = { + "type": type, + "command": command, + "seq": seq, + } + if arguments is not None: + dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class BreakpointLocationsArguments(BaseSchema): + """ + Arguments for `breakpointLocations` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "source": { + "description": "The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified.", + "type": "Source", + }, + "line": { + "type": "integer", + "description": "Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line.", + }, + "column": { + "type": "integer", + "description": "Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed.", + }, + "endLine": { + "type": "integer", + "description": "End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line.", + }, + "endColumn": { + "type": "integer", + "description": "End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed.", + }, + } + __refs__ = set(["source"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, source, line, column=None, endLine=None, endColumn=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param Source source: The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified. + :param integer line: Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line. + :param integer column: Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed. + :param integer endLine: End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line. + :param integer endColumn: End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed. + """ + if source is None: + self.source = Source() + else: + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.line = line + self.column = column + self.endLine = endLine + self.endColumn = endColumn + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + source = self.source + line = self.line + column = self.column + endLine = self.endLine + endColumn = self.endColumn + dct = { + "source": source.to_dict(update_ids_to_dap=update_ids_to_dap), + "line": line, + } + if column is not None: + dct["column"] = column + if endLine is not None: + dct["endLine"] = endLine + if endColumn is not None: + dct["endColumn"] = endColumn + dct.update(self.kwargs) + return dct + + +@register_response("breakpointLocations") +@register +class BreakpointLocationsResponse(BaseSchema): + """ + Response to `breakpointLocations` request. + + Contains possible locations for source breakpoints. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/BreakpointLocation"}, + "description": "Sorted set of possible breakpoint locations.", + } + }, + "required": ["breakpoints"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param BreakpointLocationsResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = BreakpointLocationsResponseBody() + else: + self.body = ( + BreakpointLocationsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != BreakpointLocationsResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("setBreakpoints") +@register +class SetBreakpointsRequest(BaseSchema): + """ + Sets multiple breakpoints for a single source and clears all previous breakpoints in that source. + + To clear all breakpoint for a source, specify an empty array. + + When a breakpoint is hit, a `stopped` event (with reason `breakpoint`) is generated. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["setBreakpoints"]}, + "arguments": {"type": "SetBreakpointsArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param SetBreakpointsArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "setBreakpoints" + if arguments is None: + self.arguments = SetBreakpointsArguments() + else: + self.arguments = ( + SetBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != SetBreakpointsArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class SetBreakpointsArguments(BaseSchema): + """ + Arguments for `setBreakpoints` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "source": { + "description": "The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified.", + "type": "Source", + }, + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/SourceBreakpoint"}, + "description": "The code locations of the breakpoints.", + }, + "lines": {"type": "array", "items": {"type": "integer"}, "description": "Deprecated: The code locations of the breakpoints."}, + "sourceModified": { + "type": "boolean", + "description": "A value of True indicates that the underlying source has been modified which results in new breakpoint locations.", + }, + } + __refs__ = set(["source"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, source, breakpoints=None, lines=None, sourceModified=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param Source source: The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified. + :param array breakpoints: The code locations of the breakpoints. + :param array lines: Deprecated: The code locations of the breakpoints. + :param boolean sourceModified: A value of true indicates that the underlying source has been modified which results in new breakpoint locations. + """ + if source is None: + self.source = Source() + else: + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.breakpoints = breakpoints + if update_ids_from_dap and self.breakpoints: + for o in self.breakpoints: + SourceBreakpoint.update_dict_ids_from_dap(o) + self.lines = lines + self.sourceModified = sourceModified + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + source = self.source + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] + lines = self.lines + if lines and hasattr(lines[0], "to_dict"): + lines = [x.to_dict() for x in lines] + sourceModified = self.sourceModified + dct = { + "source": source.to_dict(update_ids_to_dap=update_ids_to_dap), + } + if breakpoints is not None: + dct["breakpoints"] = ( + [SourceBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints + ) + if lines is not None: + dct["lines"] = lines + if sourceModified is not None: + dct["sourceModified"] = sourceModified + dct.update(self.kwargs) + return dct + + +@register_response("setBreakpoints") +@register +class SetBreakpointsResponse(BaseSchema): + """ + Response to `setBreakpoints` request. + + Returned is information about each breakpoint created by this request. + + This includes the actual code location and whether the breakpoint could be verified. + + The breakpoints returned are in the same order as the elements of the `breakpoints` + + (or the deprecated `lines`) array in the arguments. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/Breakpoint"}, + "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments.", + } + }, + "required": ["breakpoints"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param SetBreakpointsResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = SetBreakpointsResponseBody() + else: + self.body = ( + SetBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != SetBreakpointsResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("setFunctionBreakpoints") +@register +class SetFunctionBreakpointsRequest(BaseSchema): + """ + Replaces all existing function breakpoints with new function breakpoints. + + To clear all function breakpoints, specify an empty array. + + When a function breakpoint is hit, a `stopped` event (with reason `function breakpoint`) is + generated. + + Clients should only call this request if the corresponding capability `supportsFunctionBreakpoints` + is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["setFunctionBreakpoints"]}, + "arguments": {"type": "SetFunctionBreakpointsArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param SetFunctionBreakpointsArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "setFunctionBreakpoints" + if arguments is None: + self.arguments = SetFunctionBreakpointsArguments() + else: + self.arguments = ( + SetFunctionBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != SetFunctionBreakpointsArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class SetFunctionBreakpointsArguments(BaseSchema): + """ + Arguments for `setFunctionBreakpoints` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/FunctionBreakpoint"}, + "description": "The function names of the breakpoints.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array breakpoints: The function names of the breakpoints. + """ + self.breakpoints = breakpoints + if update_ids_from_dap and self.breakpoints: + for o in self.breakpoints: + FunctionBreakpoint.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] + dct = { + "breakpoints": [FunctionBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] + if (update_ids_to_dap and breakpoints) + else breakpoints, + } + dct.update(self.kwargs) + return dct + + +@register_response("setFunctionBreakpoints") +@register +class SetFunctionBreakpointsResponse(BaseSchema): + """ + Response to `setFunctionBreakpoints` request. + + Returned is information about each breakpoint created by this request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/Breakpoint"}, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array.", + } + }, + "required": ["breakpoints"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param SetFunctionBreakpointsResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = SetFunctionBreakpointsResponseBody() + else: + self.body = ( + SetFunctionBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != SetFunctionBreakpointsResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("setExceptionBreakpoints") +@register +class SetExceptionBreakpointsRequest(BaseSchema): + """ + The request configures the debugger's response to thrown exceptions. + + If an exception is configured to break, a `stopped` event is fired (with reason `exception`). + + Clients should only call this request if the corresponding capability `exceptionBreakpointFilters` + returns one or more filters. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["setExceptionBreakpoints"]}, + "arguments": {"type": "SetExceptionBreakpointsArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param SetExceptionBreakpointsArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "setExceptionBreakpoints" + if arguments is None: + self.arguments = SetExceptionBreakpointsArguments() + else: + self.arguments = ( + SetExceptionBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != SetExceptionBreakpointsArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class SetExceptionBreakpointsArguments(BaseSchema): + """ + Arguments for `setExceptionBreakpoints` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "filters": { + "type": "array", + "items": {"type": "string"}, + "description": "Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive.", + }, + "filterOptions": { + "type": "array", + "items": {"$ref": "#/definitions/ExceptionFilterOptions"}, + "description": "Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is True. The `filter` and `filterOptions` sets are additive.", + }, + "exceptionOptions": { + "type": "array", + "items": {"$ref": "#/definitions/ExceptionOptions"}, + "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is True.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, filters, filterOptions=None, exceptionOptions=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array filters: Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive. + :param array filterOptions: Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive. + :param array exceptionOptions: Configuration options for selected exceptions. + The attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true. + """ + self.filters = filters + self.filterOptions = filterOptions + if update_ids_from_dap and self.filterOptions: + for o in self.filterOptions: + ExceptionFilterOptions.update_dict_ids_from_dap(o) + self.exceptionOptions = exceptionOptions + if update_ids_from_dap and self.exceptionOptions: + for o in self.exceptionOptions: + ExceptionOptions.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + filters = self.filters + if filters and hasattr(filters[0], "to_dict"): + filters = [x.to_dict() for x in filters] + filterOptions = self.filterOptions + if filterOptions and hasattr(filterOptions[0], "to_dict"): + filterOptions = [x.to_dict() for x in filterOptions] + exceptionOptions = self.exceptionOptions + if exceptionOptions and hasattr(exceptionOptions[0], "to_dict"): + exceptionOptions = [x.to_dict() for x in exceptionOptions] + dct = { + "filters": filters, + } + if filterOptions is not None: + dct["filterOptions"] = ( + [ExceptionFilterOptions.update_dict_ids_to_dap(o) for o in filterOptions] + if (update_ids_to_dap and filterOptions) + else filterOptions + ) + if exceptionOptions is not None: + dct["exceptionOptions"] = ( + [ExceptionOptions.update_dict_ids_to_dap(o) for o in exceptionOptions] + if (update_ids_to_dap and exceptionOptions) + else exceptionOptions + ) + dct.update(self.kwargs) + return dct + + +@register_response("setExceptionBreakpoints") +@register +class SetExceptionBreakpointsResponse(BaseSchema): + """ + Response to `setExceptionBreakpoints` request. + + The response contains an array of `Breakpoint` objects with information about each exception + breakpoint or filter. The `Breakpoint` objects are in the same order as the elements of the + `filters`, `filterOptions`, `exceptionOptions` arrays given as arguments. If both `filters` and + `filterOptions` are given, the returned array must start with `filters` information first, followed + by `filterOptions` information. + + The `verified` property of a `Breakpoint` object signals whether the exception breakpoint or filter + could be successfully created and whether the condition is valid. In case of an error the `message` + property explains the problem. The `id` property can be used to introduce a unique ID for the + exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events. + + For backward compatibility both the `breakpoints` array and the enclosing `body` are optional. If + these elements are missing a client is not able to show problems for individual exception + breakpoints or filters. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/Breakpoint"}, + "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information.", + } + }, + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param SetExceptionBreakpointsResponseBody body: + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + if body is None: + self.body = SetExceptionBreakpointsResponseBody() + else: + self.body = ( + SetExceptionBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != SetExceptionBreakpointsResponseBody + else body + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register_request("dataBreakpointInfo") +@register +class DataBreakpointInfoRequest(BaseSchema): + """ + Obtains information on a possible data breakpoint that could be set on an expression or variable. + + Clients should only call this request if the corresponding capability `supportsDataBreakpoints` is + true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["dataBreakpointInfo"]}, + "arguments": {"type": "DataBreakpointInfoArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param DataBreakpointInfoArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "dataBreakpointInfo" + if arguments is None: + self.arguments = DataBreakpointInfoArguments() + else: + self.arguments = ( + DataBreakpointInfoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != DataBreakpointInfoArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class DataBreakpointInfoArguments(BaseSchema): + """ + Arguments for `dataBreakpointInfo` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "variablesReference": { + "type": "integer", + "description": "Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.", + }, + "name": { + "type": "string", + "description": "The name of the variable's child to obtain data breakpoint information for.\nIf `variablesReference` isn't specified, this can be an expression.", + }, + "frameId": { + "type": "integer", + "description": "When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, name, variablesReference=None, frameId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string name: The name of the variable's child to obtain data breakpoint information for. + If `variablesReference` isn't specified, this can be an expression. + :param integer variablesReference: Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + :param integer frameId: When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect. + """ + self.name = name + self.variablesReference = variablesReference + self.frameId = frameId + if update_ids_from_dap: + self.variablesReference = self._translate_id_from_dap(self.variablesReference) + self.frameId = self._translate_id_from_dap(self.frameId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + if "frameId" in dct: + dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + name = self.name + variablesReference = self.variablesReference + frameId = self.frameId + if update_ids_to_dap: + if variablesReference is not None: + variablesReference = self._translate_id_to_dap(variablesReference) + if frameId is not None: + frameId = self._translate_id_to_dap(frameId) + dct = { + "name": name, + } + if variablesReference is not None: + dct["variablesReference"] = variablesReference + if frameId is not None: + dct["frameId"] = frameId + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + if "frameId" in dct: + dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + return dct + + +@register_response("dataBreakpointInfo") +@register +class DataBreakpointInfoResponse(BaseSchema): + """ + Response to `dataBreakpointInfo` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "dataId": { + "type": ["string", "null"], + "description": "An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`.", + }, + "description": { + "type": "string", + "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available.", + }, + "accessTypes": { + "type": "array", + "items": {"$ref": "#/definitions/DataBreakpointAccessType"}, + "description": "Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information.", + }, + "canPersist": { + "type": "boolean", + "description": "Attribute indicates that a potential data breakpoint could be persisted across sessions.", + }, + }, + "required": ["dataId", "description"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param DataBreakpointInfoResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = DataBreakpointInfoResponseBody() + else: + self.body = ( + DataBreakpointInfoResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != DataBreakpointInfoResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("setDataBreakpoints") +@register +class SetDataBreakpointsRequest(BaseSchema): + """ + Replaces all existing data breakpoints with new data breakpoints. + + To clear all data breakpoints, specify an empty array. + + When a data breakpoint is hit, a `stopped` event (with reason `data breakpoint`) is generated. + + Clients should only call this request if the corresponding capability `supportsDataBreakpoints` is + true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["setDataBreakpoints"]}, + "arguments": {"type": "SetDataBreakpointsArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param SetDataBreakpointsArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "setDataBreakpoints" + if arguments is None: + self.arguments = SetDataBreakpointsArguments() + else: + self.arguments = ( + SetDataBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != SetDataBreakpointsArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class SetDataBreakpointsArguments(BaseSchema): + """ + Arguments for `setDataBreakpoints` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/DataBreakpoint"}, + "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array breakpoints: The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints. + """ + self.breakpoints = breakpoints + if update_ids_from_dap and self.breakpoints: + for o in self.breakpoints: + DataBreakpoint.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] + dct = { + "breakpoints": [DataBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] + if (update_ids_to_dap and breakpoints) + else breakpoints, + } + dct.update(self.kwargs) + return dct + + +@register_response("setDataBreakpoints") +@register +class SetDataBreakpointsResponse(BaseSchema): + """ + Response to `setDataBreakpoints` request. + + Returned is information about each breakpoint created by this request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/Breakpoint"}, + "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array.", + } + }, + "required": ["breakpoints"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param SetDataBreakpointsResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = SetDataBreakpointsResponseBody() + else: + self.body = ( + SetDataBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != SetDataBreakpointsResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("setInstructionBreakpoints") +@register +class SetInstructionBreakpointsRequest(BaseSchema): + """ + Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from + a disassembly window. + + To clear all instruction breakpoints, specify an empty array. + + When an instruction breakpoint is hit, a `stopped` event (with reason `instruction breakpoint`) is + generated. + + Clients should only call this request if the corresponding capability + `supportsInstructionBreakpoints` is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["setInstructionBreakpoints"]}, + "arguments": {"type": "SetInstructionBreakpointsArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param SetInstructionBreakpointsArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "setInstructionBreakpoints" + if arguments is None: + self.arguments = SetInstructionBreakpointsArguments() + else: + self.arguments = ( + SetInstructionBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != SetInstructionBreakpointsArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class SetInstructionBreakpointsArguments(BaseSchema): + """ + Arguments for `setInstructionBreakpoints` request + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/InstructionBreakpoint"}, + "description": "The instruction references of the breakpoints", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array breakpoints: The instruction references of the breakpoints + """ + self.breakpoints = breakpoints + if update_ids_from_dap and self.breakpoints: + for o in self.breakpoints: + InstructionBreakpoint.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] + dct = { + "breakpoints": [InstructionBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] + if (update_ids_to_dap and breakpoints) + else breakpoints, + } + dct.update(self.kwargs) + return dct + + +@register_response("setInstructionBreakpoints") +@register +class SetInstructionBreakpointsResponse(BaseSchema): + """ + Response to `setInstructionBreakpoints` request + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/Breakpoint"}, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array.", + } + }, + "required": ["breakpoints"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param SetInstructionBreakpointsResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = SetInstructionBreakpointsResponseBody() + else: + self.body = ( + SetInstructionBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != SetInstructionBreakpointsResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("continue") +@register +class ContinueRequest(BaseSchema): + """ + The request resumes execution of all threads. If the debug adapter supports single thread execution + (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to + true resumes only the specified thread. If not all threads were resumed, the `allThreadsContinued` + attribute of the response should be set to false. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["continue"]}, + "arguments": {"type": "ContinueArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param ContinueArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "continue" + if arguments is None: + self.arguments = ContinueArguments() + else: + self.arguments = ( + ContinueArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != ContinueArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class ContinueArguments(BaseSchema): + """ + Arguments for `continue` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "threadId": { + "type": "integer", + "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is True, only the thread with this ID is resumed.", + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is True, execution is resumed only for the thread with given `threadId`.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threadId, singleThread=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer threadId: Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed. + :param boolean singleThread: If this flag is true, execution is resumed only for the thread with given `threadId`. + """ + self.threadId = threadId + self.singleThread = singleThread + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + singleThread = self.singleThread + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "threadId": threadId, + } + if singleThread is not None: + dct["singleThread"] = singleThread + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register_response("continue") +@register +class ContinueResponse(BaseSchema): + """ + Response to `continue` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "allThreadsContinued": { + "type": "boolean", + "description": "The value True (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed.", + } + }, + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param ContinueResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = ContinueResponseBody() + else: + self.body = ( + ContinueResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ContinueResponseBody else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("next") +@register +class NextRequest(BaseSchema): + """ + The request executes one step (in the given granularity) for the specified thread and allows all + other threads to run freely by resuming them. + + If the debug adapter supports single thread execution (see capability + `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other + suspended threads from resuming. + + The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the + step has completed. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["next"]}, + "arguments": {"type": "NextArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param NextArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "next" + if arguments is None: + self.arguments = NextArguments() + else: + self.arguments = ( + NextArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != NextArguments else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class NextArguments(BaseSchema): + """ + Arguments for `next` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step (of the given granularity).", + }, + "singleThread": {"type": "boolean", "description": "If this flag is True, all other suspended threads are not resumed."}, + "granularity": { + "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed.", + "type": "SteppingGranularity", + }, + } + __refs__ = set(["granularity"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threadId, singleThread=None, granularity=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer threadId: Specifies the thread for which to resume execution for one step (of the given granularity). + :param boolean singleThread: If this flag is true, all other suspended threads are not resumed. + :param SteppingGranularity granularity: Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed. + """ + self.threadId = threadId + self.singleThread = singleThread + if granularity is not None: + assert granularity in SteppingGranularity.VALID_VALUES + self.granularity = granularity + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + singleThread = self.singleThread + granularity = self.granularity + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "threadId": threadId, + } + if singleThread is not None: + dct["singleThread"] = singleThread + if granularity is not None: + dct["granularity"] = granularity + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register_response("next") +@register +class NextResponse(BaseSchema): + """ + Response to `next` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("stepIn") +@register +class StepInRequest(BaseSchema): + """ + The request resumes the given thread to step into a function/method and allows all other threads to + run freely by resuming them. + + If the debug adapter supports single thread execution (see capability + `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other + suspended threads from resuming. + + If the request cannot step into a target, `stepIn` behaves like the `next` request. + + The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the + step has completed. + + If there are multiple function/method calls (or other targets) on the source line, + + the argument `targetId` can be used to control into which target the `stepIn` should occur. + + The list of possible targets for a given source line can be retrieved via the `stepInTargets` + request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["stepIn"]}, + "arguments": {"type": "StepInArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param StepInArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "stepIn" + if arguments is None: + self.arguments = StepInArguments() + else: + self.arguments = ( + StepInArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != StepInArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class StepInArguments(BaseSchema): + """ + Arguments for `stepIn` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step-into (of the given granularity).", + }, + "singleThread": {"type": "boolean", "description": "If this flag is True, all other suspended threads are not resumed."}, + "targetId": {"type": "integer", "description": "Id of the target to step into."}, + "granularity": { + "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed.", + "type": "SteppingGranularity", + }, + } + __refs__ = set(["granularity"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threadId, singleThread=None, targetId=None, granularity=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer threadId: Specifies the thread for which to resume execution for one step-into (of the given granularity). + :param boolean singleThread: If this flag is true, all other suspended threads are not resumed. + :param integer targetId: Id of the target to step into. + :param SteppingGranularity granularity: Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed. + """ + self.threadId = threadId + self.singleThread = singleThread + self.targetId = targetId + if granularity is not None: + assert granularity in SteppingGranularity.VALID_VALUES + self.granularity = granularity + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + singleThread = self.singleThread + targetId = self.targetId + granularity = self.granularity + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "threadId": threadId, + } + if singleThread is not None: + dct["singleThread"] = singleThread + if targetId is not None: + dct["targetId"] = targetId + if granularity is not None: + dct["granularity"] = granularity + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register_response("stepIn") +@register +class StepInResponse(BaseSchema): + """ + Response to `stepIn` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("stepOut") +@register +class StepOutRequest(BaseSchema): + """ + The request resumes the given thread to step out (return) from a function/method and allows all + other threads to run freely by resuming them. + + If the debug adapter supports single thread execution (see capability + `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other + suspended threads from resuming. + + The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the + step has completed. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["stepOut"]}, + "arguments": {"type": "StepOutArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param StepOutArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "stepOut" + if arguments is None: + self.arguments = StepOutArguments() + else: + self.arguments = ( + StepOutArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != StepOutArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class StepOutArguments(BaseSchema): + """ + Arguments for `stepOut` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step-out (of the given granularity).", + }, + "singleThread": {"type": "boolean", "description": "If this flag is True, all other suspended threads are not resumed."}, + "granularity": { + "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed.", + "type": "SteppingGranularity", + }, + } + __refs__ = set(["granularity"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threadId, singleThread=None, granularity=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer threadId: Specifies the thread for which to resume execution for one step-out (of the given granularity). + :param boolean singleThread: If this flag is true, all other suspended threads are not resumed. + :param SteppingGranularity granularity: Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed. + """ + self.threadId = threadId + self.singleThread = singleThread + if granularity is not None: + assert granularity in SteppingGranularity.VALID_VALUES + self.granularity = granularity + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + singleThread = self.singleThread + granularity = self.granularity + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "threadId": threadId, + } + if singleThread is not None: + dct["singleThread"] = singleThread + if granularity is not None: + dct["granularity"] = granularity + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register_response("stepOut") +@register +class StepOutResponse(BaseSchema): + """ + Response to `stepOut` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("stepBack") +@register +class StepBackRequest(BaseSchema): + """ + The request executes one backward step (in the given granularity) for the specified thread and + allows all other threads to run backward freely by resuming them. + + If the debug adapter supports single thread execution (see capability + `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other + suspended threads from resuming. + + The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the + step has completed. + + Clients should only call this request if the corresponding capability `supportsStepBack` is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["stepBack"]}, + "arguments": {"type": "StepBackArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param StepBackArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "stepBack" + if arguments is None: + self.arguments = StepBackArguments() + else: + self.arguments = ( + StepBackArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != StepBackArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class StepBackArguments(BaseSchema): + """ + Arguments for `stepBack` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step backwards (of the given granularity).", + }, + "singleThread": {"type": "boolean", "description": "If this flag is True, all other suspended threads are not resumed."}, + "granularity": { + "description": "Stepping granularity to step. If no granularity is specified, a granularity of `statement` is assumed.", + "type": "SteppingGranularity", + }, + } + __refs__ = set(["granularity"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threadId, singleThread=None, granularity=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer threadId: Specifies the thread for which to resume execution for one step backwards (of the given granularity). + :param boolean singleThread: If this flag is true, all other suspended threads are not resumed. + :param SteppingGranularity granularity: Stepping granularity to step. If no granularity is specified, a granularity of `statement` is assumed. + """ + self.threadId = threadId + self.singleThread = singleThread + if granularity is not None: + assert granularity in SteppingGranularity.VALID_VALUES + self.granularity = granularity + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + singleThread = self.singleThread + granularity = self.granularity + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "threadId": threadId, + } + if singleThread is not None: + dct["singleThread"] = singleThread + if granularity is not None: + dct["granularity"] = granularity + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register_response("stepBack") +@register +class StepBackResponse(BaseSchema): + """ + Response to `stepBack` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("reverseContinue") +@register +class ReverseContinueRequest(BaseSchema): + """ + The request resumes backward execution of all threads. If the debug adapter supports single thread + execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` + argument to true resumes only the specified thread. If not all threads were resumed, the + `allThreadsContinued` attribute of the response should be set to false. + + Clients should only call this request if the corresponding capability `supportsStepBack` is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["reverseContinue"]}, + "arguments": {"type": "ReverseContinueArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param ReverseContinueArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "reverseContinue" + if arguments is None: + self.arguments = ReverseContinueArguments() + else: + self.arguments = ( + ReverseContinueArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != ReverseContinueArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class ReverseContinueArguments(BaseSchema): + """ + Arguments for `reverseContinue` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "threadId": { + "type": "integer", + "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is True, only the thread with this ID is resumed.", + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is True, backward execution is resumed only for the thread with given `threadId`.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threadId, singleThread=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer threadId: Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed. + :param boolean singleThread: If this flag is true, backward execution is resumed only for the thread with given `threadId`. + """ + self.threadId = threadId + self.singleThread = singleThread + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + singleThread = self.singleThread + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "threadId": threadId, + } + if singleThread is not None: + dct["singleThread"] = singleThread + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register_response("reverseContinue") +@register +class ReverseContinueResponse(BaseSchema): + """ + Response to `reverseContinue` request. This is just an acknowledgement, so no body field is + required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("restartFrame") +@register +class RestartFrameRequest(BaseSchema): + """ + The request restarts execution of the specified stack frame. + + The debug adapter first sends the response and then a `stopped` event (with reason `restart`) after + the restart has completed. + + Clients should only call this request if the corresponding capability `supportsRestartFrame` is + true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["restartFrame"]}, + "arguments": {"type": "RestartFrameArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param RestartFrameArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "restartFrame" + if arguments is None: + self.arguments = RestartFrameArguments() + else: + self.arguments = ( + RestartFrameArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != RestartFrameArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class RestartFrameArguments(BaseSchema): + """ + Arguments for `restartFrame` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "frameId": { + "type": "integer", + "description": "Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, frameId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer frameId: Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + """ + self.frameId = frameId + if update_ids_from_dap: + self.frameId = self._translate_id_from_dap(self.frameId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "frameId" in dct: + dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + frameId = self.frameId + if update_ids_to_dap: + if frameId is not None: + frameId = self._translate_id_to_dap(frameId) + dct = { + "frameId": frameId, + } + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "frameId" in dct: + dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + return dct + + +@register_response("restartFrame") +@register +class RestartFrameResponse(BaseSchema): + """ + Response to `restartFrame` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("goto") +@register +class GotoRequest(BaseSchema): + """ + The request sets the location where the debuggee will continue to run. + + This makes it possible to skip the execution of code or to execute code again. + + The code between the current location and the goto target is not executed but skipped. + + The debug adapter first sends the response and then a `stopped` event with reason `goto`. + + Clients should only call this request if the corresponding capability `supportsGotoTargetsRequest` + is true (because only then goto targets exist that can be passed as arguments). + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["goto"]}, + "arguments": {"type": "GotoArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param GotoArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "goto" + if arguments is None: + self.arguments = GotoArguments() + else: + self.arguments = ( + GotoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != GotoArguments else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class GotoArguments(BaseSchema): + """ + Arguments for `goto` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "threadId": {"type": "integer", "description": "Set the goto target for this thread."}, + "targetId": {"type": "integer", "description": "The location where the debuggee will continue to run."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threadId, targetId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer threadId: Set the goto target for this thread. + :param integer targetId: The location where the debuggee will continue to run. + """ + self.threadId = threadId + self.targetId = targetId + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + targetId = self.targetId + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "threadId": threadId, + "targetId": targetId, + } + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register_response("goto") +@register +class GotoResponse(BaseSchema): + """ + Response to `goto` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("pause") +@register +class PauseRequest(BaseSchema): + """ + The request suspends the debuggee. + + The debug adapter first sends the response and then a `stopped` event (with reason `pause`) after + the thread has been paused successfully. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["pause"]}, + "arguments": {"type": "PauseArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param PauseArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "pause" + if arguments is None: + self.arguments = PauseArguments() + else: + self.arguments = ( + PauseArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != PauseArguments else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class PauseArguments(BaseSchema): + """ + Arguments for `pause` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"threadId": {"type": "integer", "description": "Pause execution for this thread."}} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threadId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer threadId: Pause execution for this thread. + """ + self.threadId = threadId + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "threadId": threadId, + } + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register_response("pause") +@register +class PauseResponse(BaseSchema): + """ + Response to `pause` request. This is just an acknowledgement, so no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("stackTrace") +@register +class StackTraceRequest(BaseSchema): + """ + The request returns a stacktrace from the current execution state of a given thread. + + A client can request all stack frames by omitting the startFrame and levels arguments. For + performance-conscious clients and if the corresponding capability `supportsDelayedStackTraceLoading` + is true, stack frames can be retrieved in a piecemeal way with the `startFrame` and `levels` + arguments. The response of the `stackTrace` request may contain a `totalFrames` property that hints + at the total number of frames in the stack. If a client needs this total number upfront, it can + issue a request for a single (first) frame and depending on the value of `totalFrames` decide how to + proceed. In any case a client should be prepared to receive fewer frames than requested, which is an + indication that the end of the stack has been reached. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["stackTrace"]}, + "arguments": {"type": "StackTraceArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param StackTraceArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "stackTrace" + if arguments is None: + self.arguments = StackTraceArguments() + else: + self.arguments = ( + StackTraceArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != StackTraceArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class StackTraceArguments(BaseSchema): + """ + Arguments for `stackTrace` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "threadId": {"type": "integer", "description": "Retrieve the stacktrace for this thread."}, + "startFrame": {"type": "integer", "description": "The index of the first frame to return; if omitted frames start at 0."}, + "levels": { + "type": "integer", + "description": "The maximum number of frames to return. If levels is not specified or 0, all frames are returned.", + }, + "format": { + "description": "Specifies details on how to format the stack frames.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is True.", + "type": "StackFrameFormat", + }, + } + __refs__ = set(["format"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threadId, startFrame=None, levels=None, format=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer threadId: Retrieve the stacktrace for this thread. + :param integer startFrame: The index of the first frame to return; if omitted frames start at 0. + :param integer levels: The maximum number of frames to return. If levels is not specified or 0, all frames are returned. + :param StackFrameFormat format: Specifies details on how to format the stack frames. + The attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true. + """ + self.threadId = threadId + self.startFrame = startFrame + self.levels = levels + if format is None: + self.format = StackFrameFormat() + else: + self.format = ( + StackFrameFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != StackFrameFormat else format + ) + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + startFrame = self.startFrame + levels = self.levels + format = self.format # noqa (assign to builtin) + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "threadId": threadId, + } + if startFrame is not None: + dct["startFrame"] = startFrame + if levels is not None: + dct["levels"] = levels + if format is not None: + dct["format"] = format.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register_response("stackTrace") +@register +class StackTraceResponse(BaseSchema): + """ + Response to `stackTrace` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "stackFrames": { + "type": "array", + "items": {"$ref": "#/definitions/StackFrame"}, + "description": "The frames of the stack frame. If the array has length zero, there are no stack frames available.\nThis means that there is no location information available.", + }, + "totalFrames": { + "type": "integer", + "description": "The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client.", + }, + }, + "required": ["stackFrames"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param StackTraceResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = StackTraceResponseBody() + else: + self.body = ( + StackTraceResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != StackTraceResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("scopes") +@register +class ScopesRequest(BaseSchema): + """ + The request returns the variable scopes for a given stack frame ID. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["scopes"]}, + "arguments": {"type": "ScopesArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param ScopesArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "scopes" + if arguments is None: + self.arguments = ScopesArguments() + else: + self.arguments = ( + ScopesArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != ScopesArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class ScopesArguments(BaseSchema): + """ + Arguments for `scopes` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "frameId": { + "type": "integer", + "description": "Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, frameId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer frameId: Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + """ + self.frameId = frameId + if update_ids_from_dap: + self.frameId = self._translate_id_from_dap(self.frameId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "frameId" in dct: + dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + frameId = self.frameId + if update_ids_to_dap: + if frameId is not None: + frameId = self._translate_id_to_dap(frameId) + dct = { + "frameId": frameId, + } + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "frameId" in dct: + dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + return dct + + +@register_response("scopes") +@register +class ScopesResponse(BaseSchema): + """ + Response to `scopes` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "items": {"$ref": "#/definitions/Scope"}, + "description": "The scopes of the stack frame. If the array has length zero, there are no scopes available.", + } + }, + "required": ["scopes"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param ScopesResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = ScopesResponseBody() + else: + self.body = ( + ScopesResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ScopesResponseBody else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("variables") +@register +class VariablesRequest(BaseSchema): + """ + Retrieves all child variables for the given variable reference. + + A filter can be used to limit the fetched children to either named or indexed children. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["variables"]}, + "arguments": {"type": "VariablesArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param VariablesArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "variables" + if arguments is None: + self.arguments = VariablesArguments() + else: + self.arguments = ( + VariablesArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != VariablesArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class VariablesArguments(BaseSchema): + """ + Arguments for `variables` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "variablesReference": { + "type": "integer", + "description": "The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.", + }, + "filter": { + "type": "string", + "enum": ["indexed", "named"], + "description": "Filter to limit the child variables to either named or indexed. If omitted, both types are fetched.", + }, + "start": { + "type": "integer", + "description": "The index of the first variable to return; if omitted children start at 0.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is True.", + }, + "count": { + "type": "integer", + "description": "The number of variables to return. If count is missing or 0, all variables are returned.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is True.", + }, + "format": { + "description": "Specifies details on how to format the Variable values.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is True.", + "type": "ValueFormat", + }, + } + __refs__ = set(["format"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, variablesReference, filter=None, start=None, count=None, format=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer variablesReference: The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + :param string filter: Filter to limit the child variables to either named or indexed. If omitted, both types are fetched. + :param integer start: The index of the first variable to return; if omitted children start at 0. + The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. + :param integer count: The number of variables to return. If count is missing or 0, all variables are returned. + The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true. + :param ValueFormat format: Specifies details on how to format the Variable values. + The attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true. + """ + self.variablesReference = variablesReference + self.filter = filter + self.start = start + self.count = count + if format is None: + self.format = ValueFormat() + else: + self.format = ValueFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != ValueFormat else format + if update_ids_from_dap: + self.variablesReference = self._translate_id_from_dap(self.variablesReference) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + variablesReference = self.variablesReference + filter = self.filter # noqa (assign to builtin) + start = self.start + count = self.count + format = self.format # noqa (assign to builtin) + if update_ids_to_dap: + if variablesReference is not None: + variablesReference = self._translate_id_to_dap(variablesReference) + dct = { + "variablesReference": variablesReference, + } + if filter is not None: + dct["filter"] = filter + if start is not None: + dct["start"] = start + if count is not None: + dct["count"] = count + if format is not None: + dct["format"] = format.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + return dct + + +@register_response("variables") +@register +class VariablesResponse(BaseSchema): + """ + Response to `variables` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "variables": { + "type": "array", + "items": {"$ref": "#/definitions/Variable"}, + "description": "All (or a range) of variables for the given variable reference.", + } + }, + "required": ["variables"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param VariablesResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = VariablesResponseBody() + else: + self.body = ( + VariablesResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != VariablesResponseBody else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("setVariable") +@register +class SetVariableRequest(BaseSchema): + """ + Set the variable with the given name in the variable container to a new value. Clients should only + call this request if the corresponding capability `supportsSetVariable` is true. + + If a debug adapter implements both `setVariable` and `setExpression`, a client will only use + `setExpression` if the variable has an `evaluateName` property. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["setVariable"]}, + "arguments": {"type": "SetVariableArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param SetVariableArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "setVariable" + if arguments is None: + self.arguments = SetVariableArguments() + else: + self.arguments = ( + SetVariableArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != SetVariableArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class SetVariableArguments(BaseSchema): + """ + Arguments for `setVariable` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "variablesReference": { + "type": "integer", + "description": "The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.", + }, + "name": {"type": "string", "description": "The name of the variable in the container."}, + "value": {"type": "string", "description": "The value of the variable."}, + "format": {"description": "Specifies details on how to format the response value.", "type": "ValueFormat"}, + } + __refs__ = set(["format"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, variablesReference, name, value, format=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer variablesReference: The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. + :param string name: The name of the variable in the container. + :param string value: The value of the variable. + :param ValueFormat format: Specifies details on how to format the response value. + """ + self.variablesReference = variablesReference + self.name = name + self.value = value + if format is None: + self.format = ValueFormat() + else: + self.format = ValueFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != ValueFormat else format + if update_ids_from_dap: + self.variablesReference = self._translate_id_from_dap(self.variablesReference) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + variablesReference = self.variablesReference + name = self.name + value = self.value + format = self.format # noqa (assign to builtin) + if update_ids_to_dap: + if variablesReference is not None: + variablesReference = self._translate_id_to_dap(variablesReference) + dct = { + "variablesReference": variablesReference, + "name": name, + "value": value, + } + if format is not None: + dct["format"] = format.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + return dct + + +@register_response("setVariable") +@register +class SetVariableResponse(BaseSchema): + """ + Response to `setVariable` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "value": {"type": "string", "description": "The new value of the variable."}, + "type": { + "type": "string", + "description": "The type of the new value. Typically shown in the UI when hovering over the value.", + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", + }, + }, + "required": ["value"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param SetVariableResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = SetVariableResponseBody() + else: + self.body = ( + SetVariableResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != SetVariableResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("source") +@register +class SourceRequest(BaseSchema): + """ + The request retrieves the source code for a given source reference. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["source"]}, + "arguments": {"type": "SourceArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param SourceArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "source" + if arguments is None: + self.arguments = SourceArguments() + else: + self.arguments = ( + SourceArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != SourceArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class SourceArguments(BaseSchema): + """ + Arguments for `source` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "source": { + "description": "Specifies the source content to load. Either `source.path` or `source.sourceReference` must be specified.", + "type": "Source", + }, + "sourceReference": { + "type": "integer", + "description": "The reference to the source. This is the same as `source.sourceReference`.\nThis is provided for backward compatibility since old clients do not understand the `source` attribute.", + }, + } + __refs__ = set(["source"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, sourceReference, source=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer sourceReference: The reference to the source. This is the same as `source.sourceReference`. + This is provided for backward compatibility since old clients do not understand the `source` attribute. + :param Source source: Specifies the source content to load. Either `source.path` or `source.sourceReference` must be specified. + """ + self.sourceReference = sourceReference + if source is None: + self.source = Source() + else: + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + sourceReference = self.sourceReference + source = self.source + dct = { + "sourceReference": sourceReference, + } + if source is not None: + dct["source"] = source.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register_response("source") +@register +class SourceResponse(BaseSchema): + """ + Response to `source` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "content": {"type": "string", "description": "Content of the source reference."}, + "mimeType": {"type": "string", "description": "Content type (MIME type) of the source."}, + }, + "required": ["content"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param SourceResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = SourceResponseBody() + else: + self.body = ( + SourceResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SourceResponseBody else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("threads") +@register +class ThreadsRequest(BaseSchema): + """ + The request retrieves a list of all threads. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["threads"]}, + "arguments": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Object containing arguments for the command.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] arguments: Object containing arguments for the command. + """ + self.type = "request" + self.command = "threads" + self.seq = seq + self.arguments = arguments + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + seq = self.seq + arguments = self.arguments + dct = { + "type": type, + "command": command, + "seq": seq, + } + if arguments is not None: + dct["arguments"] = arguments + dct.update(self.kwargs) + return dct + + +@register_response("threads") +@register +class ThreadsResponse(BaseSchema): + """ + Response to `threads` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": {"threads": {"type": "array", "items": {"$ref": "#/definitions/Thread"}, "description": "All threads."}}, + "required": ["threads"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param ThreadsResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = ThreadsResponseBody() + else: + self.body = ( + ThreadsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ThreadsResponseBody else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("terminateThreads") +@register +class TerminateThreadsRequest(BaseSchema): + """ + The request terminates the threads with the given ids. + + Clients should only call this request if the corresponding capability + `supportsTerminateThreadsRequest` is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["terminateThreads"]}, + "arguments": {"type": "TerminateThreadsArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param TerminateThreadsArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "terminateThreads" + if arguments is None: + self.arguments = TerminateThreadsArguments() + else: + self.arguments = ( + TerminateThreadsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != TerminateThreadsArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class TerminateThreadsArguments(BaseSchema): + """ + Arguments for `terminateThreads` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"threadIds": {"type": "array", "items": {"type": "integer"}, "description": "Ids of threads to be terminated."}} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threadIds=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array threadIds: Ids of threads to be terminated. + """ + self.threadIds = threadIds + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadIds = self.threadIds + if threadIds and hasattr(threadIds[0], "to_dict"): + threadIds = [x.to_dict() for x in threadIds] + dct = {} + if threadIds is not None: + dct["threadIds"] = threadIds + dct.update(self.kwargs) + return dct + + +@register_response("terminateThreads") +@register +class TerminateThreadsResponse(BaseSchema): + """ + Response to `terminateThreads` request. This is just an acknowledgement, no body field is required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("modules") +@register +class ModulesRequest(BaseSchema): + """ + Modules can be retrieved from the debug adapter with this request which can either return all + modules or a range of modules to support paging. + + Clients should only call this request if the corresponding capability `supportsModulesRequest` is + true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["modules"]}, + "arguments": {"type": "ModulesArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param ModulesArguments arguments: + """ + self.type = "request" + self.command = "modules" + self.seq = seq + if arguments is None: + self.arguments = ModulesArguments() + else: + self.arguments = ( + ModulesArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != ModulesArguments + else arguments + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + seq = self.seq + arguments = self.arguments + dct = { + "type": type, + "command": command, + "seq": seq, + } + if arguments is not None: + dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class ModulesArguments(BaseSchema): + """ + Arguments for `modules` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "startModule": {"type": "integer", "description": "The index of the first module to return; if omitted modules start at 0."}, + "moduleCount": { + "type": "integer", + "description": "The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, startModule=None, moduleCount=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer startModule: The index of the first module to return; if omitted modules start at 0. + :param integer moduleCount: The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned. + """ + self.startModule = startModule + self.moduleCount = moduleCount + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + startModule = self.startModule + moduleCount = self.moduleCount + dct = {} + if startModule is not None: + dct["startModule"] = startModule + if moduleCount is not None: + dct["moduleCount"] = moduleCount + dct.update(self.kwargs) + return dct + + +@register_response("modules") +@register +class ModulesResponse(BaseSchema): + """ + Response to `modules` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "modules": {"type": "array", "items": {"$ref": "#/definitions/Module"}, "description": "All modules or range of modules."}, + "totalModules": {"type": "integer", "description": "The total number of modules available."}, + }, + "required": ["modules"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param ModulesResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = ModulesResponseBody() + else: + self.body = ( + ModulesResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ModulesResponseBody else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("loadedSources") +@register +class LoadedSourcesRequest(BaseSchema): + """ + Retrieves the set of all sources currently loaded by the debugged process. + + Clients should only call this request if the corresponding capability `supportsLoadedSourcesRequest` + is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["loadedSources"]}, + "arguments": {"type": "LoadedSourcesArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param LoadedSourcesArguments arguments: + """ + self.type = "request" + self.command = "loadedSources" + self.seq = seq + if arguments is None: + self.arguments = LoadedSourcesArguments() + else: + self.arguments = ( + LoadedSourcesArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != LoadedSourcesArguments + else arguments + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + seq = self.seq + arguments = self.arguments + dct = { + "type": type, + "command": command, + "seq": seq, + } + if arguments is not None: + dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class LoadedSourcesArguments(BaseSchema): + """ + Arguments for `loadedSources` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ """ + + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = {} + dct.update(self.kwargs) + return dct + + +@register_response("loadedSources") +@register +class LoadedSourcesResponse(BaseSchema): + """ + Response to `loadedSources` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "sources": {"type": "array", "items": {"$ref": "#/definitions/Source"}, "description": "Set of loaded sources."} + }, + "required": ["sources"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param LoadedSourcesResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = LoadedSourcesResponseBody() + else: + self.body = ( + LoadedSourcesResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != LoadedSourcesResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("evaluate") +@register +class EvaluateRequest(BaseSchema): + """ + Evaluates the given expression in the context of the topmost stack frame. + + The expression has access to any variables and arguments that are in scope. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["evaluate"]}, + "arguments": {"type": "EvaluateArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param EvaluateArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "evaluate" + if arguments is None: + self.arguments = EvaluateArguments() + else: + self.arguments = ( + EvaluateArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != EvaluateArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class EvaluateArguments(BaseSchema): + """ + Arguments for `evaluate` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "expression": {"type": "string", "description": "The expression to evaluate."}, + "frameId": { + "type": "integer", + "description": "Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope.", + }, + "context": { + "type": "string", + "_enum": ["watch", "repl", "hover", "clipboard", "variables"], + "enumDescriptions": [ + "evaluate is called from a watch view context.", + "evaluate is called from a REPL context.", + "evaluate is called to generate the debug hover contents.\nThis value should only be used if the corresponding capability `supportsEvaluateForHovers` is True.", + "evaluate is called to generate clipboard contents.\nThis value should only be used if the corresponding capability `supportsClipboardContext` is True.", + "evaluate is called from a variables view context.", + ], + "description": "The context in which the evaluate request is used.", + }, + "format": { + "description": "Specifies details on how to format the result.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is True.", + "type": "ValueFormat", + }, + } + __refs__ = set(["format"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, expression, frameId=None, context=None, format=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string expression: The expression to evaluate. + :param integer frameId: Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. + :param string context: The context in which the evaluate request is used. + :param ValueFormat format: Specifies details on how to format the result. + The attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true. + """ + self.expression = expression + self.frameId = frameId + self.context = context + if format is None: + self.format = ValueFormat() + else: + self.format = ValueFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != ValueFormat else format + if update_ids_from_dap: + self.frameId = self._translate_id_from_dap(self.frameId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "frameId" in dct: + dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + expression = self.expression + frameId = self.frameId + context = self.context + format = self.format # noqa (assign to builtin) + if update_ids_to_dap: + if frameId is not None: + frameId = self._translate_id_to_dap(frameId) + dct = { + "expression": expression, + } + if frameId is not None: + dct["frameId"] = frameId + if context is not None: + dct["context"] = context + if format is not None: + dct["format"] = format.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "frameId" in dct: + dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + return dct + + +@register_response("evaluate") +@register +class EvaluateResponse(BaseSchema): + """ + Response to `evaluate` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "result": {"type": "string", "description": "The result of the evaluate request."}, + "type": { + "type": "string", + "description": "The type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True.", + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of an evaluate result that can be used to determine how to render the result in the UI.", + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", + }, + }, + "required": ["result", "variablesReference"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param EvaluateResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = EvaluateResponseBody() + else: + self.body = ( + EvaluateResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != EvaluateResponseBody else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("setExpression") +@register +class SetExpressionRequest(BaseSchema): + """ + Evaluates the given `value` expression and assigns it to the `expression` which must be a modifiable + l-value. + + The expressions have access to any variables and arguments that are in scope of the specified frame. + + Clients should only call this request if the corresponding capability `supportsSetExpression` is + true. + + If a debug adapter implements both `setExpression` and `setVariable`, a client uses `setExpression` + if the variable has an `evaluateName` property. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["setExpression"]}, + "arguments": {"type": "SetExpressionArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param SetExpressionArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "setExpression" + if arguments is None: + self.arguments = SetExpressionArguments() + else: + self.arguments = ( + SetExpressionArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != SetExpressionArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class SetExpressionArguments(BaseSchema): + """ + Arguments for `setExpression` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "expression": {"type": "string", "description": "The l-value expression to assign to."}, + "value": {"type": "string", "description": "The value expression to assign to the l-value expression."}, + "frameId": { + "type": "integer", + "description": "Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope.", + }, + "format": {"description": "Specifies how the resulting value should be formatted.", "type": "ValueFormat"}, + } + __refs__ = set(["format"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, expression, value, frameId=None, format=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string expression: The l-value expression to assign to. + :param string value: The value expression to assign to the l-value expression. + :param integer frameId: Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope. + :param ValueFormat format: Specifies how the resulting value should be formatted. + """ + self.expression = expression + self.value = value + self.frameId = frameId + if format is None: + self.format = ValueFormat() + else: + self.format = ValueFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != ValueFormat else format + if update_ids_from_dap: + self.frameId = self._translate_id_from_dap(self.frameId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "frameId" in dct: + dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + expression = self.expression + value = self.value + frameId = self.frameId + format = self.format # noqa (assign to builtin) + if update_ids_to_dap: + if frameId is not None: + frameId = self._translate_id_to_dap(frameId) + dct = { + "expression": expression, + "value": value, + } + if frameId is not None: + dct["frameId"] = frameId + if format is not None: + dct["format"] = format.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "frameId" in dct: + dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + return dct + + +@register_response("setExpression") +@register +class SetExpressionResponse(BaseSchema): + """ + Response to `setExpression` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "value": {"type": "string", "description": "The new value of the expression."}, + "type": { + "type": "string", + "description": "The type of the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True.", + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a value that can be used to determine how to render the result in the UI.", + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", + }, + }, + "required": ["value"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param SetExpressionResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = SetExpressionResponseBody() + else: + self.body = ( + SetExpressionResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != SetExpressionResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("stepInTargets") +@register +class StepInTargetsRequest(BaseSchema): + """ + This request retrieves the possible step-in targets for the specified stack frame. + + These targets can be used in the `stepIn` request. + + Clients should only call this request if the corresponding capability `supportsStepInTargetsRequest` + is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["stepInTargets"]}, + "arguments": {"type": "StepInTargetsArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param StepInTargetsArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "stepInTargets" + if arguments is None: + self.arguments = StepInTargetsArguments() + else: + self.arguments = ( + StepInTargetsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != StepInTargetsArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class StepInTargetsArguments(BaseSchema): + """ + Arguments for `stepInTargets` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"frameId": {"type": "integer", "description": "The stack frame for which to retrieve the possible step-in targets."}} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, frameId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer frameId: The stack frame for which to retrieve the possible step-in targets. + """ + self.frameId = frameId + if update_ids_from_dap: + self.frameId = self._translate_id_from_dap(self.frameId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "frameId" in dct: + dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + frameId = self.frameId + if update_ids_to_dap: + if frameId is not None: + frameId = self._translate_id_to_dap(frameId) + dct = { + "frameId": frameId, + } + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "frameId" in dct: + dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + return dct + + +@register_response("stepInTargets") +@register +class StepInTargetsResponse(BaseSchema): + """ + Response to `stepInTargets` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": {"$ref": "#/definitions/StepInTarget"}, + "description": "The possible step-in targets of the specified source location.", + } + }, + "required": ["targets"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param StepInTargetsResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = StepInTargetsResponseBody() + else: + self.body = ( + StepInTargetsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != StepInTargetsResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("gotoTargets") +@register +class GotoTargetsRequest(BaseSchema): + """ + This request retrieves the possible goto targets for the specified source location. + + These targets can be used in the `goto` request. + + Clients should only call this request if the corresponding capability `supportsGotoTargetsRequest` + is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["gotoTargets"]}, + "arguments": {"type": "GotoTargetsArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param GotoTargetsArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "gotoTargets" + if arguments is None: + self.arguments = GotoTargetsArguments() + else: + self.arguments = ( + GotoTargetsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != GotoTargetsArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class GotoTargetsArguments(BaseSchema): + """ + Arguments for `gotoTargets` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "source": {"description": "The source location for which the goto targets are determined.", "type": "Source"}, + "line": {"type": "integer", "description": "The line location for which the goto targets are determined."}, + "column": { + "type": "integer", + "description": "The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + } + __refs__ = set(["source"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, source, line, column=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param Source source: The source location for which the goto targets are determined. + :param integer line: The line location for which the goto targets are determined. + :param integer column: The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + """ + if source is None: + self.source = Source() + else: + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.line = line + self.column = column + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + source = self.source + line = self.line + column = self.column + dct = { + "source": source.to_dict(update_ids_to_dap=update_ids_to_dap), + "line": line, + } + if column is not None: + dct["column"] = column + dct.update(self.kwargs) + return dct + + +@register_response("gotoTargets") +@register +class GotoTargetsResponse(BaseSchema): + """ + Response to `gotoTargets` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": {"$ref": "#/definitions/GotoTarget"}, + "description": "The possible goto targets of the specified location.", + } + }, + "required": ["targets"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param GotoTargetsResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = GotoTargetsResponseBody() + else: + self.body = ( + GotoTargetsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != GotoTargetsResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("completions") +@register +class CompletionsRequest(BaseSchema): + """ + Returns a list of possible completions for a given caret position and text. + + Clients should only call this request if the corresponding capability `supportsCompletionsRequest` + is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["completions"]}, + "arguments": {"type": "CompletionsArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param CompletionsArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "completions" + if arguments is None: + self.arguments = CompletionsArguments() + else: + self.arguments = ( + CompletionsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != CompletionsArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class CompletionsArguments(BaseSchema): + """ + Arguments for `completions` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "frameId": { + "type": "integer", + "description": "Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope.", + }, + "text": { + "type": "string", + "description": "One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion.", + }, + "column": { + "type": "integer", + "description": "The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + "line": { + "type": "integer", + "description": "A line for which to determine the completion proposals. If missing the first line of the text is assumed.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, text, column, frameId=None, line=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string text: One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion. + :param integer column: The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + :param integer frameId: Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope. + :param integer line: A line for which to determine the completion proposals. If missing the first line of the text is assumed. + """ + self.text = text + self.column = column + self.frameId = frameId + self.line = line + if update_ids_from_dap: + self.frameId = self._translate_id_from_dap(self.frameId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "frameId" in dct: + dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + text = self.text + column = self.column + frameId = self.frameId + line = self.line + if update_ids_to_dap: + if frameId is not None: + frameId = self._translate_id_to_dap(frameId) + dct = { + "text": text, + "column": column, + } + if frameId is not None: + dct["frameId"] = frameId + if line is not None: + dct["line"] = line + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "frameId" in dct: + dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + return dct + + +@register_response("completions") +@register +class CompletionsResponse(BaseSchema): + """ + Response to `completions` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": {"$ref": "#/definitions/CompletionItem"}, + "description": "The possible completions for .", + } + }, + "required": ["targets"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param CompletionsResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = CompletionsResponseBody() + else: + self.body = ( + CompletionsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != CompletionsResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("exceptionInfo") +@register +class ExceptionInfoRequest(BaseSchema): + """ + Retrieves the details of the exception that caused this event to be raised. + + Clients should only call this request if the corresponding capability `supportsExceptionInfoRequest` + is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["exceptionInfo"]}, + "arguments": {"type": "ExceptionInfoArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param ExceptionInfoArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "exceptionInfo" + if arguments is None: + self.arguments = ExceptionInfoArguments() + else: + self.arguments = ( + ExceptionInfoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != ExceptionInfoArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class ExceptionInfoArguments(BaseSchema): + """ + Arguments for `exceptionInfo` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"threadId": {"type": "integer", "description": "Thread for which exception information should be retrieved."}} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threadId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer threadId: Thread for which exception information should be retrieved. + """ + self.threadId = threadId + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "threadId": threadId, + } + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register_response("exceptionInfo") +@register +class ExceptionInfoResponse(BaseSchema): + """ + Response to `exceptionInfo` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "exceptionId": {"type": "string", "description": "ID of the exception that was thrown."}, + "description": {"type": "string", "description": "Descriptive text for the exception."}, + "breakMode": { + "$ref": "#/definitions/ExceptionBreakMode", + "description": "Mode that caused the exception notification to be raised.", + }, + "details": {"$ref": "#/definitions/ExceptionDetails", "description": "Detailed information about the exception."}, + }, + "required": ["exceptionId", "breakMode"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param ExceptionInfoResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = ExceptionInfoResponseBody() + else: + self.body = ( + ExceptionInfoResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != ExceptionInfoResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register_request("readMemory") +@register +class ReadMemoryRequest(BaseSchema): + """ + Reads bytes from memory at the provided location. + + Clients should only call this request if the corresponding capability `supportsReadMemoryRequest` is + true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["readMemory"]}, + "arguments": {"type": "ReadMemoryArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param ReadMemoryArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "readMemory" + if arguments is None: + self.arguments = ReadMemoryArguments() + else: + self.arguments = ( + ReadMemoryArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != ReadMemoryArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class ReadMemoryArguments(BaseSchema): + """ + Arguments for `readMemory` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "memoryReference": {"type": "string", "description": "Memory reference to the base location from which data should be read."}, + "offset": { + "type": "integer", + "description": "Offset (in bytes) to be applied to the reference location before reading data. Can be negative.", + }, + "count": {"type": "integer", "description": "Number of bytes to read at the specified location and offset."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, memoryReference, count, offset=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string memoryReference: Memory reference to the base location from which data should be read. + :param integer count: Number of bytes to read at the specified location and offset. + :param integer offset: Offset (in bytes) to be applied to the reference location before reading data. Can be negative. + """ + self.memoryReference = memoryReference + self.count = count + self.offset = offset + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + memoryReference = self.memoryReference + count = self.count + offset = self.offset + dct = { + "memoryReference": memoryReference, + "count": count, + } + if offset is not None: + dct["offset"] = offset + dct.update(self.kwargs) + return dct + + +@register_response("readMemory") +@register +class ReadMemoryResponse(BaseSchema): + """ + Response to `readMemory` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with `0x`, or as a decimal value otherwise.", + }, + "unreadableBytes": { + "type": "integer", + "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds.", + }, + "data": { + "type": "string", + "description": "The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory.", + }, + }, + "required": ["address"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ReadMemoryResponseBody body: + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + if body is None: + self.body = ReadMemoryResponseBody() + else: + self.body = ( + ReadMemoryResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != ReadMemoryResponseBody + else body + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register_request("writeMemory") +@register +class WriteMemoryRequest(BaseSchema): + """ + Writes bytes to memory at the provided location. + + Clients should only call this request if the corresponding capability `supportsWriteMemoryRequest` + is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["writeMemory"]}, + "arguments": {"type": "WriteMemoryArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param WriteMemoryArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "writeMemory" + if arguments is None: + self.arguments = WriteMemoryArguments() + else: + self.arguments = ( + WriteMemoryArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != WriteMemoryArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class WriteMemoryArguments(BaseSchema): + """ + Arguments for `writeMemory` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "memoryReference": {"type": "string", "description": "Memory reference to the base location to which data should be written."}, + "offset": { + "type": "integer", + "description": "Offset (in bytes) to be applied to the reference location before writing data. Can be negative.", + }, + "allowPartial": { + "type": "boolean", + "description": "Property to control partial writes. If True, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties.\nIf false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not.", + }, + "data": {"type": "string", "description": "Bytes to write, encoded using base64."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, memoryReference, data, offset=None, allowPartial=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string memoryReference: Memory reference to the base location to which data should be written. + :param string data: Bytes to write, encoded using base64. + :param integer offset: Offset (in bytes) to be applied to the reference location before writing data. Can be negative. + :param boolean allowPartial: Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties. + If false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not. + """ + self.memoryReference = memoryReference + self.data = data + self.offset = offset + self.allowPartial = allowPartial + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + memoryReference = self.memoryReference + data = self.data + offset = self.offset + allowPartial = self.allowPartial + dct = { + "memoryReference": memoryReference, + "data": data, + } + if offset is not None: + dct["offset"] = offset + if allowPartial is not None: + dct["allowPartial"] = allowPartial + dct.update(self.kwargs) + return dct + + +@register_response("writeMemory") +@register +class WriteMemoryResponse(BaseSchema): + """ + Response to `writeMemory` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "offset": { + "type": "integer", + "description": "Property that should be returned when `allowPartial` is True to indicate the offset of the first byte of data successfully written. Can be negative.", + }, + "bytesWritten": { + "type": "integer", + "description": "Property that should be returned when `allowPartial` is True to indicate the number of bytes starting from address that were successfully written.", + }, + }, + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param WriteMemoryResponseBody body: + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + if body is None: + self.body = WriteMemoryResponseBody() + else: + self.body = ( + WriteMemoryResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != WriteMemoryResponseBody + else body + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register_request("disassemble") +@register +class DisassembleRequest(BaseSchema): + """ + Disassembles code stored at the provided location. + + Clients should only call this request if the corresponding capability `supportsDisassembleRequest` + is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["disassemble"]}, + "arguments": {"type": "DisassembleArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param DisassembleArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "disassemble" + if arguments is None: + self.arguments = DisassembleArguments() + else: + self.arguments = ( + DisassembleArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != DisassembleArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class DisassembleArguments(BaseSchema): + """ + Arguments for `disassemble` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location containing the instructions to disassemble.", + }, + "offset": { + "type": "integer", + "description": "Offset (in bytes) to be applied to the reference location before disassembling. Can be negative.", + }, + "instructionOffset": { + "type": "integer", + "description": "Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative.", + }, + "instructionCount": { + "type": "integer", + "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value.", + }, + "resolveSymbols": { + "type": "boolean", + "description": "If True, the adapter should attempt to resolve memory addresses and other values to symbolic names.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + memoryReference, + instructionCount, + offset=None, + instructionOffset=None, + resolveSymbols=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string memoryReference: Memory reference to the base location containing the instructions to disassemble. + :param integer instructionCount: Number of instructions to disassemble starting at the specified location and offset. + An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value. + :param integer offset: Offset (in bytes) to be applied to the reference location before disassembling. Can be negative. + :param integer instructionOffset: Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative. + :param boolean resolveSymbols: If true, the adapter should attempt to resolve memory addresses and other values to symbolic names. + """ + self.memoryReference = memoryReference + self.instructionCount = instructionCount + self.offset = offset + self.instructionOffset = instructionOffset + self.resolveSymbols = resolveSymbols + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + memoryReference = self.memoryReference + instructionCount = self.instructionCount + offset = self.offset + instructionOffset = self.instructionOffset + resolveSymbols = self.resolveSymbols + dct = { + "memoryReference": memoryReference, + "instructionCount": instructionCount, + } + if offset is not None: + dct["offset"] = offset + if instructionOffset is not None: + dct["instructionOffset"] = instructionOffset + if resolveSymbols is not None: + dct["resolveSymbols"] = resolveSymbols + dct.update(self.kwargs) + return dct + + +@register_response("disassemble") +@register +class DisassembleResponse(BaseSchema): + """ + Response to `disassemble` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "instructions": { + "type": "array", + "items": {"$ref": "#/definitions/DisassembledInstruction"}, + "description": "The list of disassembled instructions.", + } + }, + "required": ["instructions"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param DisassembleResponseBody body: + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + if body is None: + self.body = DisassembleResponseBody() + else: + self.body = ( + DisassembleResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != DisassembleResponseBody + else body + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class Capabilities(BaseSchema): + """ + Information about the capabilities of a debug adapter. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "supportsConfigurationDoneRequest": { + "type": "boolean", + "description": "The debug adapter supports the `configurationDone` request.", + }, + "supportsFunctionBreakpoints": {"type": "boolean", "description": "The debug adapter supports function breakpoints."}, + "supportsConditionalBreakpoints": {"type": "boolean", "description": "The debug adapter supports conditional breakpoints."}, + "supportsHitConditionalBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports breakpoints that break execution after a specified number of hits.", + }, + "supportsEvaluateForHovers": { + "type": "boolean", + "description": "The debug adapter supports a (side effect free) `evaluate` request for data hovers.", + }, + "exceptionBreakpointFilters": { + "type": "array", + "items": {"$ref": "#/definitions/ExceptionBreakpointsFilter"}, + "description": "Available exception filter options for the `setExceptionBreakpoints` request.", + }, + "supportsStepBack": { + "type": "boolean", + "description": "The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests.", + }, + "supportsSetVariable": {"type": "boolean", "description": "The debug adapter supports setting a variable to a value."}, + "supportsRestartFrame": {"type": "boolean", "description": "The debug adapter supports restarting a frame."}, + "supportsGotoTargetsRequest": {"type": "boolean", "description": "The debug adapter supports the `gotoTargets` request."}, + "supportsStepInTargetsRequest": {"type": "boolean", "description": "The debug adapter supports the `stepInTargets` request."}, + "supportsCompletionsRequest": {"type": "boolean", "description": "The debug adapter supports the `completions` request."}, + "completionTriggerCharacters": { + "type": "array", + "items": {"type": "string"}, + "description": "The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character.", + }, + "supportsModulesRequest": {"type": "boolean", "description": "The debug adapter supports the `modules` request."}, + "additionalModuleColumns": { + "type": "array", + "items": {"$ref": "#/definitions/ColumnDescriptor"}, + "description": "The set of additional module information exposed by the debug adapter.", + }, + "supportedChecksumAlgorithms": { + "type": "array", + "items": {"$ref": "#/definitions/ChecksumAlgorithm"}, + "description": "Checksum algorithms supported by the debug adapter.", + }, + "supportsRestartRequest": { + "type": "boolean", + "description": "The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request.", + }, + "supportsExceptionOptions": { + "type": "boolean", + "description": "The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request.", + }, + "supportsValueFormattingOptions": { + "type": "boolean", + "description": "The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests.", + }, + "supportsExceptionInfoRequest": {"type": "boolean", "description": "The debug adapter supports the `exceptionInfo` request."}, + "supportTerminateDebuggee": { + "type": "boolean", + "description": "The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request.", + }, + "supportSuspendDebuggee": { + "type": "boolean", + "description": "The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request.", + }, + "supportsDelayedStackTraceLoading": { + "type": "boolean", + "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported.", + }, + "supportsLoadedSourcesRequest": {"type": "boolean", "description": "The debug adapter supports the `loadedSources` request."}, + "supportsLogPoints": { + "type": "boolean", + "description": "The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`.", + }, + "supportsTerminateThreadsRequest": {"type": "boolean", "description": "The debug adapter supports the `terminateThreads` request."}, + "supportsSetExpression": {"type": "boolean", "description": "The debug adapter supports the `setExpression` request."}, + "supportsTerminateRequest": {"type": "boolean", "description": "The debug adapter supports the `terminate` request."}, + "supportsDataBreakpoints": {"type": "boolean", "description": "The debug adapter supports data breakpoints."}, + "supportsReadMemoryRequest": {"type": "boolean", "description": "The debug adapter supports the `readMemory` request."}, + "supportsWriteMemoryRequest": {"type": "boolean", "description": "The debug adapter supports the `writeMemory` request."}, + "supportsDisassembleRequest": {"type": "boolean", "description": "The debug adapter supports the `disassemble` request."}, + "supportsCancelRequest": {"type": "boolean", "description": "The debug adapter supports the `cancel` request."}, + "supportsBreakpointLocationsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `breakpointLocations` request.", + }, + "supportsClipboardContext": { + "type": "boolean", + "description": "The debug adapter supports the `clipboard` context value in the `evaluate` request.", + }, + "supportsSteppingGranularity": { + "type": "boolean", + "description": "The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests.", + }, + "supportsInstructionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports adding breakpoints based on instruction references.", + }, + "supportsExceptionFilterOptions": { + "type": "boolean", + "description": "The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request.", + }, + "supportsSingleThreadExecutionRequests": { + "type": "boolean", + "description": "The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`).", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + supportsConfigurationDoneRequest=None, + supportsFunctionBreakpoints=None, + supportsConditionalBreakpoints=None, + supportsHitConditionalBreakpoints=None, + supportsEvaluateForHovers=None, + exceptionBreakpointFilters=None, + supportsStepBack=None, + supportsSetVariable=None, + supportsRestartFrame=None, + supportsGotoTargetsRequest=None, + supportsStepInTargetsRequest=None, + supportsCompletionsRequest=None, + completionTriggerCharacters=None, + supportsModulesRequest=None, + additionalModuleColumns=None, + supportedChecksumAlgorithms=None, + supportsRestartRequest=None, + supportsExceptionOptions=None, + supportsValueFormattingOptions=None, + supportsExceptionInfoRequest=None, + supportTerminateDebuggee=None, + supportSuspendDebuggee=None, + supportsDelayedStackTraceLoading=None, + supportsLoadedSourcesRequest=None, + supportsLogPoints=None, + supportsTerminateThreadsRequest=None, + supportsSetExpression=None, + supportsTerminateRequest=None, + supportsDataBreakpoints=None, + supportsReadMemoryRequest=None, + supportsWriteMemoryRequest=None, + supportsDisassembleRequest=None, + supportsCancelRequest=None, + supportsBreakpointLocationsRequest=None, + supportsClipboardContext=None, + supportsSteppingGranularity=None, + supportsInstructionBreakpoints=None, + supportsExceptionFilterOptions=None, + supportsSingleThreadExecutionRequests=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param boolean supportsConfigurationDoneRequest: The debug adapter supports the `configurationDone` request. + :param boolean supportsFunctionBreakpoints: The debug adapter supports function breakpoints. + :param boolean supportsConditionalBreakpoints: The debug adapter supports conditional breakpoints. + :param boolean supportsHitConditionalBreakpoints: The debug adapter supports breakpoints that break execution after a specified number of hits. + :param boolean supportsEvaluateForHovers: The debug adapter supports a (side effect free) `evaluate` request for data hovers. + :param array exceptionBreakpointFilters: Available exception filter options for the `setExceptionBreakpoints` request. + :param boolean supportsStepBack: The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests. + :param boolean supportsSetVariable: The debug adapter supports setting a variable to a value. + :param boolean supportsRestartFrame: The debug adapter supports restarting a frame. + :param boolean supportsGotoTargetsRequest: The debug adapter supports the `gotoTargets` request. + :param boolean supportsStepInTargetsRequest: The debug adapter supports the `stepInTargets` request. + :param boolean supportsCompletionsRequest: The debug adapter supports the `completions` request. + :param array completionTriggerCharacters: The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character. + :param boolean supportsModulesRequest: The debug adapter supports the `modules` request. + :param array additionalModuleColumns: The set of additional module information exposed by the debug adapter. + :param array supportedChecksumAlgorithms: Checksum algorithms supported by the debug adapter. + :param boolean supportsRestartRequest: The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request. + :param boolean supportsExceptionOptions: The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request. + :param boolean supportsValueFormattingOptions: The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests. + :param boolean supportsExceptionInfoRequest: The debug adapter supports the `exceptionInfo` request. + :param boolean supportTerminateDebuggee: The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request. + :param boolean supportSuspendDebuggee: The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request. + :param boolean supportsDelayedStackTraceLoading: The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported. + :param boolean supportsLoadedSourcesRequest: The debug adapter supports the `loadedSources` request. + :param boolean supportsLogPoints: The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`. + :param boolean supportsTerminateThreadsRequest: The debug adapter supports the `terminateThreads` request. + :param boolean supportsSetExpression: The debug adapter supports the `setExpression` request. + :param boolean supportsTerminateRequest: The debug adapter supports the `terminate` request. + :param boolean supportsDataBreakpoints: The debug adapter supports data breakpoints. + :param boolean supportsReadMemoryRequest: The debug adapter supports the `readMemory` request. + :param boolean supportsWriteMemoryRequest: The debug adapter supports the `writeMemory` request. + :param boolean supportsDisassembleRequest: The debug adapter supports the `disassemble` request. + :param boolean supportsCancelRequest: The debug adapter supports the `cancel` request. + :param boolean supportsBreakpointLocationsRequest: The debug adapter supports the `breakpointLocations` request. + :param boolean supportsClipboardContext: The debug adapter supports the `clipboard` context value in the `evaluate` request. + :param boolean supportsSteppingGranularity: The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests. + :param boolean supportsInstructionBreakpoints: The debug adapter supports adding breakpoints based on instruction references. + :param boolean supportsExceptionFilterOptions: The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request. + :param boolean supportsSingleThreadExecutionRequests: The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`). + """ + self.supportsConfigurationDoneRequest = supportsConfigurationDoneRequest + self.supportsFunctionBreakpoints = supportsFunctionBreakpoints + self.supportsConditionalBreakpoints = supportsConditionalBreakpoints + self.supportsHitConditionalBreakpoints = supportsHitConditionalBreakpoints + self.supportsEvaluateForHovers = supportsEvaluateForHovers + self.exceptionBreakpointFilters = exceptionBreakpointFilters + if update_ids_from_dap and self.exceptionBreakpointFilters: + for o in self.exceptionBreakpointFilters: + ExceptionBreakpointsFilter.update_dict_ids_from_dap(o) + self.supportsStepBack = supportsStepBack + self.supportsSetVariable = supportsSetVariable + self.supportsRestartFrame = supportsRestartFrame + self.supportsGotoTargetsRequest = supportsGotoTargetsRequest + self.supportsStepInTargetsRequest = supportsStepInTargetsRequest + self.supportsCompletionsRequest = supportsCompletionsRequest + self.completionTriggerCharacters = completionTriggerCharacters + self.supportsModulesRequest = supportsModulesRequest + self.additionalModuleColumns = additionalModuleColumns + if update_ids_from_dap and self.additionalModuleColumns: + for o in self.additionalModuleColumns: + ColumnDescriptor.update_dict_ids_from_dap(o) + self.supportedChecksumAlgorithms = supportedChecksumAlgorithms + if update_ids_from_dap and self.supportedChecksumAlgorithms: + for o in self.supportedChecksumAlgorithms: + ChecksumAlgorithm.update_dict_ids_from_dap(o) + self.supportsRestartRequest = supportsRestartRequest + self.supportsExceptionOptions = supportsExceptionOptions + self.supportsValueFormattingOptions = supportsValueFormattingOptions + self.supportsExceptionInfoRequest = supportsExceptionInfoRequest + self.supportTerminateDebuggee = supportTerminateDebuggee + self.supportSuspendDebuggee = supportSuspendDebuggee + self.supportsDelayedStackTraceLoading = supportsDelayedStackTraceLoading + self.supportsLoadedSourcesRequest = supportsLoadedSourcesRequest + self.supportsLogPoints = supportsLogPoints + self.supportsTerminateThreadsRequest = supportsTerminateThreadsRequest + self.supportsSetExpression = supportsSetExpression + self.supportsTerminateRequest = supportsTerminateRequest + self.supportsDataBreakpoints = supportsDataBreakpoints + self.supportsReadMemoryRequest = supportsReadMemoryRequest + self.supportsWriteMemoryRequest = supportsWriteMemoryRequest + self.supportsDisassembleRequest = supportsDisassembleRequest + self.supportsCancelRequest = supportsCancelRequest + self.supportsBreakpointLocationsRequest = supportsBreakpointLocationsRequest + self.supportsClipboardContext = supportsClipboardContext + self.supportsSteppingGranularity = supportsSteppingGranularity + self.supportsInstructionBreakpoints = supportsInstructionBreakpoints + self.supportsExceptionFilterOptions = supportsExceptionFilterOptions + self.supportsSingleThreadExecutionRequests = supportsSingleThreadExecutionRequests + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + supportsConfigurationDoneRequest = self.supportsConfigurationDoneRequest + supportsFunctionBreakpoints = self.supportsFunctionBreakpoints + supportsConditionalBreakpoints = self.supportsConditionalBreakpoints + supportsHitConditionalBreakpoints = self.supportsHitConditionalBreakpoints + supportsEvaluateForHovers = self.supportsEvaluateForHovers + exceptionBreakpointFilters = self.exceptionBreakpointFilters + if exceptionBreakpointFilters and hasattr(exceptionBreakpointFilters[0], "to_dict"): + exceptionBreakpointFilters = [x.to_dict() for x in exceptionBreakpointFilters] + supportsStepBack = self.supportsStepBack + supportsSetVariable = self.supportsSetVariable + supportsRestartFrame = self.supportsRestartFrame + supportsGotoTargetsRequest = self.supportsGotoTargetsRequest + supportsStepInTargetsRequest = self.supportsStepInTargetsRequest + supportsCompletionsRequest = self.supportsCompletionsRequest + completionTriggerCharacters = self.completionTriggerCharacters + if completionTriggerCharacters and hasattr(completionTriggerCharacters[0], "to_dict"): + completionTriggerCharacters = [x.to_dict() for x in completionTriggerCharacters] + supportsModulesRequest = self.supportsModulesRequest + additionalModuleColumns = self.additionalModuleColumns + if additionalModuleColumns and hasattr(additionalModuleColumns[0], "to_dict"): + additionalModuleColumns = [x.to_dict() for x in additionalModuleColumns] + supportedChecksumAlgorithms = self.supportedChecksumAlgorithms + if supportedChecksumAlgorithms and hasattr(supportedChecksumAlgorithms[0], "to_dict"): + supportedChecksumAlgorithms = [x.to_dict() for x in supportedChecksumAlgorithms] + supportsRestartRequest = self.supportsRestartRequest + supportsExceptionOptions = self.supportsExceptionOptions + supportsValueFormattingOptions = self.supportsValueFormattingOptions + supportsExceptionInfoRequest = self.supportsExceptionInfoRequest + supportTerminateDebuggee = self.supportTerminateDebuggee + supportSuspendDebuggee = self.supportSuspendDebuggee + supportsDelayedStackTraceLoading = self.supportsDelayedStackTraceLoading + supportsLoadedSourcesRequest = self.supportsLoadedSourcesRequest + supportsLogPoints = self.supportsLogPoints + supportsTerminateThreadsRequest = self.supportsTerminateThreadsRequest + supportsSetExpression = self.supportsSetExpression + supportsTerminateRequest = self.supportsTerminateRequest + supportsDataBreakpoints = self.supportsDataBreakpoints + supportsReadMemoryRequest = self.supportsReadMemoryRequest + supportsWriteMemoryRequest = self.supportsWriteMemoryRequest + supportsDisassembleRequest = self.supportsDisassembleRequest + supportsCancelRequest = self.supportsCancelRequest + supportsBreakpointLocationsRequest = self.supportsBreakpointLocationsRequest + supportsClipboardContext = self.supportsClipboardContext + supportsSteppingGranularity = self.supportsSteppingGranularity + supportsInstructionBreakpoints = self.supportsInstructionBreakpoints + supportsExceptionFilterOptions = self.supportsExceptionFilterOptions + supportsSingleThreadExecutionRequests = self.supportsSingleThreadExecutionRequests + dct = {} + if supportsConfigurationDoneRequest is not None: + dct["supportsConfigurationDoneRequest"] = supportsConfigurationDoneRequest + if supportsFunctionBreakpoints is not None: + dct["supportsFunctionBreakpoints"] = supportsFunctionBreakpoints + if supportsConditionalBreakpoints is not None: + dct["supportsConditionalBreakpoints"] = supportsConditionalBreakpoints + if supportsHitConditionalBreakpoints is not None: + dct["supportsHitConditionalBreakpoints"] = supportsHitConditionalBreakpoints + if supportsEvaluateForHovers is not None: + dct["supportsEvaluateForHovers"] = supportsEvaluateForHovers + if exceptionBreakpointFilters is not None: + dct["exceptionBreakpointFilters"] = ( + [ExceptionBreakpointsFilter.update_dict_ids_to_dap(o) for o in exceptionBreakpointFilters] + if (update_ids_to_dap and exceptionBreakpointFilters) + else exceptionBreakpointFilters + ) + if supportsStepBack is not None: + dct["supportsStepBack"] = supportsStepBack + if supportsSetVariable is not None: + dct["supportsSetVariable"] = supportsSetVariable + if supportsRestartFrame is not None: + dct["supportsRestartFrame"] = supportsRestartFrame + if supportsGotoTargetsRequest is not None: + dct["supportsGotoTargetsRequest"] = supportsGotoTargetsRequest + if supportsStepInTargetsRequest is not None: + dct["supportsStepInTargetsRequest"] = supportsStepInTargetsRequest + if supportsCompletionsRequest is not None: + dct["supportsCompletionsRequest"] = supportsCompletionsRequest + if completionTriggerCharacters is not None: + dct["completionTriggerCharacters"] = completionTriggerCharacters + if supportsModulesRequest is not None: + dct["supportsModulesRequest"] = supportsModulesRequest + if additionalModuleColumns is not None: + dct["additionalModuleColumns"] = ( + [ColumnDescriptor.update_dict_ids_to_dap(o) for o in additionalModuleColumns] + if (update_ids_to_dap and additionalModuleColumns) + else additionalModuleColumns + ) + if supportedChecksumAlgorithms is not None: + dct["supportedChecksumAlgorithms"] = ( + [ChecksumAlgorithm.update_dict_ids_to_dap(o) for o in supportedChecksumAlgorithms] + if (update_ids_to_dap and supportedChecksumAlgorithms) + else supportedChecksumAlgorithms + ) + if supportsRestartRequest is not None: + dct["supportsRestartRequest"] = supportsRestartRequest + if supportsExceptionOptions is not None: + dct["supportsExceptionOptions"] = supportsExceptionOptions + if supportsValueFormattingOptions is not None: + dct["supportsValueFormattingOptions"] = supportsValueFormattingOptions + if supportsExceptionInfoRequest is not None: + dct["supportsExceptionInfoRequest"] = supportsExceptionInfoRequest + if supportTerminateDebuggee is not None: + dct["supportTerminateDebuggee"] = supportTerminateDebuggee + if supportSuspendDebuggee is not None: + dct["supportSuspendDebuggee"] = supportSuspendDebuggee + if supportsDelayedStackTraceLoading is not None: + dct["supportsDelayedStackTraceLoading"] = supportsDelayedStackTraceLoading + if supportsLoadedSourcesRequest is not None: + dct["supportsLoadedSourcesRequest"] = supportsLoadedSourcesRequest + if supportsLogPoints is not None: + dct["supportsLogPoints"] = supportsLogPoints + if supportsTerminateThreadsRequest is not None: + dct["supportsTerminateThreadsRequest"] = supportsTerminateThreadsRequest + if supportsSetExpression is not None: + dct["supportsSetExpression"] = supportsSetExpression + if supportsTerminateRequest is not None: + dct["supportsTerminateRequest"] = supportsTerminateRequest + if supportsDataBreakpoints is not None: + dct["supportsDataBreakpoints"] = supportsDataBreakpoints + if supportsReadMemoryRequest is not None: + dct["supportsReadMemoryRequest"] = supportsReadMemoryRequest + if supportsWriteMemoryRequest is not None: + dct["supportsWriteMemoryRequest"] = supportsWriteMemoryRequest + if supportsDisassembleRequest is not None: + dct["supportsDisassembleRequest"] = supportsDisassembleRequest + if supportsCancelRequest is not None: + dct["supportsCancelRequest"] = supportsCancelRequest + if supportsBreakpointLocationsRequest is not None: + dct["supportsBreakpointLocationsRequest"] = supportsBreakpointLocationsRequest + if supportsClipboardContext is not None: + dct["supportsClipboardContext"] = supportsClipboardContext + if supportsSteppingGranularity is not None: + dct["supportsSteppingGranularity"] = supportsSteppingGranularity + if supportsInstructionBreakpoints is not None: + dct["supportsInstructionBreakpoints"] = supportsInstructionBreakpoints + if supportsExceptionFilterOptions is not None: + dct["supportsExceptionFilterOptions"] = supportsExceptionFilterOptions + if supportsSingleThreadExecutionRequests is not None: + dct["supportsSingleThreadExecutionRequests"] = supportsSingleThreadExecutionRequests + dct.update(self.kwargs) + return dct + + +@register +class ExceptionBreakpointsFilter(BaseSchema): + """ + An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how + exceptions are dealt with. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "filter": { + "type": "string", + "description": "The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request.", + }, + "label": {"type": "string", "description": "The name of the filter option. This is shown in the UI."}, + "description": { + "type": "string", + "description": "A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated.", + }, + "default": {"type": "boolean", "description": "Initial value of the filter option. If not specified a value false is assumed."}, + "supportsCondition": { + "type": "boolean", + "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set.", + }, + "conditionDescription": { + "type": "string", + "description": "A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + filter, + label, + description=None, + default=None, + supportsCondition=None, + conditionDescription=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string filter: The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request. + :param string label: The name of the filter option. This is shown in the UI. + :param string description: A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated. + :param boolean default: Initial value of the filter option. If not specified a value false is assumed. + :param boolean supportsCondition: Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set. + :param string conditionDescription: A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated. + """ + self.filter = filter + self.label = label + self.description = description + self.default = default + self.supportsCondition = supportsCondition + self.conditionDescription = conditionDescription + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + filter = self.filter # noqa (assign to builtin) + label = self.label + description = self.description + default = self.default + supportsCondition = self.supportsCondition + conditionDescription = self.conditionDescription + dct = { + "filter": filter, + "label": label, + } + if description is not None: + dct["description"] = description + if default is not None: + dct["default"] = default + if supportsCondition is not None: + dct["supportsCondition"] = supportsCondition + if conditionDescription is not None: + dct["conditionDescription"] = conditionDescription + dct.update(self.kwargs) + return dct + + +@register +class Message(BaseSchema): + """ + A structured message object. Used to return errors from requests. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "id": { + "type": "integer", + "description": "Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily.", + }, + "format": { + "type": "string", + "description": "A format string for the message. Embedded variables have the form `{name}`.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes.", + }, + "variables": { + "type": "object", + "description": "An object used as a dictionary for looking up the variables in the format string.", + "additionalProperties": {"type": "string", "description": "All dictionary values must be strings."}, + }, + "sendTelemetry": {"type": "boolean", "description": "If True send to telemetry."}, + "showUser": {"type": "boolean", "description": "If True show user."}, + "url": {"type": "string", "description": "A url where additional information about this message can be found."}, + "urlLabel": {"type": "string", "description": "A label that is presented to the user as the UI for opening the url."}, + } + __refs__ = set(["variables"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, id, format, variables=None, sendTelemetry=None, showUser=None, url=None, urlLabel=None, update_ids_from_dap=False, **kwargs + ): # noqa (update_ids_from_dap may be unused) + """ + :param integer id: Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily. + :param string format: A format string for the message. Embedded variables have the form `{name}`. + If variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes. + :param MessageVariables variables: An object used as a dictionary for looking up the variables in the format string. + :param boolean sendTelemetry: If true send to telemetry. + :param boolean showUser: If true show user. + :param string url: A url where additional information about this message can be found. + :param string urlLabel: A label that is presented to the user as the UI for opening the url. + """ + self.id = id + self.format = format + if variables is None: + self.variables = MessageVariables() + else: + self.variables = ( + MessageVariables(update_ids_from_dap=update_ids_from_dap, **variables) + if variables.__class__ != MessageVariables + else variables + ) + self.sendTelemetry = sendTelemetry + self.showUser = showUser + self.url = url + self.urlLabel = urlLabel + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + id = self.id # noqa (assign to builtin) + format = self.format # noqa (assign to builtin) + variables = self.variables + sendTelemetry = self.sendTelemetry + showUser = self.showUser + url = self.url + urlLabel = self.urlLabel + dct = { + "id": id, + "format": format, + } + if variables is not None: + dct["variables"] = variables.to_dict(update_ids_to_dap=update_ids_to_dap) + if sendTelemetry is not None: + dct["sendTelemetry"] = sendTelemetry + if showUser is not None: + dct["showUser"] = showUser + if url is not None: + dct["url"] = url + if urlLabel is not None: + dct["urlLabel"] = urlLabel + dct.update(self.kwargs) + return dct + + +@register +class Module(BaseSchema): + """ + A Module object represents a row in the modules view. + + The `id` attribute identifies a module in the modules view and is used in a `module` event for + identifying a module for adding, updating or deleting. + + The `name` attribute is used to minimally render the module in the UI. + + + Additional attributes can be added to the module. They show up in the module view if they have a + corresponding `ColumnDescriptor`. + + + To avoid an unnecessary proliferation of additional attributes with similar semantics but different + names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce + new attributes if nothing appropriate could be found. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "id": {"type": ["integer", "string"], "description": "Unique identifier for the module."}, + "name": {"type": "string", "description": "A name of the module."}, + "path": { + "type": "string", + "description": "Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module.", + }, + "isOptimized": {"type": "boolean", "description": "True if the module is optimized."}, + "isUserCode": { + "type": "boolean", + "description": "True if the module is considered 'user code' by a debugger that supports 'Just My Code'.", + }, + "version": {"type": "string", "description": "Version of Module."}, + "symbolStatus": { + "type": "string", + "description": "User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.)", + }, + "symbolFilePath": { + "type": "string", + "description": "Logical full path to the symbol file. The exact definition is implementation defined.", + }, + "dateTimeStamp": {"type": "string", "description": "Module created or modified, encoded as a RFC 3339 timestamp."}, + "addressRange": {"type": "string", "description": "Address range covered by this module."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + id, + name, + path=None, + isOptimized=None, + isUserCode=None, + version=None, + symbolStatus=None, + symbolFilePath=None, + dateTimeStamp=None, + addressRange=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param ['integer', 'string'] id: Unique identifier for the module. + :param string name: A name of the module. + :param string path: Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module. + :param boolean isOptimized: True if the module is optimized. + :param boolean isUserCode: True if the module is considered 'user code' by a debugger that supports 'Just My Code'. + :param string version: Version of Module. + :param string symbolStatus: User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.) + :param string symbolFilePath: Logical full path to the symbol file. The exact definition is implementation defined. + :param string dateTimeStamp: Module created or modified, encoded as a RFC 3339 timestamp. + :param string addressRange: Address range covered by this module. + """ + self.id = id + self.name = name + self.path = path + self.isOptimized = isOptimized + self.isUserCode = isUserCode + self.version = version + self.symbolStatus = symbolStatus + self.symbolFilePath = symbolFilePath + self.dateTimeStamp = dateTimeStamp + self.addressRange = addressRange + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + id = self.id # noqa (assign to builtin) + name = self.name + path = self.path + isOptimized = self.isOptimized + isUserCode = self.isUserCode + version = self.version + symbolStatus = self.symbolStatus + symbolFilePath = self.symbolFilePath + dateTimeStamp = self.dateTimeStamp + addressRange = self.addressRange + dct = { + "id": id, + "name": name, + } + if path is not None: + dct["path"] = path + if isOptimized is not None: + dct["isOptimized"] = isOptimized + if isUserCode is not None: + dct["isUserCode"] = isUserCode + if version is not None: + dct["version"] = version + if symbolStatus is not None: + dct["symbolStatus"] = symbolStatus + if symbolFilePath is not None: + dct["symbolFilePath"] = symbolFilePath + if dateTimeStamp is not None: + dct["dateTimeStamp"] = dateTimeStamp + if addressRange is not None: + dct["addressRange"] = addressRange + dct.update(self.kwargs) + return dct + + +@register +class ColumnDescriptor(BaseSchema): + """ + A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to + format it, + + and what the column's label should be. + + It is only used if the underlying UI actually supports this level of customization. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "attributeName": {"type": "string", "description": "Name of the attribute rendered in this column."}, + "label": {"type": "string", "description": "Header UI label of column."}, + "format": { + "type": "string", + "description": "Format to use for the rendered values in this column. TBD how the format strings looks like.", + }, + "type": { + "type": "string", + "enum": ["string", "number", "boolean", "unixTimestampUTC"], + "description": "Datatype of values in this column. Defaults to `string` if not specified.", + }, + "width": {"type": "integer", "description": "Width of this column in characters (hint only)."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, attributeName, label, format=None, type=None, width=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string attributeName: Name of the attribute rendered in this column. + :param string label: Header UI label of column. + :param string format: Format to use for the rendered values in this column. TBD how the format strings looks like. + :param string type: Datatype of values in this column. Defaults to `string` if not specified. + :param integer width: Width of this column in characters (hint only). + """ + self.attributeName = attributeName + self.label = label + self.format = format + self.type = type + self.width = width + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + attributeName = self.attributeName + label = self.label + format = self.format # noqa (assign to builtin) + type = self.type # noqa (assign to builtin) + width = self.width + dct = { + "attributeName": attributeName, + "label": label, + } + if format is not None: + dct["format"] = format + if type is not None: + dct["type"] = type + if width is not None: + dct["width"] = width + dct.update(self.kwargs) + return dct + + +@register +class Thread(BaseSchema): + """ + A Thread + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "id": {"type": "integer", "description": "Unique identifier for the thread."}, + "name": {"type": "string", "description": "The name of the thread."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, id, name, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer id: Unique identifier for the thread. + :param string name: The name of the thread. + """ + self.id = id + self.name = name + if update_ids_from_dap: + self.id = self._translate_id_from_dap(self.id) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "id" in dct: + dct["id"] = cls._translate_id_from_dap(dct["id"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + id = self.id # noqa (assign to builtin) + name = self.name + if update_ids_to_dap: + if id is not None: + id = self._translate_id_to_dap(id) # noqa (assign to builtin) + dct = { + "id": id, + "name": name, + } + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "id" in dct: + dct["id"] = cls._translate_id_to_dap(dct["id"]) + return dct + + +@register +class Source(BaseSchema): + """ + A `Source` is a descriptor for source code. + + It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when + specifying breakpoints. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "name": { + "type": "string", + "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional.", + }, + "path": { + "type": "string", + "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0).", + }, + "sourceReference": { + "type": "integer", + "description": "If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified).\nSince a `sourceReference` is only valid for a session, it can not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "presentationHint": { + "type": "string", + "description": "A hint for how to present the source in the UI.\nA value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping.", + "enum": ["normal", "emphasize", "deemphasize"], + }, + "origin": { + "type": "string", + "description": "The origin of this source. For example, 'internal module', 'inlined content from source map', etc.", + }, + "sources": { + "type": "array", + "items": {"$ref": "#/definitions/Source"}, + "description": "A list of sources that are related to this source. These may be the source that generated this source.", + }, + "adapterData": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Additional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data.", + }, + "checksums": { + "type": "array", + "items": {"$ref": "#/definitions/Checksum"}, + "description": "The checksums associated with this file.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + name=None, + path=None, + sourceReference=None, + presentationHint=None, + origin=None, + sources=None, + adapterData=None, + checksums=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string name: The short name of the source. Every source returned from the debug adapter has a name. + When sending a source to the debug adapter this name is optional. + :param string path: The path of the source to be shown in the UI. + It is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0). + :param integer sourceReference: If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified). + Since a `sourceReference` is only valid for a session, it can not be used to persist a source. + The value should be less than or equal to 2147483647 (2^31-1). + :param string presentationHint: A hint for how to present the source in the UI. + A value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping. + :param string origin: The origin of this source. For example, 'internal module', 'inlined content from source map', etc. + :param array sources: A list of sources that are related to this source. These may be the source that generated this source. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] adapterData: Additional data that a debug adapter might want to loop through the client. + The client should leave the data intact and persist it across sessions. The client should not interpret the data. + :param array checksums: The checksums associated with this file. + """ + self.name = name + self.path = path + self.sourceReference = sourceReference + self.presentationHint = presentationHint + self.origin = origin + self.sources = sources + if update_ids_from_dap and self.sources: + for o in self.sources: + Source.update_dict_ids_from_dap(o) + self.adapterData = adapterData + self.checksums = checksums + if update_ids_from_dap and self.checksums: + for o in self.checksums: + Checksum.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + name = self.name + path = self.path + sourceReference = self.sourceReference + presentationHint = self.presentationHint + origin = self.origin + sources = self.sources + if sources and hasattr(sources[0], "to_dict"): + sources = [x.to_dict() for x in sources] + adapterData = self.adapterData + checksums = self.checksums + if checksums and hasattr(checksums[0], "to_dict"): + checksums = [x.to_dict() for x in checksums] + dct = {} + if name is not None: + dct["name"] = name + if path is not None: + dct["path"] = path + if sourceReference is not None: + dct["sourceReference"] = sourceReference + if presentationHint is not None: + dct["presentationHint"] = presentationHint + if origin is not None: + dct["origin"] = origin + if sources is not None: + dct["sources"] = [Source.update_dict_ids_to_dap(o) for o in sources] if (update_ids_to_dap and sources) else sources + if adapterData is not None: + dct["adapterData"] = adapterData + if checksums is not None: + dct["checksums"] = [Checksum.update_dict_ids_to_dap(o) for o in checksums] if (update_ids_to_dap and checksums) else checksums + dct.update(self.kwargs) + return dct + + +@register +class StackFrame(BaseSchema): + """ + A Stackframe contains the source location. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "id": { + "type": "integer", + "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame.", + }, + "name": {"type": "string", "description": "The name of the stack frame, typically a method name."}, + "source": {"description": "The source of the frame.", "type": "Source"}, + "line": { + "type": "integer", + "description": "The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client.", + }, + "column": { + "type": "integer", + "description": "Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client.", + }, + "endLine": {"type": "integer", "description": "The end line of the range covered by the stack frame."}, + "endColumn": { + "type": "integer", + "description": "End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + "canRestart": { + "type": "boolean", + "description": "Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is True. If a debug adapter has this capability, then `canRestart` defaults to `True` if the property is absent.", + }, + "instructionPointerReference": { + "type": "string", + "description": "A memory reference for the current instruction pointer in this frame.", + }, + "moduleId": {"type": ["integer", "string"], "description": "The module associated with this frame, if any."}, + "presentationHint": { + "type": "string", + "enum": ["normal", "label", "subtle"], + "description": "A hint for how to present this frame in the UI.\nA value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way.", + }, + } + __refs__ = set(["source"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + id, + name, + line, + column, + source=None, + endLine=None, + endColumn=None, + canRestart=None, + instructionPointerReference=None, + moduleId=None, + presentationHint=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param integer id: An identifier for the stack frame. It must be unique across all threads. + This id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame. + :param string name: The name of the stack frame, typically a method name. + :param integer line: The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client. + :param integer column: Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client. + :param Source source: The source of the frame. + :param integer endLine: The end line of the range covered by the stack frame. + :param integer endColumn: End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + :param boolean canRestart: Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent. + :param string instructionPointerReference: A memory reference for the current instruction pointer in this frame. + :param ['integer', 'string'] moduleId: The module associated with this frame, if any. + :param string presentationHint: A hint for how to present this frame in the UI. + A value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way. + """ + self.id = id + self.name = name + self.line = line + self.column = column + if source is None: + self.source = Source() + else: + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.endLine = endLine + self.endColumn = endColumn + self.canRestart = canRestart + self.instructionPointerReference = instructionPointerReference + self.moduleId = moduleId + self.presentationHint = presentationHint + if update_ids_from_dap: + self.id = self._translate_id_from_dap(self.id) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "id" in dct: + dct["id"] = cls._translate_id_from_dap(dct["id"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + id = self.id # noqa (assign to builtin) + name = self.name + line = self.line + column = self.column + source = self.source + endLine = self.endLine + endColumn = self.endColumn + canRestart = self.canRestart + instructionPointerReference = self.instructionPointerReference + moduleId = self.moduleId + presentationHint = self.presentationHint + if update_ids_to_dap: + if id is not None: + id = self._translate_id_to_dap(id) # noqa (assign to builtin) + dct = { + "id": id, + "name": name, + "line": line, + "column": column, + } + if source is not None: + dct["source"] = source.to_dict(update_ids_to_dap=update_ids_to_dap) + if endLine is not None: + dct["endLine"] = endLine + if endColumn is not None: + dct["endColumn"] = endColumn + if canRestart is not None: + dct["canRestart"] = canRestart + if instructionPointerReference is not None: + dct["instructionPointerReference"] = instructionPointerReference + if moduleId is not None: + dct["moduleId"] = moduleId + if presentationHint is not None: + dct["presentationHint"] = presentationHint + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "id" in dct: + dct["id"] = cls._translate_id_to_dap(dct["id"]) + return dct + + +@register +class Scope(BaseSchema): + """ + A `Scope` is a named container for variables. Optionally a scope can map to a source or a range + within a source. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "name": { + "type": "string", + "description": "Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated.", + }, + "presentationHint": { + "type": "string", + "description": "A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.", + "_enum": ["arguments", "locals", "registers"], + "enumDescriptions": [ + "Scope contains method arguments.", + "Scope contains local variables.", + "Scope contains registers. Only a single `registers` scope should be returned from a `scopes` request.", + ], + }, + "variablesReference": { + "type": "integer", + "description": "The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + }, + "namedVariables": { + "type": "integer", + "description": "The number of named variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.", + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.", + }, + "expensive": { + "type": "boolean", + "description": "If True, the number of variables in this scope is large or expensive to retrieve.", + }, + "source": {"description": "The source for this scope.", "type": "Source"}, + "line": {"type": "integer", "description": "The start line of the range covered by this scope."}, + "column": { + "type": "integer", + "description": "Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + "endLine": {"type": "integer", "description": "The end line of the range covered by this scope."}, + "endColumn": { + "type": "integer", + "description": "End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + } + __refs__ = set(["source"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + name, + variablesReference, + expensive, + presentationHint=None, + namedVariables=None, + indexedVariables=None, + source=None, + line=None, + column=None, + endLine=None, + endColumn=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string name: Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated. + :param integer variablesReference: The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. + :param boolean expensive: If true, the number of variables in this scope is large or expensive to retrieve. + :param string presentationHint: A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI. + :param integer namedVariables: The number of named variables in this scope. + The client can use this information to present the variables in a paged UI and fetch them in chunks. + :param integer indexedVariables: The number of indexed variables in this scope. + The client can use this information to present the variables in a paged UI and fetch them in chunks. + :param Source source: The source for this scope. + :param integer line: The start line of the range covered by this scope. + :param integer column: Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + :param integer endLine: The end line of the range covered by this scope. + :param integer endColumn: End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + """ + self.name = name + self.variablesReference = variablesReference + self.expensive = expensive + self.presentationHint = presentationHint + self.namedVariables = namedVariables + self.indexedVariables = indexedVariables + if source is None: + self.source = Source() + else: + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.line = line + self.column = column + self.endLine = endLine + self.endColumn = endColumn + if update_ids_from_dap: + self.variablesReference = self._translate_id_from_dap(self.variablesReference) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + name = self.name + variablesReference = self.variablesReference + expensive = self.expensive + presentationHint = self.presentationHint + namedVariables = self.namedVariables + indexedVariables = self.indexedVariables + source = self.source + line = self.line + column = self.column + endLine = self.endLine + endColumn = self.endColumn + if update_ids_to_dap: + if variablesReference is not None: + variablesReference = self._translate_id_to_dap(variablesReference) + dct = { + "name": name, + "variablesReference": variablesReference, + "expensive": expensive, + } + if presentationHint is not None: + dct["presentationHint"] = presentationHint + if namedVariables is not None: + dct["namedVariables"] = namedVariables + if indexedVariables is not None: + dct["indexedVariables"] = indexedVariables + if source is not None: + dct["source"] = source.to_dict(update_ids_to_dap=update_ids_to_dap) + if line is not None: + dct["line"] = line + if column is not None: + dct["column"] = column + if endLine is not None: + dct["endLine"] = endLine + if endColumn is not None: + dct["endColumn"] = endColumn + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + return dct + + +@register +class Variable(BaseSchema): + """ + A Variable is a name/value pair. + + The `type` attribute is shown if space permits or when hovering over the variable's name. + + The `kind` attribute is used to render additional properties of the variable, e.g. different icons + can be used to indicate that a variable is public or private. + + If the value is structured (has children), a handle is provided to retrieve the children with the + `variables` request. + + If the number of named or indexed children is large, the numbers should be returned via the + `namedVariables` and `indexedVariables` attributes. + + The client can use this information to present the children in a paged UI and fetch them in chunks. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "name": {"type": "string", "description": "The variable's name."}, + "value": { + "type": "string", + "description": "The variable's value.\nThis can be a multi-line text, e.g. for a function the body of a function.\nFor structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible.\nAn empty string can be used if no value should be shown in the UI.", + }, + "type": { + "type": "string", + "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True.", + }, + "presentationHint": { + "description": "Properties of a variable that can be used to determine how to render the variable in the UI.", + "type": "VariablePresentationHint", + }, + "evaluateName": { + "type": "string", + "description": "The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value.", + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.", + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.", + }, + "memoryReference": { + "type": "string", + "description": "A memory reference associated with this variable.\nFor pointer type variables, this is generally a reference to the memory address contained in the pointer.\nFor executable data, this reference may later be used in a `disassemble` request.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", + }, + } + __refs__ = set(["presentationHint"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + name, + value, + variablesReference, + type=None, + presentationHint=None, + evaluateName=None, + namedVariables=None, + indexedVariables=None, + memoryReference=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string name: The variable's name. + :param string value: The variable's value. + This can be a multi-line text, e.g. for a function the body of a function. + For structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible. + An empty string can be used if no value should be shown in the UI. + :param integer variablesReference: If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. + :param string type: The type of the variable's value. Typically shown in the UI when hovering over the value. + This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true. + :param VariablePresentationHint presentationHint: Properties of a variable that can be used to determine how to render the variable in the UI. + :param string evaluateName: The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value. + :param integer namedVariables: The number of named child variables. + The client can use this information to present the children in a paged UI and fetch them in chunks. + :param integer indexedVariables: The number of indexed child variables. + The client can use this information to present the children in a paged UI and fetch them in chunks. + :param string memoryReference: A memory reference associated with this variable. + For pointer type variables, this is generally a reference to the memory address contained in the pointer. + For executable data, this reference may later be used in a `disassemble` request. + This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true. + """ + self.name = name + self.value = value + self.variablesReference = variablesReference + self.type = type + if presentationHint is None: + self.presentationHint = VariablePresentationHint() + else: + self.presentationHint = ( + VariablePresentationHint(update_ids_from_dap=update_ids_from_dap, **presentationHint) + if presentationHint.__class__ != VariablePresentationHint + else presentationHint + ) + self.evaluateName = evaluateName + self.namedVariables = namedVariables + self.indexedVariables = indexedVariables + self.memoryReference = memoryReference + if update_ids_from_dap: + self.variablesReference = self._translate_id_from_dap(self.variablesReference) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + name = self.name + value = self.value + variablesReference = self.variablesReference + type = self.type # noqa (assign to builtin) + presentationHint = self.presentationHint + evaluateName = self.evaluateName + namedVariables = self.namedVariables + indexedVariables = self.indexedVariables + memoryReference = self.memoryReference + if update_ids_to_dap: + if variablesReference is not None: + variablesReference = self._translate_id_to_dap(variablesReference) + dct = { + "name": name, + "value": value, + "variablesReference": variablesReference, + } + if type is not None: + dct["type"] = type + if presentationHint is not None: + dct["presentationHint"] = presentationHint.to_dict(update_ids_to_dap=update_ids_to_dap) + if evaluateName is not None: + dct["evaluateName"] = evaluateName + if namedVariables is not None: + dct["namedVariables"] = namedVariables + if indexedVariables is not None: + dct["indexedVariables"] = indexedVariables + if memoryReference is not None: + dct["memoryReference"] = memoryReference + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + return dct + + +@register +class VariablePresentationHint(BaseSchema): + """ + Properties of a variable that can be used to determine how to render the variable in the UI. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "kind": { + "description": "The kind of variable. Before introducing additional values, try to use the listed values.", + "type": "string", + "_enum": [ + "property", + "method", + "class", + "data", + "event", + "baseClass", + "innerClass", + "interface", + "mostDerivedClass", + "virtual", + "dataBreakpoint", + ], + "enumDescriptions": [ + "Indicates that the object is a property.", + "Indicates that the object is a method.", + "Indicates that the object is a class.", + "Indicates that the object is data.", + "Indicates that the object is an event.", + "Indicates that the object is a base class.", + "Indicates that the object is an inner class.", + "Indicates that the object is an interface.", + "Indicates that the object is the most derived class.", + "Indicates that the object is virtual, that means it is a synthetic object introduced by the adapter for rendering purposes, e.g. an index range for large arrays.", + "Deprecated: Indicates that a data breakpoint is registered for the object. The `hasDataBreakpoint` attribute should generally be used instead.", + ], + }, + "attributes": { + "description": "Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.", + "type": "array", + "items": { + "type": "string", + "_enum": [ + "static", + "constant", + "readOnly", + "rawString", + "hasObjectId", + "canHaveObjectId", + "hasSideEffects", + "hasDataBreakpoint", + ], + "enumDescriptions": [ + "Indicates that the object is static.", + "Indicates that the object is a constant.", + "Indicates that the object is read only.", + "Indicates that the object is a raw string.", + "Indicates that the object can have an Object ID created for it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.", + "Indicates that the object has an Object ID associated with it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.", + "Indicates that the evaluation had side effects.", + "Indicates that the object has its value tracked by a data breakpoint.", + ], + }, + }, + "visibility": { + "description": "Visibility of variable. Before introducing additional values, try to use the listed values.", + "type": "string", + "_enum": ["public", "private", "protected", "internal", "final"], + }, + "lazy": { + "description": "If True, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation.\nThis mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function.\nPlease note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request.", + "type": "boolean", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, kind=None, attributes=None, visibility=None, lazy=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string kind: The kind of variable. Before introducing additional values, try to use the listed values. + :param array attributes: Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values. + :param string visibility: Visibility of variable. Before introducing additional values, try to use the listed values. + :param boolean lazy: If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation. + This mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function. + Please note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request. + """ + self.kind = kind + self.attributes = attributes + self.visibility = visibility + self.lazy = lazy + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + kind = self.kind + attributes = self.attributes + if attributes and hasattr(attributes[0], "to_dict"): + attributes = [x.to_dict() for x in attributes] + visibility = self.visibility + lazy = self.lazy + dct = {} + if kind is not None: + dct["kind"] = kind + if attributes is not None: + dct["attributes"] = attributes + if visibility is not None: + dct["visibility"] = visibility + if lazy is not None: + dct["lazy"] = lazy + dct.update(self.kwargs) + return dct + + +@register +class BreakpointLocation(BaseSchema): + """ + Properties of a breakpoint location returned from the `breakpointLocations` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "line": {"type": "integer", "description": "Start line of breakpoint location."}, + "column": { + "type": "integer", + "description": "The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + "endLine": {"type": "integer", "description": "The end line of breakpoint location if the location covers a range."}, + "endColumn": { + "type": "integer", + "description": "The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, line, column=None, endLine=None, endColumn=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer line: Start line of breakpoint location. + :param integer column: The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + :param integer endLine: The end line of breakpoint location if the location covers a range. + :param integer endColumn: The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + """ + self.line = line + self.column = column + self.endLine = endLine + self.endColumn = endColumn + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + line = self.line + column = self.column + endLine = self.endLine + endColumn = self.endColumn + dct = { + "line": line, + } + if column is not None: + dct["column"] = column + if endLine is not None: + dct["endLine"] = endLine + if endColumn is not None: + dct["endColumn"] = endColumn + dct.update(self.kwargs) + return dct + + +@register +class SourceBreakpoint(BaseSchema): + """ + Properties of a breakpoint or logpoint passed to the `setBreakpoints` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "line": {"type": "integer", "description": "The source line of the breakpoint or logpoint."}, + "column": { + "type": "integer", + "description": "Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + "condition": { + "type": "string", + "description": "The expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is True.", + }, + "hitCondition": { + "type": "string", + "description": "The expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is True.\nIf both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met.", + }, + "logMessage": { + "type": "string", + "description": "If this attribute exists and is non-empty, the debug adapter must not 'break' (stop)\nbut log the message instead. Expressions within `{}` are interpolated.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is True.\nIf either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, line, column=None, condition=None, hitCondition=None, logMessage=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer line: The source line of the breakpoint or logpoint. + :param integer column: Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + :param string condition: The expression for conditional breakpoints. + It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. + :param string hitCondition: The expression that controls how many hits of the breakpoint are ignored. + The debug adapter is expected to interpret the expression as needed. + The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. + If both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met. + :param string logMessage: If this attribute exists and is non-empty, the debug adapter must not 'break' (stop) + but log the message instead. Expressions within `{}` are interpolated. + The attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true. + If either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met. + """ + self.line = line + self.column = column + self.condition = condition + self.hitCondition = hitCondition + self.logMessage = logMessage + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + line = self.line + column = self.column + condition = self.condition + hitCondition = self.hitCondition + logMessage = self.logMessage + dct = { + "line": line, + } + if column is not None: + dct["column"] = column + if condition is not None: + dct["condition"] = condition + if hitCondition is not None: + dct["hitCondition"] = hitCondition + if logMessage is not None: + dct["logMessage"] = logMessage + dct.update(self.kwargs) + return dct + + +@register +class FunctionBreakpoint(BaseSchema): + """ + Properties of a breakpoint passed to the `setFunctionBreakpoints` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "name": {"type": "string", "description": "The name of the function."}, + "condition": { + "type": "string", + "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is True.", + }, + "hitCondition": { + "type": "string", + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is True.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, name, condition=None, hitCondition=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string name: The name of the function. + :param string condition: An expression for conditional breakpoints. + It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. + :param string hitCondition: An expression that controls how many hits of the breakpoint are ignored. + The debug adapter is expected to interpret the expression as needed. + The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. + """ + self.name = name + self.condition = condition + self.hitCondition = hitCondition + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + name = self.name + condition = self.condition + hitCondition = self.hitCondition + dct = { + "name": name, + } + if condition is not None: + dct["condition"] = condition + if hitCondition is not None: + dct["hitCondition"] = hitCondition + dct.update(self.kwargs) + return dct + + +@register +class DataBreakpointAccessType(BaseSchema): + """ + This enumeration defines all possible access types for data breakpoints. + + Note: automatically generated code. Do not edit manually. + """ + + READ = "read" + WRITE = "write" + READWRITE = "readWrite" + + VALID_VALUES = set(["read", "write", "readWrite"]) + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ """ + + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = {} + dct.update(self.kwargs) + return dct + + +@register +class DataBreakpoint(BaseSchema): + """ + Properties of a data breakpoint passed to the `setDataBreakpoints` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "dataId": { + "type": "string", + "description": "An id representing the data. This id is returned from the `dataBreakpointInfo` request.", + }, + "accessType": {"description": "The access type of the data.", "type": "DataBreakpointAccessType"}, + "condition": {"type": "string", "description": "An expression for conditional breakpoints."}, + "hitCondition": { + "type": "string", + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.", + }, + } + __refs__ = set(["accessType"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, dataId, accessType=None, condition=None, hitCondition=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string dataId: An id representing the data. This id is returned from the `dataBreakpointInfo` request. + :param DataBreakpointAccessType accessType: The access type of the data. + :param string condition: An expression for conditional breakpoints. + :param string hitCondition: An expression that controls how many hits of the breakpoint are ignored. + The debug adapter is expected to interpret the expression as needed. + """ + self.dataId = dataId + if accessType is not None: + assert accessType in DataBreakpointAccessType.VALID_VALUES + self.accessType = accessType + self.condition = condition + self.hitCondition = hitCondition + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dataId = self.dataId + accessType = self.accessType + condition = self.condition + hitCondition = self.hitCondition + dct = { + "dataId": dataId, + } + if accessType is not None: + dct["accessType"] = accessType + if condition is not None: + dct["condition"] = condition + if hitCondition is not None: + dct["hitCondition"] = hitCondition + dct.update(self.kwargs) + return dct + + +@register +class InstructionBreakpoint(BaseSchema): + """ + Properties of a breakpoint passed to the `setInstructionBreakpoints` request + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "instructionReference": { + "type": "string", + "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`.", + }, + "offset": {"type": "integer", "description": "The offset from the instruction reference in bytes.\nThis can be negative."}, + "condition": { + "type": "string", + "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is True.", + }, + "hitCondition": { + "type": "string", + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is True.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, instructionReference, offset=None, condition=None, hitCondition=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string instructionReference: The instruction reference of the breakpoint. + This should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`. + :param integer offset: The offset from the instruction reference in bytes. + This can be negative. + :param string condition: An expression for conditional breakpoints. + It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true. + :param string hitCondition: An expression that controls how many hits of the breakpoint are ignored. + The debug adapter is expected to interpret the expression as needed. + The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true. + """ + self.instructionReference = instructionReference + self.offset = offset + self.condition = condition + self.hitCondition = hitCondition + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + instructionReference = self.instructionReference + offset = self.offset + condition = self.condition + hitCondition = self.hitCondition + dct = { + "instructionReference": instructionReference, + } + if offset is not None: + dct["offset"] = offset + if condition is not None: + dct["condition"] = condition + if hitCondition is not None: + dct["hitCondition"] = hitCondition + dct.update(self.kwargs) + return dct + + +@register +class Breakpoint(BaseSchema): + """ + Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, + `setInstructionBreakpoints`, or `setDataBreakpoints` requests. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "id": { + "type": "integer", + "description": "The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints.", + }, + "verified": { + "type": "boolean", + "description": "If True, the breakpoint could be set (but not necessarily at the desired location).", + }, + "message": { + "type": "string", + "description": "A message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified.", + }, + "source": {"description": "The source where the breakpoint is located.", "type": "Source"}, + "line": {"type": "integer", "description": "The start line of the actual range covered by the breakpoint."}, + "column": { + "type": "integer", + "description": "Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + "endLine": {"type": "integer", "description": "The end line of the actual range covered by the breakpoint."}, + "endColumn": { + "type": "integer", + "description": "End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.\nIf no end line is given, then the end column is assumed to be in the start line.", + }, + "instructionReference": {"type": "string", "description": "A memory reference to where the breakpoint is set."}, + "offset": {"type": "integer", "description": "The offset from the instruction reference.\nThis can be negative."}, + "reason": { + "type": "string", + "description": "A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include:\n\n- `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state.\n - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention.", + "enum": ["pending", "failed"], + }, + } + __refs__ = set(["source"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + verified, + id=None, + message=None, + source=None, + line=None, + column=None, + endLine=None, + endColumn=None, + instructionReference=None, + offset=None, + reason=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param boolean verified: If true, the breakpoint could be set (but not necessarily at the desired location). + :param integer id: The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints. + :param string message: A message about the state of the breakpoint. + This is shown to the user and can be used to explain why a breakpoint could not be verified. + :param Source source: The source where the breakpoint is located. + :param integer line: The start line of the actual range covered by the breakpoint. + :param integer column: Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + :param integer endLine: The end line of the actual range covered by the breakpoint. + :param integer endColumn: End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + If no end line is given, then the end column is assumed to be in the start line. + :param string instructionReference: A memory reference to where the breakpoint is set. + :param integer offset: The offset from the instruction reference. + This can be negative. + :param string reason: A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include: + + - `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state. + - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention. + """ + self.verified = verified + self.id = id + self.message = message + if source is None: + self.source = Source() + else: + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.line = line + self.column = column + self.endLine = endLine + self.endColumn = endColumn + self.instructionReference = instructionReference + self.offset = offset + self.reason = reason + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + verified = self.verified + id = self.id # noqa (assign to builtin) + message = self.message + source = self.source + line = self.line + column = self.column + endLine = self.endLine + endColumn = self.endColumn + instructionReference = self.instructionReference + offset = self.offset + reason = self.reason + dct = { + "verified": verified, + } + if id is not None: + dct["id"] = id + if message is not None: + dct["message"] = message + if source is not None: + dct["source"] = source.to_dict(update_ids_to_dap=update_ids_to_dap) + if line is not None: + dct["line"] = line + if column is not None: + dct["column"] = column + if endLine is not None: + dct["endLine"] = endLine + if endColumn is not None: + dct["endColumn"] = endColumn + if instructionReference is not None: + dct["instructionReference"] = instructionReference + if offset is not None: + dct["offset"] = offset + if reason is not None: + dct["reason"] = reason + dct.update(self.kwargs) + return dct + + +@register +class SteppingGranularity(BaseSchema): + """ + The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`. + + Note: automatically generated code. Do not edit manually. + """ + + STATEMENT = "statement" + LINE = "line" + INSTRUCTION = "instruction" + + VALID_VALUES = set(["statement", "line", "instruction"]) + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ """ + + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = {} + dct.update(self.kwargs) + return dct + + +@register +class StepInTarget(BaseSchema): + """ + A `StepInTarget` can be used in the `stepIn` request and determines into which single target the + `stepIn` request should step. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "id": {"type": "integer", "description": "Unique identifier for a step-in target."}, + "label": {"type": "string", "description": "The name of the step-in target (shown in the UI)."}, + "line": {"type": "integer", "description": "The line of the step-in target."}, + "column": { + "type": "integer", + "description": "Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + "endLine": {"type": "integer", "description": "The end line of the range covered by the step-in target."}, + "endColumn": { + "type": "integer", + "description": "End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, id, label, line=None, column=None, endLine=None, endColumn=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer id: Unique identifier for a step-in target. + :param string label: The name of the step-in target (shown in the UI). + :param integer line: The line of the step-in target. + :param integer column: Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + :param integer endLine: The end line of the range covered by the step-in target. + :param integer endColumn: End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + """ + self.id = id + self.label = label + self.line = line + self.column = column + self.endLine = endLine + self.endColumn = endColumn + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + id = self.id # noqa (assign to builtin) + label = self.label + line = self.line + column = self.column + endLine = self.endLine + endColumn = self.endColumn + dct = { + "id": id, + "label": label, + } + if line is not None: + dct["line"] = line + if column is not None: + dct["column"] = column + if endLine is not None: + dct["endLine"] = endLine + if endColumn is not None: + dct["endColumn"] = endColumn + dct.update(self.kwargs) + return dct + + +@register +class GotoTarget(BaseSchema): + """ + A `GotoTarget` describes a code location that can be used as a target in the `goto` request. + + The possible goto targets can be determined via the `gotoTargets` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "id": {"type": "integer", "description": "Unique identifier for a goto target. This is used in the `goto` request."}, + "label": {"type": "string", "description": "The name of the goto target (shown in the UI)."}, + "line": {"type": "integer", "description": "The line of the goto target."}, + "column": {"type": "integer", "description": "The column of the goto target."}, + "endLine": {"type": "integer", "description": "The end line of the range covered by the goto target."}, + "endColumn": {"type": "integer", "description": "The end column of the range covered by the goto target."}, + "instructionPointerReference": { + "type": "string", + "description": "A memory reference for the instruction pointer value represented by this target.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + id, + label, + line, + column=None, + endLine=None, + endColumn=None, + instructionPointerReference=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param integer id: Unique identifier for a goto target. This is used in the `goto` request. + :param string label: The name of the goto target (shown in the UI). + :param integer line: The line of the goto target. + :param integer column: The column of the goto target. + :param integer endLine: The end line of the range covered by the goto target. + :param integer endColumn: The end column of the range covered by the goto target. + :param string instructionPointerReference: A memory reference for the instruction pointer value represented by this target. + """ + self.id = id + self.label = label + self.line = line + self.column = column + self.endLine = endLine + self.endColumn = endColumn + self.instructionPointerReference = instructionPointerReference + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + id = self.id # noqa (assign to builtin) + label = self.label + line = self.line + column = self.column + endLine = self.endLine + endColumn = self.endColumn + instructionPointerReference = self.instructionPointerReference + dct = { + "id": id, + "label": label, + "line": line, + } + if column is not None: + dct["column"] = column + if endLine is not None: + dct["endLine"] = endLine + if endColumn is not None: + dct["endColumn"] = endColumn + if instructionPointerReference is not None: + dct["instructionPointerReference"] = instructionPointerReference + dct.update(self.kwargs) + return dct + + +@register +class CompletionItem(BaseSchema): + """ + `CompletionItems` are the suggestions returned from the `completions` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "label": { + "type": "string", + "description": "The label of this completion item. By default this is also the text that is inserted when selecting this completion.", + }, + "text": {"type": "string", "description": "If text is returned and not an empty string, then it is inserted instead of the label."}, + "sortText": { + "type": "string", + "description": "A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead.", + }, + "detail": { + "type": "string", + "description": "A human-readable string with additional information about this item, like type or symbol information.", + }, + "type": { + "description": "The item's type. Typically the client uses this information to render the item in the UI with an icon.", + "type": "CompletionItemType", + }, + "start": { + "type": "integer", + "description": "Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request.", + }, + "length": { + "type": "integer", + "description": "Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted.", + }, + "selectionStart": { + "type": "integer", + "description": "Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text.", + }, + "selectionLength": { + "type": "integer", + "description": "Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0.", + }, + } + __refs__ = set(["type"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + label, + text=None, + sortText=None, + detail=None, + type=None, + start=None, + length=None, + selectionStart=None, + selectionLength=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string label: The label of this completion item. By default this is also the text that is inserted when selecting this completion. + :param string text: If text is returned and not an empty string, then it is inserted instead of the label. + :param string sortText: A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead. + :param string detail: A human-readable string with additional information about this item, like type or symbol information. + :param CompletionItemType type: The item's type. Typically the client uses this information to render the item in the UI with an icon. + :param integer start: Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request. + :param integer length: Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted. + :param integer selectionStart: Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text. + :param integer selectionLength: Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0. + """ + self.label = label + self.text = text + self.sortText = sortText + self.detail = detail + if type is not None: + assert type in CompletionItemType.VALID_VALUES + self.type = type + self.start = start + self.length = length + self.selectionStart = selectionStart + self.selectionLength = selectionLength + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + label = self.label + text = self.text + sortText = self.sortText + detail = self.detail + type = self.type # noqa (assign to builtin) + start = self.start + length = self.length + selectionStart = self.selectionStart + selectionLength = self.selectionLength + dct = { + "label": label, + } + if text is not None: + dct["text"] = text + if sortText is not None: + dct["sortText"] = sortText + if detail is not None: + dct["detail"] = detail + if type is not None: + dct["type"] = type + if start is not None: + dct["start"] = start + if length is not None: + dct["length"] = length + if selectionStart is not None: + dct["selectionStart"] = selectionStart + if selectionLength is not None: + dct["selectionLength"] = selectionLength + dct.update(self.kwargs) + return dct + + +@register +class CompletionItemType(BaseSchema): + """ + Some predefined types for the CompletionItem. Please note that not all clients have specific icons + for all of them. + + Note: automatically generated code. Do not edit manually. + """ + + METHOD = "method" + FUNCTION = "function" + CONSTRUCTOR = "constructor" + FIELD = "field" + VARIABLE = "variable" + CLASS = "class" + INTERFACE = "interface" + MODULE = "module" + PROPERTY = "property" + UNIT = "unit" + VALUE = "value" + ENUM = "enum" + KEYWORD = "keyword" + SNIPPET = "snippet" + TEXT = "text" + COLOR = "color" + FILE = "file" + REFERENCE = "reference" + CUSTOMCOLOR = "customcolor" + + VALID_VALUES = set( + [ + "method", + "function", + "constructor", + "field", + "variable", + "class", + "interface", + "module", + "property", + "unit", + "value", + "enum", + "keyword", + "snippet", + "text", + "color", + "file", + "reference", + "customcolor", + ] + ) + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ """ + + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = {} + dct.update(self.kwargs) + return dct + + +@register +class ChecksumAlgorithm(BaseSchema): + """ + Names of checksum algorithms that may be supported by a debug adapter. + + Note: automatically generated code. Do not edit manually. + """ + + MD5 = "MD5" + SHA1 = "SHA1" + SHA256 = "SHA256" + TIMESTAMP = "timestamp" + + VALID_VALUES = set(["MD5", "SHA1", "SHA256", "timestamp"]) + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ """ + + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = {} + dct.update(self.kwargs) + return dct + + +@register +class Checksum(BaseSchema): + """ + The checksum of an item calculated by the specified algorithm. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "algorithm": {"description": "The algorithm used to calculate this checksum.", "type": "ChecksumAlgorithm"}, + "checksum": {"type": "string", "description": "Value of the checksum, encoded as a hexadecimal value."}, + } + __refs__ = set(["algorithm"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, algorithm, checksum, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param ChecksumAlgorithm algorithm: The algorithm used to calculate this checksum. + :param string checksum: Value of the checksum, encoded as a hexadecimal value. + """ + if algorithm is not None: + assert algorithm in ChecksumAlgorithm.VALID_VALUES + self.algorithm = algorithm + self.checksum = checksum + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + algorithm = self.algorithm + checksum = self.checksum + dct = { + "algorithm": algorithm, + "checksum": checksum, + } + dct.update(self.kwargs) + return dct + + +@register +class ValueFormat(BaseSchema): + """ + Provides formatting information for a value. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"hex": {"type": "boolean", "description": "Display the value in hex."}} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, hex=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param boolean hex: Display the value in hex. + """ + self.hex = hex + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + hex = self.hex # noqa (assign to builtin) + dct = {} + if hex is not None: + dct["hex"] = hex + dct.update(self.kwargs) + return dct + + +@register +class StackFrameFormat(BaseSchema): + """ + Provides formatting information for a stack frame. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "hex": {"type": "boolean", "description": "Display the value in hex."}, + "parameters": {"type": "boolean", "description": "Displays parameters for the stack frame."}, + "parameterTypes": {"type": "boolean", "description": "Displays the types of parameters for the stack frame."}, + "parameterNames": {"type": "boolean", "description": "Displays the names of parameters for the stack frame."}, + "parameterValues": {"type": "boolean", "description": "Displays the values of parameters for the stack frame."}, + "line": {"type": "boolean", "description": "Displays the line number of the stack frame."}, + "module": {"type": "boolean", "description": "Displays the module of the stack frame."}, + "includeAll": { + "type": "boolean", + "description": "Includes all stack frames, including those the debug adapter might otherwise hide.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + hex=None, + parameters=None, + parameterTypes=None, + parameterNames=None, + parameterValues=None, + line=None, + module=None, + includeAll=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param boolean hex: Display the value in hex. + :param boolean parameters: Displays parameters for the stack frame. + :param boolean parameterTypes: Displays the types of parameters for the stack frame. + :param boolean parameterNames: Displays the names of parameters for the stack frame. + :param boolean parameterValues: Displays the values of parameters for the stack frame. + :param boolean line: Displays the line number of the stack frame. + :param boolean module: Displays the module of the stack frame. + :param boolean includeAll: Includes all stack frames, including those the debug adapter might otherwise hide. + """ + self.hex = hex + self.parameters = parameters + self.parameterTypes = parameterTypes + self.parameterNames = parameterNames + self.parameterValues = parameterValues + self.line = line + self.module = module + self.includeAll = includeAll + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + hex = self.hex # noqa (assign to builtin) + parameters = self.parameters + parameterTypes = self.parameterTypes + parameterNames = self.parameterNames + parameterValues = self.parameterValues + line = self.line + module = self.module + includeAll = self.includeAll + dct = {} + if hex is not None: + dct["hex"] = hex + if parameters is not None: + dct["parameters"] = parameters + if parameterTypes is not None: + dct["parameterTypes"] = parameterTypes + if parameterNames is not None: + dct["parameterNames"] = parameterNames + if parameterValues is not None: + dct["parameterValues"] = parameterValues + if line is not None: + dct["line"] = line + if module is not None: + dct["module"] = module + if includeAll is not None: + dct["includeAll"] = includeAll + dct.update(self.kwargs) + return dct + + +@register +class ExceptionFilterOptions(BaseSchema): + """ + An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the + `setExceptionBreakpoints` request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "filterId": {"type": "string", "description": "ID of an exception filter returned by the `exceptionBreakpointFilters` capability."}, + "condition": { + "type": "string", + "description": "An expression for conditional exceptions.\nThe exception breaks into the debugger if the result of the condition is True.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, filterId, condition=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string filterId: ID of an exception filter returned by the `exceptionBreakpointFilters` capability. + :param string condition: An expression for conditional exceptions. + The exception breaks into the debugger if the result of the condition is true. + """ + self.filterId = filterId + self.condition = condition + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + filterId = self.filterId + condition = self.condition + dct = { + "filterId": filterId, + } + if condition is not None: + dct["condition"] = condition + dct.update(self.kwargs) + return dct + + +@register +class ExceptionOptions(BaseSchema): + """ + An `ExceptionOptions` assigns configuration options to a set of exceptions. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "path": { + "type": "array", + "items": {"$ref": "#/definitions/ExceptionPathSegment"}, + "description": "A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI.", + }, + "breakMode": {"description": "Condition when a thrown exception should result in a break.", "type": "ExceptionBreakMode"}, + } + __refs__ = set(["breakMode"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, breakMode, path=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param ExceptionBreakMode breakMode: Condition when a thrown exception should result in a break. + :param array path: A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected. + By convention the first segment of the path is a category that is used to group exceptions in the UI. + """ + if breakMode is not None: + assert breakMode in ExceptionBreakMode.VALID_VALUES + self.breakMode = breakMode + self.path = path + if update_ids_from_dap and self.path: + for o in self.path: + ExceptionPathSegment.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + breakMode = self.breakMode + path = self.path + if path and hasattr(path[0], "to_dict"): + path = [x.to_dict() for x in path] + dct = { + "breakMode": breakMode, + } + if path is not None: + dct["path"] = [ExceptionPathSegment.update_dict_ids_to_dap(o) for o in path] if (update_ids_to_dap and path) else path + dct.update(self.kwargs) + return dct + + +@register +class ExceptionBreakMode(BaseSchema): + """ + This enumeration defines all possible conditions when a thrown exception should result in a break. + + never: never breaks, + + always: always breaks, + + unhandled: breaks when exception unhandled, + + userUnhandled: breaks if the exception is not handled by user code. + + Note: automatically generated code. Do not edit manually. + """ + + NEVER = "never" + ALWAYS = "always" + UNHANDLED = "unhandled" + USERUNHANDLED = "userUnhandled" + + VALID_VALUES = set(["never", "always", "unhandled", "userUnhandled"]) + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ """ + + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = {} + dct.update(self.kwargs) + return dct + + +@register +class ExceptionPathSegment(BaseSchema): + """ + An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a + tree of exceptions. + + If a segment consists of more than one name, it matches the names provided if `negate` is false or + missing, or it matches anything except the names provided if `negate` is true. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "negate": { + "type": "boolean", + "description": "If false or missing this segment matches the names provided, otherwise it matches anything except the names provided.", + }, + "names": { + "type": "array", + "items": {"type": "string"}, + "description": "Depending on the value of `negate` the names that should match or not match.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, names, negate=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array names: Depending on the value of `negate` the names that should match or not match. + :param boolean negate: If false or missing this segment matches the names provided, otherwise it matches anything except the names provided. + """ + self.names = names + self.negate = negate + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + names = self.names + if names and hasattr(names[0], "to_dict"): + names = [x.to_dict() for x in names] + negate = self.negate + dct = { + "names": names, + } + if negate is not None: + dct["negate"] = negate + dct.update(self.kwargs) + return dct + + +@register +class ExceptionDetails(BaseSchema): + """ + Detailed information about an exception that has occurred. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "message": {"type": "string", "description": "Message contained in the exception."}, + "typeName": {"type": "string", "description": "Short type name of the exception object."}, + "fullTypeName": {"type": "string", "description": "Fully-qualified type name of the exception object."}, + "evaluateName": { + "type": "string", + "description": "An expression that can be evaluated in the current scope to obtain the exception object.", + }, + "stackTrace": {"type": "string", "description": "Stack trace at the time the exception was thrown."}, + "innerException": { + "type": "array", + "items": {"$ref": "#/definitions/ExceptionDetails"}, + "description": "Details of the exception contained by this exception, if any.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + message=None, + typeName=None, + fullTypeName=None, + evaluateName=None, + stackTrace=None, + innerException=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string message: Message contained in the exception. + :param string typeName: Short type name of the exception object. + :param string fullTypeName: Fully-qualified type name of the exception object. + :param string evaluateName: An expression that can be evaluated in the current scope to obtain the exception object. + :param string stackTrace: Stack trace at the time the exception was thrown. + :param array innerException: Details of the exception contained by this exception, if any. + """ + self.message = message + self.typeName = typeName + self.fullTypeName = fullTypeName + self.evaluateName = evaluateName + self.stackTrace = stackTrace + self.innerException = innerException + if update_ids_from_dap and self.innerException: + for o in self.innerException: + ExceptionDetails.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + message = self.message + typeName = self.typeName + fullTypeName = self.fullTypeName + evaluateName = self.evaluateName + stackTrace = self.stackTrace + innerException = self.innerException + if innerException and hasattr(innerException[0], "to_dict"): + innerException = [x.to_dict() for x in innerException] + dct = {} + if message is not None: + dct["message"] = message + if typeName is not None: + dct["typeName"] = typeName + if fullTypeName is not None: + dct["fullTypeName"] = fullTypeName + if evaluateName is not None: + dct["evaluateName"] = evaluateName + if stackTrace is not None: + dct["stackTrace"] = stackTrace + if innerException is not None: + dct["innerException"] = ( + [ExceptionDetails.update_dict_ids_to_dap(o) for o in innerException] + if (update_ids_to_dap and innerException) + else innerException + ) + dct.update(self.kwargs) + return dct + + +@register +class DisassembledInstruction(BaseSchema): + """ + Represents a single disassembled instruction. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "address": { + "type": "string", + "description": "The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise.", + }, + "instructionBytes": { + "type": "string", + "description": "Raw bytes representing the instruction and its operands, in an implementation-defined format.", + }, + "instruction": { + "type": "string", + "description": "Text representing the instruction and its operands, in an implementation-defined format.", + }, + "symbol": {"type": "string", "description": "Name of the symbol that corresponds with the location of this instruction, if any."}, + "location": { + "description": "Source location that corresponds to this instruction, if any.\nShould always be set (if available) on the first instruction returned,\nbut can be omitted afterwards if this instruction maps to the same source file as the previous instruction.", + "type": "Source", + }, + "line": {"type": "integer", "description": "The line within the source location that corresponds to this instruction, if any."}, + "column": {"type": "integer", "description": "The column within the line that corresponds to this instruction, if any."}, + "endLine": {"type": "integer", "description": "The end line of the range that corresponds to this instruction, if any."}, + "endColumn": {"type": "integer", "description": "The end column of the range that corresponds to this instruction, if any."}, + "presentationHint": { + "type": "string", + "description": "A hint for how to present the instruction in the UI.\n\nA value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.'", + "enum": ["normal", "invalid"], + }, + } + __refs__ = set(["location"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + address, + instruction, + instructionBytes=None, + symbol=None, + location=None, + line=None, + column=None, + endLine=None, + endColumn=None, + presentationHint=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string address: The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise. + :param string instruction: Text representing the instruction and its operands, in an implementation-defined format. + :param string instructionBytes: Raw bytes representing the instruction and its operands, in an implementation-defined format. + :param string symbol: Name of the symbol that corresponds with the location of this instruction, if any. + :param Source location: Source location that corresponds to this instruction, if any. + Should always be set (if available) on the first instruction returned, + but can be omitted afterwards if this instruction maps to the same source file as the previous instruction. + :param integer line: The line within the source location that corresponds to this instruction, if any. + :param integer column: The column within the line that corresponds to this instruction, if any. + :param integer endLine: The end line of the range that corresponds to this instruction, if any. + :param integer endColumn: The end column of the range that corresponds to this instruction, if any. + :param string presentationHint: A hint for how to present the instruction in the UI. + + A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.' + """ + self.address = address + self.instruction = instruction + self.instructionBytes = instructionBytes + self.symbol = symbol + if location is None: + self.location = Source() + else: + self.location = Source(update_ids_from_dap=update_ids_from_dap, **location) if location.__class__ != Source else location + self.line = line + self.column = column + self.endLine = endLine + self.endColumn = endColumn + self.presentationHint = presentationHint + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + address = self.address + instruction = self.instruction + instructionBytes = self.instructionBytes + symbol = self.symbol + location = self.location + line = self.line + column = self.column + endLine = self.endLine + endColumn = self.endColumn + presentationHint = self.presentationHint + dct = { + "address": address, + "instruction": instruction, + } + if instructionBytes is not None: + dct["instructionBytes"] = instructionBytes + if symbol is not None: + dct["symbol"] = symbol + if location is not None: + dct["location"] = location.to_dict(update_ids_to_dap=update_ids_to_dap) + if line is not None: + dct["line"] = line + if column is not None: + dct["column"] = column + if endLine is not None: + dct["endLine"] = endLine + if endColumn is not None: + dct["endColumn"] = endColumn + if presentationHint is not None: + dct["presentationHint"] = presentationHint + dct.update(self.kwargs) + return dct + + +@register +class InvalidatedAreas(BaseSchema): + """ + Logical areas that can be invalidated by the `invalidated` event. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ """ + + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = {} + dct.update(self.kwargs) + return dct + + +@register_request("setDebuggerProperty") +@register +class SetDebuggerPropertyRequest(BaseSchema): + """ + The request can be used to enable or disable debugger features. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["setDebuggerProperty"]}, + "arguments": {"type": "SetDebuggerPropertyArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param SetDebuggerPropertyArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "setDebuggerProperty" + if arguments is None: + self.arguments = SetDebuggerPropertyArguments() + else: + self.arguments = ( + SetDebuggerPropertyArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != SetDebuggerPropertyArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class SetDebuggerPropertyArguments(BaseSchema): + """ + Arguments for 'setDebuggerProperty' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "ideOS": {"type": ["string"], "description": "OS where the ide is running. Supported values [Windows, Linux]"}, + "dontTraceStartPatterns": { + "type": ["array"], + "description": "Patterns to match with the start of the file paths. Matching paths will be added to a list of file where trace is ignored.", + }, + "dontTraceEndPatterns": { + "type": ["array"], + "description": "Patterns to match with the end of the file paths. Matching paths will be added to a list of file where trace is ignored.", + }, + "skipSuspendOnBreakpointException": { + "type": ["array"], + "description": "List of exceptions that should be skipped when doing condition evaluations.", + }, + "skipPrintBreakpointException": { + "type": ["array"], + "description": "List of exceptions that should skip printing to stderr when doing condition evaluations.", + }, + "multiThreadsSingleNotification": { + "type": ["boolean"], + "description": "If false then a notification is generated for each thread event. If True a single event is gnenerated, and all threads follow that behavior.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + ideOS=None, + dontTraceStartPatterns=None, + dontTraceEndPatterns=None, + skipSuspendOnBreakpointException=None, + skipPrintBreakpointException=None, + multiThreadsSingleNotification=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param ['string'] ideOS: OS where the ide is running. Supported values [Windows, Linux] + :param ['array'] dontTraceStartPatterns: Patterns to match with the start of the file paths. Matching paths will be added to a list of file where trace is ignored. + :param ['array'] dontTraceEndPatterns: Patterns to match with the end of the file paths. Matching paths will be added to a list of file where trace is ignored. + :param ['array'] skipSuspendOnBreakpointException: List of exceptions that should be skipped when doing condition evaluations. + :param ['array'] skipPrintBreakpointException: List of exceptions that should skip printing to stderr when doing condition evaluations. + :param ['boolean'] multiThreadsSingleNotification: If false then a notification is generated for each thread event. If true a single event is gnenerated, and all threads follow that behavior. + """ + self.ideOS = ideOS + self.dontTraceStartPatterns = dontTraceStartPatterns + self.dontTraceEndPatterns = dontTraceEndPatterns + self.skipSuspendOnBreakpointException = skipSuspendOnBreakpointException + self.skipPrintBreakpointException = skipPrintBreakpointException + self.multiThreadsSingleNotification = multiThreadsSingleNotification + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + ideOS = self.ideOS + dontTraceStartPatterns = self.dontTraceStartPatterns + dontTraceEndPatterns = self.dontTraceEndPatterns + skipSuspendOnBreakpointException = self.skipSuspendOnBreakpointException + skipPrintBreakpointException = self.skipPrintBreakpointException + multiThreadsSingleNotification = self.multiThreadsSingleNotification + dct = {} + if ideOS is not None: + dct["ideOS"] = ideOS + if dontTraceStartPatterns is not None: + dct["dontTraceStartPatterns"] = dontTraceStartPatterns + if dontTraceEndPatterns is not None: + dct["dontTraceEndPatterns"] = dontTraceEndPatterns + if skipSuspendOnBreakpointException is not None: + dct["skipSuspendOnBreakpointException"] = skipSuspendOnBreakpointException + if skipPrintBreakpointException is not None: + dct["skipPrintBreakpointException"] = skipPrintBreakpointException + if multiThreadsSingleNotification is not None: + dct["multiThreadsSingleNotification"] = multiThreadsSingleNotification + dct.update(self.kwargs) + return dct + + +@register_response("setDebuggerProperty") +@register +class SetDebuggerPropertyResponse(BaseSchema): + """ + Response to 'setDebuggerProperty' request. This is just an acknowledgement, so no body field is + required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_event("pydevdInputRequested") +@register +class PydevdInputRequestedEvent(BaseSchema): + """ + The event indicates input was requested by debuggee. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["event"]}, + "event": {"type": "string", "enum": ["pydevdInputRequested"]}, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Event-specific information.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string event: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Event-specific information. + """ + self.type = "event" + self.event = "pydevdInputRequested" + self.seq = seq + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + seq = self.seq + body = self.body + dct = { + "type": type, + "event": event, + "seq": seq, + } + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register_request("setPydevdSourceMap") +@register +class SetPydevdSourceMapRequest(BaseSchema): + """ + Sets multiple PydevdSourceMap for a single source and clears all previous PydevdSourceMap in that + source. + + i.e.: Maps paths and lines in a 1:N mapping (use case: map a single file in the IDE to multiple + IPython cells). + + To clear all PydevdSourceMap for a source, specify an empty array. + + Interaction with breakpoints: When a new mapping is sent, breakpoints that match the source (or + previously matched a source) are reapplied. + + Interaction with launch pathMapping: both mappings are independent. This mapping is applied after + the launch pathMapping. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["setPydevdSourceMap"]}, + "arguments": {"type": "SetPydevdSourceMapArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param SetPydevdSourceMapArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "setPydevdSourceMap" + if arguments is None: + self.arguments = SetPydevdSourceMapArguments() + else: + self.arguments = ( + SetPydevdSourceMapArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != SetPydevdSourceMapArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class SetPydevdSourceMapArguments(BaseSchema): + """ + Arguments for 'setPydevdSourceMap' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "source": { + "description": "The source location of the PydevdSourceMap; 'source.path' must be specified (e.g.: for an ipython notebook this could be something as /home/notebook/note.py).", + "type": "Source", + }, + "pydevdSourceMaps": { + "type": "array", + "items": {"$ref": "#/definitions/PydevdSourceMap"}, + "description": "The PydevdSourceMaps to be set to the given source (provide an empty array to clear the source mappings for a given path).", + }, + } + __refs__ = set(["source"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, source, pydevdSourceMaps=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param Source source: The source location of the PydevdSourceMap; 'source.path' must be specified (e.g.: for an ipython notebook this could be something as /home/notebook/note.py). + :param array pydevdSourceMaps: The PydevdSourceMaps to be set to the given source (provide an empty array to clear the source mappings for a given path). + """ + if source is None: + self.source = Source() + else: + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.pydevdSourceMaps = pydevdSourceMaps + if update_ids_from_dap and self.pydevdSourceMaps: + for o in self.pydevdSourceMaps: + PydevdSourceMap.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + source = self.source + pydevdSourceMaps = self.pydevdSourceMaps + if pydevdSourceMaps and hasattr(pydevdSourceMaps[0], "to_dict"): + pydevdSourceMaps = [x.to_dict() for x in pydevdSourceMaps] + dct = { + "source": source.to_dict(update_ids_to_dap=update_ids_to_dap), + } + if pydevdSourceMaps is not None: + dct["pydevdSourceMaps"] = ( + [PydevdSourceMap.update_dict_ids_to_dap(o) for o in pydevdSourceMaps] + if (update_ids_to_dap and pydevdSourceMaps) + else pydevdSourceMaps + ) + dct.update(self.kwargs) + return dct + + +@register_response("setPydevdSourceMap") +@register +class SetPydevdSourceMapResponse(BaseSchema): + """ + Response to 'setPydevdSourceMap' request. This is just an acknowledgement, so no body field is + required. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is True and error details if success is false.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + self.seq = seq + self.message = message + self.body = body + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + seq = self.seq + message = self.message + body = self.body + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "seq": seq, + } + if message is not None: + dct["message"] = message + if body is not None: + dct["body"] = body + dct.update(self.kwargs) + return dct + + +@register +class PydevdSourceMap(BaseSchema): + """ + Information that allows mapping a local line to a remote source/line. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "line": { + "type": "integer", + "description": "The local line to which the mapping should map to (e.g.: for an ipython notebook this would be the first line of the cell in the file).", + }, + "endLine": {"type": "integer", "description": "The end line."}, + "runtimeSource": { + "description": "The path that the user has remotely -- 'source.path' must be specified (e.g.: for an ipython notebook this could be something as '')", + "type": "Source", + }, + "runtimeLine": { + "type": "integer", + "description": "The remote line to which the mapping should map to (e.g.: for an ipython notebook this would be always 1 as it'd map the start of the cell).", + }, + } + __refs__ = set(["runtimeSource"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, line, endLine, runtimeSource, runtimeLine, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer line: The local line to which the mapping should map to (e.g.: for an ipython notebook this would be the first line of the cell in the file). + :param integer endLine: The end line. + :param Source runtimeSource: The path that the user has remotely -- 'source.path' must be specified (e.g.: for an ipython notebook this could be something as '') + :param integer runtimeLine: The remote line to which the mapping should map to (e.g.: for an ipython notebook this would be always 1 as it'd map the start of the cell). + """ + self.line = line + self.endLine = endLine + if runtimeSource is None: + self.runtimeSource = Source() + else: + self.runtimeSource = ( + Source(update_ids_from_dap=update_ids_from_dap, **runtimeSource) if runtimeSource.__class__ != Source else runtimeSource + ) + self.runtimeLine = runtimeLine + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + line = self.line + endLine = self.endLine + runtimeSource = self.runtimeSource + runtimeLine = self.runtimeLine + dct = { + "line": line, + "endLine": endLine, + "runtimeSource": runtimeSource.to_dict(update_ids_to_dap=update_ids_to_dap), + "runtimeLine": runtimeLine, + } + dct.update(self.kwargs) + return dct + + +@register_request("pydevdSystemInfo") +@register +class PydevdSystemInfoRequest(BaseSchema): + """ + The request can be used retrieve system information, python version, etc. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["pydevdSystemInfo"]}, + "arguments": {"type": "PydevdSystemInfoArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param PydevdSystemInfoArguments arguments: + """ + self.type = "request" + self.command = "pydevdSystemInfo" + self.seq = seq + if arguments is None: + self.arguments = PydevdSystemInfoArguments() + else: + self.arguments = ( + PydevdSystemInfoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != PydevdSystemInfoArguments + else arguments + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + seq = self.seq + arguments = self.arguments + dct = { + "type": type, + "command": command, + "seq": seq, + } + if arguments is not None: + dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class PydevdSystemInfoArguments(BaseSchema): + """ + Arguments for 'pydevdSystemInfo' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ """ + + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = {} + dct.update(self.kwargs) + return dct + + +@register_response("pydevdSystemInfo") +@register +class PydevdSystemInfoResponse(BaseSchema): + """ + Response to 'pydevdSystemInfo' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "python": { + "$ref": "#/definitions/PydevdPythonInfo", + "description": "Information about the python version running in the current process.", + }, + "platform": { + "$ref": "#/definitions/PydevdPlatformInfo", + "description": "Information about the plarforn on which the current process is running.", + }, + "process": {"$ref": "#/definitions/PydevdProcessInfo", "description": "Information about the current process."}, + "pydevd": {"$ref": "#/definitions/PydevdInfo", "description": "Information about pydevd."}, + }, + "required": ["python", "platform", "process", "pydevd"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param PydevdSystemInfoResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = PydevdSystemInfoResponseBody() + else: + self.body = ( + PydevdSystemInfoResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != PydevdSystemInfoResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register +class PydevdPythonInfo(BaseSchema): + """ + This object contains python version and implementation details. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "version": { + "type": "string", + "description": "Python version as a string in semver format: ...", + }, + "implementation": { + "description": "Python version as a string in this format ...", + "type": "PydevdPythonImplementationInfo", + }, + } + __refs__ = set(["implementation"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, version=None, implementation=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string version: Python version as a string in semver format: ... + :param PydevdPythonImplementationInfo implementation: Python version as a string in this format ... + """ + self.version = version + if implementation is None: + self.implementation = PydevdPythonImplementationInfo() + else: + self.implementation = ( + PydevdPythonImplementationInfo(update_ids_from_dap=update_ids_from_dap, **implementation) + if implementation.__class__ != PydevdPythonImplementationInfo + else implementation + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + version = self.version + implementation = self.implementation + dct = {} + if version is not None: + dct["version"] = version + if implementation is not None: + dct["implementation"] = implementation.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class PydevdPythonImplementationInfo(BaseSchema): + """ + This object contains python implementation details. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "name": {"type": "string", "description": "Python implementation name."}, + "version": { + "type": "string", + "description": "Python version as a string in semver format: ...", + }, + "description": {"type": "string", "description": "Optional description for this python implementation."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, name=None, version=None, description=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string name: Python implementation name. + :param string version: Python version as a string in semver format: ... + :param string description: Optional description for this python implementation. + """ + self.name = name + self.version = version + self.description = description + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + name = self.name + version = self.version + description = self.description + dct = {} + if name is not None: + dct["name"] = name + if version is not None: + dct["version"] = version + if description is not None: + dct["description"] = description + dct.update(self.kwargs) + return dct + + +@register +class PydevdPlatformInfo(BaseSchema): + """ + This object contains python version and implementation details. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"name": {"type": "string", "description": "Name of the platform as returned by 'sys.platform'."}} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, name=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string name: Name of the platform as returned by 'sys.platform'. + """ + self.name = name + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + name = self.name + dct = {} + if name is not None: + dct["name"] = name + dct.update(self.kwargs) + return dct + + +@register +class PydevdProcessInfo(BaseSchema): + """ + This object contains python process details. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "pid": {"type": "integer", "description": "Process ID for the current process."}, + "ppid": {"type": "integer", "description": "Parent Process ID for the current process."}, + "executable": {"type": "string", "description": "Path to the executable as returned by 'sys.executable'."}, + "bitness": {"type": "integer", "description": "Integer value indicating the bitness of the current process."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, pid=None, ppid=None, executable=None, bitness=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer pid: Process ID for the current process. + :param integer ppid: Parent Process ID for the current process. + :param string executable: Path to the executable as returned by 'sys.executable'. + :param integer bitness: Integer value indicating the bitness of the current process. + """ + self.pid = pid + self.ppid = ppid + self.executable = executable + self.bitness = bitness + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + pid = self.pid + ppid = self.ppid + executable = self.executable + bitness = self.bitness + dct = {} + if pid is not None: + dct["pid"] = pid + if ppid is not None: + dct["ppid"] = ppid + if executable is not None: + dct["executable"] = executable + if bitness is not None: + dct["bitness"] = bitness + dct.update(self.kwargs) + return dct + + +@register +class PydevdInfo(BaseSchema): + """ + This object contains details on pydevd. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "usingCython": {"type": "boolean", "description": "Specifies whether the cython native module is being used."}, + "usingFrameEval": {"type": "boolean", "description": "Specifies whether the frame eval native module is being used."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, usingCython=None, usingFrameEval=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param boolean usingCython: Specifies whether the cython native module is being used. + :param boolean usingFrameEval: Specifies whether the frame eval native module is being used. + """ + self.usingCython = usingCython + self.usingFrameEval = usingFrameEval + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + usingCython = self.usingCython + usingFrameEval = self.usingFrameEval + dct = {} + if usingCython is not None: + dct["usingCython"] = usingCython + if usingFrameEval is not None: + dct["usingFrameEval"] = usingFrameEval + dct.update(self.kwargs) + return dct + + +@register_request("pydevdAuthorize") +@register +class PydevdAuthorizeRequest(BaseSchema): + """ + A request to authorize the ide to start accepting commands. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["request"]}, + "command": {"type": "string", "enum": ["pydevdAuthorize"]}, + "arguments": {"type": "PydevdAuthorizeArguments"}, + } + __refs__ = set(["arguments"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param PydevdAuthorizeArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = "request" + self.command = "pydevdAuthorize" + if arguments is None: + self.arguments = PydevdAuthorizeArguments() + else: + self.arguments = ( + PydevdAuthorizeArguments(update_ids_from_dap=update_ids_from_dap, **arguments) + if arguments.__class__ != PydevdAuthorizeArguments + else arguments + ) + self.seq = seq + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + "type": type, + "command": command, + "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + dct.update(self.kwargs) + return dct + + +@register +class PydevdAuthorizeArguments(BaseSchema): + """ + Arguments for 'pydevdAuthorize' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"debugServerAccessToken": {"type": "string", "description": "The access token to access the debug server."}} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, debugServerAccessToken=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string debugServerAccessToken: The access token to access the debug server. + """ + self.debugServerAccessToken = debugServerAccessToken + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + debugServerAccessToken = self.debugServerAccessToken + dct = {} + if debugServerAccessToken is not None: + dct["debugServerAccessToken"] = debugServerAccessToken + dct.update(self.kwargs) + return dct + + +@register_response("pydevdAuthorize") +@register +class PydevdAuthorizeResponse(BaseSchema): + """ + Response to 'pydevdAuthorize' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + }, + "type": {"type": "string", "enum": ["response"]}, + "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + }, + "command": {"type": "string", "description": "The command requested."}, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + }, + "body": { + "type": "object", + "properties": { + "clientAccessToken": {"type": "string", "description": "The access token to access the client (i.e.: usually the IDE)."} + }, + "required": ["clientAccessToken"], + }, + } + __refs__ = set(["body"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: The command requested. + :param PydevdAuthorizeResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = "response" + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = PydevdAuthorizeResponseBody() + else: + self.body = ( + PydevdAuthorizeResponseBody(update_ids_from_dap=update_ids_from_dap, **body) + if body.__class__ != PydevdAuthorizeResponseBody + else body + ) + self.seq = seq + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + "type": type, + "request_seq": request_seq, + "success": success, + "command": command, + "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), + "seq": seq, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register +class ErrorResponseBody(BaseSchema): + """ + "body" of ErrorResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"error": {"description": "A structured error message.", "type": "Message"}} + __refs__ = set(["error"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, error=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param Message error: A structured error message. + """ + if error is None: + self.error = Message() + else: + self.error = Message(update_ids_from_dap=update_ids_from_dap, **error) if error.__class__ != Message else error + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + error = self.error + dct = {} + if error is not None: + dct["error"] = error.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class StoppedEventBody(BaseSchema): + """ + "body" of StoppedEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "reason": { + "type": "string", + "description": "The reason for the event.\nFor backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated).", + "_enum": [ + "step", + "breakpoint", + "exception", + "pause", + "entry", + "goto", + "function breakpoint", + "data breakpoint", + "instruction breakpoint", + ], + }, + "description": { + "type": "string", + "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated.", + }, + "threadId": {"type": "integer", "description": "The thread which was stopped."}, + "preserveFocusHint": { + "type": "boolean", + "description": "A value of True hints to the client that this event should not change the focus.", + }, + "text": { + "type": "string", + "description": "Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI.", + }, + "allThreadsStopped": { + "type": "boolean", + "description": "If `allThreadsStopped` is True, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given `threadId` can be expanded.", + }, + "hitBreakpointIds": { + "type": "array", + "items": {"type": "integer"}, + "description": "Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + reason, + description=None, + threadId=None, + preserveFocusHint=None, + text=None, + allThreadsStopped=None, + hitBreakpointIds=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string reason: The reason for the event. + For backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated). + :param string description: The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated. + :param integer threadId: The thread which was stopped. + :param boolean preserveFocusHint: A value of true hints to the client that this event should not change the focus. + :param string text: Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI. + :param boolean allThreadsStopped: If `allThreadsStopped` is true, a debug adapter can announce that all threads have stopped. + - The client should use this information to enable that all threads can be expanded to access their stacktraces. + - If the attribute is missing or false, only the thread with the given `threadId` can be expanded. + :param array hitBreakpointIds: Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints: + - Different types of breakpoints map to the same location. + - Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime. + - Multiple function breakpoints with different function names map to the same location. + """ + self.reason = reason + self.description = description + self.threadId = threadId + self.preserveFocusHint = preserveFocusHint + self.text = text + self.allThreadsStopped = allThreadsStopped + self.hitBreakpointIds = hitBreakpointIds + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + reason = self.reason + description = self.description + threadId = self.threadId + preserveFocusHint = self.preserveFocusHint + text = self.text + allThreadsStopped = self.allThreadsStopped + hitBreakpointIds = self.hitBreakpointIds + if hitBreakpointIds and hasattr(hitBreakpointIds[0], "to_dict"): + hitBreakpointIds = [x.to_dict() for x in hitBreakpointIds] + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "reason": reason, + } + if description is not None: + dct["description"] = description + if threadId is not None: + dct["threadId"] = threadId + if preserveFocusHint is not None: + dct["preserveFocusHint"] = preserveFocusHint + if text is not None: + dct["text"] = text + if allThreadsStopped is not None: + dct["allThreadsStopped"] = allThreadsStopped + if hitBreakpointIds is not None: + dct["hitBreakpointIds"] = hitBreakpointIds + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register +class ContinuedEventBody(BaseSchema): + """ + "body" of ContinuedEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "threadId": {"type": "integer", "description": "The thread which was continued."}, + "allThreadsContinued": { + "type": "boolean", + "description": "If `allThreadsContinued` is True, a debug adapter can announce that all threads have continued.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threadId, allThreadsContinued=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer threadId: The thread which was continued. + :param boolean allThreadsContinued: If `allThreadsContinued` is true, a debug adapter can announce that all threads have continued. + """ + self.threadId = threadId + self.allThreadsContinued = allThreadsContinued + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + allThreadsContinued = self.allThreadsContinued + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "threadId": threadId, + } + if allThreadsContinued is not None: + dct["allThreadsContinued"] = allThreadsContinued + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register +class ExitedEventBody(BaseSchema): + """ + "body" of ExitedEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"exitCode": {"type": "integer", "description": "The exit code returned from the debuggee."}} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, exitCode, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer exitCode: The exit code returned from the debuggee. + """ + self.exitCode = exitCode + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + exitCode = self.exitCode + dct = { + "exitCode": exitCode, + } + dct.update(self.kwargs) + return dct + + +@register +class TerminatedEventBody(BaseSchema): + """ + "body" of TerminatedEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "restart": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "A debug adapter may set `restart` to True (or to an arbitrary object) to request that the client restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, restart=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] restart: A debug adapter may set `restart` to true (or to an arbitrary object) to request that the client restarts the session. + The value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests. + """ + self.restart = restart + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + restart = self.restart + dct = {} + if restart is not None: + dct["restart"] = restart + dct.update(self.kwargs) + return dct + + +@register +class ThreadEventBody(BaseSchema): + """ + "body" of ThreadEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "reason": {"type": "string", "description": "The reason for the event.", "_enum": ["started", "exited"]}, + "threadId": {"type": "integer", "description": "The identifier of the thread."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, reason, threadId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string reason: The reason for the event. + :param integer threadId: The identifier of the thread. + """ + self.reason = reason + self.threadId = threadId + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + reason = self.reason + threadId = self.threadId + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + "reason": reason, + "threadId": threadId, + } + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register +class OutputEventBody(BaseSchema): + """ + "body" of OutputEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "category": { + "type": "string", + "description": "The output category. If not specified or if the category is not understood by the client, `console` is assumed.", + "_enum": ["console", "important", "stdout", "stderr", "telemetry"], + "enumDescriptions": [ + "Show the output in the client's default message UI, e.g. a 'debug console'. This category should only be used for informational output from the debugger (as opposed to the debuggee).", + "A hint for the client to show the output in the client's UI for important and highly visible information, e.g. as a popup notification. This category should only be used for important messages from the debugger (as opposed to the debuggee). Since this category value is a hint, clients might ignore the hint and assume the `console` category.", + "Show the output as normal program output from the debuggee.", + "Show the output as error program output from the debuggee.", + "Send the output to telemetry instead of showing it to the user.", + ], + }, + "output": {"type": "string", "description": "The output to report."}, + "group": { + "type": "string", + "description": "Support for keeping an output log organized by grouping related messages.", + "enum": ["start", "startCollapsed", "end"], + "enumDescriptions": [ + "Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe `output` attribute becomes the name of the group and is not indented.", + "Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe `output` attribute becomes the name of the group and is not indented.", + "End the current group and decrease the indentation of subsequent output events.\nA non-empty `output` attribute is shown as the unindented end of the group.", + ], + }, + "variablesReference": { + "type": "integer", + "description": "If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + }, + "source": {"description": "The source location where the output was produced.", "type": "Source"}, + "line": {"type": "integer", "description": "The source location's line where the output was produced."}, + "column": { + "type": "integer", + "description": "The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + }, + "data": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format.", + }, + } + __refs__ = set(["source"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + output, + category=None, + group=None, + variablesReference=None, + source=None, + line=None, + column=None, + data=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string output: The output to report. + :param string category: The output category. If not specified or if the category is not understood by the client, `console` is assumed. + :param string group: Support for keeping an output log organized by grouping related messages. + :param integer variablesReference: If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. + :param Source source: The source location where the output was produced. + :param integer line: The source location's line where the output was produced. + :param integer column: The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] data: Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format. + """ + self.output = output + self.category = category + self.group = group + self.variablesReference = variablesReference + if source is None: + self.source = Source() + else: + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.line = line + self.column = column + self.data = data + if update_ids_from_dap: + self.variablesReference = self._translate_id_from_dap(self.variablesReference) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + output = self.output + category = self.category + group = self.group + variablesReference = self.variablesReference + source = self.source + line = self.line + column = self.column + data = self.data + if update_ids_to_dap: + if variablesReference is not None: + variablesReference = self._translate_id_to_dap(variablesReference) + dct = { + "output": output, + } + if category is not None: + dct["category"] = category + if group is not None: + dct["group"] = group + if variablesReference is not None: + dct["variablesReference"] = variablesReference + if source is not None: + dct["source"] = source.to_dict(update_ids_to_dap=update_ids_to_dap) + if line is not None: + dct["line"] = line + if column is not None: + dct["column"] = column + if data is not None: + dct["data"] = data + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + return dct + + +@register +class BreakpointEventBody(BaseSchema): + """ + "body" of BreakpointEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "reason": {"type": "string", "description": "The reason for the event.", "_enum": ["changed", "new", "removed"]}, + "breakpoint": { + "description": "The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values.", + "type": "Breakpoint", + }, + } + __refs__ = set(["breakpoint"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, reason, breakpoint, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string reason: The reason for the event. + :param Breakpoint breakpoint: The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values. + """ + self.reason = reason + if breakpoint is None: + self.breakpoint = Breakpoint() + else: + self.breakpoint = ( + Breakpoint(update_ids_from_dap=update_ids_from_dap, **breakpoint) if breakpoint.__class__ != Breakpoint else breakpoint + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + reason = self.reason + breakpoint = self.breakpoint # noqa (assign to builtin) + dct = { + "reason": reason, + "breakpoint": breakpoint.to_dict(update_ids_to_dap=update_ids_to_dap), + } + dct.update(self.kwargs) + return dct + + +@register +class ModuleEventBody(BaseSchema): + """ + "body" of ModuleEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "reason": {"type": "string", "description": "The reason for the event.", "enum": ["new", "changed", "removed"]}, + "module": { + "description": "The new, changed, or removed module. In case of `removed` only the module id is used.", + "type": "Module", + }, + } + __refs__ = set(["module"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, reason, module, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string reason: The reason for the event. + :param Module module: The new, changed, or removed module. In case of `removed` only the module id is used. + """ + self.reason = reason + if module is None: + self.module = Module() + else: + self.module = Module(update_ids_from_dap=update_ids_from_dap, **module) if module.__class__ != Module else module + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + reason = self.reason + module = self.module + dct = { + "reason": reason, + "module": module.to_dict(update_ids_to_dap=update_ids_to_dap), + } + dct.update(self.kwargs) + return dct + + +@register +class LoadedSourceEventBody(BaseSchema): + """ + "body" of LoadedSourceEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "reason": {"type": "string", "description": "The reason for the event.", "enum": ["new", "changed", "removed"]}, + "source": {"description": "The new, changed, or removed source.", "type": "Source"}, + } + __refs__ = set(["source"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, reason, source, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string reason: The reason for the event. + :param Source source: The new, changed, or removed source. + """ + self.reason = reason + if source is None: + self.source = Source() + else: + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + reason = self.reason + source = self.source + dct = { + "reason": reason, + "source": source.to_dict(update_ids_to_dap=update_ids_to_dap), + } + dct.update(self.kwargs) + return dct + + +@register +class ProcessEventBody(BaseSchema): + """ + "body" of ProcessEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "name": { + "type": "string", + "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js.", + }, + "systemProcessId": { + "type": "integer", + "description": "The system process id of the debugged process. This property is missing for non-system processes.", + }, + "isLocalProcess": {"type": "boolean", "description": "If True, the process is running on the same computer as the debug adapter."}, + "startMethod": { + "type": "string", + "enum": ["launch", "attach", "attachForSuspendedLaunch"], + "description": "Describes how the debug engine started debugging this process.", + "enumDescriptions": [ + "Process was launched under the debugger.", + "Debugger attached to an existing process.", + "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach.", + ], + }, + "pointerSize": { + "type": "integer", + "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, name, systemProcessId=None, isLocalProcess=None, startMethod=None, pointerSize=None, update_ids_from_dap=False, **kwargs + ): # noqa (update_ids_from_dap may be unused) + """ + :param string name: The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js. + :param integer systemProcessId: The system process id of the debugged process. This property is missing for non-system processes. + :param boolean isLocalProcess: If true, the process is running on the same computer as the debug adapter. + :param string startMethod: Describes how the debug engine started debugging this process. + :param integer pointerSize: The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display. + """ + self.name = name + self.systemProcessId = systemProcessId + self.isLocalProcess = isLocalProcess + self.startMethod = startMethod + self.pointerSize = pointerSize + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + name = self.name + systemProcessId = self.systemProcessId + isLocalProcess = self.isLocalProcess + startMethod = self.startMethod + pointerSize = self.pointerSize + dct = { + "name": name, + } + if systemProcessId is not None: + dct["systemProcessId"] = systemProcessId + if isLocalProcess is not None: + dct["isLocalProcess"] = isLocalProcess + if startMethod is not None: + dct["startMethod"] = startMethod + if pointerSize is not None: + dct["pointerSize"] = pointerSize + dct.update(self.kwargs) + return dct + + +@register +class CapabilitiesEventBody(BaseSchema): + """ + "body" of CapabilitiesEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"capabilities": {"description": "The set of updated capabilities.", "type": "Capabilities"}} + __refs__ = set(["capabilities"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, capabilities, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param Capabilities capabilities: The set of updated capabilities. + """ + if capabilities is None: + self.capabilities = Capabilities() + else: + self.capabilities = ( + Capabilities(update_ids_from_dap=update_ids_from_dap, **capabilities) + if capabilities.__class__ != Capabilities + else capabilities + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + capabilities = self.capabilities + dct = { + "capabilities": capabilities.to_dict(update_ids_to_dap=update_ids_to_dap), + } + dct.update(self.kwargs) + return dct + + +@register +class ProgressStartEventBody(BaseSchema): + """ + "body" of ProgressStartEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "progressId": { + "type": "string", + "description": "An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.\nIDs must be unique within a debug session.", + }, + "title": { + "type": "string", + "description": "Short title of the progress reporting. Shown in the UI to describe the long running operation.", + }, + "requestId": { + "type": "integer", + "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter.", + }, + "cancellable": { + "type": "boolean", + "description": "If True, the request that reports progress may be cancelled with a `cancel` request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting.", + }, + "message": {"type": "string", "description": "More detailed progress message."}, + "percentage": { + "type": "number", + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, progressId, title, requestId=None, cancellable=None, message=None, percentage=None, update_ids_from_dap=False, **kwargs + ): # noqa (update_ids_from_dap may be unused) + """ + :param string progressId: An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting. + IDs must be unique within a debug session. + :param string title: Short title of the progress reporting. Shown in the UI to describe the long running operation. + :param integer requestId: The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled. + If the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter. + :param boolean cancellable: If true, the request that reports progress may be cancelled with a `cancel` request. + So this property basically controls whether the client should use UX that supports cancellation. + Clients that don't support cancellation are allowed to ignore the setting. + :param string message: More detailed progress message. + :param number percentage: Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown. + """ + self.progressId = progressId + self.title = title + self.requestId = requestId + self.cancellable = cancellable + self.message = message + self.percentage = percentage + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + progressId = self.progressId + title = self.title + requestId = self.requestId + cancellable = self.cancellable + message = self.message + percentage = self.percentage + dct = { + "progressId": progressId, + "title": title, + } + if requestId is not None: + dct["requestId"] = requestId + if cancellable is not None: + dct["cancellable"] = cancellable + if message is not None: + dct["message"] = message + if percentage is not None: + dct["percentage"] = percentage + dct.update(self.kwargs) + return dct + + +@register +class ProgressUpdateEventBody(BaseSchema): + """ + "body" of ProgressUpdateEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "progressId": {"type": "string", "description": "The ID that was introduced in the initial `progressStart` event."}, + "message": {"type": "string", "description": "More detailed progress message. If omitted, the previous message (if any) is used."}, + "percentage": { + "type": "number", + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, progressId, message=None, percentage=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string progressId: The ID that was introduced in the initial `progressStart` event. + :param string message: More detailed progress message. If omitted, the previous message (if any) is used. + :param number percentage: Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown. + """ + self.progressId = progressId + self.message = message + self.percentage = percentage + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + progressId = self.progressId + message = self.message + percentage = self.percentage + dct = { + "progressId": progressId, + } + if message is not None: + dct["message"] = message + if percentage is not None: + dct["percentage"] = percentage + dct.update(self.kwargs) + return dct + + +@register +class ProgressEndEventBody(BaseSchema): + """ + "body" of ProgressEndEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "progressId": {"type": "string", "description": "The ID that was introduced in the initial `ProgressStartEvent`."}, + "message": {"type": "string", "description": "More detailed progress message. If omitted, the previous message (if any) is used."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, progressId, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string progressId: The ID that was introduced in the initial `ProgressStartEvent`. + :param string message: More detailed progress message. If omitted, the previous message (if any) is used. + """ + self.progressId = progressId + self.message = message + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + progressId = self.progressId + message = self.message + dct = { + "progressId": progressId, + } + if message is not None: + dct["message"] = message + dct.update(self.kwargs) + return dct + + +@register +class InvalidatedEventBody(BaseSchema): + """ + "body" of InvalidatedEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "areas": { + "type": "array", + "description": "Set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honoring the areas but there are no guarantees. If this property is missing, empty, or if values are not understood, the client should assume a single value `all`.", + "items": {"$ref": "#/definitions/InvalidatedAreas"}, + }, + "threadId": {"type": "integer", "description": "If specified, the client only needs to refetch data related to this thread."}, + "stackFrameId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored).", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, areas=None, threadId=None, stackFrameId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array areas: Set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honoring the areas but there are no guarantees. If this property is missing, empty, or if values are not understood, the client should assume a single value `all`. + :param integer threadId: If specified, the client only needs to refetch data related to this thread. + :param integer stackFrameId: If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored). + """ + self.areas = areas + if update_ids_from_dap and self.areas: + for o in self.areas: + InvalidatedAreas.update_dict_ids_from_dap(o) + self.threadId = threadId + self.stackFrameId = stackFrameId + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + areas = self.areas + if areas and hasattr(areas[0], "to_dict"): + areas = [x.to_dict() for x in areas] + threadId = self.threadId + stackFrameId = self.stackFrameId + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = {} + if areas is not None: + dct["areas"] = [InvalidatedAreas.update_dict_ids_to_dap(o) for o in areas] if (update_ids_to_dap and areas) else areas + if threadId is not None: + dct["threadId"] = threadId + if stackFrameId is not None: + dct["stackFrameId"] = stackFrameId + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "threadId" in dct: + dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + return dct + + +@register +class MemoryEventBody(BaseSchema): + """ + "body" of MemoryEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "memoryReference": {"type": "string", "description": "Memory reference of a memory range that has been updated."}, + "offset": {"type": "integer", "description": "Starting offset in bytes where memory has been updated. Can be negative."}, + "count": {"type": "integer", "description": "Number of bytes updated."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, memoryReference, offset, count, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string memoryReference: Memory reference of a memory range that has been updated. + :param integer offset: Starting offset in bytes where memory has been updated. Can be negative. + :param integer count: Number of bytes updated. + """ + self.memoryReference = memoryReference + self.offset = offset + self.count = count + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + memoryReference = self.memoryReference + offset = self.offset + count = self.count + dct = { + "memoryReference": memoryReference, + "offset": offset, + "count": count, + } + dct.update(self.kwargs) + return dct + + +@register +class RunInTerminalRequestArgumentsEnv(BaseSchema): + """ + "env" of RunInTerminalRequestArguments + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ """ + + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = {} + dct.update(self.kwargs) + return dct + + +@register +class RunInTerminalResponseBody(BaseSchema): + """ + "body" of RunInTerminalResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "processId": {"type": "integer", "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)."}, + "shellProcessId": { + "type": "integer", + "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1).", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, processId=None, shellProcessId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer processId: The process ID. The value should be less than or equal to 2147483647 (2^31-1). + :param integer shellProcessId: The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1). + """ + self.processId = processId + self.shellProcessId = shellProcessId + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + processId = self.processId + shellProcessId = self.shellProcessId + dct = {} + if processId is not None: + dct["processId"] = processId + if shellProcessId is not None: + dct["shellProcessId"] = shellProcessId + dct.update(self.kwargs) + return dct + + +@register +class StartDebuggingRequestArgumentsConfiguration(BaseSchema): + """ + "configuration" of StartDebuggingRequestArguments + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ """ + + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = {} + dct.update(self.kwargs) + return dct + + +@register +class BreakpointLocationsResponseBody(BaseSchema): + """ + "body" of BreakpointLocationsResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/BreakpointLocation"}, + "description": "Sorted set of possible breakpoint locations.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array breakpoints: Sorted set of possible breakpoint locations. + """ + self.breakpoints = breakpoints + if update_ids_from_dap and self.breakpoints: + for o in self.breakpoints: + BreakpointLocation.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] + dct = { + "breakpoints": [BreakpointLocation.update_dict_ids_to_dap(o) for o in breakpoints] + if (update_ids_to_dap and breakpoints) + else breakpoints, + } + dct.update(self.kwargs) + return dct + + +@register +class SetBreakpointsResponseBody(BaseSchema): + """ + "body" of SetBreakpointsResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/Breakpoint"}, + "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array breakpoints: Information about the breakpoints. + The array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments. + """ + self.breakpoints = breakpoints + if update_ids_from_dap and self.breakpoints: + for o in self.breakpoints: + Breakpoint.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] + dct = { + "breakpoints": [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] + if (update_ids_to_dap and breakpoints) + else breakpoints, + } + dct.update(self.kwargs) + return dct + + +@register +class SetFunctionBreakpointsResponseBody(BaseSchema): + """ + "body" of SetFunctionBreakpointsResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/Breakpoint"}, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array breakpoints: Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array. + """ + self.breakpoints = breakpoints + if update_ids_from_dap and self.breakpoints: + for o in self.breakpoints: + Breakpoint.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] + dct = { + "breakpoints": [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] + if (update_ids_to_dap and breakpoints) + else breakpoints, + } + dct.update(self.kwargs) + return dct + + +@register +class SetExceptionBreakpointsResponseBody(BaseSchema): + """ + "body" of SetExceptionBreakpointsResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/Breakpoint"}, + "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, breakpoints=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array breakpoints: Information about the exception breakpoints or filters. + The breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information. + """ + self.breakpoints = breakpoints + if update_ids_from_dap and self.breakpoints: + for o in self.breakpoints: + Breakpoint.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] + dct = {} + if breakpoints is not None: + dct["breakpoints"] = ( + [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints + ) + dct.update(self.kwargs) + return dct + + +@register +class DataBreakpointInfoResponseBody(BaseSchema): + """ + "body" of DataBreakpointInfoResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "dataId": { + "type": ["string", "null"], + "description": "An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`.", + }, + "description": { + "type": "string", + "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available.", + }, + "accessTypes": { + "type": "array", + "items": {"$ref": "#/definitions/DataBreakpointAccessType"}, + "description": "Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information.", + }, + "canPersist": { + "type": "boolean", + "description": "Attribute indicates that a potential data breakpoint could be persisted across sessions.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, dataId, description, accessTypes=None, canPersist=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param ['string', 'null'] dataId: An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`. + :param string description: UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available. + :param array accessTypes: Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information. + :param boolean canPersist: Attribute indicates that a potential data breakpoint could be persisted across sessions. + """ + self.dataId = dataId + self.description = description + self.accessTypes = accessTypes + if update_ids_from_dap and self.accessTypes: + for o in self.accessTypes: + DataBreakpointAccessType.update_dict_ids_from_dap(o) + self.canPersist = canPersist + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dataId = self.dataId + description = self.description + accessTypes = self.accessTypes + if accessTypes and hasattr(accessTypes[0], "to_dict"): + accessTypes = [x.to_dict() for x in accessTypes] + canPersist = self.canPersist + dct = { + "dataId": dataId, + "description": description, + } + if accessTypes is not None: + dct["accessTypes"] = ( + [DataBreakpointAccessType.update_dict_ids_to_dap(o) for o in accessTypes] + if (update_ids_to_dap and accessTypes) + else accessTypes + ) + if canPersist is not None: + dct["canPersist"] = canPersist + dct.update(self.kwargs) + return dct + + +@register +class SetDataBreakpointsResponseBody(BaseSchema): + """ + "body" of SetDataBreakpointsResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/Breakpoint"}, + "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array breakpoints: Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array. + """ + self.breakpoints = breakpoints + if update_ids_from_dap and self.breakpoints: + for o in self.breakpoints: + Breakpoint.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] + dct = { + "breakpoints": [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] + if (update_ids_to_dap and breakpoints) + else breakpoints, + } + dct.update(self.kwargs) + return dct + + +@register +class SetInstructionBreakpointsResponseBody(BaseSchema): + """ + "body" of SetInstructionBreakpointsResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "breakpoints": { + "type": "array", + "items": {"$ref": "#/definitions/Breakpoint"}, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array breakpoints: Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array. + """ + self.breakpoints = breakpoints + if update_ids_from_dap and self.breakpoints: + for o in self.breakpoints: + Breakpoint.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] + dct = { + "breakpoints": [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] + if (update_ids_to_dap and breakpoints) + else breakpoints, + } + dct.update(self.kwargs) + return dct + + +@register +class ContinueResponseBody(BaseSchema): + """ + "body" of ContinueResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "allThreadsContinued": { + "type": "boolean", + "description": "The value True (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, allThreadsContinued=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param boolean allThreadsContinued: The value true (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed. + """ + self.allThreadsContinued = allThreadsContinued + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + allThreadsContinued = self.allThreadsContinued + dct = {} + if allThreadsContinued is not None: + dct["allThreadsContinued"] = allThreadsContinued + dct.update(self.kwargs) + return dct + + +@register +class StackTraceResponseBody(BaseSchema): + """ + "body" of StackTraceResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "stackFrames": { + "type": "array", + "items": {"$ref": "#/definitions/StackFrame"}, + "description": "The frames of the stack frame. If the array has length zero, there are no stack frames available.\nThis means that there is no location information available.", + }, + "totalFrames": { + "type": "integer", + "description": "The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, stackFrames, totalFrames=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array stackFrames: The frames of the stack frame. If the array has length zero, there are no stack frames available. + This means that there is no location information available. + :param integer totalFrames: The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client. + """ + self.stackFrames = stackFrames + if update_ids_from_dap and self.stackFrames: + for o in self.stackFrames: + StackFrame.update_dict_ids_from_dap(o) + self.totalFrames = totalFrames + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + stackFrames = self.stackFrames + if stackFrames and hasattr(stackFrames[0], "to_dict"): + stackFrames = [x.to_dict() for x in stackFrames] + totalFrames = self.totalFrames + dct = { + "stackFrames": [StackFrame.update_dict_ids_to_dap(o) for o in stackFrames] + if (update_ids_to_dap and stackFrames) + else stackFrames, + } + if totalFrames is not None: + dct["totalFrames"] = totalFrames + dct.update(self.kwargs) + return dct + + +@register +class ScopesResponseBody(BaseSchema): + """ + "body" of ScopesResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "scopes": { + "type": "array", + "items": {"$ref": "#/definitions/Scope"}, + "description": "The scopes of the stack frame. If the array has length zero, there are no scopes available.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, scopes, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array scopes: The scopes of the stack frame. If the array has length zero, there are no scopes available. + """ + self.scopes = scopes + if update_ids_from_dap and self.scopes: + for o in self.scopes: + Scope.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + scopes = self.scopes + if scopes and hasattr(scopes[0], "to_dict"): + scopes = [x.to_dict() for x in scopes] + dct = { + "scopes": [Scope.update_dict_ids_to_dap(o) for o in scopes] if (update_ids_to_dap and scopes) else scopes, + } + dct.update(self.kwargs) + return dct + + +@register +class VariablesResponseBody(BaseSchema): + """ + "body" of VariablesResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "variables": { + "type": "array", + "items": {"$ref": "#/definitions/Variable"}, + "description": "All (or a range) of variables for the given variable reference.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, variables, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array variables: All (or a range) of variables for the given variable reference. + """ + self.variables = variables + if update_ids_from_dap and self.variables: + for o in self.variables: + Variable.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + variables = self.variables + if variables and hasattr(variables[0], "to_dict"): + variables = [x.to_dict() for x in variables] + dct = { + "variables": [Variable.update_dict_ids_to_dap(o) for o in variables] if (update_ids_to_dap and variables) else variables, + } + dct.update(self.kwargs) + return dct + + +@register +class SetVariableResponseBody(BaseSchema): + """ + "body" of SetVariableResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "value": {"type": "string", "description": "The new value of the variable."}, + "type": {"type": "string", "description": "The type of the new value. Typically shown in the UI when hovering over the value."}, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + value, + type=None, + variablesReference=None, + namedVariables=None, + indexedVariables=None, + memoryReference=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string value: The new value of the variable. + :param string type: The type of the new value. Typically shown in the UI when hovering over the value. + :param integer variablesReference: If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. + :param integer namedVariables: The number of named child variables. + The client can use this information to present the variables in a paged UI and fetch them in chunks. + The value should be less than or equal to 2147483647 (2^31-1). + :param integer indexedVariables: The number of indexed child variables. + The client can use this information to present the variables in a paged UI and fetch them in chunks. + The value should be less than or equal to 2147483647 (2^31-1). + :param string memoryReference: A memory reference to a location appropriate for this result. + For pointer type eval results, this is generally a reference to the memory address contained in the pointer. + This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true. + """ + self.value = value + self.type = type + self.variablesReference = variablesReference + self.namedVariables = namedVariables + self.indexedVariables = indexedVariables + self.memoryReference = memoryReference + if update_ids_from_dap: + self.variablesReference = self._translate_id_from_dap(self.variablesReference) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + value = self.value + type = self.type # noqa (assign to builtin) + variablesReference = self.variablesReference + namedVariables = self.namedVariables + indexedVariables = self.indexedVariables + memoryReference = self.memoryReference + if update_ids_to_dap: + if variablesReference is not None: + variablesReference = self._translate_id_to_dap(variablesReference) + dct = { + "value": value, + } + if type is not None: + dct["type"] = type + if variablesReference is not None: + dct["variablesReference"] = variablesReference + if namedVariables is not None: + dct["namedVariables"] = namedVariables + if indexedVariables is not None: + dct["indexedVariables"] = indexedVariables + if memoryReference is not None: + dct["memoryReference"] = memoryReference + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + return dct + + +@register +class SourceResponseBody(BaseSchema): + """ + "body" of SourceResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "content": {"type": "string", "description": "Content of the source reference."}, + "mimeType": {"type": "string", "description": "Content type (MIME type) of the source."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, content, mimeType=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string content: Content of the source reference. + :param string mimeType: Content type (MIME type) of the source. + """ + self.content = content + self.mimeType = mimeType + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + content = self.content + mimeType = self.mimeType + dct = { + "content": content, + } + if mimeType is not None: + dct["mimeType"] = mimeType + dct.update(self.kwargs) + return dct + + +@register +class ThreadsResponseBody(BaseSchema): + """ + "body" of ThreadsResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"threads": {"type": "array", "items": {"$ref": "#/definitions/Thread"}, "description": "All threads."}} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, threads, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array threads: All threads. + """ + self.threads = threads + if update_ids_from_dap and self.threads: + for o in self.threads: + Thread.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threads = self.threads + if threads and hasattr(threads[0], "to_dict"): + threads = [x.to_dict() for x in threads] + dct = { + "threads": [Thread.update_dict_ids_to_dap(o) for o in threads] if (update_ids_to_dap and threads) else threads, + } + dct.update(self.kwargs) + return dct + + +@register +class ModulesResponseBody(BaseSchema): + """ + "body" of ModulesResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "modules": {"type": "array", "items": {"$ref": "#/definitions/Module"}, "description": "All modules or range of modules."}, + "totalModules": {"type": "integer", "description": "The total number of modules available."}, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, modules, totalModules=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array modules: All modules or range of modules. + :param integer totalModules: The total number of modules available. + """ + self.modules = modules + if update_ids_from_dap and self.modules: + for o in self.modules: + Module.update_dict_ids_from_dap(o) + self.totalModules = totalModules + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + modules = self.modules + if modules and hasattr(modules[0], "to_dict"): + modules = [x.to_dict() for x in modules] + totalModules = self.totalModules + dct = { + "modules": [Module.update_dict_ids_to_dap(o) for o in modules] if (update_ids_to_dap and modules) else modules, + } + if totalModules is not None: + dct["totalModules"] = totalModules + dct.update(self.kwargs) + return dct + + +@register +class LoadedSourcesResponseBody(BaseSchema): + """ + "body" of LoadedSourcesResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"sources": {"type": "array", "items": {"$ref": "#/definitions/Source"}, "description": "Set of loaded sources."}} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, sources, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array sources: Set of loaded sources. + """ + self.sources = sources + if update_ids_from_dap and self.sources: + for o in self.sources: + Source.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + sources = self.sources + if sources and hasattr(sources[0], "to_dict"): + sources = [x.to_dict() for x in sources] + dct = { + "sources": [Source.update_dict_ids_to_dap(o) for o in sources] if (update_ids_to_dap and sources) else sources, + } + dct.update(self.kwargs) + return dct + + +@register +class EvaluateResponseBody(BaseSchema): + """ + "body" of EvaluateResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "result": {"type": "string", "description": "The result of the evaluate request."}, + "type": { + "type": "string", + "description": "The type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True.", + }, + "presentationHint": { + "description": "Properties of an evaluate result that can be used to determine how to render the result in the UI.", + "type": "VariablePresentationHint", + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", + }, + } + __refs__ = set(["presentationHint"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + result, + variablesReference, + type=None, + presentationHint=None, + namedVariables=None, + indexedVariables=None, + memoryReference=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string result: The result of the evaluate request. + :param integer variablesReference: If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. + :param string type: The type of the evaluate result. + This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true. + :param VariablePresentationHint presentationHint: Properties of an evaluate result that can be used to determine how to render the result in the UI. + :param integer namedVariables: The number of named child variables. + The client can use this information to present the variables in a paged UI and fetch them in chunks. + The value should be less than or equal to 2147483647 (2^31-1). + :param integer indexedVariables: The number of indexed child variables. + The client can use this information to present the variables in a paged UI and fetch them in chunks. + The value should be less than or equal to 2147483647 (2^31-1). + :param string memoryReference: A memory reference to a location appropriate for this result. + For pointer type eval results, this is generally a reference to the memory address contained in the pointer. + This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true. + """ + self.result = result + self.variablesReference = variablesReference + self.type = type + if presentationHint is None: + self.presentationHint = VariablePresentationHint() + else: + self.presentationHint = ( + VariablePresentationHint(update_ids_from_dap=update_ids_from_dap, **presentationHint) + if presentationHint.__class__ != VariablePresentationHint + else presentationHint + ) + self.namedVariables = namedVariables + self.indexedVariables = indexedVariables + self.memoryReference = memoryReference + if update_ids_from_dap: + self.variablesReference = self._translate_id_from_dap(self.variablesReference) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + result = self.result + variablesReference = self.variablesReference + type = self.type # noqa (assign to builtin) + presentationHint = self.presentationHint + namedVariables = self.namedVariables + indexedVariables = self.indexedVariables + memoryReference = self.memoryReference + if update_ids_to_dap: + if variablesReference is not None: + variablesReference = self._translate_id_to_dap(variablesReference) + dct = { + "result": result, + "variablesReference": variablesReference, + } + if type is not None: + dct["type"] = type + if presentationHint is not None: + dct["presentationHint"] = presentationHint.to_dict(update_ids_to_dap=update_ids_to_dap) + if namedVariables is not None: + dct["namedVariables"] = namedVariables + if indexedVariables is not None: + dct["indexedVariables"] = indexedVariables + if memoryReference is not None: + dct["memoryReference"] = memoryReference + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + return dct + + +@register +class SetExpressionResponseBody(BaseSchema): + """ + "body" of SetExpressionResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "value": {"type": "string", "description": "The new value of the expression."}, + "type": { + "type": "string", + "description": "The type of the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True.", + }, + "presentationHint": { + "description": "Properties of a value that can be used to determine how to render the result in the UI.", + "type": "VariablePresentationHint", + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", + }, + } + __refs__ = set(["presentationHint"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__( + self, + value, + type=None, + presentationHint=None, + variablesReference=None, + namedVariables=None, + indexedVariables=None, + memoryReference=None, + update_ids_from_dap=False, + **kwargs, + ): # noqa (update_ids_from_dap may be unused) + """ + :param string value: The new value of the expression. + :param string type: The type of the value. + This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true. + :param VariablePresentationHint presentationHint: Properties of a value that can be used to determine how to render the result in the UI. + :param integer variablesReference: If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. + :param integer namedVariables: The number of named child variables. + The client can use this information to present the variables in a paged UI and fetch them in chunks. + The value should be less than or equal to 2147483647 (2^31-1). + :param integer indexedVariables: The number of indexed child variables. + The client can use this information to present the variables in a paged UI and fetch them in chunks. + The value should be less than or equal to 2147483647 (2^31-1). + :param string memoryReference: A memory reference to a location appropriate for this result. + For pointer type eval results, this is generally a reference to the memory address contained in the pointer. + This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true. + """ + self.value = value + self.type = type + if presentationHint is None: + self.presentationHint = VariablePresentationHint() + else: + self.presentationHint = ( + VariablePresentationHint(update_ids_from_dap=update_ids_from_dap, **presentationHint) + if presentationHint.__class__ != VariablePresentationHint + else presentationHint + ) + self.variablesReference = variablesReference + self.namedVariables = namedVariables + self.indexedVariables = indexedVariables + self.memoryReference = memoryReference + if update_ids_from_dap: + self.variablesReference = self._translate_id_from_dap(self.variablesReference) + self.kwargs = kwargs + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + value = self.value + type = self.type # noqa (assign to builtin) + presentationHint = self.presentationHint + variablesReference = self.variablesReference + namedVariables = self.namedVariables + indexedVariables = self.indexedVariables + memoryReference = self.memoryReference + if update_ids_to_dap: + if variablesReference is not None: + variablesReference = self._translate_id_to_dap(variablesReference) + dct = { + "value": value, + } + if type is not None: + dct["type"] = type + if presentationHint is not None: + dct["presentationHint"] = presentationHint.to_dict(update_ids_to_dap=update_ids_to_dap) + if variablesReference is not None: + dct["variablesReference"] = variablesReference + if namedVariables is not None: + dct["namedVariables"] = namedVariables + if indexedVariables is not None: + dct["indexedVariables"] = indexedVariables + if memoryReference is not None: + dct["memoryReference"] = memoryReference + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if "variablesReference" in dct: + dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + return dct + + +@register +class StepInTargetsResponseBody(BaseSchema): + """ + "body" of StepInTargetsResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "targets": { + "type": "array", + "items": {"$ref": "#/definitions/StepInTarget"}, + "description": "The possible step-in targets of the specified source location.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, targets, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array targets: The possible step-in targets of the specified source location. + """ + self.targets = targets + if update_ids_from_dap and self.targets: + for o in self.targets: + StepInTarget.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + targets = self.targets + if targets and hasattr(targets[0], "to_dict"): + targets = [x.to_dict() for x in targets] + dct = { + "targets": [StepInTarget.update_dict_ids_to_dap(o) for o in targets] if (update_ids_to_dap and targets) else targets, + } + dct.update(self.kwargs) + return dct + + +@register +class GotoTargetsResponseBody(BaseSchema): + """ + "body" of GotoTargetsResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "targets": { + "type": "array", + "items": {"$ref": "#/definitions/GotoTarget"}, + "description": "The possible goto targets of the specified location.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, targets, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array targets: The possible goto targets of the specified location. + """ + self.targets = targets + if update_ids_from_dap and self.targets: + for o in self.targets: + GotoTarget.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + targets = self.targets + if targets and hasattr(targets[0], "to_dict"): + targets = [x.to_dict() for x in targets] + dct = { + "targets": [GotoTarget.update_dict_ids_to_dap(o) for o in targets] if (update_ids_to_dap and targets) else targets, + } + dct.update(self.kwargs) + return dct + + +@register +class CompletionsResponseBody(BaseSchema): + """ + "body" of CompletionsResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "targets": {"type": "array", "items": {"$ref": "#/definitions/CompletionItem"}, "description": "The possible completions for ."} + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, targets, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array targets: The possible completions for . + """ + self.targets = targets + if update_ids_from_dap and self.targets: + for o in self.targets: + CompletionItem.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + targets = self.targets + if targets and hasattr(targets[0], "to_dict"): + targets = [x.to_dict() for x in targets] + dct = { + "targets": [CompletionItem.update_dict_ids_to_dap(o) for o in targets] if (update_ids_to_dap and targets) else targets, + } + dct.update(self.kwargs) + return dct + + +@register +class ExceptionInfoResponseBody(BaseSchema): + """ + "body" of ExceptionInfoResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "exceptionId": {"type": "string", "description": "ID of the exception that was thrown."}, + "description": {"type": "string", "description": "Descriptive text for the exception."}, + "breakMode": {"description": "Mode that caused the exception notification to be raised.", "type": "ExceptionBreakMode"}, + "details": {"description": "Detailed information about the exception.", "type": "ExceptionDetails"}, + } + __refs__ = set(["breakMode", "details"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, exceptionId, breakMode, description=None, details=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string exceptionId: ID of the exception that was thrown. + :param ExceptionBreakMode breakMode: Mode that caused the exception notification to be raised. + :param string description: Descriptive text for the exception. + :param ExceptionDetails details: Detailed information about the exception. + """ + self.exceptionId = exceptionId + if breakMode is not None: + assert breakMode in ExceptionBreakMode.VALID_VALUES + self.breakMode = breakMode + self.description = description + if details is None: + self.details = ExceptionDetails() + else: + self.details = ( + ExceptionDetails(update_ids_from_dap=update_ids_from_dap, **details) if details.__class__ != ExceptionDetails else details + ) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + exceptionId = self.exceptionId + breakMode = self.breakMode + description = self.description + details = self.details + dct = { + "exceptionId": exceptionId, + "breakMode": breakMode, + } + if description is not None: + dct["description"] = description + if details is not None: + dct["details"] = details.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register +class ReadMemoryResponseBody(BaseSchema): + """ + "body" of ReadMemoryResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "address": { + "type": "string", + "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with `0x`, or as a decimal value otherwise.", + }, + "unreadableBytes": { + "type": "integer", + "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds.", + }, + "data": { + "type": "string", + "description": "The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, address, unreadableBytes=None, data=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string address: The address of the first byte of data returned. + Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise. + :param integer unreadableBytes: The number of unreadable bytes encountered after the last successfully read byte. + This can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds. + :param string data: The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory. + """ + self.address = address + self.unreadableBytes = unreadableBytes + self.data = data + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + address = self.address + unreadableBytes = self.unreadableBytes + data = self.data + dct = { + "address": address, + } + if unreadableBytes is not None: + dct["unreadableBytes"] = unreadableBytes + if data is not None: + dct["data"] = data + dct.update(self.kwargs) + return dct + + +@register +class WriteMemoryResponseBody(BaseSchema): + """ + "body" of WriteMemoryResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "offset": { + "type": "integer", + "description": "Property that should be returned when `allowPartial` is True to indicate the offset of the first byte of data successfully written. Can be negative.", + }, + "bytesWritten": { + "type": "integer", + "description": "Property that should be returned when `allowPartial` is True to indicate the number of bytes starting from address that were successfully written.", + }, + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, offset=None, bytesWritten=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param integer offset: Property that should be returned when `allowPartial` is true to indicate the offset of the first byte of data successfully written. Can be negative. + :param integer bytesWritten: Property that should be returned when `allowPartial` is true to indicate the number of bytes starting from address that were successfully written. + """ + self.offset = offset + self.bytesWritten = bytesWritten + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + offset = self.offset + bytesWritten = self.bytesWritten + dct = {} + if offset is not None: + dct["offset"] = offset + if bytesWritten is not None: + dct["bytesWritten"] = bytesWritten + dct.update(self.kwargs) + return dct + + +@register +class DisassembleResponseBody(BaseSchema): + """ + "body" of DisassembleResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "instructions": { + "type": "array", + "items": {"$ref": "#/definitions/DisassembledInstruction"}, + "description": "The list of disassembled instructions.", + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, instructions, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array instructions: The list of disassembled instructions. + """ + self.instructions = instructions + if update_ids_from_dap and self.instructions: + for o in self.instructions: + DisassembledInstruction.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + instructions = self.instructions + if instructions and hasattr(instructions[0], "to_dict"): + instructions = [x.to_dict() for x in instructions] + dct = { + "instructions": [DisassembledInstruction.update_dict_ids_to_dap(o) for o in instructions] + if (update_ids_to_dap and instructions) + else instructions, + } + dct.update(self.kwargs) + return dct + + +@register +class MessageVariables(BaseSchema): + """ + "variables" of Message + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ """ + + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = {} + dct.update(self.kwargs) + return dct + + +@register +class PydevdSystemInfoResponseBody(BaseSchema): + """ + "body" of PydevdSystemInfoResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "python": {"description": "Information about the python version running in the current process.", "type": "PydevdPythonInfo"}, + "platform": { + "description": "Information about the plarforn on which the current process is running.", + "type": "PydevdPlatformInfo", + }, + "process": {"description": "Information about the current process.", "type": "PydevdProcessInfo"}, + "pydevd": {"description": "Information about pydevd.", "type": "PydevdInfo"}, + } + __refs__ = set(["python", "platform", "process", "pydevd"]) + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, python, platform, process, pydevd, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param PydevdPythonInfo python: Information about the python version running in the current process. + :param PydevdPlatformInfo platform: Information about the plarforn on which the current process is running. + :param PydevdProcessInfo process: Information about the current process. + :param PydevdInfo pydevd: Information about pydevd. + """ + if python is None: + self.python = PydevdPythonInfo() + else: + self.python = ( + PydevdPythonInfo(update_ids_from_dap=update_ids_from_dap, **python) if python.__class__ != PydevdPythonInfo else python + ) + if platform is None: + self.platform = PydevdPlatformInfo() + else: + self.platform = ( + PydevdPlatformInfo(update_ids_from_dap=update_ids_from_dap, **platform) + if platform.__class__ != PydevdPlatformInfo + else platform + ) + if process is None: + self.process = PydevdProcessInfo() + else: + self.process = ( + PydevdProcessInfo(update_ids_from_dap=update_ids_from_dap, **process) if process.__class__ != PydevdProcessInfo else process + ) + if pydevd is None: + self.pydevd = PydevdInfo() + else: + self.pydevd = PydevdInfo(update_ids_from_dap=update_ids_from_dap, **pydevd) if pydevd.__class__ != PydevdInfo else pydevd + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + python = self.python + platform = self.platform + process = self.process + pydevd = self.pydevd + dct = { + "python": python.to_dict(update_ids_to_dap=update_ids_to_dap), + "platform": platform.to_dict(update_ids_to_dap=update_ids_to_dap), + "process": process.to_dict(update_ids_to_dap=update_ids_to_dap), + "pydevd": pydevd.to_dict(update_ids_to_dap=update_ids_to_dap), + } + dct.update(self.kwargs) + return dct + + +@register +class PydevdAuthorizeResponseBody(BaseSchema): + """ + "body" of PydevdAuthorizeResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {"clientAccessToken": {"type": "string", "description": "The access token to access the client (i.e.: usually the IDE)."}} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ["kwargs"] + + def __init__(self, clientAccessToken, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string clientAccessToken: The access token to access the client (i.e.: usually the IDE). + """ + self.clientAccessToken = clientAccessToken + self.kwargs = kwargs + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + clientAccessToken = self.clientAccessToken + dct = { + "clientAccessToken": clientAccessToken, + } + dct.update(self.kwargs) + return dct diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema_log.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema_log.py new file mode 100644 index 0000000..b3dda5a --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema_log.py @@ -0,0 +1,45 @@ +import os +import traceback +from _pydevd_bundle.pydevd_constants import ForkSafeLock + +_pid = os.getpid() +_pid_msg = "%s: " % (_pid,) + +_debug_lock = ForkSafeLock() + +DEBUG = False +DEBUG_FILE = os.path.join(os.path.dirname(__file__), "__debug_output__.txt") + + +def debug(msg): + if DEBUG: + with _debug_lock: + _pid_prefix = _pid_msg + if isinstance(msg, bytes): + _pid_prefix = _pid_prefix.encode("utf-8") + + if not msg.endswith(b"\r") and not msg.endswith(b"\n"): + msg += b"\n" + mode = "a+b" + else: + if not msg.endswith("\r") and not msg.endswith("\n"): + msg += "\n" + mode = "a+" + with open(DEBUG_FILE, mode) as stream: + stream.write(_pid_prefix) + stream.write(msg) + + +def debug_exception(msg=None): + if DEBUG: + if msg: + debug(msg) + + with _debug_lock: + with open(DEBUG_FILE, "a+") as stream: + _pid_prefix = _pid_msg + if isinstance(msg, bytes): + _pid_prefix = _pid_prefix.encode("utf-8") + stream.write(_pid_prefix) + + traceback.print_exc(file=stream) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevconsole_code.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevconsole_code.py new file mode 100644 index 0000000..760036e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevconsole_code.py @@ -0,0 +1,553 @@ +""" +A copy of the code module in the standard library with some changes to work with +async evaluation. + +Utilities needed to emulate Python's interactive interpreter. +""" + +# Inspired by similar code by Jeff Epler and Fredrik Lundh. + +import sys +import traceback +import inspect + +# START --------------------------- from codeop import CommandCompiler, compile_command +# START --------------------------- from codeop import CommandCompiler, compile_command +# START --------------------------- from codeop import CommandCompiler, compile_command +# START --------------------------- from codeop import CommandCompiler, compile_command +# START --------------------------- from codeop import CommandCompiler, compile_command +r"""Utilities to compile possibly incomplete Python source code. + +This module provides two interfaces, broadly similar to the builtin +function compile(), which take program text, a filename and a 'mode' +and: + +- Return code object if the command is complete and valid +- Return None if the command is incomplete +- Raise SyntaxError, ValueError or OverflowError if the command is a + syntax error (OverflowError and ValueError can be produced by + malformed literals). + +Approach: + +First, check if the source consists entirely of blank lines and +comments; if so, replace it with 'pass', because the built-in +parser doesn't always do the right thing for these. + +Compile three times: as is, with \n, and with \n\n appended. If it +compiles as is, it's complete. If it compiles with one \n appended, +we expect more. If it doesn't compile either way, we compare the +error we get when compiling with \n or \n\n appended. If the errors +are the same, the code is broken. But if the errors are different, we +expect more. Not intuitive; not even guaranteed to hold in future +releases; but this matches the compiler's behavior from Python 1.4 +through 2.2, at least. + +Caveat: + +It is possible (but not likely) that the parser stops parsing with a +successful outcome before reaching the end of the source; in this +case, trailing symbols may be ignored instead of causing an error. +For example, a backslash followed by two newlines may be followed by +arbitrary garbage. This will be fixed once the API for the parser is +better. + +The two interfaces are: + +compile_command(source, filename, symbol): + + Compiles a single command in the manner described above. + +CommandCompiler(): + + Instances of this class have __call__ methods identical in + signature to compile_command; the difference is that if the + instance compiles program text containing a __future__ statement, + the instance 'remembers' and compiles all subsequent program texts + with the statement in force. + +The module also provides another class: + +Compile(): + + Instances of this class act like the built-in function compile, + but with 'memory' in the sense described above. +""" + +import __future__ + +_features = [getattr(__future__, fname) for fname in __future__.all_feature_names] + +__all__ = ["compile_command", "Compile", "CommandCompiler"] + +PyCF_DONT_IMPLY_DEDENT = 0x200 # Matches pythonrun.h + + +def _maybe_compile(compiler, source, filename, symbol): + # Check for source consisting of only blank lines and comments + for line in source.split("\n"): + line = line.strip() + if line and line[0] != "#": + break # Leave it alone + else: + if symbol != "eval": + source = "pass" # Replace it with a 'pass' statement + + err = err1 = err2 = None + code = code1 = code2 = None + + try: + code = compiler(source, filename, symbol) + except SyntaxError as err: + pass + + try: + code1 = compiler(source + "\n", filename, symbol) + except SyntaxError as e: + err1 = e + + try: + code2 = compiler(source + "\n\n", filename, symbol) + except SyntaxError as e: + err2 = e + + try: + if code: + return code + if not code1 and repr(err1) == repr(err2): + raise err1 + finally: + err1 = err2 = None + + +def _compile(source, filename, symbol): + return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT) + + +def compile_command(source, filename="", symbol="single"): + r"""Compile a command and determine whether it is incomplete. + + Arguments: + + source -- the source string; may contain \n characters + filename -- optional filename from which source was read; default + "" + symbol -- optional grammar start symbol; "single" (default) or "eval" + + Return value / exceptions raised: + + - Return a code object if the command is complete and valid + - Return None if the command is incomplete + - Raise SyntaxError, ValueError or OverflowError if the command is a + syntax error (OverflowError and ValueError can be produced by + malformed literals). + """ + return _maybe_compile(_compile, source, filename, symbol) + + +class Compile: + """Instances of this class behave much like the built-in compile + function, but if one is used to compile text containing a future + statement, it "remembers" and compiles all subsequent program texts + with the statement in force.""" + + def __init__(self): + self.flags = PyCF_DONT_IMPLY_DEDENT + + try: + from ast import PyCF_ALLOW_TOP_LEVEL_AWAIT + + self.flags |= PyCF_ALLOW_TOP_LEVEL_AWAIT + except: + pass + + def __call__(self, source, filename, symbol): + codeob = compile(source, filename, symbol, self.flags, 1) + for feature in _features: + if codeob.co_flags & feature.compiler_flag: + self.flags |= feature.compiler_flag + return codeob + + +class CommandCompiler: + """Instances of this class have __call__ methods identical in + signature to compile_command; the difference is that if the + instance compiles program text containing a __future__ statement, + the instance 'remembers' and compiles all subsequent program texts + with the statement in force.""" + + def __init__( + self, + ): + self.compiler = Compile() + + def __call__(self, source, filename="", symbol="single"): + r"""Compile a command and determine whether it is incomplete. + + Arguments: + + source -- the source string; may contain \n characters + filename -- optional filename from which source was read; + default "" + symbol -- optional grammar start symbol; "single" (default) or + "eval" + + Return value / exceptions raised: + + - Return a code object if the command is complete and valid + - Return None if the command is incomplete + - Raise SyntaxError, ValueError or OverflowError if the command is a + syntax error (OverflowError and ValueError can be produced by + malformed literals). + """ + return _maybe_compile(self.compiler, source, filename, symbol) + + +# END --------------------------- from codeop import CommandCompiler, compile_command +# END --------------------------- from codeop import CommandCompiler, compile_command +# END --------------------------- from codeop import CommandCompiler, compile_command +# END --------------------------- from codeop import CommandCompiler, compile_command +# END --------------------------- from codeop import CommandCompiler, compile_command + + +__all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", "compile_command"] + +from _pydev_bundle._pydev_saved_modules import threading + + +class _EvalAwaitInNewEventLoop(threading.Thread): + def __init__(self, compiled, updated_globals, updated_locals): + threading.Thread.__init__(self) + self.daemon = True + self._compiled = compiled + self._updated_globals = updated_globals + self._updated_locals = updated_locals + + # Output + self.evaluated_value = None + self.exc = None + + async def _async_func(self): + return await eval(self._compiled, self._updated_locals, self._updated_globals) + + def run(self): + try: + import asyncio + + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) + self.evaluated_value = asyncio.run(self._async_func()) + except: + self.exc = sys.exc_info() + + +class InteractiveInterpreter: + """Base class for InteractiveConsole. + + This class deals with parsing and interpreter state (the user's + namespace); it doesn't deal with input buffering or prompting or + input file naming (the filename is always passed in explicitly). + + """ + + def __init__(self, locals=None): + """Constructor. + + The optional 'locals' argument specifies the dictionary in + which code will be executed; it defaults to a newly created + dictionary with key "__name__" set to "__console__" and key + "__doc__" set to None. + + """ + if locals is None: + locals = {"__name__": "__console__", "__doc__": None} + self.locals = locals + self.compile = CommandCompiler() + + def runsource(self, source, filename="", symbol="single"): + """Compile and run some source in the interpreter. + + Arguments are as for compile_command(). + + One of several things can happen: + + 1) The input is incorrect; compile_command() raised an + exception (SyntaxError or OverflowError). A syntax traceback + will be printed by calling the showsyntaxerror() method. + + 2) The input is incomplete, and more input is required; + compile_command() returned None. Nothing happens. + + 3) The input is complete; compile_command() returned a code + object. The code is executed by calling self.runcode() (which + also handles run-time exceptions, except for SystemExit). + + The return value is True in case 2, False in the other cases (unless + an exception is raised). The return value can be used to + decide whether to use sys.ps1 or sys.ps2 to prompt the next + line. + + """ + try: + code = self.compile(source, filename, symbol) + except (OverflowError, SyntaxError, ValueError): + # Case 1 + self.showsyntaxerror(filename) + return False + + if code is None: + # Case 2 + return True + + # Case 3 + self.runcode(code) + return False + + def runcode(self, code): + """Execute a code object. + + When an exception occurs, self.showtraceback() is called to + display a traceback. All exceptions are caught except + SystemExit, which is reraised. + + A note about KeyboardInterrupt: this exception may occur + elsewhere in this code, and may not always be caught. The + caller should be prepared to deal with it. + + """ + try: + is_async = False + if hasattr(inspect, "CO_COROUTINE"): + is_async = inspect.CO_COROUTINE & code.co_flags == inspect.CO_COROUTINE + + if is_async: + t = _EvalAwaitInNewEventLoop(code, self.locals, None) + t.start() + t.join() + + if t.exc: + raise t.exc[1].with_traceback(t.exc[2]) + + else: + exec(code, self.locals) + except SystemExit: + raise + except: + self.showtraceback() + + def showsyntaxerror(self, filename=None): + """Display the syntax error that just occurred. + + This doesn't display a stack trace because there isn't one. + + If a filename is given, it is stuffed in the exception instead + of what was there before (because Python's parser always uses + "" when reading from a string). + + The output is written by self.write(), below. + + """ + type, value, tb = sys.exc_info() + sys.last_type = type + sys.last_value = value + sys.last_traceback = tb + if filename and type is SyntaxError: + # Work hard to stuff the correct filename in the exception + try: + msg, (dummy_filename, lineno, offset, line) = value.args + except ValueError: + # Not the format we expect; leave it alone + pass + else: + # Stuff in the right filename + value = SyntaxError(msg, (filename, lineno, offset, line)) + sys.last_value = value + if sys.excepthook is sys.__excepthook__: + lines = traceback.format_exception_only(type, value) + self.write("".join(lines)) + else: + # If someone has set sys.excepthook, we let that take precedence + # over self.write + sys.excepthook(type, value, tb) + + def showtraceback(self): + """Display the exception that just occurred. + + We remove the first stack item because it is our own code. + + The output is written by self.write(), below. + + """ + sys.last_type, sys.last_value, last_tb = ei = sys.exc_info() + sys.last_traceback = last_tb + try: + lines = traceback.format_exception(ei[0], ei[1], last_tb.tb_next) + if sys.excepthook is sys.__excepthook__: + self.write("".join(lines)) + else: + # If someone has set sys.excepthook, we let that take precedence + # over self.write + sys.excepthook(ei[0], ei[1], last_tb) + finally: + last_tb = ei = None + + def write(self, data): + """Write a string. + + The base implementation writes to sys.stderr; a subclass may + replace this with a different implementation. + + """ + sys.stderr.write(data) + + +class InteractiveConsole(InteractiveInterpreter): + """Closely emulate the behavior of the interactive Python interpreter. + + This class builds on InteractiveInterpreter and adds prompting + using the familiar sys.ps1 and sys.ps2, and input buffering. + + """ + + def __init__(self, locals=None, filename=""): + """Constructor. + + The optional locals argument will be passed to the + InteractiveInterpreter base class. + + The optional filename argument should specify the (file)name + of the input stream; it will show up in tracebacks. + + """ + InteractiveInterpreter.__init__(self, locals) + self.filename = filename + self.resetbuffer() + + def resetbuffer(self): + """Reset the input buffer.""" + self.buffer = [] + + def interact(self, banner=None, exitmsg=None): + """Closely emulate the interactive Python console. + + The optional banner argument specifies the banner to print + before the first interaction; by default it prints a banner + similar to the one printed by the real Python interpreter, + followed by the current class name in parentheses (so as not + to confuse this with the real interpreter -- since it's so + close!). + + The optional exitmsg argument specifies the exit message + printed when exiting. Pass the empty string to suppress + printing an exit message. If exitmsg is not given or None, + a default message is printed. + + """ + try: + sys.ps1 + except AttributeError: + sys.ps1 = ">>> " + try: + sys.ps2 + except AttributeError: + sys.ps2 = "... " + cprt = 'Type "help", "copyright", "credits" or "license" for more information.' + if banner is None: + self.write("Python %s on %s\n%s\n(%s)\n" % (sys.version, sys.platform, cprt, self.__class__.__name__)) + elif banner: + self.write("%s\n" % str(banner)) + more = 0 + while 1: + try: + if more: + prompt = sys.ps2 + else: + prompt = sys.ps1 + try: + line = self.raw_input(prompt) + except EOFError: + self.write("\n") + break + else: + more = self.push(line) + except KeyboardInterrupt: + self.write("\nKeyboardInterrupt\n") + self.resetbuffer() + more = 0 + if exitmsg is None: + self.write("now exiting %s...\n" % self.__class__.__name__) + elif exitmsg != "": + self.write("%s\n" % exitmsg) + + def push(self, line): + """Push a line to the interpreter. + + The line should not have a trailing newline; it may have + internal newlines. The line is appended to a buffer and the + interpreter's runsource() method is called with the + concatenated contents of the buffer as source. If this + indicates that the command was executed or invalid, the buffer + is reset; otherwise, the command is incomplete, and the buffer + is left as it was after the line was appended. The return + value is 1 if more input is required, 0 if the line was dealt + with in some way (this is the same as runsource()). + + """ + self.buffer.append(line) + source = "\n".join(self.buffer) + more = self.runsource(source, self.filename) + if not more: + self.resetbuffer() + return more + + def raw_input(self, prompt=""): + """Write a prompt and read a line. + + The returned line does not include the trailing newline. + When the user enters the EOF key sequence, EOFError is raised. + + The base implementation uses the built-in function + input(); a subclass may replace this with a different + implementation. + + """ + return input(prompt) + + +def interact(banner=None, readfunc=None, local=None, exitmsg=None): + """Closely emulate the interactive Python interpreter. + + This is a backwards compatible interface to the InteractiveConsole + class. When readfunc is not specified, it attempts to import the + readline module to enable GNU readline if it is available. + + Arguments (all optional, all default to None): + + banner -- passed to InteractiveConsole.interact() + readfunc -- if not None, replaces InteractiveConsole.raw_input() + local -- passed to InteractiveInterpreter.__init__() + exitmsg -- passed to InteractiveConsole.interact() + + """ + console = InteractiveConsole(local) + if readfunc is not None: + console.raw_input = readfunc + else: + try: + import readline + except ImportError: + pass + console.interact(banner, exitmsg) + + +if __name__ == "__main__": + import argparse + + parser = argparse.ArgumentParser() + parser.add_argument("-q", action="store_true", help="don't print version and copyright messages") + args = parser.parse_args() + if args.q or sys.flags.quiet: + banner = "" + else: + banner = None + interact(banner) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py new file mode 100644 index 0000000..8bfb1e4 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py @@ -0,0 +1,41 @@ +# Defines which version of the PyDBAdditionalThreadInfo we'll use. +from _pydevd_bundle.pydevd_constants import ENV_FALSE_LOWER_VALUES, USE_CYTHON_FLAG, ENV_TRUE_LOWER_VALUES + +if USE_CYTHON_FLAG in ENV_TRUE_LOWER_VALUES: + # We must import the cython version if forcing cython + from _pydevd_bundle.pydevd_cython_wrapper import ( + PyDBAdditionalThreadInfo, + set_additional_thread_info, + _set_additional_thread_info_lock, # @UnusedImport + any_thread_stepping, + remove_additional_info, + ) # @UnusedImport + +elif USE_CYTHON_FLAG in ENV_FALSE_LOWER_VALUES: + # Use the regular version if not forcing cython + from _pydevd_bundle.pydevd_additional_thread_info_regular import ( + PyDBAdditionalThreadInfo, + set_additional_thread_info, + _set_additional_thread_info_lock, # @UnusedImport @Reimport + any_thread_stepping, + remove_additional_info, + ) # @UnusedImport @Reimport + +else: + # Regular: use fallback if not found (message is already given elsewhere). + try: + from _pydevd_bundle.pydevd_cython_wrapper import ( + PyDBAdditionalThreadInfo, + set_additional_thread_info, + _set_additional_thread_info_lock, + any_thread_stepping, + remove_additional_info, + ) + except ImportError: + from _pydevd_bundle.pydevd_additional_thread_info_regular import ( + PyDBAdditionalThreadInfo, + set_additional_thread_info, + _set_additional_thread_info_lock, # @UnusedImport + any_thread_stepping, + remove_additional_info, + ) # @UnusedImport diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py new file mode 100644 index 0000000..5db804b --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py @@ -0,0 +1,328 @@ +from _pydevd_bundle.pydevd_constants import ( + STATE_RUN, + PYTHON_SUSPEND, + SUPPORT_GEVENT, + ForkSafeLock, + _current_frames, + STATE_SUSPEND, + get_global_debugger, + get_thread_id, +) +from _pydev_bundle import pydev_log +from _pydev_bundle._pydev_saved_modules import threading +from _pydev_bundle.pydev_is_thread_alive import is_thread_alive +import weakref + +version = 11 + + +# ======================================================================================================================= +# PyDBAdditionalThreadInfo +# ======================================================================================================================= +# fmt: off +# IFDEF CYTHON +# cdef class PyDBAdditionalThreadInfo: +# ELSE +class PyDBAdditionalThreadInfo(object): +# ENDIF +# fmt: on + + # Note: the params in cython are declared in pydevd_cython.pxd. + # fmt: off + # IFDEF CYTHON + # ELSE + __slots__ = [ + "pydev_state", + "pydev_step_stop", + "pydev_original_step_cmd", + "pydev_step_cmd", + "pydev_notify_kill", + "pydev_django_resolve_frame", + "pydev_call_from_jinja2", + "pydev_call_inside_jinja2", + "is_tracing", + "conditional_breakpoint_exception", + "pydev_message", + "suspend_type", + "pydev_next_line", + "pydev_func_name", + "suspended_at_unhandled", + "trace_suspend_type", + "top_level_thread_tracer_no_back_frames", + "top_level_thread_tracer_unhandled", + "thread_tracer", + "step_in_initial_location", + # Used for CMD_SMART_STEP_INTO (to know which smart step into variant to use) + "pydev_smart_parent_offset", + "pydev_smart_child_offset", + # Used for CMD_SMART_STEP_INTO (list[_pydevd_bundle.pydevd_bytecode_utils.Variant]) + # Filled when the cmd_get_smart_step_into_variants is requested (so, this is a copy + # of the last request for a given thread and pydev_smart_parent_offset/pydev_smart_child_offset relies on it). + "pydev_smart_step_into_variants", + "target_id_to_smart_step_into_variant", + "pydev_use_scoped_step_frame", + "weak_thread", + "is_in_wait_loop", + ] + # ENDIF + # fmt: on + + def __init__(self): + self.pydev_state = STATE_RUN # STATE_RUN or STATE_SUSPEND + self.pydev_step_stop = None + + # Note: we have `pydev_original_step_cmd` and `pydev_step_cmd` because the original is to + # say the action that started it and the other is to say what's the current tracing behavior + # (because it's possible that we start with a step over but may have to switch to a + # different step strategy -- for instance, if a step over is done and we return the current + # method the strategy is changed to a step in). + + self.pydev_original_step_cmd = -1 # Something as CMD_STEP_INTO, CMD_STEP_OVER, etc. + self.pydev_step_cmd = -1 # Something as CMD_STEP_INTO, CMD_STEP_OVER, etc. + + self.pydev_notify_kill = False + self.pydev_django_resolve_frame = False + self.pydev_call_from_jinja2 = None + self.pydev_call_inside_jinja2 = None + self.is_tracing = 0 + self.conditional_breakpoint_exception = None + self.pydev_message = "" + self.suspend_type = PYTHON_SUSPEND + self.pydev_next_line = -1 + self.pydev_func_name = ".invalid." # Must match the type in cython + self.suspended_at_unhandled = False + self.trace_suspend_type = "trace" # 'trace' or 'frame_eval' + self.top_level_thread_tracer_no_back_frames = [] + self.top_level_thread_tracer_unhandled = None + self.thread_tracer = None + self.step_in_initial_location = None + self.pydev_smart_parent_offset = -1 + self.pydev_smart_child_offset = -1 + self.pydev_smart_step_into_variants = () + self.target_id_to_smart_step_into_variant = {} + + # Flag to indicate ipython use-case where each line will be executed as a call/line/return + # in a new new frame but in practice we want to consider each new frame as if it was all + # part of the same frame. + # + # In practice this means that a step over shouldn't revert to a step in and we need some + # special logic to know when we should stop in a step over as we need to consider 2 + # different frames as being equal if they're logically the continuation of a frame + # being executed by ipython line by line. + # + # See: https://github.com/microsoft/debugpy/issues/869#issuecomment-1132141003 + self.pydev_use_scoped_step_frame = False + self.weak_thread = None + + # Purpose: detect if this thread is suspended and actually in the wait loop + # at this time (otherwise it may be suspended but still didn't reach a point. + # to pause). + self.is_in_wait_loop = False + + # fmt: off + # IFDEF CYTHON + # cpdef object _get_related_thread(self): + # ELSE + def _get_related_thread(self): + # ENDIF + # fmt: on + if self.pydev_notify_kill: # Already killed + return None + + if self.weak_thread is None: + return None + + thread = self.weak_thread() + if thread is None: + return False + + if not is_thread_alive(thread): + return None + + if thread._ident is None: # Can this happen? + pydev_log.critical("thread._ident is None in _get_related_thread!") + return None + + if threading._active.get(thread._ident) is not thread: + return None + + return thread + + # fmt: off + # IFDEF CYTHON + # cpdef bint _is_stepping(self): + # ELSE + def _is_stepping(self): + # ENDIF + # fmt: on + if self.pydev_state == STATE_RUN and self.pydev_step_cmd != -1: + # This means actually stepping in a step operation. + return True + + if self.pydev_state == STATE_SUSPEND and self.is_in_wait_loop: + # This means stepping because it was suspended but still didn't + # reach a suspension point. + return True + + return False + + # fmt: off + # IFDEF CYTHON + # cpdef get_topmost_frame(self, thread): + # ELSE + def get_topmost_frame(self, thread): + # ENDIF + # fmt: on + """ + Gets the topmost frame for the given thread. Note that it may be None + and callers should remove the reference to the frame as soon as possible + to avoid disturbing user code. + """ + # sys._current_frames(): dictionary with thread id -> topmost frame + current_frames = _current_frames() + topmost_frame = current_frames.get(thread._ident) + if topmost_frame is None: + # Note: this is expected for dummy threads (so, getting the topmost frame should be + # treated as optional). + pydev_log.info( + "Unable to get topmost frame for thread: %s, thread.ident: %s, id(thread): %s\nCurrent frames: %s.\n" "GEVENT_SUPPORT: %s", + thread, + thread.ident, + id(thread), + current_frames, + SUPPORT_GEVENT, + ) + + return topmost_frame + + # fmt: off + # IFDEF CYTHON + # cpdef update_stepping_info(self): + # ELSE + def update_stepping_info(self): + # ENDIF + # fmt: on + _update_stepping_info(self) + + def __str__(self): + return "State:%s Stop:%s Cmd: %s Kill:%s" % (self.pydev_state, self.pydev_step_stop, self.pydev_step_cmd, self.pydev_notify_kill) + + +_set_additional_thread_info_lock = ForkSafeLock() +_next_additional_info = [PyDBAdditionalThreadInfo()] + + +# fmt: off +# IFDEF CYTHON +# cpdef set_additional_thread_info(thread): +# ELSE +def set_additional_thread_info(thread): +# ENDIF +# fmt: on + try: + additional_info = thread.additional_info + if additional_info is None: + raise AttributeError() + except: + with _set_additional_thread_info_lock: + # If it's not there, set it within a lock to avoid any racing + # conditions. + try: + additional_info = thread.additional_info + except: + additional_info = None + + if additional_info is None: + # Note: don't call PyDBAdditionalThreadInfo constructor at this + # point as it can piggy-back into the debugger which could + # get here again, rather get the global ref which was pre-created + # and add a new entry only after we set thread.additional_info. + additional_info = _next_additional_info[0] + thread.additional_info = additional_info + additional_info.weak_thread = weakref.ref(thread) + add_additional_info(additional_info) + del _next_additional_info[:] + _next_additional_info.append(PyDBAdditionalThreadInfo()) + + return additional_info + + +# fmt: off +# IFDEF CYTHON +# cdef set _all_infos +# cdef set _infos_stepping +# cdef object _update_infos_lock +# ELSE +# ENDIF +# fmt: on + +_all_infos = set() +_infos_stepping = set() +_update_infos_lock = ForkSafeLock() + + +# fmt: off +# IFDEF CYTHON +# cdef _update_stepping_info(PyDBAdditionalThreadInfo info): +# ELSE +def _update_stepping_info(info): +# ENDIF +# fmt: on + + global _infos_stepping + global _all_infos + + with _update_infos_lock: + # Removes entries that are no longer valid. + new_all_infos = set() + for info in _all_infos: + if info._get_related_thread() is not None: + new_all_infos.add(info) + _all_infos = new_all_infos + + new_stepping = set() + for info in _all_infos: + if info._is_stepping(): + new_stepping.add(info) + _infos_stepping = new_stepping + + py_db = get_global_debugger() + if py_db is not None and not py_db.pydb_disposed: + thread = info.weak_thread() + if thread is not None: + thread_id = get_thread_id(thread) + _queue, event = py_db.get_internal_queue_and_event(thread_id) + event.set() + +# fmt: off +# IFDEF CYTHON +# cpdef add_additional_info(PyDBAdditionalThreadInfo info): +# ELSE +def add_additional_info(info): +# ENDIF +# fmt: on + with _update_infos_lock: + _all_infos.add(info) + if info._is_stepping(): + _infos_stepping.add(info) + +# fmt: off +# IFDEF CYTHON +# cpdef remove_additional_info(PyDBAdditionalThreadInfo info): +# ELSE +def remove_additional_info(info): +# ENDIF +# fmt: on + with _update_infos_lock: + _all_infos.discard(info) + _infos_stepping.discard(info) + + +# fmt: off +# IFDEF CYTHON +# cpdef bint any_thread_stepping(): +# ELSE +def any_thread_stepping(): +# ENDIF +# fmt: on + return bool(_infos_stepping) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py new file mode 100644 index 0000000..c85ad0f --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py @@ -0,0 +1,1200 @@ +import sys +import bisect +import types + +from _pydev_bundle._pydev_saved_modules import threading +from _pydevd_bundle import pydevd_utils, pydevd_source_mapping +from _pydevd_bundle.pydevd_additional_thread_info import set_additional_thread_info +from _pydevd_bundle.pydevd_comm import ( + InternalGetThreadStack, + internal_get_completions, + InternalSetNextStatementThread, + internal_reload_code, + InternalGetVariable, + InternalGetArray, + InternalLoadFullValue, + internal_get_description, + internal_get_frame, + internal_evaluate_expression, + InternalConsoleExec, + internal_get_variable_json, + internal_change_variable, + internal_change_variable_json, + internal_evaluate_expression_json, + internal_set_expression_json, + internal_get_exception_details_json, + internal_step_in_thread, + internal_smart_step_into, +) +from _pydevd_bundle.pydevd_comm_constants import ( + CMD_THREAD_SUSPEND, + file_system_encoding, + CMD_STEP_INTO_MY_CODE, + CMD_STOP_ON_START, + CMD_SMART_STEP_INTO, +) +from _pydevd_bundle.pydevd_constants import ( + get_current_thread_id, + set_protocol, + get_protocol, + HTTP_JSON_PROTOCOL, + JSON_PROTOCOL, + DebugInfoHolder, + IS_WINDOWS, + PYDEVD_USE_SYS_MONITORING, +) +from _pydevd_bundle.pydevd_net_command_factory_json import NetCommandFactoryJson +from _pydevd_bundle.pydevd_net_command_factory_xml import NetCommandFactory +import pydevd_file_utils +from _pydev_bundle import pydev_log +from _pydevd_bundle.pydevd_breakpoints import LineBreakpoint +from pydevd_tracing import get_exception_traceback_str +import os +import subprocess +import ctypes +from _pydevd_bundle.pydevd_collect_bytecode_info import code_to_bytecode_representation +import itertools +import linecache +from _pydevd_bundle.pydevd_utils import DAPGrouper, interrupt_main_thread +from _pydevd_bundle.pydevd_daemon_thread import run_as_pydevd_daemon_thread +from _pydevd_bundle.pydevd_thread_lifecycle import pydevd_find_thread_by_id, resume_threads +import tokenize +from _pydevd_sys_monitoring import pydevd_sys_monitoring + +try: + import dis +except ImportError: + + def _get_code_lines(code): + raise NotImplementedError + +else: + + def _get_code_lines(code): + if not isinstance(code, types.CodeType): + path = code + with tokenize.open(path) as f: + src = f.read() + code = compile(src, path, "exec", 0, dont_inherit=True) + return _get_code_lines(code) + + def iterate(): + # First, get all line starts for this code object. This does not include + # bodies of nested class and function definitions, as they have their + # own objects. + for _, lineno in dis.findlinestarts(code): + if lineno is not None: + yield lineno + + # For nested class and function definitions, their respective code objects + # are constants referenced by this object. + for const in code.co_consts: + if isinstance(const, types.CodeType) and const.co_filename == code.co_filename: + for lineno in _get_code_lines(const): + yield lineno + + return iterate() + + +class PyDevdAPI(object): + class VariablePresentation(object): + def __init__(self, special="group", function="group", class_="group", protected="inline"): + self._presentation = { + DAPGrouper.SCOPE_SPECIAL_VARS: special, + DAPGrouper.SCOPE_FUNCTION_VARS: function, + DAPGrouper.SCOPE_CLASS_VARS: class_, + DAPGrouper.SCOPE_PROTECTED_VARS: protected, + } + + def get_presentation(self, scope): + return self._presentation[scope] + + def run(self, py_db): + py_db.ready_to_run = True + + def notify_initialize(self, py_db): + py_db.on_initialize() + + def notify_configuration_done(self, py_db): + py_db.on_configuration_done() + + def notify_disconnect(self, py_db): + py_db.on_disconnect() + + def set_protocol(self, py_db, seq, protocol): + set_protocol(protocol.strip()) + if get_protocol() in (HTTP_JSON_PROTOCOL, JSON_PROTOCOL): + cmd_factory_class = NetCommandFactoryJson + else: + cmd_factory_class = NetCommandFactory + + if not isinstance(py_db.cmd_factory, cmd_factory_class): + py_db.cmd_factory = cmd_factory_class() + + return py_db.cmd_factory.make_protocol_set_message(seq) + + def set_ide_os_and_breakpoints_by(self, py_db, seq, ide_os, breakpoints_by): + """ + :param ide_os: 'WINDOWS' or 'UNIX' + :param breakpoints_by: 'ID' or 'LINE' + """ + if breakpoints_by == "ID": + py_db._set_breakpoints_with_id = True + else: + py_db._set_breakpoints_with_id = False + + self.set_ide_os(ide_os) + + return py_db.cmd_factory.make_version_message(seq) + + def set_ide_os(self, ide_os): + """ + :param ide_os: 'WINDOWS' or 'UNIX' + """ + pydevd_file_utils.set_ide_os(ide_os) + + def set_gui_event_loop(self, py_db, gui_event_loop): + py_db._gui_event_loop = gui_event_loop + + def send_error_message(self, py_db, msg): + cmd = py_db.cmd_factory.make_warning_message("pydevd: %s\n" % (msg,)) + py_db.writer.add_command(cmd) + + def set_show_return_values(self, py_db, show_return_values): + if show_return_values: + py_db.show_return_values = True + else: + if py_db.show_return_values: + # We should remove saved return values + py_db.remove_return_values_flag = True + py_db.show_return_values = False + pydev_log.debug("Show return values: %s", py_db.show_return_values) + + def list_threads(self, py_db, seq): + # Response is the command with the list of threads to be added to the writer thread. + return py_db.cmd_factory.make_list_threads_message(py_db, seq) + + def request_suspend_thread(self, py_db, thread_id="*"): + # Yes, thread suspend is done at this point, not through an internal command. + threads = [] + suspend_all = thread_id.strip() == "*" + if suspend_all: + threads = pydevd_utils.get_non_pydevd_threads() + + elif thread_id.startswith("__frame__:"): + sys.stderr.write("Can't suspend tasklet: %s\n" % (thread_id,)) + + else: + threads = [pydevd_find_thread_by_id(thread_id)] + + for t in threads: + if t is None: + continue + py_db.set_suspend( + t, + CMD_THREAD_SUSPEND, + suspend_other_threads=suspend_all, + is_pause=True, + ) + # Break here (even if it's suspend all) as py_db.set_suspend will + # take care of suspending other threads. + break + + def set_enable_thread_notifications(self, py_db, enable): + """ + When disabled, no thread notifications (for creation/removal) will be + issued until it's re-enabled. + + Note that when it's re-enabled, a creation notification will be sent for + all existing threads even if it was previously sent (this is meant to + be used on disconnect/reconnect). + """ + py_db.set_enable_thread_notifications(enable) + + def request_disconnect(self, py_db, resume_threads): + self.set_enable_thread_notifications(py_db, False) + self.remove_all_breakpoints(py_db, "*") + self.remove_all_exception_breakpoints(py_db) + self.notify_disconnect(py_db) + + if resume_threads: + self.request_resume_thread(thread_id="*") + + def request_resume_thread(self, thread_id): + resume_threads(thread_id) + + def request_completions(self, py_db, seq, thread_id, frame_id, act_tok, line=-1, column=-1): + py_db.post_method_as_internal_command( + thread_id, internal_get_completions, seq, thread_id, frame_id, act_tok, line=line, column=column + ) + + def request_stack(self, py_db, seq, thread_id, fmt=None, timeout=0.5, start_frame=0, levels=0): + # If it's already suspended, get it right away. + internal_get_thread_stack = InternalGetThreadStack( + seq, thread_id, py_db, set_additional_thread_info, fmt=fmt, timeout=timeout, start_frame=start_frame, levels=levels + ) + if internal_get_thread_stack.can_be_executed_by(get_current_thread_id(threading.current_thread())): + internal_get_thread_stack.do_it(py_db) + else: + py_db.post_internal_command(internal_get_thread_stack, "*") + + def request_exception_info_json(self, py_db, request, thread_id, thread, max_frames): + py_db.post_method_as_internal_command( + thread_id, + internal_get_exception_details_json, + request, + thread_id, + thread, + max_frames, + set_additional_thread_info=set_additional_thread_info, + iter_visible_frames_info=py_db.cmd_factory._iter_visible_frames_info, + ) + + def request_step(self, py_db, thread_id, step_cmd_id): + t = pydevd_find_thread_by_id(thread_id) + if t: + py_db.post_method_as_internal_command( + thread_id, + internal_step_in_thread, + thread_id, + step_cmd_id, + set_additional_thread_info=set_additional_thread_info, + ) + elif thread_id.startswith("__frame__:"): + sys.stderr.write("Can't make tasklet step command: %s\n" % (thread_id,)) + + def request_smart_step_into(self, py_db, seq, thread_id, offset, child_offset): + t = pydevd_find_thread_by_id(thread_id) + if t: + py_db.post_method_as_internal_command( + thread_id, internal_smart_step_into, thread_id, offset, child_offset, set_additional_thread_info=set_additional_thread_info + ) + elif thread_id.startswith("__frame__:"): + sys.stderr.write("Can't set next statement in tasklet: %s\n" % (thread_id,)) + + def request_smart_step_into_by_func_name(self, py_db, seq, thread_id, line, func_name): + # Same thing as set next, just with a different cmd id. + self.request_set_next(py_db, seq, thread_id, CMD_SMART_STEP_INTO, None, line, func_name) + + def request_set_next(self, py_db, seq, thread_id, set_next_cmd_id, original_filename, line, func_name): + """ + set_next_cmd_id may actually be one of: + + CMD_RUN_TO_LINE + CMD_SET_NEXT_STATEMENT + + CMD_SMART_STEP_INTO -- note: request_smart_step_into is preferred if it's possible + to work with bytecode offset. + + :param Optional[str] original_filename: + If available, the filename may be source translated, otherwise no translation will take + place (the set next just needs the line afterwards as it executes locally, but for + the Jupyter integration, the source mapping may change the actual lines and not only + the filename). + """ + t = pydevd_find_thread_by_id(thread_id) + if t: + if original_filename is not None: + translated_filename = self.filename_to_server(original_filename) # Apply user path mapping. + pydev_log.debug("Set next (after path translation) in: %s line: %s", translated_filename, line) + func_name = self.to_str(func_name) + + assert translated_filename.__class__ == str # i.e.: bytes on py2 and str on py3 + assert func_name.__class__ == str # i.e.: bytes on py2 and str on py3 + + # Apply source mapping (i.e.: ipython). + _source_mapped_filename, new_line, multi_mapping_applied = py_db.source_mapping.map_to_server(translated_filename, line) + if multi_mapping_applied: + pydev_log.debug("Set next (after source mapping) in: %s line: %s", translated_filename, line) + line = new_line + + int_cmd = InternalSetNextStatementThread(thread_id, set_next_cmd_id, line, func_name, seq=seq) + py_db.post_internal_command(int_cmd, thread_id) + elif thread_id.startswith("__frame__:"): + sys.stderr.write("Can't set next statement in tasklet: %s\n" % (thread_id,)) + + def request_reload_code(self, py_db, seq, module_name, filename): + """ + :param seq: if -1 no message will be sent back when the reload is done. + + Note: either module_name or filename may be None (but not both at the same time). + """ + thread_id = "*" # Any thread + # Note: not going for the main thread because in this case it'd only do the load + # when we stopped on a breakpoint. + py_db.post_method_as_internal_command(thread_id, internal_reload_code, seq, module_name, filename) + + def request_change_variable(self, py_db, seq, thread_id, frame_id, scope, attr, value): + """ + :param scope: 'FRAME' or 'GLOBAL' + """ + py_db.post_method_as_internal_command(thread_id, internal_change_variable, seq, thread_id, frame_id, scope, attr, value) + + def request_get_variable(self, py_db, seq, thread_id, frame_id, scope, attrs): + """ + :param scope: 'FRAME' or 'GLOBAL' + """ + int_cmd = InternalGetVariable(seq, thread_id, frame_id, scope, attrs) + py_db.post_internal_command(int_cmd, thread_id) + + def request_get_array(self, py_db, seq, roffset, coffset, rows, cols, fmt, thread_id, frame_id, scope, attrs): + int_cmd = InternalGetArray(seq, roffset, coffset, rows, cols, fmt, thread_id, frame_id, scope, attrs) + py_db.post_internal_command(int_cmd, thread_id) + + def request_load_full_value(self, py_db, seq, thread_id, frame_id, vars): + int_cmd = InternalLoadFullValue(seq, thread_id, frame_id, vars) + py_db.post_internal_command(int_cmd, thread_id) + + def request_get_description(self, py_db, seq, thread_id, frame_id, expression): + py_db.post_method_as_internal_command(thread_id, internal_get_description, seq, thread_id, frame_id, expression) + + def request_get_frame(self, py_db, seq, thread_id, frame_id): + py_db.post_method_as_internal_command(thread_id, internal_get_frame, seq, thread_id, frame_id) + + def to_str(self, s): + """ + -- in py3 raises an error if it's not str already. + """ + if s.__class__ != str: + raise AssertionError("Expected to have str on Python 3. Found: %s (%s)" % (s, s.__class__)) + return s + + def filename_to_str(self, filename): + """ + -- in py3 raises an error if it's not str already. + """ + if filename.__class__ != str: + raise AssertionError("Expected to have str on Python 3. Found: %s (%s)" % (filename, filename.__class__)) + return filename + + def filename_to_server(self, filename): + filename = self.filename_to_str(filename) + filename = pydevd_file_utils.map_file_to_server(filename) + return filename + + class _DummyFrame(object): + """ + Dummy frame to be used with PyDB.apply_files_filter (as we don't really have the + related frame as breakpoints are added before execution). + """ + + class _DummyCode(object): + def __init__(self, filename): + self.co_firstlineno = 1 + self.co_filename = filename + self.co_name = "invalid func name " + + def __init__(self, filename): + self.f_code = self._DummyCode(filename) + self.f_globals = {} + + ADD_BREAKPOINT_NO_ERROR = 0 + ADD_BREAKPOINT_FILE_NOT_FOUND = 1 + ADD_BREAKPOINT_FILE_EXCLUDED_BY_FILTERS = 2 + + # This means that the breakpoint couldn't be fully validated (more runtime + # information may be needed). + ADD_BREAKPOINT_LAZY_VALIDATION = 3 + ADD_BREAKPOINT_INVALID_LINE = 4 + + class _AddBreakpointResult(object): + # :see: ADD_BREAKPOINT_NO_ERROR = 0 + # :see: ADD_BREAKPOINT_FILE_NOT_FOUND = 1 + # :see: ADD_BREAKPOINT_FILE_EXCLUDED_BY_FILTERS = 2 + # :see: ADD_BREAKPOINT_LAZY_VALIDATION = 3 + # :see: ADD_BREAKPOINT_INVALID_LINE = 4 + + __slots__ = ["error_code", "breakpoint_id", "translated_filename", "translated_line", "original_line"] + + def __init__(self, breakpoint_id, translated_filename, translated_line, original_line): + self.error_code = PyDevdAPI.ADD_BREAKPOINT_NO_ERROR + self.breakpoint_id = breakpoint_id + self.translated_filename = translated_filename + self.translated_line = translated_line + self.original_line = original_line + + def add_breakpoint( + self, + py_db, + original_filename, + breakpoint_type, + breakpoint_id, + line, + condition, + func_name, + expression, + suspend_policy, + hit_condition, + is_logpoint, + adjust_line=False, + on_changed_breakpoint_state=None, + ): + """ + :param str original_filename: + Note: must be sent as it was received in the protocol. It may be translated in this + function and its final value will be available in the returned _AddBreakpointResult. + + :param str breakpoint_type: + One of: 'python-line', 'django-line', 'jinja2-line'. + + :param int breakpoint_id: + + :param int line: + Note: it's possible that a new line was actually used. If that's the case its + final value will be available in the returned _AddBreakpointResult. + + :param condition: + Either None or the condition to activate the breakpoint. + + :param str func_name: + If "None" (str), may hit in any context. + Empty string will hit only top level. + Any other value must match the scope of the method to be matched. + + :param str expression: + None or the expression to be evaluated. + + :param suspend_policy: + Either "NONE" (to suspend only the current thread when the breakpoint is hit) or + "ALL" (to suspend all threads when a breakpoint is hit). + + :param str hit_condition: + An expression where `@HIT@` will be replaced by the number of hits. + i.e.: `@HIT@ == x` or `@HIT@ >= x` + + :param bool is_logpoint: + If True and an expression is passed, pydevd will create an io message command with the + result of the evaluation. + + :param bool adjust_line: + If True, the breakpoint line should be adjusted if the current line doesn't really + match an executable line (if possible). + + :param callable on_changed_breakpoint_state: + This is called when something changed internally on the breakpoint after it was initially + added (for instance, template file_to_line_to_breakpoints could be signaled as invalid initially and later + when the related template is loaded, if the line is valid it could be marked as valid). + + The signature for the callback should be: + on_changed_breakpoint_state(breakpoint_id: int, add_breakpoint_result: _AddBreakpointResult) + + Note that the add_breakpoint_result should not be modified by the callback (the + implementation may internally reuse the same instance multiple times). + + :return _AddBreakpointResult: + """ + assert original_filename.__class__ == str, "Expected str, found: %s" % ( + original_filename.__class__, + ) # i.e.: bytes on py2 and str on py3 + + original_filename_normalized = pydevd_file_utils.normcase_from_client(original_filename) + + pydev_log.debug("Request for breakpoint in: %s line: %s", original_filename, line) + original_line = line + # Parameters to reapply breakpoint. + api_add_breakpoint_params = ( + original_filename, + breakpoint_type, + breakpoint_id, + line, + condition, + func_name, + expression, + suspend_policy, + hit_condition, + is_logpoint, + ) + + translated_filename = self.filename_to_server(original_filename) # Apply user path mapping. + pydev_log.debug("Breakpoint (after path translation) in: %s line: %s", translated_filename, line) + func_name = self.to_str(func_name) + + assert translated_filename.__class__ == str # i.e.: bytes on py2 and str on py3 + assert func_name.__class__ == str # i.e.: bytes on py2 and str on py3 + + # Apply source mapping (i.e.: ipython). + source_mapped_filename, new_line, multi_mapping_applied = py_db.source_mapping.map_to_server(translated_filename, line) + + if multi_mapping_applied: + pydev_log.debug("Breakpoint (after source mapping) in: %s line: %s", source_mapped_filename, new_line) + # Note that source mapping is internal and does not change the resulting filename nor line + # (we want the outside world to see the line in the original file and not in the ipython + # cell, otherwise the editor wouldn't be correct as the returned line is the line to + # which the breakpoint will be moved in the editor). + result = self._AddBreakpointResult(breakpoint_id, original_filename, line, original_line) + + # If a multi-mapping was applied, consider it the canonical / source mapped version (translated to ipython cell). + translated_absolute_filename = source_mapped_filename + canonical_normalized_filename = pydevd_file_utils.normcase(source_mapped_filename) + line = new_line + + else: + translated_absolute_filename = pydevd_file_utils.absolute_path(translated_filename) + canonical_normalized_filename = pydevd_file_utils.canonical_normalized_path(translated_filename) + + if adjust_line and not translated_absolute_filename.startswith("<"): + # Validate file_to_line_to_breakpoints and adjust their positions. + try: + lines = sorted(_get_code_lines(translated_absolute_filename)) + except Exception: + pass + else: + if line not in lines: + # Adjust to the first preceding valid line. + idx = bisect.bisect_left(lines, line) + if idx > 0: + line = lines[idx - 1] + + result = self._AddBreakpointResult(breakpoint_id, original_filename, line, original_line) + + py_db.api_received_breakpoints[(original_filename_normalized, breakpoint_id)] = ( + canonical_normalized_filename, + api_add_breakpoint_params, + ) + + if not translated_absolute_filename.startswith("<"): + # Note: if a mapping pointed to a file starting with '<', don't validate. + + if not pydevd_file_utils.exists(translated_absolute_filename): + result.error_code = self.ADD_BREAKPOINT_FILE_NOT_FOUND + return result + + if ( + py_db.is_files_filter_enabled + and not py_db.get_require_module_for_filters() + and py_db.apply_files_filter(self._DummyFrame(translated_absolute_filename), translated_absolute_filename, False) + ): + # Note that if `get_require_module_for_filters()` returns False, we don't do this check. + # This is because we don't have the module name given a file at this point (in + # runtime it's gotten from the frame.f_globals). + # An option could be calculate it based on the filename and current sys.path, + # but on some occasions that may be wrong (for instance with `__main__` or if + # the user dynamically changes the PYTHONPATH). + + # Note: depending on the use-case, filters may be changed, so, keep on going and add the + # breakpoint even with the error code. + result.error_code = self.ADD_BREAKPOINT_FILE_EXCLUDED_BY_FILTERS + + if breakpoint_type == "python-line": + added_breakpoint = LineBreakpoint( + breakpoint_id, line, condition, func_name, expression, suspend_policy, hit_condition=hit_condition, is_logpoint=is_logpoint + ) + + file_to_line_to_breakpoints = py_db.breakpoints + file_to_id_to_breakpoint = py_db.file_to_id_to_line_breakpoint + supported_type = True + + else: + add_plugin_breakpoint_result = None + plugin = py_db.get_plugin_lazy_init() + if plugin is not None: + add_plugin_breakpoint_result = plugin.add_breakpoint( + "add_line_breakpoint", + py_db, + breakpoint_type, + canonical_normalized_filename, + breakpoint_id, + line, + condition, + expression, + func_name, + hit_condition=hit_condition, + is_logpoint=is_logpoint, + add_breakpoint_result=result, + on_changed_breakpoint_state=on_changed_breakpoint_state, + ) + + if add_plugin_breakpoint_result is not None: + supported_type = True + added_breakpoint, file_to_line_to_breakpoints = add_plugin_breakpoint_result + file_to_id_to_breakpoint = py_db.file_to_id_to_plugin_breakpoint + else: + supported_type = False + + if not supported_type: + raise NameError(breakpoint_type) + + pydev_log.debug("Added breakpoint:%s - line:%s - func_name:%s\n", canonical_normalized_filename, line, func_name) + + if canonical_normalized_filename in file_to_id_to_breakpoint: + id_to_pybreakpoint = file_to_id_to_breakpoint[canonical_normalized_filename] + else: + id_to_pybreakpoint = file_to_id_to_breakpoint[canonical_normalized_filename] = {} + + id_to_pybreakpoint[breakpoint_id] = added_breakpoint + py_db.consolidate_breakpoints(canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints) + if py_db.plugin is not None: + py_db.has_plugin_line_breaks = py_db.plugin.has_line_breaks(py_db) + py_db.plugin.after_breakpoints_consolidated( + py_db, canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints + ) + + py_db.on_breakpoints_changed() + return result + + def reapply_breakpoints(self, py_db): + """ + Reapplies all the received breakpoints as they were received by the API (so, new + translations are applied). + """ + pydev_log.debug("Reapplying breakpoints.") + values = list(py_db.api_received_breakpoints.values()) # Create a copy with items to reapply. + self.remove_all_breakpoints(py_db, "*") + for val in values: + _new_filename, api_add_breakpoint_params = val + self.add_breakpoint(py_db, *api_add_breakpoint_params) + + def remove_all_breakpoints(self, py_db, received_filename): + """ + Removes all the breakpoints from a given file or from all files if received_filename == '*'. + + :param str received_filename: + Note: must be sent as it was received in the protocol. It may be translated in this + function. + """ + assert received_filename.__class__ == str # i.e.: bytes on py2 and str on py3 + changed = False + lst = [py_db.file_to_id_to_line_breakpoint, py_db.file_to_id_to_plugin_breakpoint, py_db.breakpoints] + if hasattr(py_db, "django_breakpoints"): + lst.append(py_db.django_breakpoints) + + if hasattr(py_db, "jinja2_breakpoints"): + lst.append(py_db.jinja2_breakpoints) + + if received_filename == "*": + py_db.api_received_breakpoints.clear() + + for file_to_id_to_breakpoint in lst: + if file_to_id_to_breakpoint: + file_to_id_to_breakpoint.clear() + changed = True + + else: + received_filename_normalized = pydevd_file_utils.normcase_from_client(received_filename) + items = list(py_db.api_received_breakpoints.items()) # Create a copy to remove items. + translated_filenames = [] + for key, val in items: + original_filename_normalized, _breakpoint_id = key + if original_filename_normalized == received_filename_normalized: + canonical_normalized_filename, _api_add_breakpoint_params = val + # Note: there can be actually 1:N mappings due to source mapping (i.e.: ipython). + translated_filenames.append(canonical_normalized_filename) + del py_db.api_received_breakpoints[key] + + for canonical_normalized_filename in translated_filenames: + for file_to_id_to_breakpoint in lst: + if canonical_normalized_filename in file_to_id_to_breakpoint: + file_to_id_to_breakpoint.pop(canonical_normalized_filename, None) + changed = True + + if changed: + py_db.on_breakpoints_changed(removed=True) + + def remove_breakpoint(self, py_db, received_filename, breakpoint_type, breakpoint_id): + """ + :param str received_filename: + Note: must be sent as it was received in the protocol. It may be translated in this + function. + + :param str breakpoint_type: + One of: 'python-line', 'django-line', 'jinja2-line'. + + :param int breakpoint_id: + """ + received_filename_normalized = pydevd_file_utils.normcase_from_client(received_filename) + for key, val in list(py_db.api_received_breakpoints.items()): + original_filename_normalized, existing_breakpoint_id = key + _new_filename, _api_add_breakpoint_params = val + if received_filename_normalized == original_filename_normalized and existing_breakpoint_id == breakpoint_id: + del py_db.api_received_breakpoints[key] + break + else: + pydev_log.info("Did not find breakpoint to remove: %s (breakpoint id: %s)", received_filename, breakpoint_id) + + file_to_id_to_breakpoint = None + received_filename = self.filename_to_server(received_filename) + canonical_normalized_filename = pydevd_file_utils.canonical_normalized_path(received_filename) + + if breakpoint_type == "python-line": + file_to_line_to_breakpoints = py_db.breakpoints + file_to_id_to_breakpoint = py_db.file_to_id_to_line_breakpoint + + elif py_db.plugin is not None: + result = py_db.plugin.get_breakpoints(py_db, breakpoint_type) + if result is not None: + file_to_id_to_breakpoint = py_db.file_to_id_to_plugin_breakpoint + file_to_line_to_breakpoints = result + + if file_to_id_to_breakpoint is None: + pydev_log.critical("Error removing breakpoint. Cannot handle breakpoint of type %s", breakpoint_type) + + else: + try: + id_to_pybreakpoint = file_to_id_to_breakpoint.get(canonical_normalized_filename, {}) + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 1: + existing = id_to_pybreakpoint[breakpoint_id] + pydev_log.info( + "Removed breakpoint:%s - line:%s - func_name:%s (id: %s)\n" + % (canonical_normalized_filename, existing.line, existing.func_name, breakpoint_id) + ) + + del id_to_pybreakpoint[breakpoint_id] + py_db.consolidate_breakpoints(canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints) + if py_db.plugin is not None: + py_db.has_plugin_line_breaks = py_db.plugin.has_line_breaks(py_db) + py_db.plugin.after_breakpoints_consolidated( + py_db, canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints + ) + + except KeyError: + pydev_log.info( + "Error removing breakpoint: Breakpoint id not found: %s id: %s. Available ids: %s\n", + canonical_normalized_filename, + breakpoint_id, + list(id_to_pybreakpoint), + ) + + py_db.on_breakpoints_changed(removed=True) + + def set_function_breakpoints(self, py_db, function_breakpoints): + function_breakpoint_name_to_breakpoint = {} + for function_breakpoint in function_breakpoints: + function_breakpoint_name_to_breakpoint[function_breakpoint.func_name] = function_breakpoint + + py_db.function_breakpoint_name_to_breakpoint = function_breakpoint_name_to_breakpoint + py_db.on_breakpoints_changed() + + def request_exec_or_evaluate(self, py_db, seq, thread_id, frame_id, expression, is_exec, trim_if_too_big, attr_to_set_result): + py_db.post_method_as_internal_command( + thread_id, internal_evaluate_expression, seq, thread_id, frame_id, expression, is_exec, trim_if_too_big, attr_to_set_result + ) + + def request_exec_or_evaluate_json(self, py_db, request, thread_id): + py_db.post_method_as_internal_command(thread_id, internal_evaluate_expression_json, request, thread_id) + + def request_set_expression_json(self, py_db, request, thread_id): + py_db.post_method_as_internal_command(thread_id, internal_set_expression_json, request, thread_id) + + def request_console_exec(self, py_db, seq, thread_id, frame_id, expression): + int_cmd = InternalConsoleExec(seq, thread_id, frame_id, expression) + py_db.post_internal_command(int_cmd, thread_id) + + def request_load_source(self, py_db, seq, filename): + """ + :param str filename: + Note: must be sent as it was received in the protocol. It may be translated in this + function. + """ + try: + filename = self.filename_to_server(filename) + assert filename.__class__ == str # i.e.: bytes on py2 and str on py3 + + with tokenize.open(filename) as stream: + source = stream.read() + cmd = py_db.cmd_factory.make_load_source_message(seq, source) + except: + cmd = py_db.cmd_factory.make_error_message(seq, get_exception_traceback_str()) + + py_db.writer.add_command(cmd) + + def get_decompiled_source_from_frame_id(self, py_db, frame_id): + """ + :param py_db: + :param frame_id: + :throws Exception: + If unable to get the frame in the currently paused frames or if some error happened + when decompiling. + """ + variable = py_db.suspended_frames_manager.get_variable(int(frame_id)) + frame = variable.value + + # Check if it's in the linecache first. + lines = (linecache.getline(frame.f_code.co_filename, i) for i in itertools.count(1)) + lines = itertools.takewhile(bool, lines) # empty lines are '\n', EOF is '' + + source = "".join(lines) + if not source: + source = code_to_bytecode_representation(frame.f_code) + + return source + + def request_load_source_from_frame_id(self, py_db, seq, frame_id): + try: + source = self.get_decompiled_source_from_frame_id(py_db, frame_id) + cmd = py_db.cmd_factory.make_load_source_from_frame_id_message(seq, source) + except: + cmd = py_db.cmd_factory.make_error_message(seq, get_exception_traceback_str()) + + py_db.writer.add_command(cmd) + + def add_python_exception_breakpoint( + self, + py_db, + exception, + condition, + expression, + notify_on_handled_exceptions, + notify_on_unhandled_exceptions, + notify_on_user_unhandled_exceptions, + notify_on_first_raise_only, + ignore_libraries, + ): + exception_breakpoint = py_db.add_break_on_exception( + exception, + condition=condition, + expression=expression, + notify_on_handled_exceptions=notify_on_handled_exceptions, + notify_on_unhandled_exceptions=notify_on_unhandled_exceptions, + notify_on_user_unhandled_exceptions=notify_on_user_unhandled_exceptions, + notify_on_first_raise_only=notify_on_first_raise_only, + ignore_libraries=ignore_libraries, + ) + + if exception_breakpoint is not None: + py_db.on_breakpoints_changed() + + def add_plugins_exception_breakpoint(self, py_db, breakpoint_type, exception): + supported_type = False + plugin = py_db.get_plugin_lazy_init() + if plugin is not None: + supported_type = plugin.add_breakpoint("add_exception_breakpoint", py_db, breakpoint_type, exception) + + if supported_type: + py_db.has_plugin_exception_breaks = py_db.plugin.has_exception_breaks(py_db) + py_db.on_breakpoints_changed() + else: + raise NameError(breakpoint_type) + + def remove_python_exception_breakpoint(self, py_db, exception): + try: + cp = py_db.break_on_uncaught_exceptions.copy() + cp.pop(exception, None) + py_db.break_on_uncaught_exceptions = cp + + cp = py_db.break_on_caught_exceptions.copy() + cp.pop(exception, None) + py_db.break_on_caught_exceptions = cp + + cp = py_db.break_on_user_uncaught_exceptions.copy() + cp.pop(exception, None) + py_db.break_on_user_uncaught_exceptions = cp + except: + pydev_log.exception("Error while removing exception %s", sys.exc_info()[0]) + + py_db.on_breakpoints_changed(removed=True) + + def remove_plugins_exception_breakpoint(self, py_db, exception_type, exception): + # I.e.: no need to initialize lazy (if we didn't have it in the first place, we can't remove + # anything from it anyways). + plugin = py_db.plugin + if plugin is None: + return + + supported_type = plugin.remove_exception_breakpoint(py_db, exception_type, exception) + + if supported_type: + py_db.has_plugin_exception_breaks = py_db.plugin.has_exception_breaks(py_db) + else: + pydev_log.info("No exception of type: %s was previously registered.", exception_type) + + py_db.on_breakpoints_changed(removed=True) + + def remove_all_exception_breakpoints(self, py_db): + py_db.break_on_uncaught_exceptions = {} + py_db.break_on_caught_exceptions = {} + py_db.break_on_user_uncaught_exceptions = {} + + plugin = py_db.plugin + if plugin is not None: + plugin.remove_all_exception_breakpoints(py_db) + py_db.on_breakpoints_changed(removed=True) + + def set_project_roots(self, py_db, project_roots): + """ + :param str project_roots: + """ + py_db.set_project_roots(project_roots) + + def set_stepping_resumes_all_threads(self, py_db, stepping_resumes_all_threads): + py_db.stepping_resumes_all_threads = stepping_resumes_all_threads + + # Add it to the namespace so that it's available as PyDevdAPI.ExcludeFilter + from _pydevd_bundle.pydevd_filtering import ExcludeFilter # noqa + + def set_exclude_filters(self, py_db, exclude_filters): + """ + :param list(PyDevdAPI.ExcludeFilter) exclude_filters: + """ + py_db.set_exclude_filters(exclude_filters) + + def set_use_libraries_filter(self, py_db, use_libraries_filter): + py_db.set_use_libraries_filter(use_libraries_filter) + + def request_get_variable_json(self, py_db, request, thread_id): + """ + :param VariablesRequest request: + """ + py_db.post_method_as_internal_command(thread_id, internal_get_variable_json, request) + + def request_change_variable_json(self, py_db, request, thread_id): + """ + :param SetVariableRequest request: + """ + py_db.post_method_as_internal_command(thread_id, internal_change_variable_json, request) + + def set_dont_trace_start_end_patterns(self, py_db, start_patterns, end_patterns): + # Note: start/end patterns normalized internally. + start_patterns = tuple(pydevd_file_utils.normcase(x) for x in start_patterns) + end_patterns = tuple(pydevd_file_utils.normcase(x) for x in end_patterns) + + # After it's set the first time, we can still change it, but we need to reset the + # related caches. + reset_caches = False + dont_trace_start_end_patterns_previously_set = py_db.dont_trace_external_files.__name__ == "custom_dont_trace_external_files" + + if not dont_trace_start_end_patterns_previously_set and not start_patterns and not end_patterns: + # If it wasn't set previously and start and end patterns are empty we don't need to do anything. + return + + if not py_db.is_cache_file_type_empty(): + # i.e.: custom function set in set_dont_trace_start_end_patterns. + if dont_trace_start_end_patterns_previously_set: + reset_caches = ( + py_db.dont_trace_external_files.start_patterns != start_patterns + or py_db.dont_trace_external_files.end_patterns != end_patterns + ) + + else: + reset_caches = True + + def custom_dont_trace_external_files(abs_path): + normalized_abs_path = pydevd_file_utils.normcase(abs_path) + return normalized_abs_path.startswith(start_patterns) or normalized_abs_path.endswith(end_patterns) + + custom_dont_trace_external_files.start_patterns = start_patterns + custom_dont_trace_external_files.end_patterns = end_patterns + py_db.dont_trace_external_files = custom_dont_trace_external_files + + if reset_caches: + py_db.clear_dont_trace_start_end_patterns_caches() + + def stop_on_entry(self): + main_thread = pydevd_utils.get_main_thread() + if main_thread is None: + pydev_log.critical("Could not find main thread while setting Stop on Entry.") + else: + info = set_additional_thread_info(main_thread) + info.pydev_original_step_cmd = CMD_STOP_ON_START + info.pydev_step_cmd = CMD_STEP_INTO_MY_CODE + info.update_stepping_info() + if PYDEVD_USE_SYS_MONITORING: + pydevd_sys_monitoring.update_monitor_events(suspend_requested=True) + pydevd_sys_monitoring.restart_events() + + def set_ignore_system_exit_codes(self, py_db, ignore_system_exit_codes): + py_db.set_ignore_system_exit_codes(ignore_system_exit_codes) + + SourceMappingEntry = pydevd_source_mapping.SourceMappingEntry + + def set_source_mapping(self, py_db, source_filename, mapping): + """ + :param str source_filename: + The filename for the source mapping (bytes on py2 and str on py3). + This filename will be made absolute in this function. + + :param list(SourceMappingEntry) mapping: + A list with the source mapping entries to be applied to the given filename. + + :return str: + An error message if it was not possible to set the mapping or an empty string if + everything is ok. + """ + source_filename = self.filename_to_server(source_filename) + absolute_source_filename = pydevd_file_utils.absolute_path(source_filename) + for map_entry in mapping: + map_entry.source_filename = absolute_source_filename + error_msg = py_db.source_mapping.set_source_mapping(absolute_source_filename, mapping) + if error_msg: + return error_msg + + self.reapply_breakpoints(py_db) + return "" + + def set_variable_presentation(self, py_db, variable_presentation): + assert isinstance(variable_presentation, self.VariablePresentation) + py_db.variable_presentation = variable_presentation + + def get_ppid(self): + """ + Provides the parent pid (even for older versions of Python on Windows). + """ + ppid = None + + try: + ppid = os.getppid() + except AttributeError: + pass + + if ppid is None and IS_WINDOWS: + ppid = self._get_windows_ppid() + + return ppid + + def _get_windows_ppid(self): + this_pid = os.getpid() + for ppid, pid in _list_ppid_and_pid(): + if pid == this_pid: + return ppid + + return None + + def _terminate_child_processes_windows(self, dont_terminate_child_pids): + this_pid = os.getpid() + for _ in range(50): # Try this at most 50 times before giving up. + # Note: we can't kill the process itself with taskkill, so, we + # list immediate children, kill that tree and then exit this process. + + children_pids = [] + for ppid, pid in _list_ppid_and_pid(): + if ppid == this_pid: + if pid not in dont_terminate_child_pids: + children_pids.append(pid) + + if not children_pids: + break + else: + for pid in children_pids: + self._call(["taskkill", "/F", "/PID", str(pid), "/T"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + del children_pids[:] + + def _terminate_child_processes_linux_and_mac(self, dont_terminate_child_pids): + this_pid = os.getpid() + + def list_children_and_stop_forking(initial_pid, stop=True): + children_pids = [] + if stop: + # Ask to stop forking (shouldn't be called for this process, only subprocesses). + self._call(["kill", "-STOP", str(initial_pid)], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + list_popen = self._popen(["pgrep", "-P", str(initial_pid)], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + if list_popen is not None: + stdout, _ = list_popen.communicate() + for line in stdout.splitlines(): + line = line.decode("ascii").strip() + if line: + pid = str(line) + if pid in dont_terminate_child_pids: + continue + children_pids.append(pid) + # Recursively get children. + children_pids.extend(list_children_and_stop_forking(pid)) + return children_pids + + previously_found = set() + + for _ in range(50): # Try this at most 50 times before giving up. + children_pids = list_children_and_stop_forking(this_pid, stop=False) + found_new = False + + for pid in children_pids: + if pid not in previously_found: + found_new = True + previously_found.add(pid) + self._call(["kill", "-KILL", str(pid)], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + if not found_new: + break + + def _popen(self, cmdline, **kwargs): + try: + return subprocess.Popen(cmdline, **kwargs) + except: + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 1: + pydev_log.exception("Error running: %s" % (" ".join(cmdline))) + return None + + def _call(self, cmdline, **kwargs): + try: + subprocess.check_call(cmdline, **kwargs) + except: + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 1: + pydev_log.exception("Error running: %s" % (" ".join(cmdline))) + + def set_terminate_child_processes(self, py_db, terminate_child_processes): + py_db.terminate_child_processes = terminate_child_processes + + def set_terminate_keyboard_interrupt(self, py_db, terminate_keyboard_interrupt): + py_db.terminate_keyboard_interrupt = terminate_keyboard_interrupt + + def terminate_process(self, py_db): + """ + Terminates the current process (and child processes if the option to also terminate + child processes is enabled). + """ + try: + if py_db.terminate_child_processes: + pydev_log.debug("Terminating child processes.") + if IS_WINDOWS: + self._terminate_child_processes_windows(py_db.dont_terminate_child_pids) + else: + self._terminate_child_processes_linux_and_mac(py_db.dont_terminate_child_pids) + finally: + pydev_log.debug("Exiting process (os._exit(0)).") + os._exit(0) + + def _terminate_if_commands_processed(self, py_db): + py_db.dispose_and_kill_all_pydevd_threads() + self.terminate_process(py_db) + + def request_terminate_process(self, py_db): + if py_db.terminate_keyboard_interrupt: + if not py_db.keyboard_interrupt_requested: + py_db.keyboard_interrupt_requested = True + interrupt_main_thread() + return + + # We mark with a terminate_requested to avoid that paused threads start running + # (we should terminate as is without letting any paused thread run). + py_db.terminate_requested = True + run_as_pydevd_daemon_thread(py_db, self._terminate_if_commands_processed, py_db) + + def setup_auto_reload_watcher(self, py_db, enable_auto_reload, watch_dirs, poll_target_time, exclude_patterns, include_patterns): + py_db.setup_auto_reload_watcher(enable_auto_reload, watch_dirs, poll_target_time, exclude_patterns, include_patterns) + + +def _list_ppid_and_pid(): + _TH32CS_SNAPPROCESS = 0x00000002 + + class PROCESSENTRY32(ctypes.Structure): + _fields_ = [ + ("dwSize", ctypes.c_uint32), + ("cntUsage", ctypes.c_uint32), + ("th32ProcessID", ctypes.c_uint32), + ("th32DefaultHeapID", ctypes.c_size_t), + ("th32ModuleID", ctypes.c_uint32), + ("cntThreads", ctypes.c_uint32), + ("th32ParentProcessID", ctypes.c_uint32), + ("pcPriClassBase", ctypes.c_long), + ("dwFlags", ctypes.c_uint32), + ("szExeFile", ctypes.c_char * 260), + ] + + kernel32 = ctypes.windll.kernel32 + snapshot = kernel32.CreateToolhelp32Snapshot(_TH32CS_SNAPPROCESS, 0) + ppid_and_pids = [] + try: + process_entry = PROCESSENTRY32() + process_entry.dwSize = ctypes.sizeof(PROCESSENTRY32) + if not kernel32.Process32First(ctypes.c_void_p(snapshot), ctypes.byref(process_entry)): + pydev_log.critical("Process32First failed (getting process from CreateToolhelp32Snapshot).") + else: + while True: + ppid_and_pids.append((process_entry.th32ParentProcessID, process_entry.th32ProcessID)) + if not kernel32.Process32Next(ctypes.c_void_p(snapshot), ctypes.byref(process_entry)): + break + finally: + kernel32.CloseHandle(snapshot) + + return ppid_and_pids diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_breakpoints.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_breakpoints.py new file mode 100644 index 0000000..7d4d022 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_breakpoints.py @@ -0,0 +1,181 @@ +from _pydev_bundle import pydev_log +from _pydevd_bundle import pydevd_import_class +from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame +from _pydev_bundle._pydev_saved_modules import threading + + +class ExceptionBreakpoint(object): + def __init__( + self, + qname, + condition, + expression, + notify_on_handled_exceptions, + notify_on_unhandled_exceptions, + notify_on_user_unhandled_exceptions, + notify_on_first_raise_only, + ignore_libraries, + ): + exctype = get_exception_class(qname) + self.qname = qname + if exctype is not None: + self.name = exctype.__name__ + else: + self.name = None + + self.condition = condition + self.expression = expression + self.notify_on_unhandled_exceptions = notify_on_unhandled_exceptions + self.notify_on_handled_exceptions = notify_on_handled_exceptions + self.notify_on_first_raise_only = notify_on_first_raise_only + self.notify_on_user_unhandled_exceptions = notify_on_user_unhandled_exceptions + self.ignore_libraries = ignore_libraries + + self.type = exctype + + def __str__(self): + return self.qname + + @property + def has_condition(self): + return self.condition is not None + + def handle_hit_condition(self, frame): + return False + + +class LineBreakpoint(object): + def __init__(self, breakpoint_id, line, condition, func_name, expression, suspend_policy="NONE", hit_condition=None, is_logpoint=False): + self.breakpoint_id = breakpoint_id + self.line = line + self.condition = condition + self.func_name = func_name + self.expression = expression + self.suspend_policy = suspend_policy + self.hit_condition = hit_condition + self._hit_count = 0 + self._hit_condition_lock = threading.Lock() + self.is_logpoint = is_logpoint + + @property + def has_condition(self): + return bool(self.condition) or bool(self.hit_condition) + + def handle_hit_condition(self, frame): + if not self.hit_condition: + return False + ret = False + with self._hit_condition_lock: + self._hit_count += 1 + expr = self.hit_condition.replace("@HIT@", str(self._hit_count)) + try: + ret = bool(eval(expr, frame.f_globals, frame.f_locals)) + except Exception: + ret = False + return ret + + +class FunctionBreakpoint(object): + def __init__(self, func_name, condition, expression, suspend_policy="NONE", hit_condition=None, is_logpoint=False): + self.condition = condition + self.func_name = func_name + self.expression = expression + self.suspend_policy = suspend_policy + self.hit_condition = hit_condition + self._hit_count = 0 + self._hit_condition_lock = threading.Lock() + self.is_logpoint = is_logpoint + + @property + def has_condition(self): + return bool(self.condition) or bool(self.hit_condition) + + def handle_hit_condition(self, frame): + if not self.hit_condition: + return False + ret = False + with self._hit_condition_lock: + self._hit_count += 1 + expr = self.hit_condition.replace("@HIT@", str(self._hit_count)) + try: + ret = bool(eval(expr, frame.f_globals, frame.f_locals)) + except Exception: + ret = False + return ret + + +def get_exception_breakpoint(exctype, exceptions): + if not exctype: + exception_full_qname = None + else: + exception_full_qname = str(exctype.__module__) + "." + exctype.__name__ + + exc = None + if exceptions is not None: + try: + return exceptions[exception_full_qname] + except KeyError: + for exception_breakpoint in exceptions.values(): + if exception_breakpoint.type is not None and issubclass(exctype, exception_breakpoint.type): + if exc is None or issubclass(exception_breakpoint.type, exc.type): + exc = exception_breakpoint + return exc + + +def stop_on_unhandled_exception(py_db, thread, additional_info, arg): + exctype, value, tb = arg + break_on_uncaught_exceptions = py_db.break_on_uncaught_exceptions + if break_on_uncaught_exceptions: + exception_breakpoint = py_db.get_exception_breakpoint(exctype, break_on_uncaught_exceptions) + else: + exception_breakpoint = None + + if not exception_breakpoint: + return + + if tb is None: # sometimes it can be None, e.g. with GTK + return + + if exctype is KeyboardInterrupt: + return + + if exctype is SystemExit and py_db.ignore_system_exit_code(value): + return + + frames = [] + user_frame = None + + while tb is not None: + if not py_db.exclude_exception_by_filter(exception_breakpoint, tb): + user_frame = tb.tb_frame + frames.append(tb.tb_frame) + tb = tb.tb_next + + if user_frame is None: + return + + frames_byid = dict([(id(frame), frame) for frame in frames]) + add_exception_to_frame(user_frame, arg) + if exception_breakpoint.condition is not None: + eval_result = py_db.handle_breakpoint_condition(additional_info, exception_breakpoint, user_frame) + if not eval_result: + return + + if exception_breakpoint.expression is not None: + py_db.handle_breakpoint_expression(exception_breakpoint, additional_info, user_frame) + + try: + additional_info.pydev_message = exception_breakpoint.qname + except: + additional_info.pydev_message = exception_breakpoint.qname.encode("utf-8") + + pydev_log.debug("Handling post-mortem stop on exception breakpoint %s" % (exception_breakpoint.qname,)) + + py_db.do_stop_on_unhandled_exception(thread, user_frame, frames_byid, arg) + + +def get_exception_class(kls): + try: + return eval(kls) + except: + return pydevd_import_class.import_name(kls) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils.py new file mode 100644 index 0000000..8a47044 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils.py @@ -0,0 +1,938 @@ +""" +Bytecode analysing utils. Originally added for using in smart step into. + +Note: not importable from Python 2. +""" + +from _pydev_bundle import pydev_log +from types import CodeType +from _pydevd_frame_eval.vendored.bytecode.instr import _Variable, Label +from _pydevd_frame_eval.vendored import bytecode +from _pydevd_frame_eval.vendored.bytecode import cfg as bytecode_cfg +import dis +import opcode as _opcode + +from _pydevd_bundle.pydevd_constants import KeyifyList, DebugInfoHolder, IS_PY311_OR_GREATER +from bisect import bisect +from collections import deque +import traceback + +# When True, throws errors on unknown bytecodes, when False, ignore those as if they didn't change the stack. +STRICT_MODE = False + +GO_INTO_INNER_CODES = True + +DEBUG = False + +_BINARY_OPS = set([opname for opname in dis.opname if opname.startswith("BINARY_")]) + +_BINARY_OP_MAP = { + "BINARY_POWER": "__pow__", + "BINARY_MULTIPLY": "__mul__", + "BINARY_MATRIX_MULTIPLY": "__matmul__", + "BINARY_FLOOR_DIVIDE": "__floordiv__", + "BINARY_TRUE_DIVIDE": "__div__", + "BINARY_MODULO": "__mod__", + "BINARY_ADD": "__add__", + "BINARY_SUBTRACT": "__sub__", + "BINARY_LSHIFT": "__lshift__", + "BINARY_RSHIFT": "__rshift__", + "BINARY_AND": "__and__", + "BINARY_OR": "__or__", + "BINARY_XOR": "__xor__", + "BINARY_SUBSCR": "__getitem__", + "BINARY_DIVIDE": "__div__", +} + +_COMP_OP_MAP = { + "<": "__lt__", + "<=": "__le__", + "==": "__eq__", + "!=": "__ne__", + ">": "__gt__", + ">=": "__ge__", + "in": "__contains__", + "not in": "__contains__", +} + + +class Target(object): + __slots__ = ["arg", "lineno", "endlineno", "startcol", "endcol", "offset", "children_targets"] + + def __init__( + self, + arg, + lineno, + offset, + children_targets=(), + # These are optional (only Python 3.11 onwards). + endlineno=-1, + startcol=-1, + endcol=-1, + ): + self.arg = arg + self.lineno = lineno + self.endlineno = endlineno + self.startcol = startcol + self.endcol = endcol + + self.offset = offset + self.children_targets = children_targets + + def __repr__(self): + ret = [] + for s in self.__slots__: + ret.append("%s: %s" % (s, getattr(self, s))) + return "Target(%s)" % ", ".join(ret) + + __str__ = __repr__ + + +class _TargetIdHashable(object): + def __init__(self, target): + self.target = target + + def __eq__(self, other): + if not hasattr(other, "target"): + return + return other.target is self.target + + def __ne__(self, other): + return not self == other + + def __hash__(self): + return id(self.target) + + +class _StackInterpreter(object): + """ + Good reference: https://github.com/python/cpython/blob/fcb55c0037baab6f98f91ee38ce84b6f874f034a/Python/ceval.c + """ + + def __init__(self, bytecode): + self.bytecode = bytecode + self._stack = deque() + self.function_calls = [] + self.load_attrs = {} + self.func = set() + self.func_name_id_to_code_object = {} + + def __str__(self): + return "Stack:\nFunction calls:\n%s\nLoad attrs:\n%s\n" % (self.function_calls, list(self.load_attrs.values())) + + def _getname(self, instr): + if instr.opcode in _opcode.hascompare: + cmp_op = dis.cmp_op[instr.arg] + if cmp_op not in ("exception match", "BAD"): + return _COMP_OP_MAP.get(cmp_op, cmp_op) + return instr.arg + + def _getcallname(self, instr): + if instr.name == "BINARY_SUBSCR": + return "__getitem__().__call__" + if instr.name == "CALL_FUNCTION": + # Note: previously a '__call__().__call__' was returned, but this was a bit weird + # and on Python 3.9 this construct could appear for some internal things where + # it wouldn't be expected. + # Note: it'd be what we had in func()(). + return None + if instr.name == "MAKE_FUNCTION": + return "__func__().__call__" + if instr.name == "LOAD_ASSERTION_ERROR": + return "AssertionError" + name = self._getname(instr) + if isinstance(name, CodeType): + name = name.co_qualname # Note: only available for Python 3.11 + if isinstance(name, _Variable): + name = name.name + if isinstance(name, tuple): + # Load attr in Python 3.12 comes with (bool, name) + if len(name) == 2 and isinstance(name[0], bool) and isinstance(name[1], str): + name = name[1] + + if not isinstance(name, str): + return None + if name.endswith(">"): # xxx., xxx., ... + return name.split(".")[-1] + return name + + def _no_stack_change(self, instr): + pass # Can be aliased when the instruction does nothing. + + def on_LOAD_GLOBAL(self, instr): + self._stack.append(instr) + + def on_POP_TOP(self, instr): + try: + self._stack.pop() + except IndexError: + pass # Ok (in the end of blocks) + + def on_LOAD_ATTR(self, instr): + self.on_POP_TOP(instr) # replaces the current top + self._stack.append(instr) + self.load_attrs[_TargetIdHashable(instr)] = Target(self._getname(instr), instr.lineno, instr.offset) + + on_LOOKUP_METHOD = on_LOAD_ATTR # Improvement in PyPy + + def on_LOAD_CONST(self, instr): + self._stack.append(instr) + + on_LOAD_DEREF = on_LOAD_CONST + on_LOAD_NAME = on_LOAD_CONST + on_LOAD_CLOSURE = on_LOAD_CONST + on_LOAD_CLASSDEREF = on_LOAD_CONST + + # Although it actually changes the stack, it's inconsequential for us as a function call can't + # really be found there. + on_IMPORT_NAME = _no_stack_change + on_IMPORT_FROM = _no_stack_change + on_IMPORT_STAR = _no_stack_change + on_SETUP_ANNOTATIONS = _no_stack_change + + def on_STORE_FAST(self, instr): + try: + self._stack.pop() + except IndexError: + pass # Ok, we may have a block just with the store + + # Note: it stores in the locals and doesn't put anything in the stack. + + on_STORE_GLOBAL = on_STORE_FAST + on_STORE_DEREF = on_STORE_FAST + on_STORE_ATTR = on_STORE_FAST + on_STORE_NAME = on_STORE_FAST + + on_DELETE_NAME = on_POP_TOP + on_DELETE_ATTR = on_POP_TOP + on_DELETE_GLOBAL = on_POP_TOP + on_DELETE_FAST = on_POP_TOP + on_DELETE_DEREF = on_POP_TOP + + on_DICT_UPDATE = on_POP_TOP + on_SET_UPDATE = on_POP_TOP + + on_GEN_START = on_POP_TOP + + def on_NOP(self, instr): + pass + + def _handle_call_from_instr(self, func_name_instr, func_call_instr): + self.load_attrs.pop(_TargetIdHashable(func_name_instr), None) + call_name = self._getcallname(func_name_instr) + target = None + if not call_name: + pass # Ignore if we can't identify a name + elif call_name in ("", "", "", ""): + code_obj = self.func_name_id_to_code_object[_TargetIdHashable(func_name_instr)] + if code_obj is not None and GO_INTO_INNER_CODES: + children_targets = _get_smart_step_into_targets(code_obj) + if children_targets: + # i.e.: we have targets inside of a or . + # Note that to actually match this in the debugger we need to do matches on 2 frames, + # the one with the and then the actual target inside the . + target = Target(call_name, func_name_instr.lineno, func_call_instr.offset, children_targets) + self.function_calls.append(target) + + else: + # Ok, regular call + target = Target(call_name, func_name_instr.lineno, func_call_instr.offset) + self.function_calls.append(target) + + if DEBUG and target is not None: + print("Created target", target) + self._stack.append(func_call_instr) # Keep the func call as the result + + def on_COMPARE_OP(self, instr): + try: + _right = self._stack.pop() + except IndexError: + return + try: + _left = self._stack.pop() + except IndexError: + return + + cmp_op = dis.cmp_op[instr.arg] + if cmp_op not in ("exception match", "BAD"): + self.function_calls.append(Target(self._getname(instr), instr.lineno, instr.offset)) + + self._stack.append(instr) + + def on_IS_OP(self, instr): + try: + self._stack.pop() + except IndexError: + return + try: + self._stack.pop() + except IndexError: + return + + def on_BINARY_SUBSCR(self, instr): + try: + _sub = self._stack.pop() + except IndexError: + return + try: + _container = self._stack.pop() + except IndexError: + return + self.function_calls.append(Target(_BINARY_OP_MAP[instr.name], instr.lineno, instr.offset)) + self._stack.append(instr) + + on_BINARY_MATRIX_MULTIPLY = on_BINARY_SUBSCR + on_BINARY_POWER = on_BINARY_SUBSCR + on_BINARY_MULTIPLY = on_BINARY_SUBSCR + on_BINARY_FLOOR_DIVIDE = on_BINARY_SUBSCR + on_BINARY_TRUE_DIVIDE = on_BINARY_SUBSCR + on_BINARY_MODULO = on_BINARY_SUBSCR + on_BINARY_ADD = on_BINARY_SUBSCR + on_BINARY_SUBTRACT = on_BINARY_SUBSCR + on_BINARY_LSHIFT = on_BINARY_SUBSCR + on_BINARY_RSHIFT = on_BINARY_SUBSCR + on_BINARY_AND = on_BINARY_SUBSCR + on_BINARY_OR = on_BINARY_SUBSCR + on_BINARY_XOR = on_BINARY_SUBSCR + + def on_LOAD_METHOD(self, instr): + self.on_POP_TOP(instr) # Remove the previous as we're loading something from it. + self._stack.append(instr) + + def on_MAKE_FUNCTION(self, instr): + if not IS_PY311_OR_GREATER: + # The qualifier name is no longer put in the stack. + qualname = self._stack.pop() + code_obj_instr = self._stack.pop() + else: + # In 3.11 the code object has a co_qualname which we can use. + qualname = code_obj_instr = self._stack.pop() + + arg = instr.arg + if arg & 0x08: + _func_closure = self._stack.pop() + if arg & 0x04: + _func_annotations = self._stack.pop() + if arg & 0x02: + _func_kwdefaults = self._stack.pop() + if arg & 0x01: + _func_defaults = self._stack.pop() + + call_name = self._getcallname(qualname) + if call_name in ("", "", "", ""): + if isinstance(code_obj_instr.arg, CodeType): + self.func_name_id_to_code_object[_TargetIdHashable(qualname)] = code_obj_instr.arg + self._stack.append(qualname) + + def on_LOAD_FAST(self, instr): + self._stack.append(instr) + + on_LOAD_FAST_AND_CLEAR = on_LOAD_FAST + on_LOAD_FAST_CHECK = on_LOAD_FAST + + def on_LOAD_ASSERTION_ERROR(self, instr): + self._stack.append(instr) + + on_LOAD_BUILD_CLASS = on_LOAD_FAST + + def on_CALL_METHOD(self, instr): + # pop the actual args + for _ in range(instr.arg): + self._stack.pop() + + func_name_instr = self._stack.pop() + self._handle_call_from_instr(func_name_instr, instr) + + def on_CALL(self, instr): + # pop the actual args + for _ in range(instr.arg): + self._stack.pop() + + func_name_instr = self._stack.pop() + if self._getcallname(func_name_instr) is None: + func_name_instr = self._stack.pop() + + if self._stack: + peeked = self._stack[-1] + if peeked.name == "PUSH_NULL": + self._stack.pop() + + self._handle_call_from_instr(func_name_instr, instr) + + def on_CALL_INTRINSIC_1(self, instr): + try: + func_name_instr = self._stack.pop() + except IndexError: + return + + if self._stack: + peeked = self._stack[-1] + if peeked.name == "PUSH_NULL": + self._stack.pop() + + self._handle_call_from_instr(func_name_instr, instr) + + def on_PUSH_NULL(self, instr): + self._stack.append(instr) + + def on_KW_NAMES(self, instr): + return + + def on_RETURN_CONST(self, instr): + return + + def on_CALL_FUNCTION(self, instr): + arg = instr.arg + + argc = arg & 0xFF # positional args + argc += (arg >> 8) * 2 # keyword args + + # pop the actual args + for _ in range(argc): + try: + self._stack.pop() + except IndexError: + return + + try: + func_name_instr = self._stack.pop() + except IndexError: + return + self._handle_call_from_instr(func_name_instr, instr) + + def on_CALL_FUNCTION_KW(self, instr): + # names of kw args + _names_of_kw_args = self._stack.pop() + + # pop the actual args + arg = instr.arg + + argc = arg & 0xFF # positional args + argc += (arg >> 8) * 2 # keyword args + + for _ in range(argc): + self._stack.pop() + + func_name_instr = self._stack.pop() + self._handle_call_from_instr(func_name_instr, instr) + + def on_CALL_FUNCTION_VAR(self, instr): + # var name + _var_arg = self._stack.pop() + + # pop the actual args + arg = instr.arg + + argc = arg & 0xFF # positional args + argc += (arg >> 8) * 2 # keyword args + + for _ in range(argc): + self._stack.pop() + + func_name_instr = self._stack.pop() + self._handle_call_from_instr(func_name_instr, instr) + + def on_CALL_FUNCTION_VAR_KW(self, instr): + # names of kw args + _names_of_kw_args = self._stack.pop() + + arg = instr.arg + + argc = arg & 0xFF # positional args + argc += (arg >> 8) * 2 # keyword args + + # also pop **kwargs + self._stack.pop() + + # pop the actual args + for _ in range(argc): + self._stack.pop() + + func_name_instr = self._stack.pop() + self._handle_call_from_instr(func_name_instr, instr) + + def on_CALL_FUNCTION_EX(self, instr): + if instr.arg & 0x01: + _kwargs = self._stack.pop() + _callargs = self._stack.pop() + func_name_instr = self._stack.pop() + self._handle_call_from_instr(func_name_instr, instr) + + on_GET_AITER = _no_stack_change + on_GET_ANEXT = _no_stack_change + on_END_FOR = _no_stack_change + on_END_ASYNC_FOR = _no_stack_change + on_BEFORE_ASYNC_WITH = _no_stack_change + on_SETUP_ASYNC_WITH = _no_stack_change + on_YIELD_FROM = _no_stack_change + on_SETUP_LOOP = _no_stack_change + on_FOR_ITER = _no_stack_change + on_BREAK_LOOP = _no_stack_change + on_JUMP_ABSOLUTE = _no_stack_change + on_RERAISE = _no_stack_change + on_LIST_TO_TUPLE = _no_stack_change + on_CALL_FINALLY = _no_stack_change + on_POP_FINALLY = _no_stack_change + + def on_JUMP_IF_FALSE_OR_POP(self, instr): + try: + self._stack.pop() + except IndexError: + return + + on_JUMP_IF_TRUE_OR_POP = on_JUMP_IF_FALSE_OR_POP + + def on_JUMP_IF_NOT_EXC_MATCH(self, instr): + try: + self._stack.pop() + except IndexError: + return + try: + self._stack.pop() + except IndexError: + return + + def on_SWAP(self, instr): + i = instr.arg + try: + self._stack[-i], self._stack[-1] = self._stack[-1], self._stack[-i] + except: + pass + + def on_ROT_TWO(self, instr): + try: + p0 = self._stack.pop() + except IndexError: + return + + try: + p1 = self._stack.pop() + except: + self._stack.append(p0) + return + + self._stack.append(p0) + self._stack.append(p1) + + def on_ROT_THREE(self, instr): + try: + p0 = self._stack.pop() + except IndexError: + return + + try: + p1 = self._stack.pop() + except: + self._stack.append(p0) + return + + try: + p2 = self._stack.pop() + except: + self._stack.append(p0) + self._stack.append(p1) + return + + self._stack.append(p0) + self._stack.append(p1) + self._stack.append(p2) + + def on_ROT_FOUR(self, instr): + try: + p0 = self._stack.pop() + except IndexError: + return + + try: + p1 = self._stack.pop() + except: + self._stack.append(p0) + return + + try: + p2 = self._stack.pop() + except: + self._stack.append(p0) + self._stack.append(p1) + return + + try: + p3 = self._stack.pop() + except: + self._stack.append(p0) + self._stack.append(p1) + self._stack.append(p2) + return + + self._stack.append(p0) + self._stack.append(p1) + self._stack.append(p2) + self._stack.append(p3) + + def on_BUILD_LIST_FROM_ARG(self, instr): + self._stack.append(instr) + + def on_BUILD_MAP(self, instr): + for _i in range(instr.arg): + self._stack.pop() + self._stack.pop() + self._stack.append(instr) + + def on_BUILD_CONST_KEY_MAP(self, instr): + self.on_POP_TOP(instr) # keys + for _i in range(instr.arg): + self.on_POP_TOP(instr) # value + self._stack.append(instr) + + on_YIELD_VALUE = on_POP_TOP + on_RETURN_VALUE = on_POP_TOP + on_POP_JUMP_IF_FALSE = on_POP_TOP + on_POP_JUMP_IF_TRUE = on_POP_TOP + on_DICT_MERGE = on_POP_TOP + on_LIST_APPEND = on_POP_TOP + on_SET_ADD = on_POP_TOP + on_LIST_EXTEND = on_POP_TOP + on_UNPACK_EX = on_POP_TOP + + # ok: doesn't change the stack (converts top to getiter(top)) + on_GET_ITER = _no_stack_change + on_GET_AWAITABLE = _no_stack_change + on_GET_YIELD_FROM_ITER = _no_stack_change + + def on_RETURN_GENERATOR(self, instr): + self._stack.append(instr) + + on_RETURN_GENERATOR = _no_stack_change + on_RESUME = _no_stack_change + + def on_MAP_ADD(self, instr): + self.on_POP_TOP(instr) + self.on_POP_TOP(instr) + + def on_UNPACK_SEQUENCE(self, instr): + self._stack.pop() + for _i in range(instr.arg): + self._stack.append(instr) + + def on_BUILD_LIST(self, instr): + for _i in range(instr.arg): + self.on_POP_TOP(instr) + self._stack.append(instr) + + on_BUILD_TUPLE = on_BUILD_LIST + on_BUILD_STRING = on_BUILD_LIST + on_BUILD_TUPLE_UNPACK_WITH_CALL = on_BUILD_LIST + on_BUILD_TUPLE_UNPACK = on_BUILD_LIST + on_BUILD_LIST_UNPACK = on_BUILD_LIST + on_BUILD_MAP_UNPACK_WITH_CALL = on_BUILD_LIST + on_BUILD_MAP_UNPACK = on_BUILD_LIST + on_BUILD_SET = on_BUILD_LIST + on_BUILD_SET_UNPACK = on_BUILD_LIST + + on_SETUP_FINALLY = _no_stack_change + on_POP_FINALLY = _no_stack_change + on_BEGIN_FINALLY = _no_stack_change + on_END_FINALLY = _no_stack_change + + def on_RAISE_VARARGS(self, instr): + for _i in range(instr.arg): + self.on_POP_TOP(instr) + + on_POP_BLOCK = _no_stack_change + on_JUMP_FORWARD = _no_stack_change + on_JUMP_BACKWARD = _no_stack_change + on_JUMP_BACKWARD_NO_INTERRUPT = _no_stack_change + on_POP_EXCEPT = _no_stack_change + on_SETUP_EXCEPT = _no_stack_change + on_WITH_EXCEPT_START = _no_stack_change + + on_END_FINALLY = _no_stack_change + on_BEGIN_FINALLY = _no_stack_change + on_SETUP_WITH = _no_stack_change + on_WITH_CLEANUP_START = _no_stack_change + on_WITH_CLEANUP_FINISH = _no_stack_change + on_FORMAT_VALUE = _no_stack_change + on_EXTENDED_ARG = _no_stack_change + + def on_INPLACE_ADD(self, instr): + # This would actually pop 2 and leave the value in the stack. + # In a += 1 it pop `a` and `1` and leave the resulting value + # for a load. In our case, let's just pop the `1` and leave the `a` + # instead of leaving the INPLACE_ADD bytecode. + try: + self._stack.pop() + except IndexError: + pass + + on_INPLACE_POWER = on_INPLACE_ADD + on_INPLACE_MULTIPLY = on_INPLACE_ADD + on_INPLACE_MATRIX_MULTIPLY = on_INPLACE_ADD + on_INPLACE_TRUE_DIVIDE = on_INPLACE_ADD + on_INPLACE_FLOOR_DIVIDE = on_INPLACE_ADD + on_INPLACE_MODULO = on_INPLACE_ADD + on_INPLACE_SUBTRACT = on_INPLACE_ADD + on_INPLACE_RSHIFT = on_INPLACE_ADD + on_INPLACE_LSHIFT = on_INPLACE_ADD + on_INPLACE_AND = on_INPLACE_ADD + on_INPLACE_OR = on_INPLACE_ADD + on_INPLACE_XOR = on_INPLACE_ADD + + def on_DUP_TOP(self, instr): + try: + i = self._stack[-1] + except IndexError: + # ok (in the start of block) + self._stack.append(instr) + else: + self._stack.append(i) + + def on_DUP_TOP_TWO(self, instr): + if len(self._stack) == 0: + self._stack.append(instr) + return + + if len(self._stack) == 1: + i = self._stack[-1] + self._stack.append(i) + self._stack.append(instr) + return + + i = self._stack[-1] + j = self._stack[-2] + self._stack.append(j) + self._stack.append(i) + + def on_BUILD_SLICE(self, instr): + for _ in range(instr.arg): + try: + self._stack.pop() + except IndexError: + pass + self._stack.append(instr) + + def on_STORE_SUBSCR(self, instr): + try: + self._stack.pop() + self._stack.pop() + self._stack.pop() + except IndexError: + pass + + def on_DELETE_SUBSCR(self, instr): + try: + self._stack.pop() + self._stack.pop() + except IndexError: + pass + + # Note: on Python 3 this is only found on interactive mode to print the results of + # some evaluation. + on_PRINT_EXPR = on_POP_TOP + + on_LABEL = _no_stack_change + on_UNARY_POSITIVE = _no_stack_change + on_UNARY_NEGATIVE = _no_stack_change + on_UNARY_NOT = _no_stack_change + on_UNARY_INVERT = _no_stack_change + + on_CACHE = _no_stack_change + on_PRECALL = _no_stack_change + + +def _get_smart_step_into_targets(code): + """ + :return list(Target) + """ + b = bytecode.Bytecode.from_code(code) + cfg = bytecode_cfg.ControlFlowGraph.from_bytecode(b) + + ret = [] + + for block in cfg: + if DEBUG: + print("\nStart block----") + stack = _StackInterpreter(block) + for instr in block: + if isinstance(instr, (Label,)): + # No name for these + continue + try: + func_name = "on_%s" % (instr.name,) + func = getattr(stack, func_name, None) + + if func is None: + if STRICT_MODE: + raise AssertionError("%s not found." % (func_name,)) + else: + if DEBUG: + print("Skipping: %s." % (func_name,)) + + continue + func(instr) + + if DEBUG: + if instr.name != "CACHE": # Filter the ones we don't want to see. + print("\nHandled: ", instr, ">>", stack._getname(instr), "<<") + print("New stack:") + for entry in stack._stack: + print(" arg:", stack._getname(entry), "(", entry, ")") + except: + if STRICT_MODE: + raise # Error in strict mode. + else: + # In non-strict mode, log it (if in verbose mode) and keep on going. + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 2: + pydev_log.exception("Exception computing step into targets (handled).") + + ret.extend(stack.function_calls) + # No longer considering attr loads as calls (while in theory sometimes it's possible + # that something as `some.attr` can turn out to be a property which could be stepped + # in, it's not that common in practice and can be surprising for users, so, disabling + # step into from stepping into properties). + # ret.extend(stack.load_attrs.values()) + + if DEBUG: + print("\nEnd block----") + return ret + + +# Note that the offset is unique within the frame (so, we can use it as the target id). +# Also, as the offset is the instruction offset within the frame, it's possible to +# to inspect the parent frame for frame.f_lasti to know where we actually are (as the +# caller name may not always match the new frame name). +class Variant(object): + __slots__ = ["name", "is_visited", "line", "offset", "call_order", "children_variants", "parent", "endlineno", "startcol", "endcol"] + + def __init__(self, name, is_visited, line, offset, call_order, children_variants=None, endlineno=-1, startcol=-1, endcol=-1): + self.name = name + self.is_visited = is_visited + self.line = line + self.endlineno = endlineno + self.startcol = startcol + self.endcol = endcol + self.offset = offset + self.call_order = call_order + self.children_variants = children_variants + self.parent = None + if children_variants: + for variant in children_variants: + variant.parent = self + + def __repr__(self): + ret = [] + for s in self.__slots__: + if s == "parent": + try: + parent = self.parent + except AttributeError: + ret.append("%s: " % (s,)) + else: + if parent is None: + ret.append("parent: None") + else: + ret.append("parent: %s (%s)" % (parent.name, parent.offset)) + continue + + if s == "children_variants": + ret.append("children_variants: %s" % (len(self.children_variants) if self.children_variants else 0)) + continue + + try: + ret.append("%s= %s" % (s, getattr(self, s))) + except AttributeError: + ret.append("%s: " % (s,)) + return "Variant(%s)" % ", ".join(ret) + + __str__ = __repr__ + + +def _convert_target_to_variant(target, start_line, end_line, call_order_cache: dict, lasti: int, base: int): + name = target.arg + if not isinstance(name, str): + return + if target.lineno > end_line: + return + if target.lineno < start_line: + return + + call_order = call_order_cache.get(name, 0) + 1 + call_order_cache[name] = call_order + is_visited = target.offset <= lasti + + children_targets = target.children_targets + children_variants = None + if children_targets: + children_variants = [ + _convert_target_to_variant(child, start_line, end_line, call_order_cache, lasti, base) for child in target.children_targets + ] + + return Variant( + name, + is_visited, + target.lineno - base, + target.offset, + call_order, + children_variants, + # Only really matter in Python 3.11 + target.endlineno - base if target.endlineno >= 0 else -1, + target.startcol, + target.endcol, + ) + + +def calculate_smart_step_into_variants(frame, start_line, end_line, base=0): + """ + Calculate smart step into variants for the given line range. + :param frame: + :type frame: :py:class:`types.FrameType` + :param start_line: + :param end_line: + :return: A list of call names from the first to the last. + :note: it's guaranteed that the offsets appear in order. + :raise: :py:class:`RuntimeError` if failed to parse the bytecode or if dis cannot be used. + """ + if IS_PY311_OR_GREATER: + from . import pydevd_bytecode_utils_py311 + + return pydevd_bytecode_utils_py311.calculate_smart_step_into_variants(frame, start_line, end_line, base) + + variants = [] + code = frame.f_code + lasti = frame.f_lasti + + call_order_cache = {} + if DEBUG: + print("dis.dis:") + if IS_PY311_OR_GREATER: + dis.dis(code, show_caches=False) + else: + dis.dis(code) + + for target in _get_smart_step_into_targets(code): + variant = _convert_target_to_variant(target, start_line, end_line, call_order_cache, lasti, base) + if variant is None: + continue + variants.append(variant) + + return variants + + +def get_smart_step_into_variant_from_frame_offset(frame_f_lasti, variants): + """ + Given the frame.f_lasti, return the related `Variant`. + + :note: if the offset is found before any variant available or no variants are + available, None is returned. + + :rtype: Variant|NoneType + """ + if not variants: + return None + + i = bisect(KeyifyList(variants, lambda entry: entry.offset), frame_f_lasti) + + if i == 0: + return None + + else: + return variants[i - 1] diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils_py311.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils_py311.py new file mode 100644 index 0000000..7ebaa7f --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils_py311.py @@ -0,0 +1,105 @@ +from _pydevd_bundle.pydevd_constants import IS_PY311_OR_GREATER +import dis +from types import CodeType +from collections import namedtuple + +DEBUG = False + +_Pos = namedtuple("_Pos", "lineno endlineno startcol endcol") + + +def _is_inside(item_pos: _Pos, container_pos: _Pos): + if item_pos.lineno < container_pos.lineno or item_pos.endlineno > container_pos.endlineno: + return False + + if item_pos.lineno == container_pos.lineno: + if item_pos.startcol < container_pos.startcol: + return False + + if item_pos.endlineno == container_pos.endlineno: + if item_pos.endcol > container_pos.endcol: + return False + + # Not outside, must be inside. + return True + + +def _get_smart_step_into_targets(code): + import linecache + from .pydevd_bytecode_utils import Target + + filename = code.co_filename + + targets_root = [] + children = [] + for instr in dis.Bytecode(code): + if instr.opname == "LOAD_CONST": + if isinstance(instr.argval, CodeType): + children.append(_get_smart_step_into_targets(instr.argval)) + + elif instr.opname in ("CALL", "CALL_INTRINSIC_1"): + positions = instr.positions + if positions.lineno is None: + continue + if positions.end_lineno is None: + continue + lines = [] + for lineno in range(positions.lineno, positions.end_lineno + 1): + lines.append(linecache.getline(filename, lineno)) + + startcol = positions.col_offset + endcol = positions.end_col_offset + + if positions.lineno == positions.end_lineno: + lines[0] = lines[0][startcol:endcol] + else: + lines[0] = lines[0][startcol:] + lines[-1] = lines[-1][:endcol] + + pos = _Pos(positions.lineno, positions.end_lineno, startcol, endcol) + targets_root.append(Target("".join(lines), positions.lineno, instr.offset, [], positions.end_lineno, startcol, endcol)) + + for targets in children: + for child_target in targets: + pos = _Pos(child_target.lineno, child_target.endlineno, child_target.startcol, child_target.endcol) + + for outer_target in targets_root: + outer_pos = _Pos(outer_target.lineno, outer_target.endlineno, outer_target.startcol, outer_target.endcol) + if _is_inside(pos, outer_pos): + outer_target.children_targets.append(child_target) + break + return targets_root + + +def calculate_smart_step_into_variants(frame, start_line, end_line, base=0): + """ + Calculate smart step into variants for the given line range. + :param frame: + :type frame: :py:class:`types.FrameType` + :param start_line: + :param end_line: + :return: A list of call names from the first to the last. + :note: it's guaranteed that the offsets appear in order. + :raise: :py:class:`RuntimeError` if failed to parse the bytecode or if dis cannot be used. + """ + from .pydevd_bytecode_utils import _convert_target_to_variant + + variants = [] + code = frame.f_code + lasti = frame.f_lasti + + call_order_cache = {} + if DEBUG: + print("dis.dis:") + if IS_PY311_OR_GREATER: + dis.dis(code, show_caches=False) + else: + dis.dis(code) + + for target in _get_smart_step_into_targets(code): + variant = _convert_target_to_variant(target, start_line, end_line, call_order_cache, lasti, base) + if variant is None: + continue + variants.append(variant) + + return variants diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_code_to_source.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_code_to_source.py new file mode 100644 index 0000000..9147fa0 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_code_to_source.py @@ -0,0 +1,605 @@ +""" +Decompiler that can be used with the debugger (where statements correctly represent the +line numbers). + +Note: this is a work in progress / proof of concept / not ready to be used. +""" + +import dis + +from _pydevd_bundle.pydevd_collect_bytecode_info import iter_instructions +from _pydev_bundle import pydev_log +import sys +import inspect +from io import StringIO + + +class _Stack(object): + def __init__(self): + self._contents = [] + + def push(self, obj): + # print('push', obj) + self._contents.append(obj) + + def pop(self): + return self._contents.pop(-1) + + +INDENT_MARKER = object() +DEDENT_MARKER = object() +_SENTINEL = object() + +DEBUG = False + + +class _Token(object): + def __init__(self, i_line, instruction=None, tok=_SENTINEL, priority=0, after=None, end_of_line=False): + """ + :param i_line: + :param instruction: + :param tok: + :param priority: + :param after: + :param end_of_line: + Marker to signal only after all the other tokens have been written. + """ + self.i_line = i_line + if tok is not _SENTINEL: + self.tok = tok + else: + if instruction is not None: + if inspect.iscode(instruction.argval): + self.tok = "" + else: + self.tok = str(instruction.argval) + else: + raise AssertionError("Either the tok or the instruction is needed.") + self.instruction = instruction + self.priority = priority + self.end_of_line = end_of_line + self._after_tokens = set() + self._after_handler_tokens = set() + if after: + self.mark_after(after) + + def mark_after(self, v): + if isinstance(v, _Token): + self._after_tokens.add(v) + elif isinstance(v, _BaseHandler): + self._after_handler_tokens.add(v) + + else: + raise AssertionError("Unhandled: %s" % (v,)) + + def get_after_tokens(self): + ret = self._after_tokens.copy() + for handler in self._after_handler_tokens: + ret.update(handler.tokens) + return ret + + def __repr__(self): + return "Token(%s, after: %s)" % (self.tok, self.get_after_tokens()) + + __str__ = __repr__ + + +class _Writer(object): + def __init__(self): + self.line_to_contents = {} + self.all_tokens = set() + + def get_line(self, line): + lst = self.line_to_contents.get(line) + if lst is None: + lst = self.line_to_contents[line] = [] + return lst + + def indent(self, line): + self.get_line(line).append(INDENT_MARKER) + + def dedent(self, line): + self.get_line(line).append(DEDENT_MARKER) + + def write(self, line, token): + if token in self.all_tokens: + return + self.all_tokens.add(token) + assert isinstance(token, _Token) + lst = self.get_line(line) + lst.append(token) + + +class _BaseHandler(object): + def __init__(self, i_line, instruction, stack, writer, disassembler): + self.i_line = i_line + self.instruction = instruction + self.stack = stack + self.writer = writer + self.disassembler = disassembler + self.tokens = [] + self._handle() + + def _write_tokens(self): + for token in self.tokens: + self.writer.write(token.i_line, token) + + def _handle(self): + raise NotImplementedError(self) + + def __repr__(self, *args, **kwargs): + try: + return "%s line:%s" % (self.instruction, self.i_line) + except: + return object.__repr__(self) + + __str__ = __repr__ + + +_op_name_to_handler = {} + + +def _register(cls): + _op_name_to_handler[cls.opname] = cls + return cls + + +class _BasePushHandler(_BaseHandler): + def _handle(self): + self.stack.push(self) + + +class _BaseLoadHandler(_BasePushHandler): + def _handle(self): + _BasePushHandler._handle(self) + self.tokens = [_Token(self.i_line, self.instruction)] + + +@_register +class _LoadBuildClass(_BasePushHandler): + opname = "LOAD_BUILD_CLASS" + + +@_register +class _LoadConst(_BaseLoadHandler): + opname = "LOAD_CONST" + + +@_register +class _LoadName(_BaseLoadHandler): + opname = "LOAD_NAME" + + +@_register +class _LoadGlobal(_BaseLoadHandler): + opname = "LOAD_GLOBAL" + + +@_register +class _LoadFast(_BaseLoadHandler): + opname = "LOAD_FAST" + + +@_register +class _GetIter(_BaseHandler): + """ + Implements TOS = iter(TOS). + """ + + opname = "GET_ITER" + iter_target = None + + def _handle(self): + self.iter_target = self.stack.pop() + self.tokens.extend(self.iter_target.tokens) + self.stack.push(self) + + +@_register +class _ForIter(_BaseHandler): + """ + TOS is an iterator. Call its __next__() method. If this yields a new value, push it on the stack + (leaving the iterator below it). If the iterator indicates it is exhausted TOS is popped, and + the byte code counter is incremented by delta. + """ + + opname = "FOR_ITER" + + iter_in = None + + def _handle(self): + self.iter_in = self.stack.pop() + self.stack.push(self) + + def store_in_name(self, store_name): + for_token = _Token(self.i_line, None, "for ") + self.tokens.append(for_token) + prev = for_token + + t_name = _Token(store_name.i_line, store_name.instruction, after=prev) + self.tokens.append(t_name) + prev = t_name + + in_token = _Token(store_name.i_line, None, " in ", after=prev) + self.tokens.append(in_token) + prev = in_token + + max_line = store_name.i_line + if self.iter_in: + for t in self.iter_in.tokens: + t.mark_after(prev) + max_line = max(max_line, t.i_line) + prev = t + self.tokens.extend(self.iter_in.tokens) + + colon_token = _Token(self.i_line, None, ":", after=prev) + self.tokens.append(colon_token) + prev = for_token + + self._write_tokens() + + +@_register +class _StoreName(_BaseHandler): + """ + Implements name = TOS. namei is the index of name in the attribute co_names of the code object. + The compiler tries to use STORE_FAST or STORE_GLOBAL if possible. + """ + + opname = "STORE_NAME" + + def _handle(self): + v = self.stack.pop() + + if isinstance(v, _ForIter): + v.store_in_name(self) + else: + if not isinstance(v, _MakeFunction) or v.is_lambda: + line = self.i_line + for t in v.tokens: + line = min(line, t.i_line) + + t_name = _Token(line, self.instruction) + t_equal = _Token(line, None, "=", after=t_name) + + self.tokens.append(t_name) + self.tokens.append(t_equal) + + for t in v.tokens: + t.mark_after(t_equal) + self.tokens.extend(v.tokens) + + self._write_tokens() + + +@_register +class _ReturnValue(_BaseHandler): + """ + Returns with TOS to the caller of the function. + """ + + opname = "RETURN_VALUE" + + def _handle(self): + v = self.stack.pop() + return_token = _Token(self.i_line, None, "return ", end_of_line=True) + self.tokens.append(return_token) + for token in v.tokens: + token.mark_after(return_token) + self.tokens.extend(v.tokens) + + self._write_tokens() + + +@_register +class _CallFunction(_BaseHandler): + """ + + CALL_FUNCTION(argc) + + Calls a callable object with positional arguments. argc indicates the number of positional + arguments. The top of the stack contains positional arguments, with the right-most argument + on top. Below the arguments is a callable object to call. CALL_FUNCTION pops all arguments + and the callable object off the stack, calls the callable object with those arguments, and + pushes the return value returned by the callable object. + + Changed in version 3.6: This opcode is used only for calls with positional arguments. + + """ + + opname = "CALL_FUNCTION" + + def _handle(self): + args = [] + for _i in range(self.instruction.argval + 1): + arg = self.stack.pop() + args.append(arg) + it = reversed(args) + name = next(it) + max_line = name.i_line + for t in name.tokens: + self.tokens.append(t) + + tok_open_parens = _Token(name.i_line, None, "(", after=name) + self.tokens.append(tok_open_parens) + + prev = tok_open_parens + for i, arg in enumerate(it): + for t in arg.tokens: + t.mark_after(name) + t.mark_after(prev) + max_line = max(max_line, t.i_line) + self.tokens.append(t) + prev = arg + + if i > 0: + comma_token = _Token(prev.i_line, None, ",", after=prev) + self.tokens.append(comma_token) + prev = comma_token + + tok_close_parens = _Token(max_line, None, ")", after=prev) + self.tokens.append(tok_close_parens) + + self._write_tokens() + + self.stack.push(self) + + +@_register +class _MakeFunctionPy3(_BaseHandler): + """ + Pushes a new function object on the stack. From bottom to top, the consumed stack must consist + of values if the argument carries a specified flag value + + 0x01 a tuple of default values for positional-only and positional-or-keyword parameters in positional order + + 0x02 a dictionary of keyword-only parameters' default values + + 0x04 an annotation dictionary + + 0x08 a tuple containing cells for free variables, making a closure + + the code associated with the function (at TOS1) + + the qualified name of the function (at TOS) + """ + + opname = "MAKE_FUNCTION" + is_lambda = False + + def _handle(self): + stack = self.stack + self.qualified_name = stack.pop() + self.code = stack.pop() + + default_node = None + if self.instruction.argval & 0x01: + default_node = stack.pop() + + is_lambda = self.is_lambda = "" in [x.tok for x in self.qualified_name.tokens] + + if not is_lambda: + def_token = _Token(self.i_line, None, "def ") + self.tokens.append(def_token) + + for token in self.qualified_name.tokens: + self.tokens.append(token) + if not is_lambda: + token.mark_after(def_token) + prev = token + + open_parens_token = _Token(self.i_line, None, "(", after=prev) + self.tokens.append(open_parens_token) + prev = open_parens_token + + code = self.code.instruction.argval + + if default_node: + defaults = ([_SENTINEL] * (len(code.co_varnames) - len(default_node.instruction.argval))) + list( + default_node.instruction.argval + ) + else: + defaults = [_SENTINEL] * len(code.co_varnames) + + for i, arg in enumerate(code.co_varnames): + if i > 0: + comma_token = _Token(prev.i_line, None, ", ", after=prev) + self.tokens.append(comma_token) + prev = comma_token + + arg_token = _Token(self.i_line, None, arg, after=prev) + self.tokens.append(arg_token) + + default = defaults[i] + if default is not _SENTINEL: + eq_token = _Token(default_node.i_line, None, "=", after=prev) + self.tokens.append(eq_token) + prev = eq_token + + default_token = _Token(default_node.i_line, None, str(default), after=prev) + self.tokens.append(default_token) + prev = default_token + + tok_close_parens = _Token(prev.i_line, None, "):", after=prev) + self.tokens.append(tok_close_parens) + + self._write_tokens() + + stack.push(self) + self.writer.indent(prev.i_line + 1) + self.writer.dedent(max(self.disassembler.merge_code(code))) + + +_MakeFunction = _MakeFunctionPy3 + + +def _print_after_info(line_contents, stream=None): + if stream is None: + stream = sys.stdout + for token in line_contents: + after_tokens = token.get_after_tokens() + if after_tokens: + s = "%s after: %s\n" % (repr(token.tok), ('"' + '", "'.join(t.tok for t in token.get_after_tokens()) + '"')) + stream.write(s) + else: + stream.write("%s (NO REQUISITES)" % repr(token.tok)) + + +def _compose_line_contents(line_contents, previous_line_tokens): + lst = [] + handled = set() + + add_to_end_of_line = [] + delete_indexes = [] + for i, token in enumerate(line_contents): + if token.end_of_line: + add_to_end_of_line.append(token) + delete_indexes.append(i) + for i in reversed(delete_indexes): + del line_contents[i] + del delete_indexes + + while line_contents: + added = False + delete_indexes = [] + + for i, token in enumerate(line_contents): + after_tokens = token.get_after_tokens() + for after in after_tokens: + if after not in handled and after not in previous_line_tokens: + break + else: + added = True + previous_line_tokens.add(token) + handled.add(token) + lst.append(token.tok) + delete_indexes.append(i) + + for i in reversed(delete_indexes): + del line_contents[i] + + if not added: + if add_to_end_of_line: + line_contents.extend(add_to_end_of_line) + del add_to_end_of_line[:] + continue + + # Something is off, let's just add as is. + for token in line_contents: + if token not in handled: + lst.append(token.tok) + + stream = StringIO() + _print_after_info(line_contents, stream) + pydev_log.critical("Error. After markers are not correct:\n%s", stream.getvalue()) + break + return "".join(lst) + + +class _PyCodeToSource(object): + def __init__(self, co, memo=None): + if memo is None: + memo = {} + self.memo = memo + self.co = co + self.instructions = list(iter_instructions(co)) + self.stack = _Stack() + self.writer = _Writer() + + def _process_next(self, i_line): + instruction = self.instructions.pop(0) + handler_class = _op_name_to_handler.get(instruction.opname) + if handler_class is not None: + s = handler_class(i_line, instruction, self.stack, self.writer, self) + if DEBUG: + print(s) + + else: + if DEBUG: + print("UNHANDLED", instruction) + + def build_line_to_contents(self): + co = self.co + + op_offset_to_line = dict(dis.findlinestarts(co)) + curr_line_index = 0 + + instructions = self.instructions + while instructions: + instruction = instructions[0] + new_line_index = op_offset_to_line.get(instruction.offset) + if new_line_index is not None: + curr_line_index = new_line_index + + self._process_next(curr_line_index) + return self.writer.line_to_contents + + def merge_code(self, code): + if DEBUG: + print("merge code ----") + # for d in dir(code): + # if not d.startswith('_'): + # print(d, getattr(code, d)) + line_to_contents = _PyCodeToSource(code, self.memo).build_line_to_contents() + lines = [] + for line, contents in sorted(line_to_contents.items()): + lines.append(line) + self.writer.get_line(line).extend(contents) + if DEBUG: + print("end merge code ----") + return lines + + def disassemble(self): + show_lines = False + line_to_contents = self.build_line_to_contents() + stream = StringIO() + last_line = 0 + indent = "" + previous_line_tokens = set() + for i_line, contents in sorted(line_to_contents.items()): + while last_line < i_line - 1: + if show_lines: + stream.write("%s.\n" % (last_line + 1,)) + else: + stream.write("\n") + last_line += 1 + + line_contents = [] + dedents_found = 0 + for part in contents: + if part is INDENT_MARKER: + if DEBUG: + print("found indent", i_line) + indent += " " + continue + if part is DEDENT_MARKER: + if DEBUG: + print("found dedent", i_line) + dedents_found += 1 + continue + line_contents.append(part) + + s = indent + _compose_line_contents(line_contents, previous_line_tokens) + if show_lines: + stream.write("%s. %s\n" % (i_line, s)) + else: + stream.write("%s\n" % s) + + if dedents_found: + indent = indent[: -(4 * dedents_found)] + last_line = i_line + + return stream.getvalue() + + +def code_obj_to_source(co): + """ + Converts a code object to source code to provide a suitable representation for the compiler when + the actual source code is not found. + + This is a work in progress / proof of concept / not ready to be used. + """ + ret = _PyCodeToSource(co).disassemble() + if DEBUG: + print(ret) + return ret diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py new file mode 100644 index 0000000..f6ed19c --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py @@ -0,0 +1,873 @@ +import dis +import inspect +import sys +from collections import namedtuple + +from _pydev_bundle import pydev_log +from opcode import EXTENDED_ARG, HAVE_ARGUMENT, cmp_op, hascompare, hasconst, hasfree, hasjrel, haslocal, hasname, opname + +from io import StringIO + + +class TryExceptInfo(object): + def __init__(self, try_line, ignore=False): + """ + :param try_line: + :param ignore: + Usually we should ignore any block that's not a try..except + (this can happen for finally blocks, with statements, etc, for + which we create temporary entries). + """ + self.try_line = try_line + self.ignore = ignore + self.except_line = -1 + self.except_end_line = -1 + self.raise_lines_in_except = [] + + # Note: these may not be available if generated from source instead of bytecode. + self.except_bytecode_offset = -1 + self.except_end_bytecode_offset = -1 + + def is_line_in_try_block(self, line): + return self.try_line <= line < self.except_line + + def is_line_in_except_block(self, line): + return self.except_line <= line <= self.except_end_line + + def __str__(self): + lst = [ + "{try:", + str(self.try_line), + " except ", + str(self.except_line), + " end block ", + str(self.except_end_line), + ] + if self.raise_lines_in_except: + lst.append(" raises: %s" % (", ".join(str(x) for x in self.raise_lines_in_except),)) + + lst.append("}") + return "".join(lst) + + __repr__ = __str__ + + +class ReturnInfo(object): + def __init__(self, return_line): + self.return_line = return_line + + def __str__(self): + return "{return: %s}" % (self.return_line,) + + __repr__ = __str__ + + +def _get_line(op_offset_to_line, op_offset, firstlineno, search=False): + op_offset_original = op_offset + while op_offset >= 0: + ret = op_offset_to_line.get(op_offset) + if ret is not None: + return ret - firstlineno + if not search: + return ret + else: + op_offset -= 1 + raise AssertionError("Unable to find line for offset: %s.Info: %s" % (op_offset_original, op_offset_to_line)) + + +def debug(s): + pass + + +_Instruction = namedtuple("_Instruction", "opname, opcode, starts_line, argval, is_jump_target, offset, argrepr") + + +def iter_instructions(co): + iter_in = dis.Bytecode(co) + iter_in = list(iter_in) + + bytecode_to_instruction = {} + for instruction in iter_in: + bytecode_to_instruction[instruction.offset] = instruction + + if iter_in: + for instruction in iter_in: + yield instruction + + +def collect_return_info(co, use_func_first_line=False): + if not hasattr(co, "co_lines") and not hasattr(co, "co_lnotab"): + return [] + + if use_func_first_line: + firstlineno = co.co_firstlineno + else: + firstlineno = 0 + + lst = [] + op_offset_to_line = dict(dis.findlinestarts(co)) + for instruction in iter_instructions(co): + curr_op_name = instruction.opname + if curr_op_name in ("RETURN_VALUE", "RETURN_CONST"): + lst.append(ReturnInfo(_get_line(op_offset_to_line, instruction.offset, firstlineno, search=True))) + + return lst + + +if sys.version_info[:2] <= (3, 9): + + class _TargetInfo(object): + def __init__(self, except_end_instruction, jump_if_not_exc_instruction=None): + self.except_end_instruction = except_end_instruction + self.jump_if_not_exc_instruction = jump_if_not_exc_instruction + + def __str__(self): + msg = ["_TargetInfo("] + msg.append(self.except_end_instruction.opname) + if self.jump_if_not_exc_instruction: + msg.append(" - ") + msg.append(self.jump_if_not_exc_instruction.opname) + msg.append("(") + msg.append(str(self.jump_if_not_exc_instruction.argval)) + msg.append(")") + msg.append(")") + return "".join(msg) + + def _get_except_target_info(instructions, exception_end_instruction_index, offset_to_instruction_idx): + next_3 = [ + j_instruction.opname for j_instruction in instructions[exception_end_instruction_index : exception_end_instruction_index + 3] + ] + # print('next_3:', [(j_instruction.opname, j_instruction.argval) for j_instruction in instructions[exception_end_instruction_index:exception_end_instruction_index + 3]]) + if next_3 == ["POP_TOP", "POP_TOP", "POP_TOP"]: # try..except without checking exception. + try: + jump_instruction = instructions[exception_end_instruction_index - 1] + if jump_instruction.opname not in ("JUMP_FORWARD", "JUMP_ABSOLUTE"): + return None + except IndexError: + pass + + if jump_instruction.opname == "JUMP_ABSOLUTE": + # On latest versions of Python 3 the interpreter has a go-backwards step, + # used to show the initial line of a for/while, etc (which is this + # JUMP_ABSOLUTE)... we're not really interested in it, but rather on where + # it points to. + except_end_instruction = instructions[offset_to_instruction_idx[jump_instruction.argval]] + idx = offset_to_instruction_idx[except_end_instruction.argval] + # Search for the POP_EXCEPT which should be at the end of the block. + for pop_except_instruction in reversed(instructions[:idx]): + if pop_except_instruction.opname == "POP_EXCEPT": + except_end_instruction = pop_except_instruction + return _TargetInfo(except_end_instruction) + else: + return None # i.e.: Continue outer loop + + else: + # JUMP_FORWARD + i = offset_to_instruction_idx[jump_instruction.argval] + try: + # i.e.: the jump is to the instruction after the block finishes (so, we need to + # get the previous instruction as that should be the place where the exception + # block finishes). + except_end_instruction = instructions[i - 1] + except: + pydev_log.critical("Error when computing try..except block end.") + return None + return _TargetInfo(except_end_instruction) + + elif next_3 and next_3[0] == "DUP_TOP": # try..except AssertionError. + iter_in = instructions[exception_end_instruction_index + 1 :] + for j, jump_if_not_exc_instruction in enumerate(iter_in): + if jump_if_not_exc_instruction.opname == "JUMP_IF_NOT_EXC_MATCH": + # Python 3.9 + except_end_instruction = instructions[offset_to_instruction_idx[jump_if_not_exc_instruction.argval]] + return _TargetInfo(except_end_instruction, jump_if_not_exc_instruction) + + elif jump_if_not_exc_instruction.opname == "COMPARE_OP" and jump_if_not_exc_instruction.argval == "exception match": + # Python 3.8 and before + try: + next_instruction = iter_in[j + 1] + except: + continue + if next_instruction.opname == "POP_JUMP_IF_FALSE": + except_end_instruction = instructions[offset_to_instruction_idx[next_instruction.argval]] + return _TargetInfo(except_end_instruction, next_instruction) + else: + return None # i.e.: Continue outer loop + + else: + # i.e.: we're not interested in try..finally statements, only try..except. + return None + + def collect_try_except_info(co, use_func_first_line=False): + # We no longer have 'END_FINALLY', so, we need to do things differently in Python 3.9 + if not hasattr(co, "co_lines") and not hasattr(co, "co_lnotab"): + return [] + + if use_func_first_line: + firstlineno = co.co_firstlineno + else: + firstlineno = 0 + + try_except_info_lst = [] + + op_offset_to_line = dict(entry for entry in dis.findlinestarts(co) if entry[1] is not None) + + offset_to_instruction_idx = {} + + instructions = list(iter_instructions(co)) + + for i, instruction in enumerate(instructions): + offset_to_instruction_idx[instruction.offset] = i + + for i, instruction in enumerate(instructions): + curr_op_name = instruction.opname + if curr_op_name in ("SETUP_FINALLY", "SETUP_EXCEPT"): # SETUP_EXCEPT before Python 3.8, SETUP_FINALLY Python 3.8 onwards. + exception_end_instruction_index = offset_to_instruction_idx[instruction.argval] + + jump_instruction = instructions[exception_end_instruction_index - 1] + if jump_instruction.opname not in ("JUMP_FORWARD", "JUMP_ABSOLUTE"): + continue + + except_end_instruction = None + indexes_checked = set() + indexes_checked.add(exception_end_instruction_index) + target_info = _get_except_target_info(instructions, exception_end_instruction_index, offset_to_instruction_idx) + while target_info is not None: + # Handle a try..except..except..except. + jump_instruction = target_info.jump_if_not_exc_instruction + except_end_instruction = target_info.except_end_instruction + + if jump_instruction is not None: + check_index = offset_to_instruction_idx[jump_instruction.argval] + if check_index in indexes_checked: + break + indexes_checked.add(check_index) + target_info = _get_except_target_info(instructions, check_index, offset_to_instruction_idx) + else: + break + + if except_end_instruction is not None: + try_except_info = TryExceptInfo( + _get_line(op_offset_to_line, instruction.offset, firstlineno, search=True), ignore=False + ) + try_except_info.except_bytecode_offset = instruction.argval + try_except_info.except_line = _get_line( + op_offset_to_line, try_except_info.except_bytecode_offset, firstlineno, search=True + ) + + try_except_info.except_end_bytecode_offset = except_end_instruction.offset + try_except_info.except_end_line = _get_line(op_offset_to_line, except_end_instruction.offset, firstlineno, search=True) + try_except_info_lst.append(try_except_info) + + for raise_instruction in instructions[i : offset_to_instruction_idx[try_except_info.except_end_bytecode_offset]]: + if raise_instruction.opname == "RAISE_VARARGS": + if raise_instruction.argval == 0: + try_except_info.raise_lines_in_except.append( + _get_line(op_offset_to_line, raise_instruction.offset, firstlineno, search=True) + ) + + return try_except_info_lst + +elif sys.version_info[:2] == (3, 10): + + class _TargetInfo(object): + def __init__(self, except_end_instruction, jump_if_not_exc_instruction=None): + self.except_end_instruction = except_end_instruction + self.jump_if_not_exc_instruction = jump_if_not_exc_instruction + + def __str__(self): + msg = ["_TargetInfo("] + msg.append(self.except_end_instruction.opname) + if self.jump_if_not_exc_instruction: + msg.append(" - ") + msg.append(self.jump_if_not_exc_instruction.opname) + msg.append("(") + msg.append(str(self.jump_if_not_exc_instruction.argval)) + msg.append(")") + msg.append(")") + return "".join(msg) + + def _get_except_target_info(instructions, exception_end_instruction_index, offset_to_instruction_idx): + next_3 = [ + j_instruction.opname for j_instruction in instructions[exception_end_instruction_index : exception_end_instruction_index + 3] + ] + # print('next_3:', [(j_instruction.opname, j_instruction.argval) for j_instruction in instructions[exception_end_instruction_index:exception_end_instruction_index + 3]]) + if next_3 == ["POP_TOP", "POP_TOP", "POP_TOP"]: # try..except without checking exception. + # Previously there was a jump which was able to point where the exception would end. This + # is no longer true, now a bare except doesn't really have any indication in the bytecode + # where the end would be expected if the exception wasn't raised, so, we just blindly + # search for a POP_EXCEPT from the current position. + for pop_except_instruction in instructions[exception_end_instruction_index + 3 :]: + if pop_except_instruction.opname == "POP_EXCEPT": + except_end_instruction = pop_except_instruction + return _TargetInfo(except_end_instruction) + + elif next_3 and next_3[0] == "DUP_TOP": # try..except AssertionError. + iter_in = instructions[exception_end_instruction_index + 1 :] + for jump_if_not_exc_instruction in iter_in: + if jump_if_not_exc_instruction.opname == "JUMP_IF_NOT_EXC_MATCH": + # Python 3.9 + except_end_instruction = instructions[offset_to_instruction_idx[jump_if_not_exc_instruction.argval]] + return _TargetInfo(except_end_instruction, jump_if_not_exc_instruction) + else: + return None # i.e.: Continue outer loop + + else: + # i.e.: we're not interested in try..finally statements, only try..except. + return None + + def collect_try_except_info(co, use_func_first_line=False): + # We no longer have 'END_FINALLY', so, we need to do things differently in Python 3.9 + if not hasattr(co, "co_lines") and not hasattr(co, "co_lnotab"): + return [] + + if use_func_first_line: + firstlineno = co.co_firstlineno + else: + firstlineno = 0 + + try_except_info_lst = [] + + op_offset_to_line = dict(entry for entry in dis.findlinestarts(co) if entry[1] is not None) + + offset_to_instruction_idx = {} + + instructions = list(iter_instructions(co)) + + for i, instruction in enumerate(instructions): + offset_to_instruction_idx[instruction.offset] = i + + for i, instruction in enumerate(instructions): + curr_op_name = instruction.opname + if curr_op_name == "SETUP_FINALLY": + exception_end_instruction_index = offset_to_instruction_idx[instruction.argval] + + jump_instruction = instructions[exception_end_instruction_index] + if jump_instruction.opname != "DUP_TOP": + continue + + except_end_instruction = None + indexes_checked = set() + indexes_checked.add(exception_end_instruction_index) + target_info = _get_except_target_info(instructions, exception_end_instruction_index, offset_to_instruction_idx) + while target_info is not None: + # Handle a try..except..except..except. + jump_instruction = target_info.jump_if_not_exc_instruction + except_end_instruction = target_info.except_end_instruction + + if jump_instruction is not None: + check_index = offset_to_instruction_idx[jump_instruction.argval] + if check_index in indexes_checked: + break + indexes_checked.add(check_index) + target_info = _get_except_target_info(instructions, check_index, offset_to_instruction_idx) + else: + break + + if except_end_instruction is not None: + try_except_info = TryExceptInfo( + _get_line(op_offset_to_line, instruction.offset, firstlineno, search=True), ignore=False + ) + try_except_info.except_bytecode_offset = instruction.argval + try_except_info.except_line = _get_line( + op_offset_to_line, try_except_info.except_bytecode_offset, firstlineno, search=True + ) + + try_except_info.except_end_bytecode_offset = except_end_instruction.offset + + # On Python 3.10 the final line of the except end isn't really correct, rather, + # it's engineered to be the same line of the except and not the end line of the + # block, so, the approach taken is to search for the biggest line between the + # except and the end instruction + except_end_line = -1 + start_i = offset_to_instruction_idx[try_except_info.except_bytecode_offset] + end_i = offset_to_instruction_idx[except_end_instruction.offset] + for instruction in instructions[start_i : end_i + 1]: + found_at_line = op_offset_to_line.get(instruction.offset) + if found_at_line is not None and found_at_line > except_end_line: + except_end_line = found_at_line + try_except_info.except_end_line = except_end_line - firstlineno + + try_except_info_lst.append(try_except_info) + + for raise_instruction in instructions[i : offset_to_instruction_idx[try_except_info.except_end_bytecode_offset]]: + if raise_instruction.opname == "RAISE_VARARGS": + if raise_instruction.argval == 0: + try_except_info.raise_lines_in_except.append( + _get_line(op_offset_to_line, raise_instruction.offset, firstlineno, search=True) + ) + + return try_except_info_lst + +elif sys.version_info[:2] >= (3, 11): + + def collect_try_except_info(co, use_func_first_line=False): + """ + Note: if the filename is available and we can get the source, + `collect_try_except_info_from_source` is preferred (this is kept as + a fallback for cases where sources aren't available). + """ + return [] + + +import ast as ast_module + + +class _Visitor(ast_module.NodeVisitor): + def __init__(self): + self.try_except_infos = [] + self._stack = [] + self._in_except_stack = [] + self.max_line = -1 + + def generic_visit(self, node): + if hasattr(node, "lineno"): + if node.lineno > self.max_line: + self.max_line = node.lineno + return ast_module.NodeVisitor.generic_visit(self, node) + + def visit_Try(self, node): + info = TryExceptInfo(node.lineno, ignore=True) + self._stack.append(info) + self.generic_visit(node) + assert info is self._stack.pop() + if not info.ignore: + self.try_except_infos.insert(0, info) + + if sys.version_info[0] < 3: + visit_TryExcept = visit_Try + + def visit_ExceptHandler(self, node): + info = self._stack[-1] + info.ignore = False + if info.except_line == -1: + info.except_line = node.lineno + self._in_except_stack.append(info) + self.generic_visit(node) + if hasattr(node, "end_lineno"): + info.except_end_line = node.end_lineno + else: + info.except_end_line = self.max_line + self._in_except_stack.pop() + + if sys.version_info[0] >= 3: + + def visit_Raise(self, node): + for info in self._in_except_stack: + if node.exc is None: + info.raise_lines_in_except.append(node.lineno) + self.generic_visit(node) + + else: + + def visit_Raise(self, node): + for info in self._in_except_stack: + if node.type is None and node.tback is None: + info.raise_lines_in_except.append(node.lineno) + self.generic_visit(node) + + +def collect_try_except_info_from_source(filename): + with open(filename, "rb") as stream: + contents = stream.read() + return collect_try_except_info_from_contents(contents, filename) + + +def collect_try_except_info_from_contents(contents, filename=""): + ast = ast_module.parse(contents, filename) + visitor = _Visitor() + visitor.visit(ast) + return visitor.try_except_infos + + +RESTART_FROM_LOOKAHEAD = object() +SEPARATOR = object() + + +class _MsgPart(object): + def __init__(self, line, tok): + assert line >= 0 + self.line = line + self.tok = tok + + def __str__(self) -> str: + return "_MsgPart(line: %s tok: %s)" % (self.line, self.tok) + + __repr__ = __str__ + + @classmethod + def add_to_line_to_contents(cls, obj, line_to_contents, line=None): + if isinstance(obj, (list, tuple)): + for o in obj: + cls.add_to_line_to_contents(o, line_to_contents, line=line) + return + + if isinstance(obj, str): + assert line is not None + line = int(line) + lst = line_to_contents.setdefault(line, []) + lst.append(obj) + return + + if isinstance(obj, _MsgPart): + if isinstance(obj.tok, (list, tuple)): + cls.add_to_line_to_contents(obj.tok, line_to_contents, line=obj.line) + return + + if isinstance(obj.tok, str): + lst = line_to_contents.setdefault(obj.line, []) + lst.append(obj.tok) + return + + raise AssertionError("Unhandled: %" % (obj,)) + + +class _Disassembler(object): + def __init__(self, co, firstlineno, level=0): + self.co = co + self.firstlineno = firstlineno + self.level = level + self.instructions = list(iter_instructions(co)) + op_offset_to_line = self.op_offset_to_line = dict(entry for entry in dis.findlinestarts(co) if entry[1] is not None) + + # Update offsets so that all offsets have the line index (and update it based on + # the passed firstlineno). + line_index = co.co_firstlineno - firstlineno + for instruction in self.instructions: + new_line_index = op_offset_to_line.get(instruction.offset) + if new_line_index is not None: + line_index = new_line_index - firstlineno + op_offset_to_line[instruction.offset] = line_index + else: + op_offset_to_line[instruction.offset] = line_index + + BIG_LINE_INT = 9999999 + SMALL_LINE_INT = -1 + + def min_line(self, *args): + m = self.BIG_LINE_INT + for arg in args: + if isinstance(arg, (list, tuple)): + m = min(m, self.min_line(*arg)) + + elif isinstance(arg, _MsgPart): + m = min(m, arg.line) + + elif hasattr(arg, "offset"): + m = min(m, self.op_offset_to_line[arg.offset]) + return m + + def max_line(self, *args): + m = self.SMALL_LINE_INT + for arg in args: + if isinstance(arg, (list, tuple)): + m = max(m, self.max_line(*arg)) + + elif isinstance(arg, _MsgPart): + m = max(m, arg.line) + + elif hasattr(arg, "offset"): + m = max(m, self.op_offset_to_line[arg.offset]) + return m + + def _lookahead(self): + """ + This handles and converts some common constructs from bytecode to actual source code. + + It may change the list of instructions. + """ + msg = self._create_msg_part + found = [] + fullrepr = None + + # Collect all the load instructions + for next_instruction in self.instructions: + if next_instruction.opname in ("LOAD_GLOBAL", "LOAD_FAST", "LOAD_CONST", "LOAD_NAME"): + found.append(next_instruction) + else: + break + + if not found: + return None + + if next_instruction.opname == "LOAD_ATTR": + prev_instruction = found[-1] + # Remove the current LOAD_ATTR + assert self.instructions.pop(len(found)) is next_instruction + + # Add the LOAD_ATTR to the previous LOAD + self.instructions[len(found) - 1] = _Instruction( + prev_instruction.opname, + prev_instruction.opcode, + prev_instruction.starts_line, + prev_instruction.argval, + False, # prev_instruction.is_jump_target, + prev_instruction.offset, + (msg(prev_instruction), msg(prev_instruction, "."), msg(next_instruction)), + ) + return RESTART_FROM_LOOKAHEAD + + if next_instruction.opname in ("CALL_FUNCTION", "PRECALL", "CALL"): + if len(found) == next_instruction.argval + 1: + force_restart = False + delta = 0 + else: + force_restart = True + if len(found) > next_instruction.argval + 1: + delta = len(found) - (next_instruction.argval + 1) + else: + return None # This is odd + + del_upto = delta + next_instruction.argval + 2 # +2 = NAME / CALL_FUNCTION + if next_instruction.opname == "PRECALL": + del_upto += 1 # Also remove the CALL right after the PRECALL. + del self.instructions[delta:del_upto] + + found = iter(found[delta:]) + call_func = next(found) + args = list(found) + fullrepr = [ + msg(call_func), + msg(call_func, "("), + ] + prev = call_func + for i, arg in enumerate(args): + if i > 0: + fullrepr.append(msg(prev, ", ")) + prev = arg + fullrepr.append(msg(arg)) + + fullrepr.append(msg(prev, ")")) + + if force_restart: + self.instructions.insert( + delta, + _Instruction( + call_func.opname, + call_func.opcode, + call_func.starts_line, + call_func.argval, + False, # call_func.is_jump_target, + call_func.offset, + tuple(fullrepr), + ), + ) + return RESTART_FROM_LOOKAHEAD + + elif next_instruction.opname == "BUILD_TUPLE": + if len(found) == next_instruction.argval: + force_restart = False + delta = 0 + else: + force_restart = True + if len(found) > next_instruction.argval: + delta = len(found) - (next_instruction.argval) + else: + return None # This is odd + + del self.instructions[delta : delta + next_instruction.argval + 1] # +1 = BUILD_TUPLE + + found = iter(found[delta:]) + + args = [instruction for instruction in found] + if args: + first_instruction = args[0] + else: + first_instruction = next_instruction + prev = first_instruction + + fullrepr = [] + fullrepr.append(msg(prev, "(")) + for i, arg in enumerate(args): + if i > 0: + fullrepr.append(msg(prev, ", ")) + prev = arg + fullrepr.append(msg(arg)) + + fullrepr.append(msg(prev, ")")) + + if force_restart: + self.instructions.insert( + delta, + _Instruction( + first_instruction.opname, + first_instruction.opcode, + first_instruction.starts_line, + first_instruction.argval, + False, # first_instruction.is_jump_target, + first_instruction.offset, + tuple(fullrepr), + ), + ) + return RESTART_FROM_LOOKAHEAD + + if fullrepr is not None and self.instructions: + if self.instructions[0].opname == "POP_TOP": + self.instructions.pop(0) + + if self.instructions[0].opname in ("STORE_FAST", "STORE_NAME"): + next_instruction = self.instructions.pop(0) + return msg(next_instruction), msg(next_instruction, " = "), fullrepr + + if self.instructions[0].opname == "RETURN_VALUE": + next_instruction = self.instructions.pop(0) + return msg(next_instruction, "return ", line=self.min_line(next_instruction, fullrepr)), fullrepr + + return fullrepr + + def _decorate_jump_target(self, instruction, instruction_repr): + if instruction.is_jump_target: + return ("|", str(instruction.offset), "|", instruction_repr) + + return instruction_repr + + def _create_msg_part(self, instruction, tok=None, line=None): + dec = self._decorate_jump_target + if line is None or line in (self.BIG_LINE_INT, self.SMALL_LINE_INT): + line = self.op_offset_to_line[instruction.offset] + + argrepr = instruction.argrepr + if isinstance(argrepr, str) and argrepr.startswith("NULL + "): + argrepr = argrepr[7:] + if isinstance(argrepr, str) and argrepr.endswith("+ NULL"): + argrepr = argrepr[:-7] + return _MsgPart(line, tok if tok is not None else dec(instruction, argrepr)) + + def _next_instruction_to_str(self, line_to_contents): + # indent = '' + # if self.level > 0: + # indent += ' ' * self.level + # print(indent, 'handle', self.instructions[0]) + + if self.instructions: + ret = self._lookahead() + if ret: + return ret + + msg = self._create_msg_part + + instruction = self.instructions.pop(0) + + if instruction.opname in ("RESUME", "NULL"): + return None + + if instruction.opname == "RETURN_CONST": + return (msg(instruction, "return ", line=self.min_line(instruction)), msg(instruction)) + + if instruction.opname in ("LOAD_GLOBAL", "LOAD_FAST", "LOAD_CONST", "LOAD_NAME"): + next_instruction = self.instructions[0] + if next_instruction.opname in ("STORE_FAST", "STORE_NAME"): + self.instructions.pop(0) + return (msg(next_instruction), msg(next_instruction, " = "), msg(instruction)) + + if next_instruction.opname == "RETURN_VALUE": + self.instructions.pop(0) + return (msg(instruction, "return ", line=self.min_line(instruction)), msg(instruction)) + + if next_instruction.opname == "RAISE_VARARGS" and next_instruction.argval == 1: + self.instructions.pop(0) + return (msg(instruction, "raise ", line=self.min_line(instruction)), msg(instruction)) + + if instruction.opname == "LOAD_CONST": + if inspect.iscode(instruction.argval): + code_line_to_contents = _Disassembler(instruction.argval, self.firstlineno, self.level + 1).build_line_to_contents() + + for contents in code_line_to_contents.values(): + contents.insert(0, " ") + for line, contents in code_line_to_contents.items(): + line_to_contents.setdefault(line, []).extend(contents) + return msg(instruction, "LOAD_CONST(code)") + + if instruction.opname == "RAISE_VARARGS": + if instruction.argval == 0: + return msg(instruction, "raise") + + if instruction.opname == "SETUP_FINALLY": + return msg(instruction, ("try(", instruction.argrepr, "):")) + + if instruction.argrepr: + return msg(instruction, (instruction.opname, "(", instruction.argrepr, ")")) + + if instruction.argval: + return msg( + instruction, + "%s{%s}" + % ( + instruction.opname, + instruction.argval, + ), + ) + + return msg(instruction, instruction.opname) + + def build_line_to_contents(self): + # print('----') + # for instruction in self.instructions: + # print(instruction) + # print('----\n\n') + + line_to_contents = {} + + instructions = self.instructions + while instructions: + s = self._next_instruction_to_str(line_to_contents) + if s is RESTART_FROM_LOOKAHEAD: + continue + if s is None: + continue + + _MsgPart.add_to_line_to_contents(s, line_to_contents) + m = self.max_line(s) + if m != self.SMALL_LINE_INT: + line_to_contents.setdefault(m, []).append(SEPARATOR) + return line_to_contents + + def disassemble(self): + line_to_contents = self.build_line_to_contents() + stream = StringIO() + last_line = 0 + show_lines = False + for line, contents in sorted(line_to_contents.items()): + while last_line < line - 1: + if show_lines: + stream.write("%s.\n" % (last_line + 1,)) + else: + stream.write("\n") + last_line += 1 + + if show_lines: + stream.write("%s. " % (line,)) + + for i, content in enumerate(contents): + if content == SEPARATOR: + if i != len(contents) - 1: + stream.write(", ") + else: + stream.write(content) + + stream.write("\n") + + last_line = line + + return stream.getvalue() + + +def code_to_bytecode_representation(co, use_func_first_line=False): + """ + A simple disassemble of bytecode. + + It does not attempt to provide the full Python source code, rather, it provides a low-level + representation of the bytecode, respecting the lines (so, its target is making the bytecode + easier to grasp and not providing the original source code). + + Note that it does show jump locations/targets and converts some common bytecode constructs to + Python code to make it a bit easier to understand. + """ + # Reference for bytecodes: + # https://docs.python.org/3/library/dis.html + if use_func_first_line: + firstlineno = co.co_firstlineno + else: + firstlineno = 0 + + return _Disassembler(co, firstlineno).disassemble() diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py new file mode 100644 index 0000000..b70d7dc --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py @@ -0,0 +1,1920 @@ +""" pydevd - a debugging daemon +This is the daemon you launch for python remote debugging. + +Protocol: +each command has a format: + id\tsequence-num\ttext + id: protocol command number + sequence-num: each request has a sequence number. Sequence numbers + originating at the debugger are odd, sequence numbers originating + at the daemon are even. Every response uses the same sequence number + as the request. + payload: it is protocol dependent. When response is a complex structure, it + is returned as XML. Each attribute value is urlencoded, and then the whole + payload is urlencoded again to prevent stray characters corrupting protocol/xml encodings + + Commands: + + NUMBER NAME FROM* ARGUMENTS RESPONSE NOTE +100 series: program execution + 101 RUN JAVA - - + 102 LIST_THREADS JAVA RETURN with XML listing of all threads + 103 THREAD_CREATE PYDB - XML with thread information + 104 THREAD_KILL JAVA id (or * to exit) kills the thread + PYDB id nofies JAVA that thread was killed + 105 THREAD_SUSPEND JAVA XML of the stack, suspends the thread + reason for suspension + PYDB id notifies JAVA that thread was suspended + + 106 CMD_THREAD_RUN JAVA id resume the thread + PYDB id \t reason notifies JAVA that thread was resumed + + 107 STEP_INTO JAVA thread_id + 108 STEP_OVER JAVA thread_id + 109 STEP_RETURN JAVA thread_id + + 110 GET_VARIABLE JAVA thread_id \t frame_id \t GET_VARIABLE with XML of var content + FRAME|GLOBAL \t attributes* + + 111 SET_BREAK JAVA file/line of the breakpoint + 112 REMOVE_BREAK JAVA file/line of the return + 113 CMD_EVALUATE_EXPRESSION JAVA expression result of evaluating the expression + 114 CMD_GET_FRAME JAVA request for frame contents + 115 CMD_EXEC_EXPRESSION JAVA + 116 CMD_WRITE_TO_CONSOLE PYDB + 117 CMD_CHANGE_VARIABLE + 118 CMD_RUN_TO_LINE + 119 CMD_RELOAD_CODE + 120 CMD_GET_COMPLETIONS JAVA + + 200 CMD_REDIRECT_OUTPUT JAVA streams to redirect as string - + 'STDOUT' (redirect only STDOUT) + 'STDERR' (redirect only STDERR) + 'STDOUT STDERR' (redirect both streams) + +500 series diagnostics/ok + 501 VERSION either Version string (1.0) Currently just used at startup + 502 RETURN either Depends on caller - + +900 series: errors + 901 ERROR either - This is reserved for unexpected errors. + + * JAVA - remote debugger, the java end + * PYDB - pydevd, the python end +""" + +import linecache +import os + +from _pydev_bundle.pydev_imports import _queue +from _pydev_bundle._pydev_saved_modules import time, ThreadingEvent +from _pydev_bundle._pydev_saved_modules import socket as socket_module +from _pydevd_bundle.pydevd_constants import ( + DebugInfoHolder, + IS_WINDOWS, + IS_JYTHON, + IS_WASM, + IS_PY36_OR_GREATER, + STATE_RUN, + ASYNC_EVAL_TIMEOUT_SEC, + get_global_debugger, + GetGlobalDebugger, + set_global_debugger, # Keep for backward compatibility @UnusedImport + silence_warnings_decorator, + filter_all_warnings, + IS_PY311_OR_GREATER, +) +from _pydev_bundle.pydev_override import overrides +import weakref +from _pydev_bundle._pydev_completer import extract_token_and_qualifier +from _pydevd_bundle._debug_adapter.pydevd_schema import ( + VariablesResponseBody, + SetVariableResponseBody, + StepInTarget, + StepInTargetsResponseBody, +) +from _pydevd_bundle._debug_adapter import pydevd_base_schema, pydevd_schema +from _pydevd_bundle.pydevd_net_command import NetCommand +from _pydevd_bundle.pydevd_xml import ExceptionOnEvaluate +from _pydevd_bundle.pydevd_constants import ForkSafeLock, NULL +from _pydevd_bundle.pydevd_daemon_thread import PyDBDaemonThread +from _pydevd_bundle.pydevd_thread_lifecycle import pydevd_find_thread_by_id, resume_threads +from _pydevd_bundle.pydevd_dont_trace_files import PYDEV_FILE +import dis +import pydevd_file_utils +import itertools +from urllib.parse import quote_plus, unquote_plus +import pydevconsole +from _pydevd_bundle import pydevd_vars, pydevd_io, pydevd_reload +from _pydevd_bundle import pydevd_bytecode_utils +from _pydevd_bundle import pydevd_xml +from _pydevd_bundle import pydevd_vm_type +import sys +import traceback +from _pydevd_bundle.pydevd_utils import ( + quote_smart as quote, + compare_object_attrs_key, + notify_about_gevent_if_needed, + isinstance_checked, + ScopeRequest, + getattr_checked, + Timer, + is_current_thread_main_thread, +) +from _pydev_bundle import pydev_log, fsnotify +from _pydev_bundle.pydev_log import exception as pydev_log_exception +from _pydev_bundle import _pydev_completer + +from pydevd_tracing import get_exception_traceback_str +from _pydevd_bundle import pydevd_console +from _pydev_bundle.pydev_monkey import disable_trace_thread_modules, enable_trace_thread_modules +from io import StringIO + +# CMD_XXX constants imported for backward compatibility +from _pydevd_bundle.pydevd_comm_constants import * # @UnusedWildImport + +# Socket import aliases: +AF_INET, AF_INET6, SOCK_STREAM, SHUT_WR, SOL_SOCKET, IPPROTO_TCP, socket = ( + socket_module.AF_INET, + socket_module.AF_INET6, + socket_module.SOCK_STREAM, + socket_module.SHUT_WR, + socket_module.SOL_SOCKET, + socket_module.IPPROTO_TCP, + socket_module.socket, +) + +if IS_WINDOWS and not IS_JYTHON: + SO_EXCLUSIVEADDRUSE = socket_module.SO_EXCLUSIVEADDRUSE +if not IS_WASM: + SO_REUSEADDR = socket_module.SO_REUSEADDR + + +class ReaderThread(PyDBDaemonThread): + """reader thread reads and dispatches commands in an infinite loop""" + + def __init__(self, sock, py_db, PyDevJsonCommandProcessor, process_net_command, terminate_on_socket_close=True): + assert sock is not None + PyDBDaemonThread.__init__(self, py_db) + self.__terminate_on_socket_close = terminate_on_socket_close + + self.sock = sock + self._buffer = b"" + self.name = "pydevd.Reader" + self.process_net_command = process_net_command + self.process_net_command_json = PyDevJsonCommandProcessor(self._from_json).process_net_command_json + + def _from_json(self, json_msg, update_ids_from_dap=False): + return pydevd_base_schema.from_json(json_msg, update_ids_from_dap, on_dict_loaded=self._on_dict_loaded) + + def _on_dict_loaded(self, dct): + for listener in self.py_db.dap_messages_listeners: + listener.after_receive(dct) + + @overrides(PyDBDaemonThread.do_kill_pydev_thread) + def do_kill_pydev_thread(self): + PyDBDaemonThread.do_kill_pydev_thread(self) + # Note that we no longer shutdown the reader, just the writer. The idea is that we shutdown + # the writer to send that the communication has finished, then, the client will shutdown its + # own writer when it receives an empty read, at which point this reader will also shutdown. + + # That way, we can *almost* guarantee that all messages have been properly sent -- it's not + # completely guaranteed because it's possible that the process exits before the whole + # message was sent as having this thread alive won't stop the process from exiting -- we + # have a timeout when exiting the process waiting for this thread to finish -- see: + # PyDB.dispose_and_kill_all_pydevd_threads()). + + # try: + # self.sock.shutdown(SHUT_RD) + # except: + # pass + # try: + # self.sock.close() + # except: + # pass + + def _read(self, size): + while True: + buffer_len = len(self._buffer) + if buffer_len == size: + ret = self._buffer + self._buffer = b"" + return ret + + if buffer_len > size: + ret = self._buffer[:size] + self._buffer = self._buffer[size:] + return ret + + try: + r = self.sock.recv(max(size - buffer_len, 1024)) + except OSError: + return b"" + if not r: + return b"" + self._buffer += r + + def _read_line(self): + while True: + i = self._buffer.find(b"\n") + if i != -1: + i += 1 # Add the newline to the return + ret = self._buffer[:i] + self._buffer = self._buffer[i:] + return ret + else: + try: + r = self.sock.recv(1024) + except OSError: + return b"" + if not r: + return b"" + self._buffer += r + + @overrides(PyDBDaemonThread._on_run) + def _on_run(self): + try: + content_len = -1 + + while True: + # i.e.: even if we received a kill, we should only exit the ReaderThread when the + # client itself closes the connection (although on kill received we stop actually + # processing anything read). + try: + notify_about_gevent_if_needed() + line = self._read_line() + + if len(line) == 0: + pydev_log.debug("ReaderThread: empty contents received (len(line) == 0).") + self._terminate_on_socket_close() + return # Finished communication. + + if self._kill_received: + continue + + if line.startswith(b"Content-Length:"): + content_len = int(line.strip().split(b":", 1)[1]) + continue + + if content_len != -1: + # If we previously received a content length, read until a '\r\n'. + if line == b"\r\n": + json_contents = self._read(content_len) + + content_len = -1 + + if len(json_contents) == 0: + pydev_log.debug("ReaderThread: empty contents received (len(json_contents) == 0).") + self._terminate_on_socket_close() + return # Finished communication. + + if self._kill_received: + continue + + # We just received a json message, let's process it. + self.process_net_command_json(self.py_db, json_contents) + + continue + else: + # No content len, regular line-based protocol message (remove trailing new-line). + if line.endswith(b"\n\n"): + line = line[:-2] + + elif line.endswith(b"\n"): + line = line[:-1] + + elif line.endswith(b"\r"): + line = line[:-1] + except: + if not self._kill_received: + pydev_log_exception() + self._terminate_on_socket_close() + return # Finished communication. + + # Note: the java backend is always expected to pass utf-8 encoded strings. We now work with str + # internally and thus, we may need to convert to the actual encoding where needed (i.e.: filenames + # on python 2 may need to be converted to the filesystem encoding). + if hasattr(line, "decode"): + line = line.decode("utf-8") + + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 3: + pydev_log.debug("debugger: received >>%s<<\n", line) + + args = line.split("\t", 2) + try: + cmd_id = int(args[0]) + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 3: + pydev_log.debug("Received command: %s %s\n", ID_TO_MEANING.get(str(cmd_id), "???"), line) + self.process_command(cmd_id, int(args[1]), args[2]) + except: + if sys is not None and pydev_log_exception is not None: # Could happen at interpreter shutdown + pydev_log_exception("Can't process net command: %s.", line) + + except: + if not self._kill_received: + if sys is not None and pydev_log_exception is not None: # Could happen at interpreter shutdown + pydev_log_exception() + + self._terminate_on_socket_close() + finally: + pydev_log.debug("ReaderThread: exit") + + def _terminate_on_socket_close(self): + if self.__terminate_on_socket_close: + self.py_db.dispose_and_kill_all_pydevd_threads() + + def process_command(self, cmd_id, seq, text): + self.process_net_command(self.py_db, cmd_id, seq, text) + + +class FSNotifyThread(PyDBDaemonThread): + def __init__(self, py_db, api, watch_dirs): + PyDBDaemonThread.__init__(self, py_db) + self.api = api + self.name = "pydevd.FSNotifyThread" + self.watcher = fsnotify.Watcher() + self.watch_dirs = watch_dirs + + @overrides(PyDBDaemonThread._on_run) + def _on_run(self): + try: + pydev_log.info("Watching directories for code reload:\n---\n%s\n---" % ("\n".join(sorted(self.watch_dirs)))) + + # i.e.: The first call to set_tracked_paths will do a full scan, so, do it in the thread + # too (after everything is configured). + self.watcher.set_tracked_paths(self.watch_dirs) + while not self._kill_received: + for change_enum, change_path in self.watcher.iter_changes(): + # We're only interested in modified events + if change_enum == fsnotify.Change.modified: + pydev_log.info("Modified: %s", change_path) + self.api.request_reload_code(self.py_db, -1, None, change_path) + else: + pydev_log.info("Ignored (add or remove) change in: %s", change_path) + except: + pydev_log.exception("Error when waiting for filesystem changes in FSNotifyThread.") + + @overrides(PyDBDaemonThread.do_kill_pydev_thread) + def do_kill_pydev_thread(self): + self.watcher.dispose() + PyDBDaemonThread.do_kill_pydev_thread(self) + + +class WriterThread(PyDBDaemonThread): + """writer thread writes out the commands in an infinite loop""" + + def __init__(self, sock, py_db, terminate_on_socket_close=True): + PyDBDaemonThread.__init__(self, py_db) + self.sock = sock + self.__terminate_on_socket_close = terminate_on_socket_close + self.name = "pydevd.Writer" + self._cmd_queue = _queue.Queue() + if pydevd_vm_type.get_vm_type() == "python": + self.timeout = 0 + else: + self.timeout = 0.1 + + def add_command(self, cmd): + """cmd is NetCommand""" + if not self._kill_received: # we don't take new data after everybody die + self._cmd_queue.put(cmd, False) + + @overrides(PyDBDaemonThread._on_run) + def _on_run(self): + """just loop and write responses""" + + try: + while True: + try: + try: + cmd = self._cmd_queue.get(True, 0.1) + except _queue.Empty: + if self._kill_received: + pydev_log.debug("WriterThread: kill_received (sock.shutdown(SHUT_WR))") + try: + self.sock.shutdown(SHUT_WR) + except: + pass + # Note: don't close the socket, just send the shutdown, + # then, when no data is received on the reader, it can close + # the socket. + # See: https://blog.netherlabs.nl/articles/2009/01/18/the-ultimate-so_linger-page-or-why-is-my-tcp-not-reliable + + # try: + # self.sock.close() + # except: + # pass + + return # break if queue is empty and _kill_received + else: + continue + except: + # pydev_log.info('Finishing debug communication...(1)') + # when liberating the thread here, we could have errors because we were shutting down + # but the thread was still not liberated + return + + if cmd.as_dict is not None: + for listener in self.py_db.dap_messages_listeners: + listener.before_send(cmd.as_dict) + + notify_about_gevent_if_needed() + cmd.send(self.sock) + + if cmd.id == CMD_EXIT: + pydev_log.debug("WriterThread: CMD_EXIT received") + break + if time is None: + break # interpreter shutdown + time.sleep(self.timeout) + except Exception: + if self.__terminate_on_socket_close: + self.py_db.dispose_and_kill_all_pydevd_threads() + if DebugInfoHolder.DEBUG_TRACE_LEVEL > 0: + pydev_log_exception() + finally: + pydev_log.debug("WriterThread: exit") + + def empty(self): + return self._cmd_queue.empty() + + @overrides(PyDBDaemonThread.do_kill_pydev_thread) + def do_kill_pydev_thread(self): + if not self._kill_received: + # Add command before setting the kill flag (otherwise the command may not be added). + exit_cmd = self.py_db.cmd_factory.make_exit_command(self.py_db) + self.add_command(exit_cmd) + + PyDBDaemonThread.do_kill_pydev_thread(self) + + +def create_server_socket(host, port): + try: + server = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) + if IS_WINDOWS and not IS_JYTHON: + server.setsockopt(SOL_SOCKET, SO_EXCLUSIVEADDRUSE, 1) + elif not IS_WASM: + server.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) + + server.bind((host, port)) + server.settimeout(None) + except Exception: + server.close() + raise + + return server + + +def start_server(port): + """binds to a port, waits for the debugger to connect""" + s = create_server_socket(host="", port=port) + + try: + s.listen(1) + # Let the user know it's halted waiting for the connection. + host, port = s.getsockname() + msg = f"pydevd: waiting for connection at: {host}:{port}" + print(msg, file=sys.stderr) + pydev_log.info(msg) + + new_socket, _addr = s.accept() + pydev_log.info("Connection accepted") + # closing server socket is not necessary but we don't need it + s.close() + return new_socket + except: + pydev_log.exception("Could not bind to port: %s\n", port) + raise + + +def start_client(host, port): + """connects to a host/port""" + pydev_log.info("Connecting to %s:%s", host, port) + + address_family = AF_INET + for res in socket_module.getaddrinfo(host, port, 0, SOCK_STREAM): + if res[0] == AF_INET: + address_family = res[0] + # Prefer IPv4 addresses for backward compat. + break + if res[0] == AF_INET6: + # Don't break after this - if the socket is dual-stack prefer IPv4. + address_family = res[0] + + s = socket(address_family, SOCK_STREAM) + + # Set TCP keepalive on an open socket. + # It activates after 1 second (TCP_KEEPIDLE,) of idleness, + # then sends a keepalive ping once every 3 seconds (TCP_KEEPINTVL), + # and closes the connection after 5 failed ping (TCP_KEEPCNT), or 15 seconds + try: + s.setsockopt(SOL_SOCKET, socket_module.SO_KEEPALIVE, 1) + except (AttributeError, OSError): + pass # May not be available everywhere. + try: + s.setsockopt(socket_module.IPPROTO_TCP, socket_module.TCP_KEEPIDLE, 1) + except (AttributeError, OSError): + pass # May not be available everywhere. + try: + s.setsockopt(socket_module.IPPROTO_TCP, socket_module.TCP_KEEPINTVL, 3) + except (AttributeError, OSError): + pass # May not be available everywhere. + try: + s.setsockopt(socket_module.IPPROTO_TCP, socket_module.TCP_KEEPCNT, 5) + except (AttributeError, OSError): + pass # May not be available everywhere. + + try: + # 10 seconds default timeout + timeout = int(os.environ.get("PYDEVD_CONNECT_TIMEOUT", 10)) + s.settimeout(timeout) + s.connect((host, port)) + s.settimeout(None) # no timeout after connected + pydev_log.info(f"Connected to: {s}.") + return s + except: + pydev_log.exception("Could not connect to %s: %s", host, port) + raise + + +INTERNAL_TERMINATE_THREAD = 1 +INTERNAL_SUSPEND_THREAD = 2 + + +class InternalThreadCommand(object): + """internal commands are generated/executed by the debugger. + + The reason for their existence is that some commands have to be executed + on specific threads. These are the InternalThreadCommands that get + get posted to PyDB. + """ + + def __init__(self, thread_id, method=None, *args, **kwargs): + self.thread_id = thread_id + self.method = method + self.args = args + self.kwargs = kwargs + + def can_be_executed_by(self, thread_id): + """By default, it must be in the same thread to be executed""" + return self.thread_id == thread_id or self.thread_id.endswith("|" + thread_id) + + def do_it(self, dbg): + try: + if self.method is not None: + self.method(dbg, *self.args, **self.kwargs) + else: + raise NotImplementedError("you have to override do_it") + finally: + self.args = None + self.kwargs = None + + def __str__(self): + return "InternalThreadCommands(%s, %s, %s)" % (self.method, self.args, self.kwargs) + + __repr__ = __str__ + + +class InternalThreadCommandForAnyThread(InternalThreadCommand): + def __init__(self, thread_id, method=None, *args, **kwargs): + assert thread_id == "*" + + InternalThreadCommand.__init__(self, thread_id, method, *args, **kwargs) + + self.executed = False + self.lock = ForkSafeLock() + + def can_be_executed_by(self, thread_id): + return True # Can be executed by any thread. + + def do_it(self, dbg): + with self.lock: + if self.executed: + return + self.executed = True + + InternalThreadCommand.do_it(self, dbg) + + +def _send_io_message(py_db, s): + cmd = py_db.cmd_factory.make_io_message(s, 2) + if py_db.writer is not None: + py_db.writer.add_command(cmd) + + +def internal_reload_code(dbg, seq, module_name, filename): + try: + found_module_to_reload = False + if module_name is not None: + module_name = module_name + if module_name not in sys.modules: + if "." in module_name: + new_module_name = module_name.split(".")[-1] + if new_module_name in sys.modules: + module_name = new_module_name + + modules_to_reload = {} + module = sys.modules.get(module_name) + if module is not None: + modules_to_reload[id(module)] = (module, module_name) + + if filename: + filename = pydevd_file_utils.normcase(filename) + for module_name, module in sys.modules.copy().items(): + f = getattr_checked(module, "__file__") + if f is not None: + if f.endswith((".pyc", ".pyo")): + f = f[:-1] + + if pydevd_file_utils.normcase(f) == filename: + modules_to_reload[id(module)] = (module, module_name) + + if not modules_to_reload: + if filename and module_name: + _send_io_message(dbg, "code reload: Unable to find module %s to reload for path: %s\n" % (module_name, filename)) + elif filename: + _send_io_message(dbg, "code reload: Unable to find module to reload for path: %s\n" % (filename,)) + elif module_name: + _send_io_message(dbg, "code reload: Unable to find module to reload: %s\n" % (module_name,)) + + else: + # Too much info... + # _send_io_message(dbg, 'code reload: This usually means you are trying to reload the __main__ module (which cannot be reloaded).\n') + for module, module_name in modules_to_reload.values(): + _send_io_message(dbg, 'code reload: Start reloading module: "' + module_name + '" ... \n') + found_module_to_reload = True + + if pydevd_reload.xreload(module): + _send_io_message(dbg, "code reload: reload finished\n") + else: + _send_io_message(dbg, "code reload: reload finished without applying any change\n") + + cmd = dbg.cmd_factory.make_reloaded_code_message(seq, found_module_to_reload) + dbg.writer.add_command(cmd) + except: + pydev_log.exception("Error reloading code") + + +class InternalGetThreadStack(InternalThreadCommand): + """ + This command will either wait for a given thread to be paused to get its stack or will provide + it anyways after a timeout (in which case the stack will be gotten but local variables won't + be available and it'll not be possible to interact with the frame as it's not actually + stopped in a breakpoint). + """ + + def __init__(self, seq, thread_id, py_db, set_additional_thread_info, fmt, timeout=0.5, start_frame=0, levels=0): + InternalThreadCommand.__init__(self, thread_id) + self._py_db = weakref.ref(py_db) + self._timeout = time.time() + timeout + self.seq = seq + self._cmd = None + self._fmt = fmt + self._start_frame = start_frame + self._levels = levels + + # Note: receives set_additional_thread_info to avoid a circular import + # in this module. + self._set_additional_thread_info = set_additional_thread_info + + @overrides(InternalThreadCommand.can_be_executed_by) + def can_be_executed_by(self, _thread_id): + timed_out = time.time() >= self._timeout + + py_db = self._py_db() + t = pydevd_find_thread_by_id(self.thread_id) + frame = None + if t and not getattr(t, "pydev_do_not_trace", None): + additional_info = self._set_additional_thread_info(t) + frame = additional_info.get_topmost_frame(t) + try: + self._cmd = py_db.cmd_factory.make_get_thread_stack_message( + py_db, + self.seq, + self.thread_id, + frame, + self._fmt, + must_be_suspended=not timed_out, + start_frame=self._start_frame, + levels=self._levels, + ) + finally: + frame = None + t = None + + return self._cmd is not None or timed_out + + @overrides(InternalThreadCommand.do_it) + def do_it(self, dbg): + if self._cmd is not None: + dbg.writer.add_command(self._cmd) + self._cmd = None + + +def internal_step_in_thread(py_db, thread_id, cmd_id, set_additional_thread_info): + thread_to_step = pydevd_find_thread_by_id(thread_id) + if thread_to_step is not None: + info = set_additional_thread_info(thread_to_step) + info.pydev_original_step_cmd = cmd_id + info.pydev_step_cmd = cmd_id + info.pydev_step_stop = None + info.pydev_state = STATE_RUN + info.update_stepping_info() + + if py_db.stepping_resumes_all_threads: + resume_threads("*", except_thread=thread_to_step) + + +def internal_smart_step_into(py_db, thread_id, offset, child_offset, set_additional_thread_info): + thread_to_step = pydevd_find_thread_by_id(thread_id) + if thread_to_step is not None: + info = set_additional_thread_info(thread_to_step) + info.pydev_original_step_cmd = CMD_SMART_STEP_INTO + info.pydev_step_cmd = CMD_SMART_STEP_INTO + info.pydev_step_stop = None + info.pydev_smart_parent_offset = int(offset) + info.pydev_smart_child_offset = int(child_offset) + info.pydev_state = STATE_RUN + info.update_stepping_info() + + if py_db.stepping_resumes_all_threads: + resume_threads("*", except_thread=thread_to_step) + + +class InternalSetNextStatementThread(InternalThreadCommand): + def __init__(self, thread_id, cmd_id, line, func_name, seq=0): + """ + cmd_id may actually be one of: + + CMD_RUN_TO_LINE + CMD_SET_NEXT_STATEMENT + CMD_SMART_STEP_INTO + """ + self.thread_id = thread_id + self.cmd_id = cmd_id + self.line = line + self.seq = seq + + self.func_name = func_name + + def do_it(self, dbg): + t = pydevd_find_thread_by_id(self.thread_id) + if t is not None: + info = t.additional_info + info.pydev_original_step_cmd = self.cmd_id + info.pydev_step_cmd = self.cmd_id + info.pydev_step_stop = None + info.pydev_next_line = int(self.line) + info.pydev_func_name = self.func_name + info.pydev_message = str(self.seq) + info.pydev_smart_parent_offset = -1 + info.pydev_smart_child_offset = -1 + info.pydev_state = STATE_RUN + info.update_stepping_info() + + +@silence_warnings_decorator +def internal_get_variable_json(py_db, request): + """ + :param VariablesRequest request: + """ + arguments = request.arguments # : :type arguments: VariablesArguments + variables_reference = arguments.variablesReference + scope = None + if isinstance_checked(variables_reference, ScopeRequest): + scope = variables_reference + variables_reference = variables_reference.variable_reference + + fmt = arguments.format + if hasattr(fmt, "to_dict"): + fmt = fmt.to_dict() + + variables = [] + try: + try: + variable = py_db.suspended_frames_manager.get_variable(variables_reference) + except KeyError: + pass + else: + for child_var in variable.get_children_variables(fmt=fmt, scope=scope): + variables.append(child_var.get_var_data(fmt=fmt)) + except: + try: + exc, exc_type, tb = sys.exc_info() + err = "".join(traceback.format_exception(exc, exc_type, tb)) + variables = [{"name": "", "value": err, "type": "", "variablesReference": 0}] + except: + err = "" + pydev_log.exception(err) + variables = [] + + body = VariablesResponseBody(variables) + variables_response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + py_db.writer.add_command(NetCommand(CMD_RETURN, 0, variables_response, is_json=True)) + + +class InternalGetVariable(InternalThreadCommand): + """gets the value of a variable""" + + def __init__(self, seq, thread_id, frame_id, scope, attrs): + self.sequence = seq + self.thread_id = thread_id + self.frame_id = frame_id + self.scope = scope + self.attributes = attrs + + @silence_warnings_decorator + def do_it(self, dbg): + """Converts request into python variable""" + try: + xml = StringIO() + xml.write("") + type_name, val_dict = pydevd_vars.resolve_compound_variable_fields( + dbg, self.thread_id, self.frame_id, self.scope, self.attributes + ) + if val_dict is None: + val_dict = {} + + # assume properly ordered if resolver returns 'OrderedDict' + # check type as string to support OrderedDict backport for older Python + keys = list(val_dict) + if not (type_name == "OrderedDict" or val_dict.__class__.__name__ == "OrderedDict" or IS_PY36_OR_GREATER): + keys = sorted(keys, key=compare_object_attrs_key) + + timer = Timer() + for k in keys: + val = val_dict[k] + evaluate_full_value = pydevd_xml.should_evaluate_full_value(val) + xml.write(pydevd_xml.var_to_xml(val, k, evaluate_full_value=evaluate_full_value)) + timer.report_if_compute_repr_attr_slow(self.attributes, k, type(val)) + + xml.write("") + cmd = dbg.cmd_factory.make_get_variable_message(self.sequence, xml.getvalue()) + xml.close() + dbg.writer.add_command(cmd) + except Exception: + cmd = dbg.cmd_factory.make_error_message(self.sequence, "Error resolving variables %s" % (get_exception_traceback_str(),)) + dbg.writer.add_command(cmd) + + +class InternalGetArray(InternalThreadCommand): + def __init__(self, seq, roffset, coffset, rows, cols, format, thread_id, frame_id, scope, attrs): + self.sequence = seq + self.thread_id = thread_id + self.frame_id = frame_id + self.scope = scope + self.name = attrs.split("\t")[-1] + self.attrs = attrs + self.roffset = int(roffset) + self.coffset = int(coffset) + self.rows = int(rows) + self.cols = int(cols) + self.format = format + + def do_it(self, dbg): + try: + frame = dbg.find_frame(self.thread_id, self.frame_id) + var = pydevd_vars.eval_in_context(self.name, frame.f_globals, frame.f_locals, py_db=dbg) + xml = pydevd_vars.table_like_struct_to_xml(var, self.name, self.roffset, self.coffset, self.rows, self.cols, self.format) + cmd = dbg.cmd_factory.make_get_array_message(self.sequence, xml) + dbg.writer.add_command(cmd) + except: + cmd = dbg.cmd_factory.make_error_message(self.sequence, "Error resolving array: " + get_exception_traceback_str()) + dbg.writer.add_command(cmd) + + +def internal_change_variable(dbg, seq, thread_id, frame_id, scope, attr, value): + """Changes the value of a variable""" + try: + frame = dbg.find_frame(thread_id, frame_id) + if frame is not None: + result = pydevd_vars.change_attr_expression(frame, attr, value, dbg) + else: + result = None + xml = "" + xml += pydevd_xml.var_to_xml(result, "") + xml += "" + cmd = dbg.cmd_factory.make_variable_changed_message(seq, xml) + dbg.writer.add_command(cmd) + except Exception: + cmd = dbg.cmd_factory.make_error_message( + seq, "Error changing variable attr:%s expression:%s traceback:%s" % (attr, value, get_exception_traceback_str()) + ) + dbg.writer.add_command(cmd) + + +def internal_change_variable_json(py_db, request): + """ + The pydevd_vars.change_attr_expression(thread_id, frame_id, attr, value, dbg) can only + deal with changing at a frame level, so, currently changing the contents of something + in a different scope is currently not supported. + + :param SetVariableRequest request: + """ + # : :type arguments: SetVariableArguments + arguments = request.arguments + variables_reference = arguments.variablesReference + scope = None + if isinstance_checked(variables_reference, ScopeRequest): + scope = variables_reference + variables_reference = variables_reference.variable_reference + + fmt = arguments.format + if hasattr(fmt, "to_dict"): + fmt = fmt.to_dict() + + try: + variable = py_db.suspended_frames_manager.get_variable(variables_reference) + except KeyError: + variable = None + + if variable is None: + _write_variable_response( + py_db, request, value="", success=False, message="Unable to find variable container to change: %s." % (variables_reference,) + ) + return + + child_var = variable.change_variable(arguments.name, arguments.value, py_db, fmt=fmt) + + if child_var is None: + _write_variable_response(py_db, request, value="", success=False, message="Unable to change: %s." % (arguments.name,)) + return + + var_data = child_var.get_var_data(fmt=fmt) + body = SetVariableResponseBody( + value=var_data["value"], + type=var_data["type"], + variablesReference=var_data.get("variablesReference"), + namedVariables=var_data.get("namedVariables"), + indexedVariables=var_data.get("indexedVariables"), + ) + variables_response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + py_db.writer.add_command(NetCommand(CMD_RETURN, 0, variables_response, is_json=True)) + + +def _write_variable_response(py_db, request, value, success, message): + body = SetVariableResponseBody("") + variables_response = pydevd_base_schema.build_response(request, kwargs={"body": body, "success": False, "message": message}) + cmd = NetCommand(CMD_RETURN, 0, variables_response, is_json=True) + py_db.writer.add_command(cmd) + + +@silence_warnings_decorator +def internal_get_frame(dbg, seq, thread_id, frame_id): + """Converts request into python variable""" + try: + frame = dbg.find_frame(thread_id, frame_id) + if frame is not None: + hidden_ns = pydevconsole.get_ipython_hidden_vars() + xml = "" + xml += pydevd_xml.frame_vars_to_xml(frame.f_locals, hidden_ns) + del frame + xml += "" + cmd = dbg.cmd_factory.make_get_frame_message(seq, xml) + dbg.writer.add_command(cmd) + else: + # pydevd_vars.dump_frames(thread_id) + # don't print this error: frame not found: means that the client is not synchronized (but that's ok) + cmd = dbg.cmd_factory.make_error_message(seq, "Frame not found: %s from thread: %s" % (frame_id, thread_id)) + dbg.writer.add_command(cmd) + except: + cmd = dbg.cmd_factory.make_error_message(seq, "Error resolving frame: %s from thread: %s" % (frame_id, thread_id)) + dbg.writer.add_command(cmd) + + +def internal_get_smart_step_into_variants(dbg, seq, thread_id, frame_id, start_line, end_line, set_additional_thread_info): + try: + thread = pydevd_find_thread_by_id(thread_id) + frame = dbg.find_frame(thread_id, frame_id) + + if thread is None or frame is None: + cmd = dbg.cmd_factory.make_error_message(seq, "Frame not found: %s from thread: %s" % (frame_id, thread_id)) + dbg.writer.add_command(cmd) + return + + if pydevd_bytecode_utils is None: + variants = [] + else: + variants = pydevd_bytecode_utils.calculate_smart_step_into_variants(frame, int(start_line), int(end_line)) + + info = set_additional_thread_info(thread) + + # Store the last request (may be used afterwards when stepping). + info.pydev_smart_step_into_variants = tuple(variants) + xml = "" + + for variant in variants: + if variant.children_variants: + for child_variant in variant.children_variants: + # If there are child variants, the current one is just an intermediary, so, + # just create variants for the child (notifying properly about the parent too). + xml += ( + '' + % ( + quote(child_variant.name), + str(child_variant.is_visited).lower(), + child_variant.line, + variant.offset, + child_variant.offset, + child_variant.call_order, + variant.endlineno, + variant.startcol, + variant.endcol, + ) + ) + else: + xml += ( + '' + % ( + quote(variant.name), + str(variant.is_visited).lower(), + variant.line, + variant.offset, + variant.call_order, + variant.endlineno, + variant.startcol, + variant.endcol, + ) + ) + + xml += "" + cmd = NetCommand(CMD_GET_SMART_STEP_INTO_VARIANTS, seq, xml) + dbg.writer.add_command(cmd) + except: + # Error is expected (if `dis` module cannot be used -- i.e.: Jython). + pydev_log.exception("Error calculating Smart Step Into Variants.") + cmd = dbg.cmd_factory.make_error_message( + seq, "Error getting smart step into variants for frame: %s from thread: %s" % (frame_id, thread_id) + ) + dbg.writer.add_command(cmd) + + +def internal_get_step_in_targets_json(dbg, seq, thread_id, frame_id, request, set_additional_thread_info): + try: + thread = pydevd_find_thread_by_id(thread_id) + frame = dbg.find_frame(thread_id, frame_id) + + if thread is None or frame is None: + body = StepInTargetsResponseBody([]) + variables_response = pydevd_base_schema.build_response( + request, kwargs={"body": body, "success": False, "message": "Thread to get step in targets seems to have resumed already."} + ) + cmd = NetCommand(CMD_RETURN, 0, variables_response, is_json=True) + dbg.writer.add_command(cmd) + return + + start_line = 0 + end_line = 99999999 + if pydevd_bytecode_utils is None: + variants = [] + else: + variants = pydevd_bytecode_utils.calculate_smart_step_into_variants(frame, start_line, end_line) + + info = set_additional_thread_info(thread) + targets = [] + counter = itertools.count(0) + target_id_to_variant = {} + for variant in variants: + if not variant.is_visited: + if variant.children_variants: + for child_variant in variant.children_variants: + target_id = next(counter) + + if child_variant.call_order > 1: + targets.append( + StepInTarget( + id=target_id, + label="%s (call %s)" % (child_variant.name, child_variant.call_order), + ) + ) + else: + targets.append(StepInTarget(id=target_id, label=child_variant.name)) + target_id_to_variant[target_id] = child_variant + + if len(targets) >= 15: # Show at most 15 targets. + break + else: + target_id = next(counter) + if variant.call_order > 1: + targets.append( + StepInTarget( + id=target_id, + label="%s (call %s)" % (variant.name, variant.call_order), + ) + ) + else: + targets.append(StepInTarget(id=target_id, label=variant.name)) + target_id_to_variant[target_id] = variant + + if len(targets) >= 15: # Show at most 15 targets. + break + + # Store the last request (may be used afterwards when stepping). + info.pydev_smart_step_into_variants = tuple(variants) + info.target_id_to_smart_step_into_variant = target_id_to_variant + + body = StepInTargetsResponseBody(targets=targets) + response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + cmd = NetCommand(CMD_RETURN, 0, response, is_json=True) + dbg.writer.add_command(cmd) + except Exception as e: + # Error is expected (if `dis` module cannot be used -- i.e.: Jython). + pydev_log.exception("Error calculating Smart Step Into Variants.") + body = StepInTargetsResponseBody([]) + variables_response = pydevd_base_schema.build_response(request, kwargs={"body": body, "success": False, "message": str(e)}) + cmd = NetCommand(CMD_RETURN, 0, variables_response, is_json=True) + dbg.writer.add_command(cmd) + + +def internal_get_next_statement_targets(dbg, seq, thread_id, frame_id): + """gets the valid line numbers for use with set next statement""" + try: + frame = dbg.find_frame(thread_id, frame_id) + if frame is not None: + code = frame.f_code + xml = "" + try: + linestarts = dis.findlinestarts(code) + except: + # i.e.: jython doesn't provide co_lnotab, so, we can only keep at the current line. + xml += "%d" % (frame.f_lineno,) + else: + for _, line in linestarts: + if line is not None: + xml += "%d" % (line,) + del frame + xml += "" + cmd = dbg.cmd_factory.make_get_next_statement_targets_message(seq, xml) + dbg.writer.add_command(cmd) + else: + cmd = dbg.cmd_factory.make_error_message(seq, "Frame not found: %s from thread: %s" % (frame_id, thread_id)) + dbg.writer.add_command(cmd) + except: + cmd = dbg.cmd_factory.make_error_message(seq, "Error resolving frame: %s from thread: %s" % (frame_id, thread_id)) + dbg.writer.add_command(cmd) + + +def _evaluate_response(py_db, request, result, error_message=""): + is_error = isinstance(result, ExceptionOnEvaluate) + if is_error: + result = result.result + if not error_message: + body = pydevd_schema.EvaluateResponseBody(result=result, variablesReference=0) + variables_response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + py_db.writer.add_command(NetCommand(CMD_RETURN, 0, variables_response, is_json=True)) + else: + body = pydevd_schema.EvaluateResponseBody(result=result, variablesReference=0) + variables_response = pydevd_base_schema.build_response(request, kwargs={"body": body, "success": False, "message": error_message}) + py_db.writer.add_command(NetCommand(CMD_RETURN, 0, variables_response, is_json=True)) + + +_global_frame = None + + +def internal_evaluate_expression_json(py_db, request, thread_id): + """ + :param EvaluateRequest request: + """ + global _global_frame + # : :type arguments: EvaluateArguments + + arguments = request.arguments + expression = arguments.expression + frame_id = arguments.frameId + context = arguments.context + fmt = arguments.format + if hasattr(fmt, "to_dict"): + fmt = fmt.to_dict() + + ctx = NULL + if context == "repl": + if not py_db.is_output_redirected: + ctx = pydevd_io.redirect_stream_to_pydb_io_messages_context() + else: + # If we're not in a repl (watch, hover, ...) don't show warnings. + ctx = filter_all_warnings() + + with ctx: + try_exec = False + if frame_id is None: + if _global_frame is None: + # Lazily create a frame to be used for evaluation with no frame id. + + def __create_frame(): + yield sys._getframe() + + _global_frame = next(__create_frame()) + + frame = _global_frame + try_exec = True # Always exec in this case + eval_result = None + else: + frame = py_db.find_frame(thread_id, frame_id) + + eval_result = pydevd_vars.evaluate_expression(py_db, frame, expression, is_exec=False) + is_error = isinstance_checked(eval_result, ExceptionOnEvaluate) + if is_error: + if context == "hover": # In a hover it doesn't make sense to do an exec. + _evaluate_response(py_db, request, result="", error_message="Exception occurred during evaluation.") + return + elif context == "watch": + # If it's a watch, don't show it as an exception object, rather, format + # it and show it as a string (with success=False). + msg = "%s: %s" % ( + eval_result.result.__class__.__name__, + eval_result.result, + ) + _evaluate_response(py_db, request, result=msg, error_message=msg) + return + else: + # We only try the exec if the failure we had was due to not being able + # to evaluate the expression. + try: + pydevd_vars.compile_as_eval(expression) + except Exception: + try_exec = context == "repl" + else: + try_exec = False + if context == "repl": + # In the repl we should show the exception to the user. + _evaluate_response_return_exception(py_db, request, eval_result.etype, eval_result.result, eval_result.tb) + return + + if try_exec: + try: + pydevd_vars.evaluate_expression(py_db, frame, expression, is_exec=True) + except (Exception, KeyboardInterrupt): + _evaluate_response_return_exception(py_db, request, *sys.exc_info()) + return + # No result on exec. + _evaluate_response(py_db, request, result="") + return + + # Ok, we have the result (could be an error), let's put it into the saved variables. + frame_tracker = py_db.suspended_frames_manager.get_frame_tracker(thread_id) + if frame_tracker is None: + # This is not really expected. + _evaluate_response(py_db, request, result="", error_message="Thread id: %s is not current thread id." % (thread_id,)) + return + + safe_repr_custom_attrs = {} + if context == "clipboard": + safe_repr_custom_attrs = dict( + maxstring_outer=2**64, + maxstring_inner=2**64, + maxother_outer=2**64, + maxother_inner=2**64, + ) + + if context == "repl" and eval_result is None: + # We don't want "None" to appear when typing in the repl. + body = pydevd_schema.EvaluateResponseBody( + result="", + variablesReference=0, + ) + + else: + variable = frame_tracker.obtain_as_variable(expression, eval_result, frame=frame) + var_data = variable.get_var_data(fmt=fmt, context=context, **safe_repr_custom_attrs) + + body = pydevd_schema.EvaluateResponseBody( + result=var_data["value"], + variablesReference=var_data.get("variablesReference", 0), + type=var_data.get("type"), + presentationHint=var_data.get("presentationHint"), + namedVariables=var_data.get("namedVariables"), + indexedVariables=var_data.get("indexedVariables"), + ) + variables_response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + py_db.writer.add_command(NetCommand(CMD_RETURN, 0, variables_response, is_json=True)) + + +def _evaluate_response_return_exception(py_db, request, exc_type, exc, initial_tb): + try: + tb = initial_tb + + # Show the traceback without pydevd frames. + temp_tb = tb + while temp_tb: + if py_db.get_file_type(temp_tb.tb_frame) == PYDEV_FILE: + tb = temp_tb.tb_next + temp_tb = temp_tb.tb_next + + if tb is None: + tb = initial_tb + err = "".join(traceback.format_exception(exc_type, exc, tb)) + + # Make sure we don't keep references to them. + exc = None + exc_type = None + tb = None + temp_tb = None + initial_tb = None + except: + err = "" + pydev_log.exception(err) + + # Currently there is an issue in VSC where returning success=false for an + # eval request, in repl context, VSC does not show the error response in + # the debug console. So return the error message in result as well. + _evaluate_response(py_db, request, result=err, error_message=err) + + +@silence_warnings_decorator +def internal_evaluate_expression(dbg, seq, thread_id, frame_id, expression, is_exec, trim_if_too_big, attr_to_set_result): + """gets the value of a variable""" + try: + frame = dbg.find_frame(thread_id, frame_id) + if frame is not None: + result = pydevd_vars.evaluate_expression(dbg, frame, expression, is_exec) + if attr_to_set_result != "": + pydevd_vars.change_attr_expression(frame, attr_to_set_result, expression, dbg, result) + else: + result = None + + xml = "" + xml += pydevd_xml.var_to_xml(result, expression, trim_if_too_big) + xml += "" + cmd = dbg.cmd_factory.make_evaluate_expression_message(seq, xml) + dbg.writer.add_command(cmd) + except: + exc = get_exception_traceback_str() + cmd = dbg.cmd_factory.make_error_message(seq, "Error evaluating expression " + exc) + dbg.writer.add_command(cmd) + + +def _set_expression_response(py_db, request, error_message): + body = pydevd_schema.SetExpressionResponseBody(value="") + variables_response = pydevd_base_schema.build_response(request, kwargs={"body": body, "success": False, "message": error_message}) + py_db.writer.add_command(NetCommand(CMD_RETURN, 0, variables_response, is_json=True)) + + +def internal_set_expression_json(py_db, request, thread_id): + # : :type arguments: SetExpressionArguments + + arguments = request.arguments + expression = arguments.expression + frame_id = arguments.frameId + value = arguments.value + fmt = arguments.format + if hasattr(fmt, "to_dict"): + fmt = fmt.to_dict() + + frame = py_db.find_frame(thread_id, frame_id) + exec_code = "%s = (%s)" % (expression, value) + try: + pydevd_vars.evaluate_expression(py_db, frame, exec_code, is_exec=True) + except (Exception, KeyboardInterrupt): + _set_expression_response(py_db, request, error_message="Error executing: %s" % (exec_code,)) + return + + # Ok, we have the result (could be an error), let's put it into the saved variables. + frame_tracker = py_db.suspended_frames_manager.get_frame_tracker(thread_id) + if frame_tracker is None: + # This is not really expected. + _set_expression_response(py_db, request, error_message="Thread id: %s is not current thread id." % (thread_id,)) + return + + # Now that the exec is done, get the actual value changed to return. + result = pydevd_vars.evaluate_expression(py_db, frame, expression, is_exec=False) + variable = frame_tracker.obtain_as_variable(expression, result, frame=frame) + var_data = variable.get_var_data(fmt=fmt) + + body = pydevd_schema.SetExpressionResponseBody( + value=var_data["value"], + variablesReference=var_data.get("variablesReference", 0), + type=var_data.get("type"), + presentationHint=var_data.get("presentationHint"), + namedVariables=var_data.get("namedVariables"), + indexedVariables=var_data.get("indexedVariables"), + ) + variables_response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + py_db.writer.add_command(NetCommand(CMD_RETURN, 0, variables_response, is_json=True)) + + +def internal_get_completions(dbg, seq, thread_id, frame_id, act_tok, line=-1, column=-1): + """ + Note that if the column is >= 0, the act_tok is considered text and the actual + activation token/qualifier is computed in this command. + """ + try: + remove_path = None + try: + qualifier = "" + if column >= 0: + token_and_qualifier = extract_token_and_qualifier(act_tok, line, column) + act_tok = token_and_qualifier[0] + if act_tok: + act_tok += "." + qualifier = token_and_qualifier[1] + + frame = dbg.find_frame(thread_id, frame_id) + if frame is not None: + completions = _pydev_completer.generate_completions(frame, act_tok) + + # Note that qualifier and start are only actually valid for the + # Debug Adapter Protocol (for the line-based protocol, the IDE + # is required to filter the completions returned). + cmd = dbg.cmd_factory.make_get_completions_message(seq, completions, qualifier, start=column - len(qualifier)) + dbg.writer.add_command(cmd) + else: + cmd = dbg.cmd_factory.make_error_message( + seq, "internal_get_completions: Frame not found: %s from thread: %s" % (frame_id, thread_id) + ) + dbg.writer.add_command(cmd) + + finally: + if remove_path is not None: + sys.path.remove(remove_path) + + except: + exc = get_exception_traceback_str() + sys.stderr.write("%s\n" % (exc,)) + cmd = dbg.cmd_factory.make_error_message(seq, "Error evaluating expression " + exc) + dbg.writer.add_command(cmd) + + +def internal_get_description(dbg, seq, thread_id, frame_id, expression): + """Fetch the variable description stub from the debug console""" + try: + frame = dbg.find_frame(thread_id, frame_id) + description = pydevd_console.get_description(frame, thread_id, frame_id, expression) + description = pydevd_xml.make_valid_xml_value(quote(description, "/>_= \t")) + description_xml = '' % description + cmd = dbg.cmd_factory.make_get_description_message(seq, description_xml) + dbg.writer.add_command(cmd) + except: + exc = get_exception_traceback_str() + cmd = dbg.cmd_factory.make_error_message(seq, "Error in fetching description" + exc) + dbg.writer.add_command(cmd) + + +def build_exception_info_response(dbg, thread_id, thread, request_seq, set_additional_thread_info, iter_visible_frames_info, max_frames): + """ + :return ExceptionInfoResponse + """ + additional_info = set_additional_thread_info(thread) + topmost_frame = additional_info.get_topmost_frame(thread) + + current_paused_frame_name = "" + + source_path = "" # This is an extra bit of data used by Visual Studio + stack_str_lst = [] + name = None + description = None + + if topmost_frame is not None: + try: + try: + frames_list = dbg.suspended_frames_manager.get_frames_list(thread_id) + while frames_list is not None and len(frames_list): + frames = [] + + frame = None + + if not name: + exc_type = frames_list.exc_type + if exc_type is not None: + try: + name = exc_type.__qualname__ + except: + try: + name = exc_type.__name__ + except: + try: + name = str(exc_type) + except: + pass + + if not description: + exc_desc = frames_list.exc_desc + if exc_desc is not None: + try: + description = str(exc_desc) + except: + pass + + for ( + frame_id, + frame, + method_name, + original_filename, + filename_in_utf8, + lineno, + _applied_mapping, + show_as_current_frame, + line_col_info, + ) in iter_visible_frames_info(dbg, frames_list): + line_text = linecache.getline(original_filename, lineno) + + # Never filter out plugin frames! + if not getattr(frame, "IS_PLUGIN_FRAME", False): + if dbg.is_files_filter_enabled and dbg.apply_files_filter(frame, original_filename, False): + continue + + if show_as_current_frame: + current_paused_frame_name = method_name + method_name += " (Current frame)" + frames.append((filename_in_utf8, lineno, method_name, line_text, line_col_info)) + + if not source_path and frames: + source_path = frames[0][0] + + if IS_PY311_OR_GREATER: + stack_summary = traceback.StackSummary() + for filename_in_utf8, lineno, method_name, line_text, line_col_info in frames[-max_frames:]: + frame_summary = traceback.FrameSummary(filename_in_utf8, lineno, method_name, line=line_text) + if line_col_info is not None: + frame_summary.end_lineno = line_col_info.end_lineno + frame_summary.colno = line_col_info.colno + frame_summary.end_colno = line_col_info.end_colno + stack_summary.append(frame_summary) + + stack_str = "".join(stack_summary.format()) + + else: + # Note: remove col info (just used in 3.11). + stack_str = "".join(traceback.format_list((x[:-1] for x in frames[-max_frames:]))) + + try: + stype = frames_list.exc_type.__qualname__ + smod = frames_list.exc_type.__module__ + if smod not in ("__main__", "builtins"): + if not isinstance(smod, str): + smod = "" + stype = smod + "." + stype + except Exception: + stype = "" + pydev_log.exception("Error getting exception type.") + + stack_str += "%s: %s\n" % (stype, frames_list.exc_desc) + stack_str += frames_list.exc_context_msg + stack_str_lst.append(stack_str) + + frames_list = frames_list.chained_frames_list + if frames_list is None or not frames_list: + break + + except: + pydev_log.exception("Error on build_exception_info_response.") + finally: + topmost_frame = None + full_stack_str = "".join(reversed(stack_str_lst)) + + if not name: + name = "exception: type unknown" + if not description: + description = "exception: no description" + + if current_paused_frame_name: + name += " (note: full exception trace is shown but execution is paused at: %s)" % (current_paused_frame_name,) + + if thread.stop_reason == CMD_STEP_CAUGHT_EXCEPTION: + break_mode = pydevd_schema.ExceptionBreakMode.ALWAYS + else: + break_mode = pydevd_schema.ExceptionBreakMode.UNHANDLED + + response = pydevd_schema.ExceptionInfoResponse( + request_seq=request_seq, + success=True, + command="exceptionInfo", + body=pydevd_schema.ExceptionInfoResponseBody( + exceptionId=name, + description=description, + breakMode=break_mode, + details=pydevd_schema.ExceptionDetails( + message=description, + typeName=name, + stackTrace=full_stack_str, + source=source_path, + # Note: ExceptionDetails actually accepts an 'innerException', but + # when passing it, VSCode is not showing the stack trace at all. + ), + ), + ) + return response + + +def internal_get_exception_details_json( + dbg, request, thread_id, thread, max_frames, set_additional_thread_info=None, iter_visible_frames_info=None +): + """Fetch exception details""" + try: + response = build_exception_info_response( + dbg, thread_id, thread, request.seq, set_additional_thread_info, iter_visible_frames_info, max_frames + ) + except: + exc = get_exception_traceback_str() + response = pydevd_base_schema.build_response(request, kwargs={"success": False, "message": exc, "body": {}}) + dbg.writer.add_command(NetCommand(CMD_RETURN, 0, response, is_json=True)) + + +class InternalGetBreakpointException(InternalThreadCommand): + """Send details of exception raised while evaluating conditional breakpoint""" + + def __init__(self, thread_id, exc_type, stacktrace): + self.sequence = 0 + self.thread_id = thread_id + self.stacktrace = stacktrace + self.exc_type = exc_type + + def do_it(self, dbg): + try: + callstack = "" + + makeValid = pydevd_xml.make_valid_xml_value + + for filename, line, methodname, methodobj in self.stacktrace: + if not filesystem_encoding_is_utf8 and hasattr(filename, "decode"): + # filename is a byte string encoded using the file system encoding + # convert it to utf8 + filename = filename.decode(file_system_encoding).encode("utf-8") + + callstack += '' % ( + self.thread_id, + makeValid(filename), + line, + makeValid(methodname), + makeValid(methodobj), + ) + callstack += "" + + cmd = dbg.cmd_factory.make_send_breakpoint_exception_message(self.sequence, self.exc_type + "\t" + callstack) + dbg.writer.add_command(cmd) + except: + exc = get_exception_traceback_str() + sys.stderr.write("%s\n" % (exc,)) + cmd = dbg.cmd_factory.make_error_message(self.sequence, "Error Sending Exception: " + exc) + dbg.writer.add_command(cmd) + + +class InternalSendCurrExceptionTrace(InternalThreadCommand): + """Send details of the exception that was caught and where we've broken in.""" + + def __init__(self, thread_id, arg, curr_frame_id): + """ + :param arg: exception type, description, traceback object + """ + self.sequence = 0 + self.thread_id = thread_id + self.curr_frame_id = curr_frame_id + self.arg = arg + + def do_it(self, dbg): + try: + cmd = dbg.cmd_factory.make_send_curr_exception_trace_message(dbg, self.sequence, self.thread_id, self.curr_frame_id, *self.arg) + del self.arg + dbg.writer.add_command(cmd) + except: + exc = get_exception_traceback_str() + sys.stderr.write("%s\n" % (exc,)) + cmd = dbg.cmd_factory.make_error_message(self.sequence, "Error Sending Current Exception Trace: " + exc) + dbg.writer.add_command(cmd) + + +class InternalSendCurrExceptionTraceProceeded(InternalThreadCommand): + """Send details of the exception that was caught and where we've broken in.""" + + def __init__(self, thread_id): + self.sequence = 0 + self.thread_id = thread_id + + def do_it(self, dbg): + try: + cmd = dbg.cmd_factory.make_send_curr_exception_trace_proceeded_message(self.sequence, self.thread_id) + dbg.writer.add_command(cmd) + except: + exc = get_exception_traceback_str() + sys.stderr.write("%s\n" % (exc,)) + cmd = dbg.cmd_factory.make_error_message(self.sequence, "Error Sending Current Exception Trace Proceeded: " + exc) + dbg.writer.add_command(cmd) + + +class InternalEvaluateConsoleExpression(InternalThreadCommand): + """Execute the given command in the debug console""" + + def __init__(self, seq, thread_id, frame_id, line, buffer_output=True): + self.sequence = seq + self.thread_id = thread_id + self.frame_id = frame_id + self.line = line + self.buffer_output = buffer_output + + def do_it(self, dbg): + """Create an XML for console output, error and more (true/false) + + + + true/false + + """ + try: + frame = dbg.find_frame(self.thread_id, self.frame_id) + if frame is not None: + console_message = pydevd_console.execute_console_command( + frame, self.thread_id, self.frame_id, self.line, self.buffer_output + ) + + cmd = dbg.cmd_factory.make_send_console_message(self.sequence, console_message.to_xml()) + else: + from _pydevd_bundle.pydevd_console import ConsoleMessage + + console_message = ConsoleMessage() + console_message.add_console_message( + pydevd_console.CONSOLE_ERROR, + "Select the valid frame in the debug view (thread: %s, frame: %s invalid)" % (self.thread_id, self.frame_id), + ) + cmd = dbg.cmd_factory.make_error_message(self.sequence, console_message.to_xml()) + except: + exc = get_exception_traceback_str() + cmd = dbg.cmd_factory.make_error_message(self.sequence, "Error evaluating expression " + exc) + dbg.writer.add_command(cmd) + + +class InternalRunCustomOperation(InternalThreadCommand): + """Run a custom command on an expression""" + + def __init__(self, seq, thread_id, frame_id, scope, attrs, style, encoded_code_or_file, fnname): + self.sequence = seq + self.thread_id = thread_id + self.frame_id = frame_id + self.scope = scope + self.attrs = attrs + self.style = style + self.code_or_file = unquote_plus(encoded_code_or_file) + self.fnname = fnname + + def do_it(self, dbg): + try: + res = pydevd_vars.custom_operation( + dbg, self.thread_id, self.frame_id, self.scope, self.attrs, self.style, self.code_or_file, self.fnname + ) + resEncoded = quote_plus(res) + cmd = dbg.cmd_factory.make_custom_operation_message(self.sequence, resEncoded) + dbg.writer.add_command(cmd) + except: + exc = get_exception_traceback_str() + cmd = dbg.cmd_factory.make_error_message(self.sequence, "Error in running custom operation" + exc) + dbg.writer.add_command(cmd) + + +class InternalConsoleGetCompletions(InternalThreadCommand): + """Fetch the completions in the debug console""" + + def __init__(self, seq, thread_id, frame_id, act_tok): + self.sequence = seq + self.thread_id = thread_id + self.frame_id = frame_id + self.act_tok = act_tok + + def do_it(self, dbg): + """Get completions and write back to the client""" + try: + frame = dbg.find_frame(self.thread_id, self.frame_id) + completions_xml = pydevd_console.get_completions(frame, self.act_tok) + cmd = dbg.cmd_factory.make_send_console_message(self.sequence, completions_xml) + dbg.writer.add_command(cmd) + except: + exc = get_exception_traceback_str() + cmd = dbg.cmd_factory.make_error_message(self.sequence, "Error in fetching completions" + exc) + dbg.writer.add_command(cmd) + + +class InternalConsoleExec(InternalThreadCommand): + """gets the value of a variable""" + + def __init__(self, seq, thread_id, frame_id, expression): + self.sequence = seq + self.thread_id = thread_id + self.frame_id = frame_id + self.expression = expression + + def init_matplotlib_in_debug_console(self, py_db): + # import hook and patches for matplotlib support in debug console + from _pydev_bundle.pydev_import_hook import import_hook_manager + + if is_current_thread_main_thread(): + for module in list(py_db.mpl_modules_for_patching): + import_hook_manager.add_module_name(module, py_db.mpl_modules_for_patching.pop(module)) + + def do_it(self, py_db): + if not py_db.mpl_hooks_in_debug_console and not py_db.gui_in_use: + # add import hooks for matplotlib patches if only debug console was started + try: + self.init_matplotlib_in_debug_console(py_db) + py_db.gui_in_use = True + except: + pydev_log.debug("Matplotlib support in debug console failed", traceback.format_exc()) + py_db.mpl_hooks_in_debug_console = True + + try: + try: + # Don't trace new threads created by console command. + disable_trace_thread_modules() + + result = pydevconsole.console_exec(self.thread_id, self.frame_id, self.expression, py_db) + xml = "" + xml += pydevd_xml.var_to_xml(result, "") + xml += "" + cmd = py_db.cmd_factory.make_evaluate_expression_message(self.sequence, xml) + py_db.writer.add_command(cmd) + except: + exc = get_exception_traceback_str() + sys.stderr.write("%s\n" % (exc,)) + cmd = py_db.cmd_factory.make_error_message(self.sequence, "Error evaluating console expression " + exc) + py_db.writer.add_command(cmd) + finally: + enable_trace_thread_modules() + + sys.stderr.flush() + sys.stdout.flush() + + +class InternalLoadFullValue(InternalThreadCommand): + """ + Loads values asynchronously + """ + + def __init__(self, seq, thread_id, frame_id, vars): + self.sequence = seq + self.thread_id = thread_id + self.frame_id = frame_id + self.vars = vars + + @silence_warnings_decorator + def do_it(self, dbg): + """Starts a thread that will load values asynchronously""" + try: + var_objects = [] + for variable in self.vars: + variable = variable.strip() + if len(variable) > 0: + if "\t" in variable: # there are attributes beyond scope + scope, attrs = variable.split("\t", 1) + name = attrs[0] + else: + scope, attrs = (variable, None) + name = scope + var_obj = pydevd_vars.getVariable(dbg, self.thread_id, self.frame_id, scope, attrs) + var_objects.append((var_obj, name)) + + t = GetValueAsyncThreadDebug(dbg, dbg, self.sequence, var_objects) + t.start() + except: + exc = get_exception_traceback_str() + sys.stderr.write("%s\n" % (exc,)) + cmd = dbg.cmd_factory.make_error_message(self.sequence, "Error evaluating variable %s " % exc) + dbg.writer.add_command(cmd) + + +class AbstractGetValueAsyncThread(PyDBDaemonThread): + """ + Abstract class for a thread, which evaluates values for async variables + """ + + def __init__(self, py_db, frame_accessor, seq, var_objects): + PyDBDaemonThread.__init__(self, py_db) + self.frame_accessor = frame_accessor + self.seq = seq + self.var_objs = var_objects + self.cancel_event = ThreadingEvent() + + def send_result(self, xml): + raise NotImplementedError() + + @overrides(PyDBDaemonThread._on_run) + def _on_run(self): + start = time.time() + xml = StringIO() + xml.write("") + for var_obj, name in self.var_objs: + current_time = time.time() + if current_time - start > ASYNC_EVAL_TIMEOUT_SEC or self.cancel_event.is_set(): + break + xml.write(pydevd_xml.var_to_xml(var_obj, name, evaluate_full_value=True)) + xml.write("") + self.send_result(xml) + xml.close() + + +class GetValueAsyncThreadDebug(AbstractGetValueAsyncThread): + """ + A thread for evaluation async values, which returns result for debugger + Create message and send it via writer thread + """ + + def send_result(self, xml): + if self.frame_accessor is not None: + cmd = self.frame_accessor.cmd_factory.make_load_full_value_message(self.seq, xml.getvalue()) + self.frame_accessor.writer.add_command(cmd) + + +class GetValueAsyncThreadConsole(AbstractGetValueAsyncThread): + """ + A thread for evaluation async values, which returns result for Console + Send result directly to Console's server + """ + + def send_result(self, xml): + if self.frame_accessor is not None: + self.frame_accessor.ReturnFullValue(self.seq, xml.getvalue()) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py new file mode 100644 index 0000000..7de3d8e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py @@ -0,0 +1,200 @@ +CMD_RUN = 101 +CMD_LIST_THREADS = 102 +CMD_THREAD_CREATE = 103 +CMD_THREAD_KILL = 104 +CMD_THREAD_SUSPEND = 105 +CMD_THREAD_RUN = 106 +CMD_STEP_INTO = 107 +CMD_STEP_OVER = 108 +CMD_STEP_RETURN = 109 +CMD_GET_VARIABLE = 110 +CMD_SET_BREAK = 111 +CMD_REMOVE_BREAK = 112 +CMD_EVALUATE_EXPRESSION = 113 +CMD_GET_FRAME = 114 +CMD_EXEC_EXPRESSION = 115 +CMD_WRITE_TO_CONSOLE = 116 +CMD_CHANGE_VARIABLE = 117 +CMD_RUN_TO_LINE = 118 +CMD_RELOAD_CODE = 119 +CMD_GET_COMPLETIONS = 120 + +# Note: renumbered (conflicted on merge) +CMD_CONSOLE_EXEC = 121 +CMD_ADD_EXCEPTION_BREAK = 122 +CMD_REMOVE_EXCEPTION_BREAK = 123 +CMD_LOAD_SOURCE = 124 +CMD_ADD_DJANGO_EXCEPTION_BREAK = 125 +CMD_REMOVE_DJANGO_EXCEPTION_BREAK = 126 +CMD_SET_NEXT_STATEMENT = 127 +CMD_SMART_STEP_INTO = 128 +CMD_EXIT = 129 +CMD_SIGNATURE_CALL_TRACE = 130 + +CMD_SET_PY_EXCEPTION = 131 +CMD_GET_FILE_CONTENTS = 132 +CMD_SET_PROPERTY_TRACE = 133 +# Pydev debug console commands +CMD_EVALUATE_CONSOLE_EXPRESSION = 134 +CMD_RUN_CUSTOM_OPERATION = 135 +CMD_GET_BREAKPOINT_EXCEPTION = 136 +CMD_STEP_CAUGHT_EXCEPTION = 137 +CMD_SEND_CURR_EXCEPTION_TRACE = 138 +CMD_SEND_CURR_EXCEPTION_TRACE_PROCEEDED = 139 +CMD_IGNORE_THROWN_EXCEPTION_AT = 140 +CMD_ENABLE_DONT_TRACE = 141 +CMD_SHOW_CONSOLE = 142 + +CMD_GET_ARRAY = 143 +CMD_STEP_INTO_MY_CODE = 144 +CMD_GET_CONCURRENCY_EVENT = 145 +CMD_SHOW_RETURN_VALUES = 146 +CMD_INPUT_REQUESTED = 147 +CMD_GET_DESCRIPTION = 148 + +CMD_PROCESS_CREATED = 149 +CMD_SHOW_CYTHON_WARNING = 150 +CMD_LOAD_FULL_VALUE = 151 + +CMD_GET_THREAD_STACK = 152 + +# This is mostly for unit-tests to diagnose errors on ci. +CMD_THREAD_DUMP_TO_STDERR = 153 + +# Sent from the client to signal that we should stop when we start executing user code. +CMD_STOP_ON_START = 154 + +# When the debugger is stopped in an exception, this command will provide the details of the current exception (in the current thread). +CMD_GET_EXCEPTION_DETAILS = 155 + +# Allows configuring pydevd settings (can be called multiple times and only keys +# available in the json will be configured -- keys not passed will not change the +# previous configuration). +CMD_PYDEVD_JSON_CONFIG = 156 + +CMD_THREAD_SUSPEND_SINGLE_NOTIFICATION = 157 +CMD_THREAD_RESUME_SINGLE_NOTIFICATION = 158 + +CMD_STEP_OVER_MY_CODE = 159 +CMD_STEP_RETURN_MY_CODE = 160 + +CMD_SET_PY_EXCEPTION_JSON = 161 +CMD_SET_PATH_MAPPING_JSON = 162 + +CMD_GET_SMART_STEP_INTO_VARIANTS = 163 # XXX: PyCharm has 160 for this (we're currently incompatible anyways). + +CMD_REDIRECT_OUTPUT = 200 +CMD_GET_NEXT_STATEMENT_TARGETS = 201 +CMD_SET_PROJECT_ROOTS = 202 + +CMD_MODULE_EVENT = 203 +CMD_PROCESS_EVENT = 204 + +CMD_AUTHENTICATE = 205 + +CMD_STEP_INTO_COROUTINE = 206 + +CMD_LOAD_SOURCE_FROM_FRAME_ID = 207 + +CMD_SET_FUNCTION_BREAK = 208 + +CMD_VERSION = 501 +CMD_RETURN = 502 +CMD_SET_PROTOCOL = 503 +CMD_ERROR = 901 + +# this number can be changed if there's need to do so +# if the io is too big, we'll not send all (could make the debugger too non-responsive) +MAX_IO_MSG_SIZE = 10000 + +VERSION_STRING = "@@BUILD_NUMBER@@" + +from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding + +file_system_encoding = getfilesystemencoding() +filesystem_encoding_is_utf8 = file_system_encoding.lower() in ("utf-8", "utf_8", "utf8") + +ID_TO_MEANING = { + "101": "CMD_RUN", + "102": "CMD_LIST_THREADS", + "103": "CMD_THREAD_CREATE", + "104": "CMD_THREAD_KILL", + "105": "CMD_THREAD_SUSPEND", + "106": "CMD_THREAD_RUN", + "107": "CMD_STEP_INTO", + "108": "CMD_STEP_OVER", + "109": "CMD_STEP_RETURN", + "110": "CMD_GET_VARIABLE", + "111": "CMD_SET_BREAK", + "112": "CMD_REMOVE_BREAK", + "113": "CMD_EVALUATE_EXPRESSION", + "114": "CMD_GET_FRAME", + "115": "CMD_EXEC_EXPRESSION", + "116": "CMD_WRITE_TO_CONSOLE", + "117": "CMD_CHANGE_VARIABLE", + "118": "CMD_RUN_TO_LINE", + "119": "CMD_RELOAD_CODE", + "120": "CMD_GET_COMPLETIONS", + "121": "CMD_CONSOLE_EXEC", + "122": "CMD_ADD_EXCEPTION_BREAK", + "123": "CMD_REMOVE_EXCEPTION_BREAK", + "124": "CMD_LOAD_SOURCE", + "125": "CMD_ADD_DJANGO_EXCEPTION_BREAK", + "126": "CMD_REMOVE_DJANGO_EXCEPTION_BREAK", + "127": "CMD_SET_NEXT_STATEMENT", + "128": "CMD_SMART_STEP_INTO", + "129": "CMD_EXIT", + "130": "CMD_SIGNATURE_CALL_TRACE", + "131": "CMD_SET_PY_EXCEPTION", + "132": "CMD_GET_FILE_CONTENTS", + "133": "CMD_SET_PROPERTY_TRACE", + "134": "CMD_EVALUATE_CONSOLE_EXPRESSION", + "135": "CMD_RUN_CUSTOM_OPERATION", + "136": "CMD_GET_BREAKPOINT_EXCEPTION", + "137": "CMD_STEP_CAUGHT_EXCEPTION", + "138": "CMD_SEND_CURR_EXCEPTION_TRACE", + "139": "CMD_SEND_CURR_EXCEPTION_TRACE_PROCEEDED", + "140": "CMD_IGNORE_THROWN_EXCEPTION_AT", + "141": "CMD_ENABLE_DONT_TRACE", + "142": "CMD_SHOW_CONSOLE", + "143": "CMD_GET_ARRAY", + "144": "CMD_STEP_INTO_MY_CODE", + "145": "CMD_GET_CONCURRENCY_EVENT", + "146": "CMD_SHOW_RETURN_VALUES", + "147": "CMD_INPUT_REQUESTED", + "148": "CMD_GET_DESCRIPTION", + "149": "CMD_PROCESS_CREATED", # Note: this is actually a notification of a sub-process created. + "150": "CMD_SHOW_CYTHON_WARNING", + "151": "CMD_LOAD_FULL_VALUE", + "152": "CMD_GET_THREAD_STACK", + "153": "CMD_THREAD_DUMP_TO_STDERR", + "154": "CMD_STOP_ON_START", + "155": "CMD_GET_EXCEPTION_DETAILS", + "156": "CMD_PYDEVD_JSON_CONFIG", + "157": "CMD_THREAD_SUSPEND_SINGLE_NOTIFICATION", + "158": "CMD_THREAD_RESUME_SINGLE_NOTIFICATION", + "159": "CMD_STEP_OVER_MY_CODE", + "160": "CMD_STEP_RETURN_MY_CODE", + "161": "CMD_SET_PY_EXCEPTION_JSON", + "162": "CMD_SET_PATH_MAPPING_JSON", + "163": "CMD_GET_SMART_STEP_INTO_VARIANTS", + "200": "CMD_REDIRECT_OUTPUT", + "201": "CMD_GET_NEXT_STATEMENT_TARGETS", + "202": "CMD_SET_PROJECT_ROOTS", + "203": "CMD_MODULE_EVENT", + "204": "CMD_PROCESS_EVENT", # DAP process event. + "205": "CMD_AUTHENTICATE", + "206": "CMD_STEP_INTO_COROUTINE", + "207": "CMD_LOAD_SOURCE_FROM_FRAME_ID", + "501": "CMD_VERSION", + "502": "CMD_RETURN", + "503": "CMD_SET_PROTOCOL", + "901": "CMD_ERROR", +} + + +def constant_to_str(constant): + s = ID_TO_MEANING.get(str(constant)) + if not s: + s = "" % (constant,) + return s diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_command_line_handling.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_command_line_handling.py new file mode 100644 index 0000000..8fb3e03 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_command_line_handling.py @@ -0,0 +1,181 @@ +import os +import sys + + +class ArgHandlerWithParam: + """ + Handler for some arguments which needs a value + """ + + def __init__(self, arg_name, convert_val=None, default_val=None): + self.arg_name = arg_name + self.arg_v_rep = "--%s" % (arg_name,) + self.convert_val = convert_val + self.default_val = default_val + + def to_argv(self, lst, setup): + v = setup.get(self.arg_name) + if v is not None and v != self.default_val: + lst.append(self.arg_v_rep) + lst.append("%s" % (v,)) + + def handle_argv(self, argv, i, setup): + assert argv[i] == self.arg_v_rep + del argv[i] + + val = argv[i] + if self.convert_val: + val = self.convert_val(val) + + setup[self.arg_name] = val + del argv[i] + + +class ArgHandlerBool: + """ + If a given flag is received, mark it as 'True' in setup. + """ + + def __init__(self, arg_name, default_val=False): + self.arg_name = arg_name + self.arg_v_rep = "--%s" % (arg_name,) + self.default_val = default_val + + def to_argv(self, lst, setup): + v = setup.get(self.arg_name) + if v: + lst.append(self.arg_v_rep) + + def handle_argv(self, argv, i, setup): + assert argv[i] == self.arg_v_rep + del argv[i] + setup[self.arg_name] = True + + +def convert_ppid(ppid): + ret = int(ppid) + if ret != 0: + if ret == os.getpid(): + raise AssertionError("ppid passed is the same as the current process pid (%s)!" % (ret,)) + return ret + + +ACCEPTED_ARG_HANDLERS = [ + ArgHandlerWithParam("port", int, 0), + ArgHandlerWithParam("ppid", convert_ppid, 0), + ArgHandlerWithParam("vm_type"), + ArgHandlerWithParam("client"), + ArgHandlerWithParam("access-token"), + ArgHandlerWithParam("client-access-token"), + ArgHandlerWithParam("debug-mode"), + ArgHandlerWithParam("preimport"), + # Logging + ArgHandlerWithParam("log-file"), + ArgHandlerWithParam("log-level", int, None), + ArgHandlerBool("server"), + ArgHandlerBool("multiproc"), # Used by PyCharm (reuses connection: ssh tunneling) + ArgHandlerBool("multiprocess"), # Used by PyDev (creates new connection to ide) + ArgHandlerBool("save-signatures"), + ArgHandlerBool("save-threading"), + ArgHandlerBool("save-asyncio"), + ArgHandlerBool("print-in-debugger-startup"), + ArgHandlerBool("cmd-line"), + ArgHandlerBool("module"), + ArgHandlerBool("skip-notify-stdin"), + # The ones below should've been just one setting to specify the protocol, but for compatibility + # reasons they're passed as a flag but are mutually exclusive. + ArgHandlerBool("json-dap"), # Protocol used by ptvsd to communicate with pydevd (a single json message in each read) + ArgHandlerBool("json-dap-http"), # Actual DAP (json messages over http protocol). + ArgHandlerBool("protocol-quoted-line"), # Custom protocol with quoted lines. + ArgHandlerBool("protocol-http"), # Custom protocol with http. +] + +ARGV_REP_TO_HANDLER = {} +for handler in ACCEPTED_ARG_HANDLERS: + ARGV_REP_TO_HANDLER[handler.arg_v_rep] = handler + + +def get_pydevd_file(): + import pydevd + + f = pydevd.__file__ + if f.endswith(".pyc"): + f = f[:-1] + elif f.endswith("$py.class"): + f = f[: -len("$py.class")] + ".py" + return f + + +def setup_to_argv(setup, skip_names=None): + """ + :param dict setup: + A dict previously gotten from process_command_line. + + :param set skip_names: + The names in the setup which shouldn't be converted to argv. + + :note: does not handle --file nor --DEBUG. + """ + if skip_names is None: + skip_names = set() + ret = [get_pydevd_file()] + + for handler in ACCEPTED_ARG_HANDLERS: + if handler.arg_name in setup and handler.arg_name not in skip_names: + handler.to_argv(ret, setup) + return ret + + +def process_command_line(argv): + """parses the arguments. + removes our arguments from the command line""" + setup = {} + for handler in ACCEPTED_ARG_HANDLERS: + setup[handler.arg_name] = handler.default_val + setup["file"] = "" + setup["qt-support"] = "" + + initial_argv = tuple(argv) + + i = 0 + del argv[0] + while i < len(argv): + handler = ARGV_REP_TO_HANDLER.get(argv[i]) + if handler is not None: + handler.handle_argv(argv, i, setup) + + elif argv[i].startswith("--qt-support"): + # The --qt-support is special because we want to keep backward compatibility: + # Previously, just passing '--qt-support' meant that we should use the auto-discovery mode + # whereas now, if --qt-support is passed, it should be passed as --qt-support=, where + # mode can be one of 'auto', 'none', 'pyqt5', 'pyqt4', 'pyside', 'pyside2'. + if argv[i] == "--qt-support": + setup["qt-support"] = "auto" + + elif argv[i].startswith("--qt-support="): + qt_support = argv[i][len("--qt-support=") :] + valid_modes = ("none", "auto", "pyqt5", "pyqt4", "pyside", "pyside2") + if qt_support not in valid_modes: + raise ValueError("qt-support mode invalid: " + qt_support) + if qt_support == "none": + # On none, actually set an empty string to evaluate to False. + setup["qt-support"] = "" + else: + setup["qt-support"] = qt_support + else: + raise ValueError("Unexpected definition for qt-support flag: " + argv[i]) + + del argv[i] + + elif argv[i] == "--file": + # --file is special because it's the last one (so, no handler for it). + del argv[i] + setup["file"] = argv[i] + i = len(argv) # pop out, file is our last argument + + elif argv[i] == "--DEBUG": + sys.stderr.write("pydevd: --DEBUG parameter deprecated. Use `--debug-level=3` instead.\n") + + else: + raise ValueError("Unexpected option: %s when processing: %s" % (argv[i], initial_argv)) + return setup diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__init__.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..44e7f50 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__pycache__/pydevd_concurrency_logger.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__pycache__/pydevd_concurrency_logger.cpython-312.pyc new file mode 100644 index 0000000..cd269a6 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__pycache__/pydevd_concurrency_logger.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__pycache__/pydevd_thread_wrappers.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__pycache__/pydevd_thread_wrappers.cpython-312.pyc new file mode 100644 index 0000000..83698cc Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__pycache__/pydevd_thread_wrappers.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_concurrency_logger.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_concurrency_logger.py new file mode 100644 index 0000000..af5a8b9 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_concurrency_logger.py @@ -0,0 +1,482 @@ +import time + +from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding +from _pydev_bundle._pydev_saved_modules import threading +from _pydevd_bundle import pydevd_xml +from _pydevd_bundle.pydevd_constants import GlobalDebuggerHolder +from _pydevd_bundle.pydevd_constants import get_thread_id +from _pydevd_bundle.pydevd_net_command import NetCommand +from _pydevd_bundle.pydevd_concurrency_analyser.pydevd_thread_wrappers import ObjectWrapper, wrap_attr +import pydevd_file_utils +from _pydev_bundle import pydev_log +import sys + +file_system_encoding = getfilesystemencoding() + +from urllib.parse import quote + +threadingCurrentThread = threading.current_thread + +DONT_TRACE_THREADING = ["threading.py", "pydevd.py"] +INNER_METHODS = ["_stop"] +INNER_FILES = ["threading.py"] +THREAD_METHODS = ["start", "_stop", "join"] +LOCK_METHODS = ["__init__", "acquire", "release", "__enter__", "__exit__"] +QUEUE_METHODS = ["put", "get"] + +# return time since epoch in milliseconds +cur_time = lambda: int(round(time.time() * 1000000)) + + +def get_text_list_for_frame(frame): + # partial copy-paste from make_thread_suspend_str + curFrame = frame + cmdTextList = [] + try: + while curFrame: + # print cmdText + myId = str(id(curFrame)) + # print "id is ", myId + + if curFrame.f_code is None: + break # Iron Python sometimes does not have it! + + myName = curFrame.f_code.co_name # method name (if in method) or ? if global + if myName is None: + break # Iron Python sometimes does not have it! + + # print "name is ", myName + + absolute_filename = pydevd_file_utils.get_abs_path_real_path_and_base_from_frame(curFrame)[0] + + my_file, _applied_mapping = pydevd_file_utils.map_file_to_client(absolute_filename) + + # print "file is ", my_file + # my_file = inspect.getsourcefile(curFrame) or inspect.getfile(frame) + + myLine = str(curFrame.f_lineno) + # print "line is ", myLine + + # the variables are all gotten 'on-demand' + # variables = pydevd_xml.frame_vars_to_xml(curFrame.f_locals) + + variables = "" + cmdTextList.append('' % (quote(my_file, "/>_= \t"), myLine)) + cmdTextList.append(variables) + cmdTextList.append("") + curFrame = curFrame.f_back + except: + pydev_log.exception() + + return cmdTextList + + +def send_concurrency_message(event_class, time, name, thread_id, type, event, file, line, frame, lock_id=0, parent=None): + dbg = GlobalDebuggerHolder.global_dbg + if dbg is None: + return + cmdTextList = [""] + + cmdTextList.append("<" + event_class) + cmdTextList.append(' time="%s"' % pydevd_xml.make_valid_xml_value(str(time))) + cmdTextList.append(' name="%s"' % pydevd_xml.make_valid_xml_value(name)) + cmdTextList.append(' thread_id="%s"' % pydevd_xml.make_valid_xml_value(thread_id)) + cmdTextList.append(' type="%s"' % pydevd_xml.make_valid_xml_value(type)) + if type == "lock": + cmdTextList.append(' lock_id="%s"' % pydevd_xml.make_valid_xml_value(str(lock_id))) + if parent is not None: + cmdTextList.append(' parent="%s"' % pydevd_xml.make_valid_xml_value(parent)) + cmdTextList.append(' event="%s"' % pydevd_xml.make_valid_xml_value(event)) + cmdTextList.append(' file="%s"' % pydevd_xml.make_valid_xml_value(file)) + cmdTextList.append(' line="%s"' % pydevd_xml.make_valid_xml_value(str(line))) + cmdTextList.append(">") + + cmdTextList += get_text_list_for_frame(frame) + cmdTextList.append("") + + text = "".join(cmdTextList) + if dbg.writer is not None: + dbg.writer.add_command(NetCommand(145, 0, text)) + + +def log_new_thread(global_debugger, t): + event_time = cur_time() - global_debugger.thread_analyser.start_time + send_concurrency_message( + "threading_event", event_time, t.name, get_thread_id(t), "thread", "start", "code_name", 0, None, parent=get_thread_id(t) + ) + + +class ThreadingLogger: + def __init__(self): + self.start_time = cur_time() + + def set_start_time(self, time): + self.start_time = time + + def log_event(self, frame): + write_log = False + self_obj = None + if "self" in frame.f_locals: + self_obj = frame.f_locals["self"] + if isinstance(self_obj, threading.Thread) or self_obj.__class__ == ObjectWrapper: + write_log = True + if hasattr(frame, "f_back") and frame.f_back is not None: + back = frame.f_back + if hasattr(back, "f_back") and back.f_back is not None: + back = back.f_back + if "self" in back.f_locals: + if isinstance(back.f_locals["self"], threading.Thread): + write_log = True + try: + if write_log: + t = threadingCurrentThread() + back = frame.f_back + if not back: + return + name, _, back_base = pydevd_file_utils.get_abs_path_real_path_and_base_from_frame(back) + event_time = cur_time() - self.start_time + method_name = frame.f_code.co_name + + if isinstance(self_obj, threading.Thread): + if not hasattr(self_obj, "_pydev_run_patched"): + wrap_attr(self_obj, "run") + if (method_name in THREAD_METHODS) and ( + back_base not in DONT_TRACE_THREADING or (method_name in INNER_METHODS and back_base in INNER_FILES) + ): + thread_id = get_thread_id(self_obj) + name = self_obj.getName() + real_method = frame.f_code.co_name + parent = None + if real_method == "_stop": + if back_base in INNER_FILES and back.f_code.co_name == "_wait_for_tstate_lock": + back = back.f_back.f_back + real_method = "stop" + if hasattr(self_obj, "_pydev_join_called"): + parent = get_thread_id(t) + elif real_method == "join": + # join called in the current thread, not in self object + if not self_obj.is_alive(): + return + thread_id = get_thread_id(t) + name = t.name + self_obj._pydev_join_called = True + + if real_method == "start": + parent = get_thread_id(t) + send_concurrency_message( + "threading_event", + event_time, + name, + thread_id, + "thread", + real_method, + back.f_code.co_filename, + back.f_lineno, + back, + parent=parent, + ) + # print(event_time, self_obj.getName(), thread_id, "thread", + # real_method, back.f_code.co_filename, back.f_lineno) + + if method_name == "pydev_after_run_call": + if hasattr(frame, "f_back") and frame.f_back is not None: + back = frame.f_back + if hasattr(back, "f_back") and back.f_back is not None: + back = back.f_back + if "self" in back.f_locals: + if isinstance(back.f_locals["self"], threading.Thread): + my_self_obj = frame.f_back.f_back.f_locals["self"] + my_back = frame.f_back.f_back + my_thread_id = get_thread_id(my_self_obj) + send_massage = True + if hasattr(my_self_obj, "_pydev_join_called"): + send_massage = False + # we can't detect stop after join in Python 2 yet + if send_massage: + send_concurrency_message( + "threading_event", + event_time, + "Thread", + my_thread_id, + "thread", + "stop", + my_back.f_code.co_filename, + my_back.f_lineno, + my_back, + parent=None, + ) + + if self_obj.__class__ == ObjectWrapper: + if back_base in DONT_TRACE_THREADING: + # do not trace methods called from threading + return + back_back_base = pydevd_file_utils.get_abs_path_real_path_and_base_from_frame(back.f_back)[2] + back = back.f_back + if back_back_base in DONT_TRACE_THREADING: + # back_back_base is the file, where the method was called froms + return + if method_name == "__init__": + send_concurrency_message( + "threading_event", + event_time, + t.name, + get_thread_id(t), + "lock", + method_name, + back.f_code.co_filename, + back.f_lineno, + back, + lock_id=str(id(frame.f_locals["self"])), + ) + if "attr" in frame.f_locals and (frame.f_locals["attr"] in LOCK_METHODS or frame.f_locals["attr"] in QUEUE_METHODS): + real_method = frame.f_locals["attr"] + if method_name == "call_begin": + real_method += "_begin" + elif method_name == "call_end": + real_method += "_end" + else: + return + if real_method == "release_end": + # do not log release end. Maybe use it later + return + send_concurrency_message( + "threading_event", + event_time, + t.name, + get_thread_id(t), + "lock", + real_method, + back.f_code.co_filename, + back.f_lineno, + back, + lock_id=str(id(self_obj)), + ) + + if real_method in ("put_end", "get_end"): + # fake release for queue, cause we don't call it directly + send_concurrency_message( + "threading_event", + event_time, + t.name, + get_thread_id(t), + "lock", + "release", + back.f_code.co_filename, + back.f_lineno, + back, + lock_id=str(id(self_obj)), + ) + # print(event_time, t.name, get_thread_id(t), "lock", + # real_method, back.f_code.co_filename, back.f_lineno) + + except Exception: + pydev_log.exception() + + +class NameManager: + def __init__(self, name_prefix): + self.tasks = {} + self.last = 0 + self.prefix = name_prefix + + def get(self, id): + if id not in self.tasks: + self.last += 1 + self.tasks[id] = self.prefix + "-" + str(self.last) + return self.tasks[id] + + +class AsyncioLogger: + def __init__(self): + self.task_mgr = NameManager("Task") + self.coro_mgr = NameManager("Coro") + self.start_time = cur_time() + + def get_task_id(self, frame): + asyncio = sys.modules.get("asyncio") + if asyncio is None: + # If asyncio was not imported, there's nothing to be done + # (also fixes issue where multiprocessing is imported due + # to asyncio). + return None + while frame is not None: + if "self" in frame.f_locals: + self_obj = frame.f_locals["self"] + if isinstance(self_obj, asyncio.Task): + method_name = frame.f_code.co_name + if method_name == "_step": + return id(self_obj) + frame = frame.f_back + return None + + def log_event(self, frame): + event_time = cur_time() - self.start_time + + # Debug loop iterations + # if isinstance(self_obj, asyncio.base_events.BaseEventLoop): + # if method_name == "_run_once": + # print("Loop iteration") + + if not hasattr(frame, "f_back") or frame.f_back is None: + return + + asyncio = sys.modules.get("asyncio") + if asyncio is None: + # If asyncio was not imported, there's nothing to be done + # (also fixes issue where multiprocessing is imported due + # to asyncio). + return + + back = frame.f_back + + if "self" in frame.f_locals: + self_obj = frame.f_locals["self"] + if isinstance(self_obj, asyncio.Task): + method_name = frame.f_code.co_name + if method_name == "set_result": + task_id = id(self_obj) + task_name = self.task_mgr.get(str(task_id)) + send_concurrency_message( + "asyncio_event", event_time, task_name, task_name, "thread", "stop", frame.f_code.co_filename, frame.f_lineno, frame + ) + + method_name = back.f_code.co_name + if method_name == "__init__": + task_id = id(self_obj) + task_name = self.task_mgr.get(str(task_id)) + send_concurrency_message( + "asyncio_event", + event_time, + task_name, + task_name, + "thread", + "start", + frame.f_code.co_filename, + frame.f_lineno, + frame, + ) + + method_name = frame.f_code.co_name + if isinstance(self_obj, asyncio.Lock): + if method_name in ("acquire", "release"): + task_id = self.get_task_id(frame) + task_name = self.task_mgr.get(str(task_id)) + + if method_name == "acquire": + if not self_obj._waiters and not self_obj.locked(): + send_concurrency_message( + "asyncio_event", + event_time, + task_name, + task_name, + "lock", + method_name + "_begin", + frame.f_code.co_filename, + frame.f_lineno, + frame, + lock_id=str(id(self_obj)), + ) + if self_obj.locked(): + method_name += "_begin" + else: + method_name += "_end" + elif method_name == "release": + method_name += "_end" + + send_concurrency_message( + "asyncio_event", + event_time, + task_name, + task_name, + "lock", + method_name, + frame.f_code.co_filename, + frame.f_lineno, + frame, + lock_id=str(id(self_obj)), + ) + + if isinstance(self_obj, asyncio.Queue): + if method_name in ("put", "get", "_put", "_get"): + task_id = self.get_task_id(frame) + task_name = self.task_mgr.get(str(task_id)) + + if method_name == "put": + send_concurrency_message( + "asyncio_event", + event_time, + task_name, + task_name, + "lock", + "acquire_begin", + frame.f_code.co_filename, + frame.f_lineno, + frame, + lock_id=str(id(self_obj)), + ) + elif method_name == "_put": + send_concurrency_message( + "asyncio_event", + event_time, + task_name, + task_name, + "lock", + "acquire_end", + frame.f_code.co_filename, + frame.f_lineno, + frame, + lock_id=str(id(self_obj)), + ) + send_concurrency_message( + "asyncio_event", + event_time, + task_name, + task_name, + "lock", + "release", + frame.f_code.co_filename, + frame.f_lineno, + frame, + lock_id=str(id(self_obj)), + ) + elif method_name == "get": + back = frame.f_back + if back.f_code.co_name != "send": + send_concurrency_message( + "asyncio_event", + event_time, + task_name, + task_name, + "lock", + "acquire_begin", + frame.f_code.co_filename, + frame.f_lineno, + frame, + lock_id=str(id(self_obj)), + ) + else: + send_concurrency_message( + "asyncio_event", + event_time, + task_name, + task_name, + "lock", + "acquire_end", + frame.f_code.co_filename, + frame.f_lineno, + frame, + lock_id=str(id(self_obj)), + ) + send_concurrency_message( + "asyncio_event", + event_time, + task_name, + task_name, + "lock", + "release", + frame.f_code.co_filename, + frame.f_lineno, + frame, + lock_id=str(id(self_obj)), + ) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_thread_wrappers.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_thread_wrappers.py new file mode 100644 index 0000000..e71f3e5 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_thread_wrappers.py @@ -0,0 +1,82 @@ +from _pydev_bundle._pydev_saved_modules import threading + + +def wrapper(fun): + def pydev_after_run_call(): + pass + + def inner(*args, **kwargs): + fun(*args, **kwargs) + pydev_after_run_call() + + return inner + + +def wrap_attr(obj, attr): + t_save_start = getattr(obj, attr) + setattr(obj, attr, wrapper(t_save_start)) + obj._pydev_run_patched = True + + +class ObjectWrapper(object): + def __init__(self, obj): + self.wrapped_object = obj + try: + import functools + + functools.update_wrapper(self, obj) + except: + pass + + def __getattr__(self, attr): + orig_attr = getattr(self.wrapped_object, attr) # .__getattribute__(attr) + if callable(orig_attr): + + def patched_attr(*args, **kwargs): + self.call_begin(attr) + result = orig_attr(*args, **kwargs) + self.call_end(attr) + if result == self.wrapped_object: + return self + return result + + return patched_attr + else: + return orig_attr + + def call_begin(self, attr): + pass + + def call_end(self, attr): + pass + + def __enter__(self): + self.call_begin("__enter__") + self.wrapped_object.__enter__() + self.call_end("__enter__") + + def __exit__(self, exc_type, exc_val, exc_tb): + self.call_begin("__exit__") + self.wrapped_object.__exit__(exc_type, exc_val, exc_tb) + + +def factory_wrapper(fun): + def inner(*args, **kwargs): + obj = fun(*args, **kwargs) + return ObjectWrapper(obj) + + return inner + + +def wrap_threads(): + # TODO: add wrappers for thread and _thread + # import _thread as mod + # print("Thread imported") + # mod.start_new_thread = wrapper(mod.start_new_thread) + threading.Lock = factory_wrapper(threading.Lock) + threading.RLock = factory_wrapper(threading.RLock) + + # queue patching + import queue # @UnresolvedImport + + queue.Queue = factory_wrapper(queue.Queue) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_console.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_console.py new file mode 100644 index 0000000..9221f68 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_console.py @@ -0,0 +1,265 @@ +"""An helper file for the pydev debugger (REPL) console +""" +import sys +import traceback +from _pydevd_bundle.pydevconsole_code import InteractiveConsole, _EvalAwaitInNewEventLoop +from _pydev_bundle import _pydev_completer +from _pydev_bundle.pydev_console_utils import BaseInterpreterInterface, BaseStdIn +from _pydev_bundle.pydev_imports import Exec +from _pydev_bundle.pydev_override import overrides +from _pydevd_bundle import pydevd_save_locals +from _pydevd_bundle.pydevd_io import IOBuf +from pydevd_tracing import get_exception_traceback_str +from _pydevd_bundle.pydevd_xml import make_valid_xml_value +import inspect +from _pydevd_bundle.pydevd_save_locals import update_globals_and_locals + +CONSOLE_OUTPUT = "output" +CONSOLE_ERROR = "error" + + +# ======================================================================================================================= +# ConsoleMessage +# ======================================================================================================================= +class ConsoleMessage: + """Console Messages""" + + def __init__(self): + self.more = False + # List of tuple [('error', 'error_message'), ('message_list', 'output_message')] + self.console_messages = [] + + def add_console_message(self, message_type, message): + """add messages in the console_messages list""" + for m in message.split("\n"): + if m.strip(): + self.console_messages.append((message_type, m)) + + def update_more(self, more): + """more is set to true if further input is required from the user + else more is set to false + """ + self.more = more + + def to_xml(self): + """Create an XML for console message_list, error and more (true/false) + + console message_list + console error + true/false + + """ + makeValid = make_valid_xml_value + + xml = "%s" % (self.more) + + for message_type, message in self.console_messages: + xml += '<%s message="%s">' % (message_type, makeValid(message), message_type) + + xml += "" + + return xml + + +# ======================================================================================================================= +# _DebugConsoleStdIn +# ======================================================================================================================= +class _DebugConsoleStdIn(BaseStdIn): + @overrides(BaseStdIn.readline) + def readline(self, *args, **kwargs): + sys.stderr.write("Warning: Reading from stdin is still not supported in this console.\n") + return "\n" + + +# ======================================================================================================================= +# DebugConsole +# ======================================================================================================================= +class DebugConsole(InteractiveConsole, BaseInterpreterInterface): + """Wrapper around code.InteractiveConsole, in order to send + errors and outputs to the debug console + """ + + @overrides(BaseInterpreterInterface.create_std_in) + def create_std_in(self, *args, **kwargs): + try: + if not self.__buffer_output: + return sys.stdin + except: + pass + + return _DebugConsoleStdIn() # If buffered, raw_input is not supported in this console. + + @overrides(InteractiveConsole.push) + def push(self, line, frame, buffer_output=True): + """Change built-in stdout and stderr methods by the + new custom StdMessage. + execute the InteractiveConsole.push. + Change the stdout and stderr back be the original built-ins + + :param buffer_output: if False won't redirect the output. + + Return boolean (True if more input is required else False), + output_messages and input_messages + """ + self.__buffer_output = buffer_output + more = False + if buffer_output: + original_stdout = sys.stdout + original_stderr = sys.stderr + try: + try: + self.frame = frame + if buffer_output: + out = sys.stdout = IOBuf() + err = sys.stderr = IOBuf() + more = self.add_exec(line) + except Exception: + exc = get_exception_traceback_str() + if buffer_output: + err.buflist.append("Internal Error: %s" % (exc,)) + else: + sys.stderr.write("Internal Error: %s\n" % (exc,)) + finally: + # Remove frame references. + self.frame = None + frame = None + if buffer_output: + sys.stdout = original_stdout + sys.stderr = original_stderr + + if buffer_output: + return more, out.buflist, err.buflist + else: + return more, [], [] + + @overrides(BaseInterpreterInterface.do_add_exec) + def do_add_exec(self, line): + return InteractiveConsole.push(self, line) + + @overrides(InteractiveConsole.runcode) + def runcode(self, code): + """Execute a code object. + + When an exception occurs, self.showtraceback() is called to + display a traceback. All exceptions are caught except + SystemExit, which is reraised. + + A note about KeyboardInterrupt: this exception may occur + elsewhere in this code, and may not always be caught. The + caller should be prepared to deal with it. + + """ + try: + updated_globals = self.get_namespace() + initial_globals = updated_globals.copy() + + updated_locals = None + + is_async = False + if hasattr(inspect, "CO_COROUTINE"): + is_async = inspect.CO_COROUTINE & code.co_flags == inspect.CO_COROUTINE + + if is_async: + t = _EvalAwaitInNewEventLoop(code, updated_globals, updated_locals) + t.start() + t.join() + + update_globals_and_locals(updated_globals, initial_globals, self.frame) + if t.exc: + raise t.exc[1].with_traceback(t.exc[2]) + + else: + try: + exec(code, updated_globals, updated_locals) + finally: + update_globals_and_locals(updated_globals, initial_globals, self.frame) + except SystemExit: + raise + except: + # In case sys.excepthook called, use original excepthook #PyDev-877: Debug console freezes with Python 3.5+ + # (showtraceback does it on python 3.5 onwards) + sys.excepthook = sys.__excepthook__ + try: + self.showtraceback() + finally: + sys.__excepthook__ = sys.excepthook + + def get_namespace(self): + dbg_namespace = {} + dbg_namespace.update(self.frame.f_globals) + dbg_namespace.update(self.frame.f_locals) # locals later because it has precedence over the actual globals + return dbg_namespace + + +# ======================================================================================================================= +# InteractiveConsoleCache +# ======================================================================================================================= +class InteractiveConsoleCache: + thread_id = None + frame_id = None + interactive_console_instance = None + + +# Note: On Jython 2.1 we can't use classmethod or staticmethod, so, just make the functions below free-functions. +def get_interactive_console(thread_id, frame_id, frame, console_message): + """returns the global interactive console. + interactive console should have been initialized by this time + :rtype: DebugConsole + """ + if InteractiveConsoleCache.thread_id == thread_id and InteractiveConsoleCache.frame_id == frame_id: + return InteractiveConsoleCache.interactive_console_instance + + InteractiveConsoleCache.interactive_console_instance = DebugConsole() + InteractiveConsoleCache.thread_id = thread_id + InteractiveConsoleCache.frame_id = frame_id + + console_stacktrace = traceback.extract_stack(frame, limit=1) + if console_stacktrace: + current_context = console_stacktrace[0] # top entry from stacktrace + context_message = 'File "%s", line %s, in %s' % (current_context[0], current_context[1], current_context[2]) + console_message.add_console_message(CONSOLE_OUTPUT, "[Current context]: %s" % (context_message,)) + return InteractiveConsoleCache.interactive_console_instance + + +def clear_interactive_console(): + InteractiveConsoleCache.thread_id = None + InteractiveConsoleCache.frame_id = None + InteractiveConsoleCache.interactive_console_instance = None + + +def execute_console_command(frame, thread_id, frame_id, line, buffer_output=True): + """fetch an interactive console instance from the cache and + push the received command to the console. + + create and return an instance of console_message + """ + console_message = ConsoleMessage() + + interpreter = get_interactive_console(thread_id, frame_id, frame, console_message) + more, output_messages, error_messages = interpreter.push(line, frame, buffer_output) + console_message.update_more(more) + + for message in output_messages: + console_message.add_console_message(CONSOLE_OUTPUT, message) + + for message in error_messages: + console_message.add_console_message(CONSOLE_ERROR, message) + + return console_message + + +def get_description(frame, thread_id, frame_id, expression): + console_message = ConsoleMessage() + interpreter = get_interactive_console(thread_id, frame_id, frame, console_message) + try: + interpreter.frame = frame + return interpreter.getDescription(expression) + finally: + interpreter.frame = None + + +def get_completions(frame, act_tok): + """fetch all completions, create xml for the same + return the completions xml + """ + return _pydev_completer.generate_completions_as_xml(frame, act_tok) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_constants.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_constants.py new file mode 100644 index 0000000..5a97a25 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_constants.py @@ -0,0 +1,847 @@ +""" +This module holds the constants used for specifying the states of the debugger. +""" + +from __future__ import nested_scopes +import platform +import weakref +import struct +import warnings +import functools +from contextlib import contextmanager + +STATE_RUN = 1 +STATE_SUSPEND = 2 + +PYTHON_SUSPEND = 1 +DJANGO_SUSPEND = 2 +JINJA2_SUSPEND = 3 + +int_types = (int,) + +# types does not include a MethodWrapperType +try: + MethodWrapperType = type([].__str__) +except: + MethodWrapperType = None + +import sys # Note: the sys import must be here anyways (others depend on it) + +# Preload codecs to avoid imports to them later on which can potentially halt the debugger. +import codecs as _codecs + +for _codec in ["ascii", "utf8", "utf-8", "latin1", "latin-1", "idna"]: + _codecs.lookup(_codec) + + +class DebugInfoHolder: + # we have to put it here because it can be set through the command line (so, the + # already imported references would not have it). + + # General information + DEBUG_TRACE_LEVEL = 0 # 0 = critical, 1 = info, 2 = debug, 3 = verbose + + PYDEVD_DEBUG_FILE = None + + +# Any filename that starts with these strings is not traced nor shown to the user. +# In Python 3.7 " ..." can appear and should be ignored for the user. +# has special heuristics to know whether it should be traced or not (it's part of +# user code when it's the used in python -c and part of the library otherwise). + +# Any filename that starts with these strings is considered user (project) code. Note +# that files for which we have a source mapping are also considered as a part of the project. +USER_CODE_BASENAMES_STARTING_WITH = (" (2**32) + +IS_JYTHON = pydevd_vm_type.get_vm_type() == pydevd_vm_type.PydevdVmType.JYTHON + +IS_PYPY = platform.python_implementation() == "PyPy" + +if IS_JYTHON: + import java.lang.System # @UnresolvedImport + + IS_WINDOWS = java.lang.System.getProperty("os.name").lower().startswith("windows") + +USE_CUSTOM_SYS_CURRENT_FRAMES = not hasattr(sys, "_current_frames") or IS_PYPY +USE_CUSTOM_SYS_CURRENT_FRAMES_MAP = USE_CUSTOM_SYS_CURRENT_FRAMES and (IS_PYPY or IS_IRONPYTHON) + +if USE_CUSTOM_SYS_CURRENT_FRAMES: + # Some versions of Jython don't have it (but we can provide a replacement) + if IS_JYTHON: + from java.lang import NoSuchFieldException + from org.python.core import ThreadStateMapping + + try: + cachedThreadState = ThreadStateMapping.getDeclaredField("globalThreadStates") # Dev version + except NoSuchFieldException: + cachedThreadState = ThreadStateMapping.getDeclaredField("cachedThreadState") # Release Jython 2.7.0 + cachedThreadState.accessible = True + thread_states = cachedThreadState.get(ThreadStateMapping) + + def _current_frames(): + as_array = thread_states.entrySet().toArray() + ret = {} + for thread_to_state in as_array: + thread = thread_to_state.getKey() + if thread is None: + continue + thread_state = thread_to_state.getValue() + if thread_state is None: + continue + + frame = thread_state.frame + if frame is None: + continue + + ret[thread.getId()] = frame + return ret + + elif USE_CUSTOM_SYS_CURRENT_FRAMES_MAP: + constructed_tid_to_last_frame = {} + + # IronPython doesn't have it. Let's use our workaround... + def _current_frames(): + return constructed_tid_to_last_frame + + else: + raise RuntimeError("Unable to proceed (sys._current_frames not available in this Python implementation).") +else: + _current_frames = sys._current_frames + +IS_PYTHON_STACKLESS = "stackless" in sys.version.lower() +CYTHON_SUPPORTED = False + +python_implementation = platform.python_implementation() +if python_implementation == "CPython": + # Only available for CPython! + CYTHON_SUPPORTED = True + +# ======================================================================================================================= +# Python 3? +# ======================================================================================================================= +IS_PY36_OR_GREATER = sys.version_info >= (3, 6) +IS_PY37_OR_GREATER = sys.version_info >= (3, 7) +IS_PY38_OR_GREATER = sys.version_info >= (3, 8) +IS_PY39_OR_GREATER = sys.version_info >= (3, 9) +IS_PY310_OR_GREATER = sys.version_info >= (3, 10) +IS_PY311_OR_GREATER = sys.version_info >= (3, 11) +IS_PY312_OR_GREATER = sys.version_info >= (3, 12) +IS_PY313_OR_GREATER = sys.version_info >= (3, 13) +IS_PY314_OR_GREATER = sys.version_info >= (3, 14) + +# Bug affecting Python 3.13.0 specifically makes some tests crash the interpreter! +# Hopefully it'll be fixed in 3.13.1. +IS_PY313_0 = sys.version_info[:3] == (3, 13, 0) + +# Mark tests that need to be fixed with this. +TODO_PY313_OR_GREATER = IS_PY313_OR_GREATER + +# Not currently supported in Python 3.14. +SUPPORT_ATTACH_TO_PID = not IS_PY314_OR_GREATER + + +def version_str(v): + return ".".join((str(x) for x in v[:3])) + "".join((str(x) for x in v[3:])) + + +PY_VERSION_STR = version_str(sys.version_info) +try: + PY_IMPL_VERSION_STR = version_str(sys.implementation.version) +except AttributeError: + PY_IMPL_VERSION_STR = "" + +try: + PY_IMPL_NAME = sys.implementation.name +except AttributeError: + PY_IMPL_NAME = "" + +ENV_TRUE_LOWER_VALUES = ("yes", "true", "1") +ENV_FALSE_LOWER_VALUES = ("no", "false", "0") + +PYDEVD_USE_SYS_MONITORING = IS_PY312_OR_GREATER and hasattr(sys, "monitoring") +if PYDEVD_USE_SYS_MONITORING: # Default gotten, let's see if it was somehow customize by the user. + _use_sys_monitoring_env_var = os.getenv("PYDEVD_USE_SYS_MONITORING", "").lower() + if _use_sys_monitoring_env_var: + # Check if the user specified something. + if _use_sys_monitoring_env_var in ENV_FALSE_LOWER_VALUES: + PYDEVD_USE_SYS_MONITORING = False + elif _use_sys_monitoring_env_var in ENV_TRUE_LOWER_VALUES: + PYDEVD_USE_SYS_MONITORING = True + else: + raise RuntimeError("Unrecognized value for PYDEVD_USE_SYS_MONITORING: %s" % (_use_sys_monitoring_env_var,)) + + +def is_true_in_env(env_key): + if isinstance(env_key, tuple): + # If a tuple, return True if any of those ends up being true. + for v in env_key: + if is_true_in_env(v): + return True + return False + else: + return os.getenv(env_key, "").lower() in ENV_TRUE_LOWER_VALUES + + +def as_float_in_env(env_key, default): + value = os.getenv(env_key) + if value is None: + return default + try: + return float(value) + except Exception: + raise RuntimeError("Error: expected the env variable: %s to be set to a float value. Found: %s" % (env_key, value)) + + +def as_int_in_env(env_key, default): + value = os.getenv(env_key) + if value is None: + return default + try: + return int(value) + except Exception: + raise RuntimeError("Error: expected the env variable: %s to be set to a int value. Found: %s" % (env_key, value)) + + +# If true in env, use gevent mode. +SUPPORT_GEVENT = is_true_in_env("GEVENT_SUPPORT") + +# Opt-in support to show gevent paused greenlets. False by default because if too many greenlets are +# paused the UI can slow-down (i.e.: if 1000 greenlets are paused, each one would be shown separate +# as a different thread, but if the UI isn't optimized for that the experience is lacking...). +GEVENT_SHOW_PAUSED_GREENLETS = is_true_in_env("GEVENT_SHOW_PAUSED_GREENLETS") + +DISABLE_FILE_VALIDATION = is_true_in_env("PYDEVD_DISABLE_FILE_VALIDATION") + +GEVENT_SUPPORT_NOT_SET_MSG = os.getenv( + "GEVENT_SUPPORT_NOT_SET_MSG", + "It seems that the gevent monkey-patching is being used.\n" + "Please set an environment variable with:\n" + "GEVENT_SUPPORT=True\n" + "to enable gevent support in the debugger.", +) + +USE_LIB_COPY = SUPPORT_GEVENT + +INTERACTIVE_MODE_AVAILABLE = sys.platform in ("darwin", "win32") or os.getenv("DISPLAY") is not None + +# If true in env, forces cython to be used (raises error if not available). +# If false in env, disables it. +# If not specified, uses default heuristic to determine if it should be loaded. +USE_CYTHON_FLAG = os.getenv("PYDEVD_USE_CYTHON") + +if USE_CYTHON_FLAG is not None: + USE_CYTHON_FLAG = USE_CYTHON_FLAG.lower() + if USE_CYTHON_FLAG not in ENV_TRUE_LOWER_VALUES and USE_CYTHON_FLAG not in ENV_FALSE_LOWER_VALUES: + raise RuntimeError( + "Unexpected value for PYDEVD_USE_CYTHON: %s (enable with one of: %s, disable with one of: %s)" + % (USE_CYTHON_FLAG, ENV_TRUE_LOWER_VALUES, ENV_FALSE_LOWER_VALUES) + ) + +else: + if not CYTHON_SUPPORTED: + USE_CYTHON_FLAG = "no" + +# If true in env, forces frame eval to be used (raises error if not available). +# If false in env, disables it. +# If not specified, uses default heuristic to determine if it should be loaded. +PYDEVD_USE_FRAME_EVAL = os.getenv("PYDEVD_USE_FRAME_EVAL", "").lower() + +# Values used to determine how much container items will be shown. +# PYDEVD_CONTAINER_INITIAL_EXPANDED_ITEMS: +# - Defines how many items will appear initially expanded after which a 'more...' will appear. +# +# PYDEVD_CONTAINER_BUCKET_SIZE +# - Defines the size of each bucket inside the 'more...' item +# i.e.: a bucket with size == 2 would show items such as: +# - [2:4] +# - [4:6] +# ... +# +# PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS +# - Defines the maximum number of items for dicts and sets. +# +PYDEVD_CONTAINER_INITIAL_EXPANDED_ITEMS = as_int_in_env("PYDEVD_CONTAINER_INITIAL_EXPANDED_ITEMS", 100) +PYDEVD_CONTAINER_BUCKET_SIZE = as_int_in_env("PYDEVD_CONTAINER_BUCKET_SIZE", 1000) +PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS = as_int_in_env("PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS", 500) +PYDEVD_CONTAINER_NUMPY_MAX_ITEMS = as_int_in_env("PYDEVD_CONTAINER_NUMPY_MAX_ITEMS", 500) + +PYDEVD_IPYTHON_COMPATIBLE_DEBUGGING = is_true_in_env("PYDEVD_IPYTHON_COMPATIBLE_DEBUGGING") + +# If specified in PYDEVD_IPYTHON_CONTEXT it must be a string with the basename +# and then the name of 2 methods in which the evaluate is done. +PYDEVD_IPYTHON_CONTEXT = ("interactiveshell.py", "run_code", "run_ast_nodes") +_ipython_ctx = os.getenv("PYDEVD_IPYTHON_CONTEXT") +if _ipython_ctx: + PYDEVD_IPYTHON_CONTEXT = tuple(x.strip() for x in _ipython_ctx.split(",")) + assert len(PYDEVD_IPYTHON_CONTEXT) == 3, "Invalid PYDEVD_IPYTHON_CONTEXT: %s" % (_ipython_ctx,) + +# Use to disable loading the lib to set tracing to all threads (default is using heuristics based on where we're running). +LOAD_NATIVE_LIB_FLAG = os.getenv("PYDEVD_LOAD_NATIVE_LIB", "").lower() + +LOG_TIME = os.getenv("PYDEVD_LOG_TIME", "true").lower() in ENV_TRUE_LOWER_VALUES + +SHOW_COMPILE_CYTHON_COMMAND_LINE = is_true_in_env("PYDEVD_SHOW_COMPILE_CYTHON_COMMAND_LINE") + +LOAD_VALUES_ASYNC = is_true_in_env("PYDEVD_LOAD_VALUES_ASYNC") +DEFAULT_VALUE = "__pydevd_value_async" +ASYNC_EVAL_TIMEOUT_SEC = 60 +NEXT_VALUE_SEPARATOR = "__pydev_val__" +BUILTINS_MODULE_NAME = "builtins" + +# Pandas customization. +PANDAS_MAX_ROWS = as_int_in_env("PYDEVD_PANDAS_MAX_ROWS", 60) +PANDAS_MAX_COLS = as_int_in_env("PYDEVD_PANDAS_MAX_COLS", 10) +PANDAS_MAX_COLWIDTH = as_int_in_env("PYDEVD_PANDAS_MAX_COLWIDTH", 50) + +# If getting an attribute or computing some value is too slow, let the user know if the given timeout elapses. +PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT = as_float_in_env("PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT", 0.50) + +# This timeout is used to track the time to send a message saying that the evaluation +# is taking too long and possible mitigations. +PYDEVD_WARN_EVALUATION_TIMEOUT = as_float_in_env("PYDEVD_WARN_EVALUATION_TIMEOUT", 3.0) + +# If True in env shows a thread dump when the evaluation times out. +PYDEVD_THREAD_DUMP_ON_WARN_EVALUATION_TIMEOUT = is_true_in_env("PYDEVD_THREAD_DUMP_ON_WARN_EVALUATION_TIMEOUT") + +# This timeout is used only when the mode that all threads are stopped/resumed at once is used +# (i.e.: multi_threads_single_notification) +# +# In this mode, if some evaluation doesn't finish until this timeout, we notify the user +# and then resume all threads until the evaluation finishes. +# +# A negative value will disable the timeout and a value of 0 will automatically run all threads +# (without any notification) when the evaluation is started and pause all threads when the +# evaluation is finished. A positive value will run run all threads after the timeout +# elapses. +PYDEVD_UNBLOCK_THREADS_TIMEOUT = as_float_in_env("PYDEVD_UNBLOCK_THREADS_TIMEOUT", -1.0) + +# Timeout to interrupt a thread (so, if some evaluation doesn't finish until this +# timeout, the thread doing the evaluation is interrupted). +# A value <= 0 means this is disabled. +# See: _pydevd_bundle.pydevd_timeout.create_interrupt_this_thread_callback for details +# on how the thread interruption works (there are some caveats related to it). +PYDEVD_INTERRUPT_THREAD_TIMEOUT = as_float_in_env("PYDEVD_INTERRUPT_THREAD_TIMEOUT", -1) + +# If PYDEVD_APPLY_PATCHING_TO_HIDE_PYDEVD_THREADS is set to False, the patching to hide pydevd threads won't be applied. +PYDEVD_APPLY_PATCHING_TO_HIDE_PYDEVD_THREADS = ( + os.getenv("PYDEVD_APPLY_PATCHING_TO_HIDE_PYDEVD_THREADS", "true").lower() in ENV_TRUE_LOWER_VALUES +) + +EXCEPTION_TYPE_UNHANDLED = "UNHANDLED" +EXCEPTION_TYPE_USER_UNHANDLED = "USER_UNHANDLED" +EXCEPTION_TYPE_HANDLED = "HANDLED" + +SHOW_DEBUG_INFO_ENV = is_true_in_env(("PYCHARM_DEBUG", "PYDEV_DEBUG", "PYDEVD_DEBUG")) + +if SHOW_DEBUG_INFO_ENV: + # show debug info before the debugger start + DebugInfoHolder.DEBUG_TRACE_LEVEL = 3 + +DebugInfoHolder.PYDEVD_DEBUG_FILE = os.getenv("PYDEVD_DEBUG_FILE") + + +def protect_libraries_from_patching(): + """ + In this function we delete some modules from `sys.modules` dictionary and import them again inside + `_pydev_saved_modules` in order to save their original copies there. After that we can use these + saved modules within the debugger to protect them from patching by external libraries (e.g. gevent). + """ + patched = [ + "threading", + "thread", + "_thread", + "time", + "socket", + "queue", + "select", + "xmlrpclib", + "SimpleXMLRPCServer", + "BaseHTTPServer", + "SocketServer", + "xmlrpc.client", + "xmlrpc.server", + "http.server", + "socketserver", + ] + + for name in patched: + try: + __import__(name) + except: + pass + + patched_modules = dict([(k, v) for k, v in sys.modules.items() if k in patched]) + + for name in patched_modules: + del sys.modules[name] + + # import for side effects + import _pydev_bundle._pydev_saved_modules + + for name in patched_modules: + sys.modules[name] = patched_modules[name] + + +if USE_LIB_COPY: + protect_libraries_from_patching() + +from _pydev_bundle._pydev_saved_modules import thread, threading + +_fork_safe_locks = [] + +if IS_JYTHON: + + def ForkSafeLock(rlock=False): + if rlock: + return threading.RLock() + else: + return threading.Lock() + +else: + + class ForkSafeLock(object): + """ + A lock which is fork-safe (when a fork is done, `pydevd_constants.after_fork()` + should be called to reset the locks in the new process to avoid deadlocks + from a lock which was locked during the fork). + + Note: + Unlike `threading.Lock` this class is not completely atomic, so, doing: + + lock = ForkSafeLock() + with lock: + ... + + is different than using `threading.Lock` directly because the tracing may + find an additional function call on `__enter__` and on `__exit__`, so, it's + not recommended to use this in all places, only where the forking may be important + (so, for instance, the locks on PyDB should not be changed to this lock because + of that -- and those should all be collected in the new process because PyDB itself + should be completely cleared anyways). + + It's possible to overcome this limitation by using `ForkSafeLock.acquire` and + `ForkSafeLock.release` instead of the context manager (as acquire/release are + bound to the original implementation, whereas __enter__/__exit__ is not due to Python + limitations). + """ + + def __init__(self, rlock=False): + self._rlock = rlock + self._init() + _fork_safe_locks.append(weakref.ref(self)) + + def __enter__(self): + return self._lock.__enter__() + + def __exit__(self, exc_type, exc_val, exc_tb): + return self._lock.__exit__(exc_type, exc_val, exc_tb) + + def _init(self): + if self._rlock: + self._lock = threading.RLock() + else: + self._lock = thread.allocate_lock() + + self.acquire = self._lock.acquire + self.release = self._lock.release + _fork_safe_locks.append(weakref.ref(self)) + + +def after_fork(): + """ + Must be called after a fork operation (will reset the ForkSafeLock). + """ + global _fork_safe_locks + locks = _fork_safe_locks[:] + _fork_safe_locks = [] + for lock in locks: + lock = lock() + if lock is not None: + lock._init() + + +_thread_id_lock = ForkSafeLock() +thread_get_ident = thread.get_ident + + +def as_str(s): + assert isinstance(s, str) + return s + + +@contextmanager +def filter_all_warnings(): + with warnings.catch_warnings(): + warnings.filterwarnings("ignore") + yield + + +def silence_warnings_decorator(func): + @functools.wraps(func) + def new_func(*args, **kwargs): + with filter_all_warnings(): + return func(*args, **kwargs) + + return new_func + + +def sorted_dict_repr(d): + s = sorted(d.items(), key=lambda x: str(x[0])) + return "{" + ", ".join(("%r: %r" % x) for x in s) + "}" + + +def iter_chars(b): + # In Python 2, we can iterate bytes or str with individual characters, but Python 3 onwards + # changed that behavior so that when iterating bytes we actually get ints! + if isinstance(b, bytes): + # i.e.: do something as struct.unpack('3c', b) + return iter(struct.unpack(str(len(b)) + "c", b)) + return iter(b) + + +if IS_JYTHON or PYDEVD_USE_SYS_MONITORING: + + def NO_FTRACE(frame, event, arg): + return None + +else: + _curr_trace = sys.gettrace() + + # Set a temporary trace which does nothing for us to test (otherwise setting frame.f_trace has no + # effect). + def _temp_trace(frame, event, arg): + return None + + sys.settrace(_temp_trace) + + def _check_ftrace_set_none(): + """ + Will throw an error when executing a line event + """ + sys._getframe().f_trace = None + _line_event = 1 + _line_event = 2 + + try: + _check_ftrace_set_none() + + def NO_FTRACE(frame, event, arg): + frame.f_trace = None + return None + + except TypeError: + + def NO_FTRACE(frame, event, arg): + # In Python <= 2.6 and <= 3.4, if we're tracing a method, frame.f_trace may not be set + # to None, it must always be set to a tracing function. + # See: tests_python.test_tracing_gotchas.test_tracing_gotchas + # + # Note: Python 2.7 sometimes works and sometimes it doesn't depending on the minor + # version because of https://bugs.python.org/issue20041 (although bug reports didn't + # include the minor version, so, mark for any Python 2.7 as I'm not completely sure + # the fix in later 2.7 versions is the same one we're dealing with). + return None + + sys.settrace(_curr_trace) + + +# ======================================================================================================================= +# get_pid +# ======================================================================================================================= +def get_pid(): + try: + return os.getpid() + except AttributeError: + try: + # Jython does not have it! + import java.lang.management.ManagementFactory # @UnresolvedImport -- just for jython + + pid = java.lang.management.ManagementFactory.getRuntimeMXBean().getName() + return pid.replace("@", "_") + except: + # ok, no pid available (will be unable to debug multiple processes) + return "000001" + + +def clear_cached_thread_id(thread): + with _thread_id_lock: + try: + if thread.__pydevd_id__ != "console_main": + # The console_main is a special thread id used in the console and its id should never be reset + # (otherwise we may no longer be able to get its variables -- see: https://www.brainwy.com/tracker/PyDev/776). + del thread.__pydevd_id__ + except AttributeError: + pass + + +# Don't let threads be collected (so that id(thread) is guaranteed to be unique). +_thread_id_to_thread_found = {} + + +def _get_or_compute_thread_id_with_lock(thread, is_current_thread): + with _thread_id_lock: + # We do a new check with the lock in place just to be sure that nothing changed + tid = getattr(thread, "__pydevd_id__", None) + if tid is not None: + return tid + + _thread_id_to_thread_found[id(thread)] = thread + + # Note: don't use thread.ident because a new thread may have the + # same id from an old thread. + pid = get_pid() + tid = "pid_%s_id_%s" % (pid, id(thread)) + + thread.__pydevd_id__ = tid + + return tid + + +def get_current_thread_id(thread): + """ + Note: the difference from get_current_thread_id to get_thread_id is that + for the current thread we can get the thread id while the thread.ident + is still not set in the Thread instance. + """ + try: + # Fast path without getting lock. + tid = thread.__pydevd_id__ + if tid is None: + # Fix for https://www.brainwy.com/tracker/PyDev/645 + # if __pydevd_id__ is None, recalculate it... also, use an heuristic + # that gives us always the same id for the thread (using thread.ident or id(thread)). + raise AttributeError() + except AttributeError: + tid = _get_or_compute_thread_id_with_lock(thread, is_current_thread=True) + + return tid + + +def get_thread_id(thread): + try: + # Fast path without getting lock. + tid = thread.__pydevd_id__ + if tid is None: + # Fix for https://www.brainwy.com/tracker/PyDev/645 + # if __pydevd_id__ is None, recalculate it... also, use an heuristic + # that gives us always the same id for the thread (using thread.ident or id(thread)). + raise AttributeError() + except AttributeError: + tid = _get_or_compute_thread_id_with_lock(thread, is_current_thread=False) + + return tid + + +def set_thread_id(thread, thread_id): + with _thread_id_lock: + thread.__pydevd_id__ = thread_id + + +# ======================================================================================================================= +# Null +# ======================================================================================================================= +class Null: + """ + Gotten from: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/68205 + """ + + def __init__(self, *args, **kwargs): + return None + + def __call__(self, *args, **kwargs): + return self + + def __enter__(self, *args, **kwargs): + return self + + def __exit__(self, *args, **kwargs): + return self + + def __getattr__(self, mname): + if len(mname) > 4 and mname[:2] == "__" and mname[-2:] == "__": + # Don't pretend to implement special method names. + raise AttributeError(mname) + return self + + def __setattr__(self, name, value): + return self + + def __delattr__(self, name): + return self + + def __repr__(self): + return "" + + def __str__(self): + return "Null" + + def __len__(self): + return 0 + + def __getitem__(self): + return self + + def __setitem__(self, *args, **kwargs): + pass + + def write(self, *args, **kwargs): + pass + + def __nonzero__(self): + return 0 + + def __iter__(self): + return iter(()) + + +# Default instance +NULL = Null() + + +class KeyifyList(object): + def __init__(self, inner, key): + self.inner = inner + self.key = key + + def __len__(self): + return len(self.inner) + + def __getitem__(self, k): + return self.key(self.inner[k]) + + +def call_only_once(func): + """ + To be used as a decorator + + @call_only_once + def func(): + print 'Calling func only this time' + + Actually, in PyDev it must be called as: + + func = call_only_once(func) to support older versions of Python. + """ + + def new_func(*args, **kwargs): + if not new_func._called: + new_func._called = True + return func(*args, **kwargs) + + new_func._called = False + return new_func + + +# Protocol where each line is a new message (text is quoted to prevent new lines). +# payload is xml +QUOTED_LINE_PROTOCOL = "quoted-line" +ARGUMENT_QUOTED_LINE_PROTOCOL = "protocol-quoted-line" + +# Uses http protocol to provide a new message. +# i.e.: Content-Length:xxx\r\n\r\npayload +# payload is xml +HTTP_PROTOCOL = "http" +ARGUMENT_HTTP_PROTOCOL = "protocol-http" + +# Message is sent without any header. +# payload is json +JSON_PROTOCOL = "json" +ARGUMENT_JSON_PROTOCOL = "json-dap" + +# Same header as the HTTP_PROTOCOL +# payload is json +HTTP_JSON_PROTOCOL = "http_json" +ARGUMENT_HTTP_JSON_PROTOCOL = "json-dap-http" + +ARGUMENT_PPID = "ppid" + + +class _GlobalSettings: + protocol = QUOTED_LINE_PROTOCOL + + +def set_protocol(protocol): + expected = (HTTP_PROTOCOL, QUOTED_LINE_PROTOCOL, JSON_PROTOCOL, HTTP_JSON_PROTOCOL) + assert protocol in expected, "Protocol (%s) should be one of: %s" % (protocol, expected) + + _GlobalSettings.protocol = protocol + + +def get_protocol(): + return _GlobalSettings.protocol + + +def is_json_protocol(): + return _GlobalSettings.protocol in (JSON_PROTOCOL, HTTP_JSON_PROTOCOL) + + +class GlobalDebuggerHolder: + """ + Holder for the global debugger. + """ + + global_dbg = None # Note: don't rename (the name is used in our attach to process) + + +def get_global_debugger(): + return GlobalDebuggerHolder.global_dbg + + +GetGlobalDebugger = get_global_debugger # Backward-compatibility + + +def set_global_debugger(dbg): + GlobalDebuggerHolder.global_dbg = dbg + + +if __name__ == "__main__": + if Null(): + sys.stdout.write("here\n") diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py new file mode 100644 index 0000000..65c83c4 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py @@ -0,0 +1,114 @@ +from _pydevd_bundle.pydevd_constants import get_current_thread_id, Null, ForkSafeLock +from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame +from _pydev_bundle._pydev_saved_modules import thread, threading +import sys +from _pydev_bundle import pydev_log + +DEBUG = False + + +class CustomFramesContainer: + # Actual Values initialized later on. + custom_frames_lock = None # : :type custom_frames_lock: threading.Lock + + custom_frames = None + + _next_frame_id = None + + _py_db_command_thread_event = None + + +def custom_frames_container_init(): # Note: no staticmethod on jython 2.1 (so, use free-function) + CustomFramesContainer.custom_frames_lock = ForkSafeLock() + + # custom_frames can only be accessed if properly locked with custom_frames_lock! + # Key is a string identifying the frame (as well as the thread it belongs to). + # Value is a CustomFrame. + # + CustomFramesContainer.custom_frames = {} + + # Only to be used in this module + CustomFramesContainer._next_frame_id = 0 + + # This is the event we must set to release an internal process events. It's later set by the actual debugger + # when we do create the debugger. + CustomFramesContainer._py_db_command_thread_event = Null() + + +# Initialize it the first time (it may be reinitialized later on when dealing with a fork). +custom_frames_container_init() + + +class CustomFrame: + def __init__(self, name, frame, thread_id): + # 0 = string with the representation of that frame + self.name = name + + # 1 = the frame to show + self.frame = frame + + # 2 = an integer identifying the last time the frame was changed. + self.mod_time = 0 + + # 3 = the thread id of the given frame + self.thread_id = thread_id + + +def add_custom_frame(frame, name, thread_id): + """ + It's possible to show paused frames by adding a custom frame through this API (it's + intended to be used for coroutines, but could potentially be used for generators too). + + :param frame: + The topmost frame to be shown paused when a thread with thread.ident == thread_id is paused. + + :param name: + The name to be shown for the custom thread in the UI. + + :param thread_id: + The thread id to which this frame is related (must match thread.ident). + + :return: str + Returns the custom thread id which will be used to show the given frame paused. + """ + with CustomFramesContainer.custom_frames_lock: + curr_thread_id = get_current_thread_id(threading.current_thread()) + next_id = CustomFramesContainer._next_frame_id = CustomFramesContainer._next_frame_id + 1 + + # Note: the frame id kept contains an id and thread information on the thread where the frame was added + # so that later on we can check if the frame is from the current thread by doing frame_id.endswith('|'+thread_id). + frame_custom_thread_id = "__frame__:%s|%s" % (next_id, curr_thread_id) + if DEBUG: + sys.stderr.write( + "add_custom_frame: %s (%s) %s %s\n" + % (frame_custom_thread_id, get_abs_path_real_path_and_base_from_frame(frame)[-1], frame.f_lineno, frame.f_code.co_name) + ) + + CustomFramesContainer.custom_frames[frame_custom_thread_id] = CustomFrame(name, frame, thread_id) + CustomFramesContainer._py_db_command_thread_event.set() + return frame_custom_thread_id + + +def update_custom_frame(frame_custom_thread_id, frame, thread_id, name=None): + with CustomFramesContainer.custom_frames_lock: + if DEBUG: + sys.stderr.write("update_custom_frame: %s\n" % frame_custom_thread_id) + try: + old = CustomFramesContainer.custom_frames[frame_custom_thread_id] + if name is not None: + old.name = name + old.mod_time += 1 + old.thread_id = thread_id + except: + sys.stderr.write("Unable to get frame to replace: %s\n" % (frame_custom_thread_id,)) + pydev_log.exception() + + CustomFramesContainer._py_db_command_thread_event.set() + + +def remove_custom_frame(frame_custom_thread_id): + with CustomFramesContainer.custom_frames_lock: + if DEBUG: + sys.stderr.write("remove_custom_frame: %s\n" % frame_custom_thread_id) + CustomFramesContainer.custom_frames.pop(frame_custom_thread_id, None) + CustomFramesContainer._py_db_command_thread_event.set() diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c new file mode 100644 index 0000000..95fb355 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c @@ -0,0 +1,55557 @@ +/* Generated by Cython 3.0.11 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "_pydevd_bundle.pydevd_cython", + "sources": [ + "_pydevd_bundle/pydevd_cython.pyx" + ] + }, + "module_name": "_pydevd_bundle.pydevd_cython" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +#if defined(CYTHON_LIMITED_API) && 0 + #ifndef Py_LIMITED_API + #if CYTHON_LIMITED_API+0 > 0x03030000 + #define Py_LIMITED_API CYTHON_LIMITED_API + #else + #define Py_LIMITED_API 0x03030000 + #endif + #endif +#endif + +#include "Python.h" +#if PY_VERSION_HEX >= 0x03090000 +#include "internal/pycore_gc.h" +#include "internal/pycore_interp.h" +#endif + +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.7+ or Python 3.3+. +#else +#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API +#define __PYX_EXTRA_ABI_MODULE_NAME "limited" +#else +#define __PYX_EXTRA_ABI_MODULE_NAME "" +#endif +#define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." +#define CYTHON_HEX_VERSION 0x03000BF0 +#define CYTHON_FUTURE_DIVISION 1 +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_NOGIL 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_NOGIL 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_NOGIL 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 1 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_NOGIL 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #ifndef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #endif +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_NOGIL 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #if PY_VERSION_HEX < 0x030400a1 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #elif !defined(CYTHON_USE_TP_FINALIZE) + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #if PY_VERSION_HEX < 0x030600B1 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) + #endif + #if PY_VERSION_HEX < 0x030700A3 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #elif !defined(CYTHON_USE_EXC_INFO_STACK) + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if !defined(CYTHON_VECTORCALL) +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_MAJOR_VERSION < 3 + #include "longintrepr.h" + #endif + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_DefaultClassType PyClass_Type + #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" + #define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } + #ifndef CO_OPTIMIZED + #define CO_OPTIMIZED 0x0001 + #endif + #ifndef CO_NEWLOCALS + #define CO_NEWLOCALS 0x0002 + #endif + #ifndef CO_VARARGS + #define CO_VARARGS 0x0004 + #endif + #ifndef CO_VARKEYWORDS + #define CO_VARKEYWORDS 0x0008 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x0200 + #endif + #ifndef CO_GENERATOR + #define CO_GENERATOR 0x0020 + #endif + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x0080 + #endif +#elif PY_VERSION_HEX >= 0x030B0000 + static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); + if (!empty_bytes) return NULL; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes); + Py_DECREF(empty_bytes); + return result; + } +#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +#endif +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 +#endif +#ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_MAJOR_VERSION >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x030900B1 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif +#if PY_MAJOR_VERSION < 3 + #if CYTHON_COMPILING_IN_PYPY + #if PYPY_VERSION_NUM < 0x07030600 + #if defined(__cplusplus) && __cplusplus >= 201402L + [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]] + #elif defined(__GNUC__) || defined(__clang__) + __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))) + #elif defined(_MSC_VER) + __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")) + #endif + static CYTHON_INLINE int PyGILState_Check(void) { + return 0; + } + #else // PYPY_VERSION_NUM < 0x07030600 + #endif // PYPY_VERSION_NUM < 0x07030600 + #else + static CYTHON_INLINE int PyGILState_Check(void) { + PyThreadState * tstate = _PyThreadState_Current; + return tstate && (tstate == PyGILState_GetThisThreadState()); + } + #endif +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) + #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) + #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v) +#else + #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v) +#endif +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define CYTHON_PEP393_ENABLED 1 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) + #undef PyUnicode_Contains + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode + #define PyObject_Unicode PyObject_Str +#endif +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define __Pyx_Py3Int_Check(op) PyLong_Check(op) + #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#else + #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) + #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #if !defined(_USE_MATH_DEFINES) + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE___pydevd_bundle__pydevd_cython +#define __PYX_HAVE_API___pydevd_bundle__pydevd_cython +/* Early includes */ +#include +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +#include +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = (char) c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#include +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char *__pyx_f[] = { + "_pydevd_bundle\\\\pydevd_cython.pyx", + "_pydevd_bundle\\\\pydevd_cython.pxd", + "", + "type.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo; +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj; +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame; +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper; +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions; +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame; +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer; + +/* "_pydevd_bundle/pydevd_cython.pxd":1 + * cdef class PyDBAdditionalThreadInfo: # <<<<<<<<<<<<<< + * cdef public int pydev_state + * cdef public object pydev_step_stop # Actually, it's a frame or None + */ +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo { + PyObject_HEAD + struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_vtab; + int pydev_state; + PyObject *pydev_step_stop; + int pydev_original_step_cmd; + int pydev_step_cmd; + int pydev_notify_kill; + PyObject *pydev_smart_step_stop; + int pydev_django_resolve_frame; + PyObject *pydev_call_from_jinja2; + PyObject *pydev_call_inside_jinja2; + int is_tracing; + PyObject *conditional_breakpoint_exception; + PyObject *pydev_message; + int suspend_type; + int pydev_next_line; + PyObject *pydev_func_name; + int suspended_at_unhandled; + PyObject *trace_suspend_type; + PyObject *top_level_thread_tracer_no_back_frames; + PyObject *top_level_thread_tracer_unhandled; + PyObject *thread_tracer; + PyObject *step_in_initial_location; + int pydev_smart_parent_offset; + int pydev_smart_child_offset; + PyObject *pydev_smart_step_into_variants; + PyObject *target_id_to_smart_step_into_variant; + int pydev_use_scoped_step_frame; + PyObject *weak_thread; + int is_in_wait_loop; +}; + + +/* "_pydevd_bundle/pydevd_cython.pyx":435 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef class _TryExceptContainerObj: # <<<<<<<<<<<<<< + * cdef public list try_except_infos; + * def __init__(self): + */ +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj { + PyObject_HEAD + PyObject *try_except_infos; +}; + + +/* "_pydevd_bundle/pydevd_cython.pyx":455 + * # ======================================================================================================================= + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef class PyDBFrame: # <<<<<<<<<<<<<< + * # ELSE + * # class PyDBFrame: + */ +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame { + PyObject_HEAD + struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_vtab; + PyObject *_args; + int should_skip; + PyObject *exc_info; +}; + + +/* "_pydevd_bundle/pydevd_cython.pyx":1688 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef class SafeCallWrapper: # <<<<<<<<<<<<<< + * cdef method_object + * def __init__(self, method_object): + */ +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper { + PyObject_HEAD + PyObject *method_object; +}; + + +/* "_pydevd_bundle/pydevd_cython.pyx":1854 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef class TopLevelThreadTracerOnlyUnhandledExceptions: # <<<<<<<<<<<<<< + * cdef public tuple _args; + * def __init__(self, tuple args): + */ +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions { + PyObject_HEAD + PyObject *_args; +}; + + +/* "_pydevd_bundle/pydevd_cython.pyx":1885 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef class TopLevelThreadTracerNoBackFrame: # <<<<<<<<<<<<<< + * cdef public object _frame_trace_dispatch; + * cdef public tuple _args; + */ +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame { + PyObject_HEAD + PyObject *_frame_trace_dispatch; + PyObject *_args; + PyObject *try_except_infos; + PyObject *_last_exc_arg; + PyObject *_raise_lines; + int _last_raise_line; +}; + + +/* "_pydevd_bundle/pydevd_cython.pyx":1965 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef class ThreadTracer: # <<<<<<<<<<<<<< + * cdef public tuple _args; + * def __init__(self, tuple args): + */ +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer { + PyObject_HEAD + PyObject *_args; +}; + + + +/* "_pydevd_bundle/pydevd_cython.pyx":30 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef class PyDBAdditionalThreadInfo: # <<<<<<<<<<<<<< + * # ELSE + * # class PyDBAdditionalThreadInfo(object): + */ + +struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo { + PyObject *(*get_topmost_frame)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*update_stepping_info)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch); + PyObject *(*_get_related_thread)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch); + int (*_is_stepping)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo; + + +/* "_pydevd_bundle/pydevd_cython.pyx":455 + * # ======================================================================================================================= + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef class PyDBFrame: # <<<<<<<<<<<<<< + * # ELSE + * # class PyDBFrame: + */ + +struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame { + PyObject *(*get_func_name)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *); + PyObject *(*_show_return_values)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *); + PyObject *(*_remove_return_values)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *); + PyObject *(*_get_unfiltered_back_frame)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *); + PyObject *(*_is_same_frame)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *); + PyObject *(*trace_dispatch)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBFrame; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) + #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() +#endif + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto */ +#include + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) +#else + #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) +#endif +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) + #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) +#else + #define __Pyx_Arg_NewRef_VARARGS(arg) arg + #define __Pyx_Arg_XDECREF_VARARGS(arg) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_Arg_FASTCALL(args, i) args[i] + #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif + #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs + to have the same reference counting */ + #define __Pyx_Arg_XDECREF_FASTCALL(arg) +#else + #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS + #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) + #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) +#else +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* KeywordStringCheck.proto */ +static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, + PyObject **argnames[], + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, + const char* function_name); + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* PyObjectCallNoArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* SliceObject.proto */ +#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\ + __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) +static CYTHON_INLINE int __Pyx_PyObject_SetSlice( + PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +/* ListAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* append.proto */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); + +/* RaiseUnboundLocalError.proto */ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* IterFinish.proto */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* set_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set, + Py_ssize_t* p_orig_length, int* p_source_is_set); +static CYTHON_INLINE int __Pyx_set_iter_next( + PyObject* iter_obj, Py_ssize_t orig_length, + Py_ssize_t* ppos, PyObject **value, + int source_is_set); + +/* RaiseTooManyValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* RaiseNeedMoreValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* UnpackItemEndCheck.proto */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* pyfrozenset_new.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); + +/* py_set_discard.proto */ +static CYTHON_INLINE int __Pyx_PySet_Discard(PyObject *set, PyObject *key); + +/* PySetContains.proto */ +static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq); + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* StrEquals.proto */ +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals +#else +#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals +#endif + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* RaiseNoneIterError.proto */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* PyIntBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyInt_AndObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2)) +#endif + +/* dict_getitem_default.proto */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; + +/* CallUnboundCMethod1.proto */ +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#else +#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) +#endif + +/* CallUnboundCMethod2.proto */ +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* PyObjectCallMethod0.proto */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* UnpackTupleError.proto */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto */ +#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\ + (likely(is_tuple || PyTuple_Check(tuple)) ?\ + (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\ + __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\ + (__Pyx_UnpackTupleError(tuple, 2), -1)) :\ + __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* PyDictContains.proto */ +static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { + int result = PyDict_Contains(dict, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* DictGetItem.proto */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* SliceObject.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +/* GetAttr.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +/* HasAttr.proto */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); + +/* py_dict_clear.proto */ +#define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0) + +/* PyIntBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* SliceTupleAndList.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); +static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); +#else +#define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) +#define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) +#endif + +/* PyIntCompare.proto */ +static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* IncludeStructmemberH.proto */ +#include + +/* FixUpExtensionType.proto */ +#if CYTHON_USE_TYPE_SPECS +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); +#endif + +/* ValidateBasesTuple.proto */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* PyObject_GenericGetAttrNoDict.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr +#endif + +/* PyObject_GenericGetAttr.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr +#endif + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +#if !CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_MergeVtables(PyTypeObject *type); +#endif + +/* SetupReduce.proto */ +#if !CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_setup_reduce(PyObject* type_obj); +#endif + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11 +#define __PYX_HAVE_RT_ImportType_proto_3_0_11 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_0_11 { + __Pyx_ImportType_CheckSize_Error_3_0_11 = 0, + __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size); +#endif + +/* ImportDottedModule.proto */ +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); +#if PY_MAJOR_VERSION >= 3 +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); +#endif + +/* FetchSharedCythonModule.proto */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto */ +#if !CYTHON_USE_TYPE_SPECS +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); +#else +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); +#endif + +/* PyMethodNew.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *typesModule=NULL, *methodType=NULL, *result=NULL; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + typesModule = PyImport_ImportModule("types"); + if (!typesModule) return NULL; + methodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + if (!methodType) return NULL; + result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL); + Py_DECREF(methodType); + return result; +} +#elif PY_MAJOR_VERSION >= 3 +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#else + #define __Pyx_PyMethod_New PyMethod_New +#endif + +/* PyVectorcallFastCallDict.proto */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_BACKPORT_VECTORCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + void *defaults; + int defaults_pyobjects; + size_t defaults_size; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, + size_t size, + int pyobjects); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_BACKPORT_VECTORCALL +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +#if !CYTHON_COMPILING_IN_LIMITED_API +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); +#endif + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#else +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +/* CheckBinaryVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + +/* #### Code section: module_declarations ### */ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo__get_related_thread(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static int __pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo__is_stepping(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_get_topmost_frame(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_thread, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_update_stepping_info(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_get_func_name(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame); /* proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__show_return_values(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_arg); /* proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__remove_return_values(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame); /* proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__get_unfiltered_back_frame(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame); /* proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__is_same_frame(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_target_frame, PyObject *__pyx_v_current_frame); /* proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispatch(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdio" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.type" */ + +/* Module declarations from "cpython" */ + +/* Module declarations from "cpython.object" */ + +/* Module declarations from "cpython.ref" */ + +/* Module declarations from "_pydevd_bundle.pydevd_cython" */ +static PyObject *__pyx_v_14_pydevd_bundle_13pydevd_cython__all_infos = 0; +static PyObject *__pyx_v_14_pydevd_bundle_13pydevd_cython__infos_stepping = 0; +static PyObject *__pyx_v_14_pydevd_bundle_13pydevd_cython__update_infos_lock = 0; +static PyObject *__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in = 0; +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_set_additional_thread_info(PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_add_additional_info(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_remove_additional_info(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch); /*proto*/ +static int __pyx_f_14_pydevd_bundle_13pydevd_cython_any_thread_stepping(int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython__update_stepping_info(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBAdditionalThreadInfo__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, PyObject *); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle__TryExceptContainerObj__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *, PyObject *); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBFrame__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_SafeCallWrapper__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *, PyObject *); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *, PyObject *); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *, PyObject *); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_ThreadTracer__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "_pydevd_bundle.pydevd_cython" +extern int __pyx_module_is_main__pydevd_bundle__pydevd_cython; +int __pyx_module_is_main__pydevd_bundle__pydevd_cython = 0; + +/* Implementation of "_pydevd_bundle.pydevd_cython" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_ImportError; +static PyObject *__pyx_builtin_NameError; +static PyObject *__pyx_builtin_StopIteration; +static PyObject *__pyx_builtin_id; +static PyObject *__pyx_builtin_AttributeError; +static PyObject *__pyx_builtin_KeyboardInterrupt; +static PyObject *__pyx_builtin_SystemExit; +static PyObject *__pyx_builtin_GeneratorExit; +static PyObject *__pyx_builtin_RuntimeError; +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = ""; +static const char __pyx_k_1[] = "1"; +static const char __pyx_k_f[] = "f"; +static const char __pyx_k_i[] = "i"; +static const char __pyx_k_j[] = "j"; +static const char __pyx_k_t[] = "t"; +static const char __pyx_k__4[] = "?"; +static const char __pyx_k__8[] = "/"; +static const char __pyx_k__9[] = "\\"; +static const char __pyx_k_gc[] = "gc"; +static const char __pyx_k_id[] = "id"; +static const char __pyx_k_os[] = "os"; +static const char __pyx_k_re[] = "re"; +static const char __pyx_k_ALL[] = "ALL"; +static const char __pyx_k__10[] = "."; +static const char __pyx_k__19[] = "*"; +static const char __pyx_k_add[] = "add"; +static const char __pyx_k_arg[] = "arg"; +static const char __pyx_k_dis[] = "dis"; +static const char __pyx_k_get[] = "get"; +static const char __pyx_k_new[] = "__new__"; +static const char __pyx_k_pop[] = "pop"; +static const char __pyx_k_pyc[] = ".pyc"; +static const char __pyx_k_ref[] = "ref"; +static const char __pyx_k_ret[] = "ret"; +static const char __pyx_k_run[] = "run"; +static const char __pyx_k_s_s[] = "%s.%s"; +static const char __pyx_k_set[] = "set"; +static const char __pyx_k_sys[] = "sys"; +static const char __pyx_k_None[] = "None"; +static const char __pyx_k_args[] = "args"; +static const char __pyx_k_call[] = "call"; +static const char __pyx_k_cell[] = "__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); + Py_CLEAR(clear_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); + Py_CLEAR(clear_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj); + Py_CLEAR(clear_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj); + Py_CLEAR(clear_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); + Py_CLEAR(clear_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame); + Py_CLEAR(clear_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper); + Py_CLEAR(clear_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper); + Py_CLEAR(clear_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions); + Py_CLEAR(clear_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions); + Py_CLEAR(clear_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame); + Py_CLEAR(clear_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame); + Py_CLEAR(clear_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer); + Py_CLEAR(clear_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer); + Py_CLEAR(clear_module_state->__pyx_kp_s_); + Py_CLEAR(clear_module_state->__pyx_kp_s_1); + Py_CLEAR(clear_module_state->__pyx_n_s_ALL); + Py_CLEAR(clear_module_state->__pyx_n_s_AttributeError); + Py_CLEAR(clear_module_state->__pyx_n_s_CMD_SET_FUNCTION_BREAK); + Py_CLEAR(clear_module_state->__pyx_n_s_DEBUG_START); + Py_CLEAR(clear_module_state->__pyx_n_s_DEBUG_START_PY3K); + Py_CLEAR(clear_module_state->__pyx_n_s_EXCEPTION_TYPE_HANDLED); + Py_CLEAR(clear_module_state->__pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED); + Py_CLEAR(clear_module_state->__pyx_kp_s_Error_in_linecache_checkcache_r); + Py_CLEAR(clear_module_state->__pyx_kp_s_Error_in_linecache_getline_r_s_f); + Py_CLEAR(clear_module_state->__pyx_n_s_ForkSafeLock); + Py_CLEAR(clear_module_state->__pyx_n_s_GeneratorExit); + Py_CLEAR(clear_module_state->__pyx_n_s_IGNORE_EXCEPTION_TAG); + Py_CLEAR(clear_module_state->__pyx_kp_s_IgnoreException); + Py_CLEAR(clear_module_state->__pyx_kp_s_Ignore_exception_s_in_library_s); + Py_CLEAR(clear_module_state->__pyx_n_s_ImportError); + Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0); + Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2); + Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3); + Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4); + Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5); + Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6); + Py_CLEAR(clear_module_state->__pyx_n_s_KeyboardInterrupt); + Py_CLEAR(clear_module_state->__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); + Py_CLEAR(clear_module_state->__pyx_n_s_NO_FTRACE); + Py_CLEAR(clear_module_state->__pyx_n_s_NameError); + Py_CLEAR(clear_module_state->__pyx_n_s_None); + Py_CLEAR(clear_module_state->__pyx_kp_s_Not_used_in_sys_monitoring_mode); + Py_CLEAR(clear_module_state->__pyx_n_s_PYDEVD_IPYTHON_CONTEXT); + Py_CLEAR(clear_module_state->__pyx_n_s_PYDEVD_USE_SYS_MONITORING); + Py_CLEAR(clear_module_state->__pyx_n_s_PYDEV_FILE); + Py_CLEAR(clear_module_state->__pyx_n_s_PYTHON_SUSPEND); + Py_CLEAR(clear_module_state->__pyx_n_s_PickleError); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBAdditionalThreadInfo); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBAdditionalThreadInfo___reduc); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBAdditionalThreadInfo___setst); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBAdditionalThreadInfo__get_re); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBAdditionalThreadInfo__is_ste); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBAdditionalThreadInfo_get_top); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBAdditionalThreadInfo_update); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBFrame); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBFrame___reduce_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBFrame___setstate_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBFrame_do_wait_suspend); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBFrame_handle_user_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBFrame_set_suspend); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBFrame_trace_dispatch); + Py_CLEAR(clear_module_state->__pyx_n_s_PyDBFrame_trace_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_RETURN_VALUES_DICT); + Py_CLEAR(clear_module_state->__pyx_n_s_RuntimeError); + Py_CLEAR(clear_module_state->__pyx_n_s_STATE_RUN); + Py_CLEAR(clear_module_state->__pyx_n_s_STATE_SUSPEND); + Py_CLEAR(clear_module_state->__pyx_n_s_SUPPORT_GEVENT); + Py_CLEAR(clear_module_state->__pyx_n_s_SafeCallWrapper); + Py_CLEAR(clear_module_state->__pyx_n_s_SafeCallWrapper___reduce_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_SafeCallWrapper___setstate_cytho); + Py_CLEAR(clear_module_state->__pyx_n_s_SafeCallWrapper_get_method_objec); + Py_CLEAR(clear_module_state->__pyx_kp_s_State_s_Stop_s_Cmd_s_Kill_s); + Py_CLEAR(clear_module_state->__pyx_n_s_StopAsyncIteration); + Py_CLEAR(clear_module_state->__pyx_n_s_StopIteration); + Py_CLEAR(clear_module_state->__pyx_kp_s_Stop_inside_ipython_call); + Py_CLEAR(clear_module_state->__pyx_n_s_SystemExit); + Py_CLEAR(clear_module_state->__pyx_n_s_TRACE_PROPERTY); + Py_CLEAR(clear_module_state->__pyx_n_s_Thread); + Py_CLEAR(clear_module_state->__pyx_n_s_ThreadTracer); + Py_CLEAR(clear_module_state->__pyx_n_s_ThreadTracer___reduce_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_ThreadTracer___setstate_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_TopLevelThreadTracerNoBackFrame); + Py_CLEAR(clear_module_state->__pyx_n_s_TopLevelThreadTracerNoBackFrame_2); + Py_CLEAR(clear_module_state->__pyx_n_s_TopLevelThreadTracerNoBackFrame_3); + Py_CLEAR(clear_module_state->__pyx_n_s_TopLevelThreadTracerNoBackFrame_4); + Py_CLEAR(clear_module_state->__pyx_n_s_TopLevelThreadTracerNoBackFrame_5); + Py_CLEAR(clear_module_state->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle); + Py_CLEAR(clear_module_state->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_2); + Py_CLEAR(clear_module_state->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_3); + Py_CLEAR(clear_module_state->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_4); + Py_CLEAR(clear_module_state->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_5); + Py_CLEAR(clear_module_state->__pyx_n_s_TryExceptContainerObj); + Py_CLEAR(clear_module_state->__pyx_n_s_TryExceptContainerObj___reduce); + Py_CLEAR(clear_module_state->__pyx_n_s_TryExceptContainerObj___setstat); + Py_CLEAR(clear_module_state->__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); + Py_CLEAR(clear_module_state->__pyx_kp_s_Unable_to_get_topmost_frame_for); + Py_CLEAR(clear_module_state->__pyx_kp_s__10); + Py_CLEAR(clear_module_state->__pyx_kp_u__10); + Py_CLEAR(clear_module_state->__pyx_n_s__19); + Py_CLEAR(clear_module_state->__pyx_kp_s__4); + Py_CLEAR(clear_module_state->__pyx_kp_s__8); + Py_CLEAR(clear_module_state->__pyx_kp_s__9); + Py_CLEAR(clear_module_state->__pyx_n_s_abs_real_path_and_base); + Py_CLEAR(clear_module_state->__pyx_n_s_absolute_filename); + Py_CLEAR(clear_module_state->__pyx_n_s_active); + Py_CLEAR(clear_module_state->__pyx_n_s_add); + Py_CLEAR(clear_module_state->__pyx_n_s_add_additional_info); + Py_CLEAR(clear_module_state->__pyx_n_s_add_command); + Py_CLEAR(clear_module_state->__pyx_n_s_add_exception_to_frame); + Py_CLEAR(clear_module_state->__pyx_n_s_additional_info); + Py_CLEAR(clear_module_state->__pyx_n_s_any_thread_stepping); + Py_CLEAR(clear_module_state->__pyx_n_s_append); + Py_CLEAR(clear_module_state->__pyx_n_s_apply_files_filter); + Py_CLEAR(clear_module_state->__pyx_n_s_apply_to_settrace); + Py_CLEAR(clear_module_state->__pyx_n_s_arg); + Py_CLEAR(clear_module_state->__pyx_n_s_args); + Py_CLEAR(clear_module_state->__pyx_n_s_args_2); + Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines); + Py_CLEAR(clear_module_state->__pyx_n_s_basename); + Py_CLEAR(clear_module_state->__pyx_n_s_bootstrap); + Py_CLEAR(clear_module_state->__pyx_n_s_bootstrap_2); + Py_CLEAR(clear_module_state->__pyx_n_s_bootstrap_inner); + Py_CLEAR(clear_module_state->__pyx_n_s_bootstrap_inner_2); + Py_CLEAR(clear_module_state->__pyx_n_s_break_on_caught_exceptions); + Py_CLEAR(clear_module_state->__pyx_n_s_break_on_user_uncaught_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_breakpoints); + Py_CLEAR(clear_module_state->__pyx_n_s_call); + Py_CLEAR(clear_module_state->__pyx_n_s_call_2); + Py_CLEAR(clear_module_state->__pyx_n_s_can_skip); + Py_CLEAR(clear_module_state->__pyx_n_s_canonical_normalized_filename); + Py_CLEAR(clear_module_state->__pyx_kp_s_cell); + Py_CLEAR(clear_module_state->__pyx_n_s_check_excs); + Py_CLEAR(clear_module_state->__pyx_n_s_check_trace_obj); + Py_CLEAR(clear_module_state->__pyx_n_s_checkcache); + Py_CLEAR(clear_module_state->__pyx_n_s_children_variants); + Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem); + Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); + Py_CLEAR(clear_module_state->__pyx_n_s_cmd_factory); + Py_CLEAR(clear_module_state->__pyx_n_s_cmd_step_into); + Py_CLEAR(clear_module_state->__pyx_n_s_cmd_step_over); + Py_CLEAR(clear_module_state->__pyx_n_s_co_filename); + Py_CLEAR(clear_module_state->__pyx_n_s_co_firstlineno); + Py_CLEAR(clear_module_state->__pyx_n_s_co_flags); + Py_CLEAR(clear_module_state->__pyx_n_s_co_name); + Py_CLEAR(clear_module_state->__pyx_n_s_collect_return_info); + Py_CLEAR(clear_module_state->__pyx_n_s_collect_try_except_info); + Py_CLEAR(clear_module_state->__pyx_n_s_compile); + Py_CLEAR(clear_module_state->__pyx_n_s_condition); + Py_CLEAR(clear_module_state->__pyx_n_s_constant_to_str); + Py_CLEAR(clear_module_state->__pyx_n_s_constructed_tid_to_last_frame); + Py_CLEAR(clear_module_state->__pyx_n_s_container_obj); + Py_CLEAR(clear_module_state->__pyx_n_s_critical); + Py_CLEAR(clear_module_state->__pyx_n_s_curr_stat); + Py_CLEAR(clear_module_state->__pyx_n_s_current_frames); + Py_CLEAR(clear_module_state->__pyx_n_s_custom_key); + Py_CLEAR(clear_module_state->__pyx_n_s_debug); + Py_CLEAR(clear_module_state->__pyx_n_s_dict); + Py_CLEAR(clear_module_state->__pyx_n_s_dict_2); + Py_CLEAR(clear_module_state->__pyx_n_s_dis); + Py_CLEAR(clear_module_state->__pyx_kp_u_disable); + Py_CLEAR(clear_module_state->__pyx_n_s_disable_tracing); + Py_CLEAR(clear_module_state->__pyx_n_s_do_wait_suspend); + Py_CLEAR(clear_module_state->__pyx_kp_u_enable); + Py_CLEAR(clear_module_state->__pyx_n_s_enable_tracing); + Py_CLEAR(clear_module_state->__pyx_n_s_encode); + Py_CLEAR(clear_module_state->__pyx_n_s_endswith); + Py_CLEAR(clear_module_state->__pyx_n_s_enter); + Py_CLEAR(clear_module_state->__pyx_n_s_event); + Py_CLEAR(clear_module_state->__pyx_n_s_exc_break); + Py_CLEAR(clear_module_state->__pyx_n_s_exc_break_caught); + Py_CLEAR(clear_module_state->__pyx_n_s_exc_break_user); + Py_CLEAR(clear_module_state->__pyx_n_s_exc_info); + Py_CLEAR(clear_module_state->__pyx_n_s_exc_lineno); + Py_CLEAR(clear_module_state->__pyx_n_s_except_line); + Py_CLEAR(clear_module_state->__pyx_n_s_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_exception_break); + Py_CLEAR(clear_module_state->__pyx_n_s_exception_breakpoint); + Py_CLEAR(clear_module_state->__pyx_n_s_exception_type); + Py_CLEAR(clear_module_state->__pyx_n_s_exclude_exception_by_filter); + Py_CLEAR(clear_module_state->__pyx_n_s_exec); + Py_CLEAR(clear_module_state->__pyx_n_s_execfile); + Py_CLEAR(clear_module_state->__pyx_n_s_exit); + Py_CLEAR(clear_module_state->__pyx_n_s_expression); + Py_CLEAR(clear_module_state->__pyx_n_s_f); + Py_CLEAR(clear_module_state->__pyx_n_s_f_back); + Py_CLEAR(clear_module_state->__pyx_n_s_f_code); + Py_CLEAR(clear_module_state->__pyx_n_s_f_globals); + Py_CLEAR(clear_module_state->__pyx_n_s_f_lasti); + Py_CLEAR(clear_module_state->__pyx_n_s_f_lineno); + Py_CLEAR(clear_module_state->__pyx_n_s_f_locals); + Py_CLEAR(clear_module_state->__pyx_n_s_f_trace); + Py_CLEAR(clear_module_state->__pyx_n_s_f_unhandled); + Py_CLEAR(clear_module_state->__pyx_n_s_filename); + Py_CLEAR(clear_module_state->__pyx_n_s_filename_to_lines_where_exceptio); + Py_CLEAR(clear_module_state->__pyx_n_s_filename_to_stat_info); + Py_CLEAR(clear_module_state->__pyx_n_s_findlinestarts); + Py_CLEAR(clear_module_state->__pyx_n_s_fix_top_level_trace_and_get_trac); + Py_CLEAR(clear_module_state->__pyx_n_s_force_only_unhandled_tracer); + Py_CLEAR(clear_module_state->__pyx_n_s_frame); + Py_CLEAR(clear_module_state->__pyx_n_s_frame_cache_key); + Py_CLEAR(clear_module_state->__pyx_n_s_frame_id_to_frame); + Py_CLEAR(clear_module_state->__pyx_n_s_frame_skips_cache); + Py_CLEAR(clear_module_state->__pyx_n_s_frame_trace_dispatch); + Py_CLEAR(clear_module_state->__pyx_n_s_from_user_input); + Py_CLEAR(clear_module_state->__pyx_n_s_func_name); + Py_CLEAR(clear_module_state->__pyx_n_s_function_breakpoint_name_to_brea); + Py_CLEAR(clear_module_state->__pyx_kp_u_gc); + Py_CLEAR(clear_module_state->__pyx_n_s_get); + Py_CLEAR(clear_module_state->__pyx_n_s_get_abs_path_real_path_and_base); + Py_CLEAR(clear_module_state->__pyx_n_s_get_breakpoint); + Py_CLEAR(clear_module_state->__pyx_n_s_get_clsname_for_code); + Py_CLEAR(clear_module_state->__pyx_n_s_get_current_thread_id); + Py_CLEAR(clear_module_state->__pyx_n_s_get_exception_breakpoint); + Py_CLEAR(clear_module_state->__pyx_n_s_get_file_type); + Py_CLEAR(clear_module_state->__pyx_n_s_get_global_debugger); + Py_CLEAR(clear_module_state->__pyx_n_s_get_internal_queue_and_event); + Py_CLEAR(clear_module_state->__pyx_n_s_get_method_object); + Py_CLEAR(clear_module_state->__pyx_n_s_get_related_thread); + Py_CLEAR(clear_module_state->__pyx_n_s_get_smart_step_into_variant_from); + Py_CLEAR(clear_module_state->__pyx_n_s_get_thread_id); + Py_CLEAR(clear_module_state->__pyx_n_s_get_topmost_frame); + Py_CLEAR(clear_module_state->__pyx_n_s_get_trace_dispatch_func); + Py_CLEAR(clear_module_state->__pyx_n_s_getline); + Py_CLEAR(clear_module_state->__pyx_n_s_getstate); + Py_CLEAR(clear_module_state->__pyx_n_s_global_cache_frame_skips); + Py_CLEAR(clear_module_state->__pyx_n_s_global_cache_skips); + Py_CLEAR(clear_module_state->__pyx_n_s_global_notify_skipped_step_in_l); + Py_CLEAR(clear_module_state->__pyx_n_s_handle_breakpoint_condition); + Py_CLEAR(clear_module_state->__pyx_n_s_handle_breakpoint_expression); + Py_CLEAR(clear_module_state->__pyx_n_s_handle_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_handle_user_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_has_condition); + Py_CLEAR(clear_module_state->__pyx_n_s_has_plugin_exception_breaks); + Py_CLEAR(clear_module_state->__pyx_n_s_has_plugin_line_breaks); + Py_CLEAR(clear_module_state->__pyx_n_s_i); + Py_CLEAR(clear_module_state->__pyx_n_s_id); + Py_CLEAR(clear_module_state->__pyx_n_s_ident); + Py_CLEAR(clear_module_state->__pyx_n_s_ident_2); + Py_CLEAR(clear_module_state->__pyx_n_s_ignore_exception_trace); + Py_CLEAR(clear_module_state->__pyx_n_s_ignore_exceptions_thrown_in_line); + Py_CLEAR(clear_module_state->__pyx_n_s_ignore_system_exit_code); + Py_CLEAR(clear_module_state->__pyx_n_s_import); + Py_CLEAR(clear_module_state->__pyx_n_s_in_project_scope); + Py_CLEAR(clear_module_state->__pyx_n_s_info); + Py_CLEAR(clear_module_state->__pyx_n_s_initial_trace_obj); + Py_CLEAR(clear_module_state->__pyx_n_s_initializing); + Py_CLEAR(clear_module_state->__pyx_kp_s_invalid); + Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); + Py_CLEAR(clear_module_state->__pyx_n_s_is_files_filter_enabled); + Py_CLEAR(clear_module_state->__pyx_n_s_is_line_in_except_block); + Py_CLEAR(clear_module_state->__pyx_n_s_is_line_in_try_block); + Py_CLEAR(clear_module_state->__pyx_n_s_is_logpoint); + Py_CLEAR(clear_module_state->__pyx_n_s_is_stepping); + Py_CLEAR(clear_module_state->__pyx_n_s_is_thread_alive); + Py_CLEAR(clear_module_state->__pyx_n_s_is_unhandled_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_is_unwind); + Py_CLEAR(clear_module_state->__pyx_n_s_is_user_uncaught); + Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); + Py_CLEAR(clear_module_state->__pyx_n_s_j); + Py_CLEAR(clear_module_state->__pyx_n_s_just_raised); + Py_CLEAR(clear_module_state->__pyx_n_s_kwargs); + Py_CLEAR(clear_module_state->__pyx_kp_s_lambda); + Py_CLEAR(clear_module_state->__pyx_n_s_last_raise_line); + Py_CLEAR(clear_module_state->__pyx_n_s_last_stat); + Py_CLEAR(clear_module_state->__pyx_n_s_line); + Py_CLEAR(clear_module_state->__pyx_n_s_linecache); + Py_CLEAR(clear_module_state->__pyx_n_s_lines); + Py_CLEAR(clear_module_state->__pyx_n_s_lines_ignored); + Py_CLEAR(clear_module_state->__pyx_n_s_linesep); + Py_CLEAR(clear_module_state->__pyx_n_s_main); + Py_CLEAR(clear_module_state->__pyx_n_s_main_2); + Py_CLEAR(clear_module_state->__pyx_n_s_make_console_message); + Py_CLEAR(clear_module_state->__pyx_n_s_make_io_message); + Py_CLEAR(clear_module_state->__pyx_n_s_match); + Py_CLEAR(clear_module_state->__pyx_n_s_maybe_user_uncaught_exc_info); + Py_CLEAR(clear_module_state->__pyx_n_s_merged); + Py_CLEAR(clear_module_state->__pyx_n_s_method_object); + Py_CLEAR(clear_module_state->__pyx_kp_s_module); + Py_CLEAR(clear_module_state->__pyx_n_s_name); + Py_CLEAR(clear_module_state->__pyx_n_s_name_2); + Py_CLEAR(clear_module_state->__pyx_n_s_new); + Py_CLEAR(clear_module_state->__pyx_n_s_next_additional_info); + Py_CLEAR(clear_module_state->__pyx_n_s_notify_on_first_raise_only); + Py_CLEAR(clear_module_state->__pyx_n_s_notify_skipped_step_in_because_o); + Py_CLEAR(clear_module_state->__pyx_n_s_notify_thread_not_alive); + Py_CLEAR(clear_module_state->__pyx_n_s_original_call); + Py_CLEAR(clear_module_state->__pyx_n_s_original_step_cmd); + Py_CLEAR(clear_module_state->__pyx_n_s_os); + Py_CLEAR(clear_module_state->__pyx_n_s_os_path); + Py_CLEAR(clear_module_state->__pyx_n_s_path); + Py_CLEAR(clear_module_state->__pyx_n_s_pickle); + Py_CLEAR(clear_module_state->__pyx_n_s_plugin); + Py_CLEAR(clear_module_state->__pyx_n_s_pop); + Py_CLEAR(clear_module_state->__pyx_n_s_prev_user_uncaught_exc_info); + Py_CLEAR(clear_module_state->__pyx_n_s_py_db); + Py_CLEAR(clear_module_state->__pyx_kp_s_pyc); + Py_CLEAR(clear_module_state->__pyx_n_s_pydb_disposed); + Py_CLEAR(clear_module_state->__pyx_n_s_pydev_bundle); + Py_CLEAR(clear_module_state->__pyx_n_s_pydev_bundle__pydev_saved_modul); + Py_CLEAR(clear_module_state->__pyx_n_s_pydev_bundle_pydev_is_thread_al); + Py_CLEAR(clear_module_state->__pyx_n_s_pydev_bundle_pydev_log); + Py_CLEAR(clear_module_state->__pyx_n_s_pydev_do_not_trace); + Py_CLEAR(clear_module_state->__pyx_kp_s_pydev_execfile_py); + Py_CLEAR(clear_module_state->__pyx_n_s_pydev_log); + Py_CLEAR(clear_module_state->__pyx_n_s_pydev_log_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_pydev_monkey); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_bundle); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_bundle_pydevd_bytecode_u); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_bundle_pydevd_comm_const); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_bundle_pydevd_constants); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_bundle_pydevd_cython); + Py_CLEAR(clear_module_state->__pyx_kp_s_pydevd_bundle_pydevd_cython_pyx); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_bundle_pydevd_frame_util); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_bundle_pydevd_utils); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_dont_trace); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_file_utils); + Py_CLEAR(clear_module_state->__pyx_kp_s_pydevd_py); + Py_CLEAR(clear_module_state->__pyx_kp_s_pydevd_traceproperty_py); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_tracing); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_PyDBAdditionalThr); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_PyDBFrame); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_SafeCallWrapper); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_ThreadTracer); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TopLevelThreadTra); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_TopLevelThreadTra_2); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle__TryExceptContain); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable); + Py_CLEAR(clear_module_state->__pyx_n_s_qname); + Py_CLEAR(clear_module_state->__pyx_n_s_quitting); + Py_CLEAR(clear_module_state->__pyx_n_s_raise_lines); + Py_CLEAR(clear_module_state->__pyx_n_s_raise_lines_in_except); + Py_CLEAR(clear_module_state->__pyx_n_s_re); + Py_CLEAR(clear_module_state->__pyx_n_s_reduce); + Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex); + Py_CLEAR(clear_module_state->__pyx_n_s_ref); + Py_CLEAR(clear_module_state->__pyx_n_s_remove_additional_info); + Py_CLEAR(clear_module_state->__pyx_n_s_remove_exception_from_frame); + Py_CLEAR(clear_module_state->__pyx_n_s_remove_return_values_flag); + Py_CLEAR(clear_module_state->__pyx_n_s_result); + Py_CLEAR(clear_module_state->__pyx_n_s_ret); + Py_CLEAR(clear_module_state->__pyx_n_s_return); + Py_CLEAR(clear_module_state->__pyx_n_s_return_line); + Py_CLEAR(clear_module_state->__pyx_n_s_returns); + Py_CLEAR(clear_module_state->__pyx_n_s_rfind); + Py_CLEAR(clear_module_state->__pyx_n_s_run); + Py_CLEAR(clear_module_state->__pyx_kp_s_s_raised_from_within_the_callba); + Py_CLEAR(clear_module_state->__pyx_kp_s_s_s); + Py_CLEAR(clear_module_state->__pyx_n_s_self); + Py_CLEAR(clear_module_state->__pyx_n_s_send_caught_exception_stack); + Py_CLEAR(clear_module_state->__pyx_n_s_send_caught_exception_stack_proc); + Py_CLEAR(clear_module_state->__pyx_n_s_set); + Py_CLEAR(clear_module_state->__pyx_n_s_set_additional_thread_info); + Py_CLEAR(clear_module_state->__pyx_n_s_set_additional_thread_info_lock); + Py_CLEAR(clear_module_state->__pyx_n_s_set_suspend); + Py_CLEAR(clear_module_state->__pyx_n_s_set_trace_for_frame_and_parents); + Py_CLEAR(clear_module_state->__pyx_n_s_setstate); + Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_should_stop); + Py_CLEAR(clear_module_state->__pyx_n_s_should_stop_on_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_should_trace_hook); + Py_CLEAR(clear_module_state->__pyx_n_s_show_return_values); + Py_CLEAR(clear_module_state->__pyx_n_s_skip_on_exceptions_thrown_in_sam); + Py_CLEAR(clear_module_state->__pyx_n_s_spec); + Py_CLEAR(clear_module_state->__pyx_n_s_st_mtime); + Py_CLEAR(clear_module_state->__pyx_n_s_st_size); + Py_CLEAR(clear_module_state->__pyx_n_s_startswith); + Py_CLEAR(clear_module_state->__pyx_n_s_stat); + Py_CLEAR(clear_module_state->__pyx_n_s_state); + Py_CLEAR(clear_module_state->__pyx_n_s_stop); + Py_CLEAR(clear_module_state->__pyx_n_s_stop_on_unhandled_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_stopped); + Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); + Py_CLEAR(clear_module_state->__pyx_n_s_suspend); + Py_CLEAR(clear_module_state->__pyx_n_s_suspend_other_threads); + Py_CLEAR(clear_module_state->__pyx_n_s_suspend_policy); + Py_CLEAR(clear_module_state->__pyx_n_s_suspended_at_unhandled); + Py_CLEAR(clear_module_state->__pyx_n_s_sys); + Py_CLEAR(clear_module_state->__pyx_n_s_t); + Py_CLEAR(clear_module_state->__pyx_n_s_tb_frame); + Py_CLEAR(clear_module_state->__pyx_n_s_tb_lineno); + Py_CLEAR(clear_module_state->__pyx_n_s_tb_next); + Py_CLEAR(clear_module_state->__pyx_n_s_test); + Py_CLEAR(clear_module_state->__pyx_n_s_thread); + Py_CLEAR(clear_module_state->__pyx_kp_s_thread__ident_is_None_in__get_re); + Py_CLEAR(clear_module_state->__pyx_n_s_thread_trace_func); + Py_CLEAR(clear_module_state->__pyx_n_s_thread_tracer); + Py_CLEAR(clear_module_state->__pyx_n_s_threading); + Py_CLEAR(clear_module_state->__pyx_n_s_threading_active); + Py_CLEAR(clear_module_state->__pyx_n_s_threading_current_thread); + Py_CLEAR(clear_module_state->__pyx_n_s_threading_get_ident); + Py_CLEAR(clear_module_state->__pyx_n_s_top_level_thread_tracer); + Py_CLEAR(clear_module_state->__pyx_n_s_top_level_thread_tracer_no_back); + Py_CLEAR(clear_module_state->__pyx_n_s_top_level_thread_tracer_unhandle); + Py_CLEAR(clear_module_state->__pyx_n_s_trace); + Py_CLEAR(clear_module_state->__pyx_n_s_trace_dispatch); + Py_CLEAR(clear_module_state->__pyx_n_s_trace_dispatch_and_unhandled_exc); + Py_CLEAR(clear_module_state->__pyx_n_s_trace_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_trace_obj); + Py_CLEAR(clear_module_state->__pyx_n_s_trace_unhandled_exceptions); + Py_CLEAR(clear_module_state->__pyx_n_s_try_exc_info); + Py_CLEAR(clear_module_state->__pyx_n_s_try_except_info); + Py_CLEAR(clear_module_state->__pyx_n_s_try_except_infos); + Py_CLEAR(clear_module_state->__pyx_n_s_update); + Py_CLEAR(clear_module_state->__pyx_n_s_update_stepping_info); + Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate); + Py_CLEAR(clear_module_state->__pyx_kp_s_utf_8); + Py_CLEAR(clear_module_state->__pyx_n_s_valid_try_except_infos); + Py_CLEAR(clear_module_state->__pyx_n_s_value); + Py_CLEAR(clear_module_state->__pyx_n_s_values); + Py_CLEAR(clear_module_state->__pyx_n_s_version); + Py_CLEAR(clear_module_state->__pyx_n_s_was_just_raised); + Py_CLEAR(clear_module_state->__pyx_n_s_weak_thread); + Py_CLEAR(clear_module_state->__pyx_n_s_weakref); + Py_CLEAR(clear_module_state->__pyx_n_s_writer); + Py_CLEAR(clear_module_state->__pyx_int_0); + Py_CLEAR(clear_module_state->__pyx_int_1); + Py_CLEAR(clear_module_state->__pyx_int_2); + Py_CLEAR(clear_module_state->__pyx_int_11); + Py_CLEAR(clear_module_state->__pyx_int_111); + Py_CLEAR(clear_module_state->__pyx_int_137); + Py_CLEAR(clear_module_state->__pyx_int_160); + Py_CLEAR(clear_module_state->__pyx_int_2424557); + Py_CLEAR(clear_module_state->__pyx_int_16751766); + Py_CLEAR(clear_module_state->__pyx_int_18997755); + Py_CLEAR(clear_module_state->__pyx_int_61391470); + Py_CLEAR(clear_module_state->__pyx_int_63705258); + Py_CLEAR(clear_module_state->__pyx_int_64458794); + Py_CLEAR(clear_module_state->__pyx_int_66451433); + Py_CLEAR(clear_module_state->__pyx_int_70528507); + Py_CLEAR(clear_module_state->__pyx_int_84338306); + Py_CLEAR(clear_module_state->__pyx_int_125568891); + Py_CLEAR(clear_module_state->__pyx_int_169093275); + Py_CLEAR(clear_module_state->__pyx_int_171613889); + Py_CLEAR(clear_module_state->__pyx_int_192493205); + Py_CLEAR(clear_module_state->__pyx_int_210464433); + Py_CLEAR(clear_module_state->__pyx_int_221489684); + Py_CLEAR(clear_module_state->__pyx_int_230645316); + Py_CLEAR(clear_module_state->__pyx_int_232881363); + Py_CLEAR(clear_module_state->__pyx_int_255484337); + Py_CLEAR(clear_module_state->__pyx_int_neg_1); + Py_CLEAR(clear_module_state->__pyx_slice__2); + Py_CLEAR(clear_module_state->__pyx_slice__6); + Py_CLEAR(clear_module_state->__pyx_tuple__3); + Py_CLEAR(clear_module_state->__pyx_tuple__5); + Py_CLEAR(clear_module_state->__pyx_tuple__7); + Py_CLEAR(clear_module_state->__pyx_tuple__11); + Py_CLEAR(clear_module_state->__pyx_tuple__12); + Py_CLEAR(clear_module_state->__pyx_tuple__13); + Py_CLEAR(clear_module_state->__pyx_tuple__14); + Py_CLEAR(clear_module_state->__pyx_tuple__15); + Py_CLEAR(clear_module_state->__pyx_tuple__16); + Py_CLEAR(clear_module_state->__pyx_tuple__17); + Py_CLEAR(clear_module_state->__pyx_tuple__18); + Py_CLEAR(clear_module_state->__pyx_tuple__20); + Py_CLEAR(clear_module_state->__pyx_tuple__23); + Py_CLEAR(clear_module_state->__pyx_tuple__26); + Py_CLEAR(clear_module_state->__pyx_tuple__28); + Py_CLEAR(clear_module_state->__pyx_tuple__30); + Py_CLEAR(clear_module_state->__pyx_tuple__32); + Py_CLEAR(clear_module_state->__pyx_tuple__36); + Py_CLEAR(clear_module_state->__pyx_tuple__37); + Py_CLEAR(clear_module_state->__pyx_tuple__39); + Py_CLEAR(clear_module_state->__pyx_tuple__40); + Py_CLEAR(clear_module_state->__pyx_tuple__41); + Py_CLEAR(clear_module_state->__pyx_tuple__42); + Py_CLEAR(clear_module_state->__pyx_tuple__46); + Py_CLEAR(clear_module_state->__pyx_tuple__49); + Py_CLEAR(clear_module_state->__pyx_tuple__51); + Py_CLEAR(clear_module_state->__pyx_tuple__53); + Py_CLEAR(clear_module_state->__pyx_tuple__57); + Py_CLEAR(clear_module_state->__pyx_tuple__59); + Py_CLEAR(clear_module_state->__pyx_tuple__60); + Py_CLEAR(clear_module_state->__pyx_tuple__62); + Py_CLEAR(clear_module_state->__pyx_tuple__67); + Py_CLEAR(clear_module_state->__pyx_tuple__69); + Py_CLEAR(clear_module_state->__pyx_tuple__71); + Py_CLEAR(clear_module_state->__pyx_tuple__76); + Py_CLEAR(clear_module_state->__pyx_tuple__85); + Py_CLEAR(clear_module_state->__pyx_codeobj__21); + Py_CLEAR(clear_module_state->__pyx_codeobj__22); + Py_CLEAR(clear_module_state->__pyx_codeobj__24); + Py_CLEAR(clear_module_state->__pyx_codeobj__25); + Py_CLEAR(clear_module_state->__pyx_codeobj__27); + Py_CLEAR(clear_module_state->__pyx_codeobj__29); + Py_CLEAR(clear_module_state->__pyx_codeobj__31); + Py_CLEAR(clear_module_state->__pyx_codeobj__33); + Py_CLEAR(clear_module_state->__pyx_codeobj__34); + Py_CLEAR(clear_module_state->__pyx_codeobj__35); + Py_CLEAR(clear_module_state->__pyx_codeobj__38); + Py_CLEAR(clear_module_state->__pyx_codeobj__43); + Py_CLEAR(clear_module_state->__pyx_codeobj__44); + Py_CLEAR(clear_module_state->__pyx_codeobj__45); + Py_CLEAR(clear_module_state->__pyx_codeobj__47); + Py_CLEAR(clear_module_state->__pyx_codeobj__48); + Py_CLEAR(clear_module_state->__pyx_codeobj__50); + Py_CLEAR(clear_module_state->__pyx_codeobj__52); + Py_CLEAR(clear_module_state->__pyx_codeobj__54); + Py_CLEAR(clear_module_state->__pyx_codeobj__55); + Py_CLEAR(clear_module_state->__pyx_codeobj__56); + Py_CLEAR(clear_module_state->__pyx_codeobj__58); + Py_CLEAR(clear_module_state->__pyx_codeobj__61); + Py_CLEAR(clear_module_state->__pyx_codeobj__63); + Py_CLEAR(clear_module_state->__pyx_codeobj__64); + Py_CLEAR(clear_module_state->__pyx_codeobj__65); + Py_CLEAR(clear_module_state->__pyx_codeobj__66); + Py_CLEAR(clear_module_state->__pyx_codeobj__68); + Py_CLEAR(clear_module_state->__pyx_codeobj__70); + Py_CLEAR(clear_module_state->__pyx_codeobj__72); + Py_CLEAR(clear_module_state->__pyx_codeobj__73); + Py_CLEAR(clear_module_state->__pyx_codeobj__74); + Py_CLEAR(clear_module_state->__pyx_codeobj__75); + Py_CLEAR(clear_module_state->__pyx_codeobj__77); + Py_CLEAR(clear_module_state->__pyx_codeobj__78); + Py_CLEAR(clear_module_state->__pyx_codeobj__79); + Py_CLEAR(clear_module_state->__pyx_codeobj__80); + Py_CLEAR(clear_module_state->__pyx_codeobj__81); + Py_CLEAR(clear_module_state->__pyx_codeobj__82); + Py_CLEAR(clear_module_state->__pyx_codeobj__83); + Py_CLEAR(clear_module_state->__pyx_codeobj__84); + Py_CLEAR(clear_module_state->__pyx_codeobj__86); + Py_CLEAR(clear_module_state->__pyx_codeobj__87); + Py_CLEAR(clear_module_state->__pyx_codeobj__88); + Py_CLEAR(clear_module_state->__pyx_codeobj__89); + Py_CLEAR(clear_module_state->__pyx_codeobj__90); + Py_CLEAR(clear_module_state->__pyx_codeobj__91); + Py_CLEAR(clear_module_state->__pyx_codeobj__92); + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstate *traverse_module_state = __pyx_mstate(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + Py_VISIT(traverse_module_state->__pyx_empty_tuple); + Py_VISIT(traverse_module_state->__pyx_empty_bytes); + Py_VISIT(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); + Py_VISIT(traverse_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); + Py_VISIT(traverse_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj); + Py_VISIT(traverse_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj); + Py_VISIT(traverse_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); + Py_VISIT(traverse_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame); + Py_VISIT(traverse_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper); + Py_VISIT(traverse_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper); + Py_VISIT(traverse_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions); + Py_VISIT(traverse_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions); + Py_VISIT(traverse_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame); + Py_VISIT(traverse_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame); + Py_VISIT(traverse_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer); + Py_VISIT(traverse_module_state->__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer); + Py_VISIT(traverse_module_state->__pyx_kp_s_); + Py_VISIT(traverse_module_state->__pyx_kp_s_1); + Py_VISIT(traverse_module_state->__pyx_n_s_ALL); + Py_VISIT(traverse_module_state->__pyx_n_s_AttributeError); + Py_VISIT(traverse_module_state->__pyx_n_s_CMD_SET_FUNCTION_BREAK); + Py_VISIT(traverse_module_state->__pyx_n_s_DEBUG_START); + Py_VISIT(traverse_module_state->__pyx_n_s_DEBUG_START_PY3K); + Py_VISIT(traverse_module_state->__pyx_n_s_EXCEPTION_TYPE_HANDLED); + Py_VISIT(traverse_module_state->__pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED); + Py_VISIT(traverse_module_state->__pyx_kp_s_Error_in_linecache_checkcache_r); + Py_VISIT(traverse_module_state->__pyx_kp_s_Error_in_linecache_getline_r_s_f); + Py_VISIT(traverse_module_state->__pyx_n_s_ForkSafeLock); + Py_VISIT(traverse_module_state->__pyx_n_s_GeneratorExit); + Py_VISIT(traverse_module_state->__pyx_n_s_IGNORE_EXCEPTION_TAG); + Py_VISIT(traverse_module_state->__pyx_kp_s_IgnoreException); + Py_VISIT(traverse_module_state->__pyx_kp_s_Ignore_exception_s_in_library_s); + Py_VISIT(traverse_module_state->__pyx_n_s_ImportError); + Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0); + Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2); + Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3); + Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4); + Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5); + Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6); + Py_VISIT(traverse_module_state->__pyx_n_s_KeyboardInterrupt); + Py_VISIT(traverse_module_state->__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); + Py_VISIT(traverse_module_state->__pyx_n_s_NO_FTRACE); + Py_VISIT(traverse_module_state->__pyx_n_s_NameError); + Py_VISIT(traverse_module_state->__pyx_n_s_None); + Py_VISIT(traverse_module_state->__pyx_kp_s_Not_used_in_sys_monitoring_mode); + Py_VISIT(traverse_module_state->__pyx_n_s_PYDEVD_IPYTHON_CONTEXT); + Py_VISIT(traverse_module_state->__pyx_n_s_PYDEVD_USE_SYS_MONITORING); + Py_VISIT(traverse_module_state->__pyx_n_s_PYDEV_FILE); + Py_VISIT(traverse_module_state->__pyx_n_s_PYTHON_SUSPEND); + Py_VISIT(traverse_module_state->__pyx_n_s_PickleError); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBAdditionalThreadInfo); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBAdditionalThreadInfo___reduc); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBAdditionalThreadInfo___setst); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBAdditionalThreadInfo__get_re); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBAdditionalThreadInfo__is_ste); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBAdditionalThreadInfo_get_top); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBAdditionalThreadInfo_update); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBFrame); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBFrame___reduce_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBFrame___setstate_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBFrame_do_wait_suspend); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBFrame_handle_user_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBFrame_set_suspend); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBFrame_trace_dispatch); + Py_VISIT(traverse_module_state->__pyx_n_s_PyDBFrame_trace_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_RETURN_VALUES_DICT); + Py_VISIT(traverse_module_state->__pyx_n_s_RuntimeError); + Py_VISIT(traverse_module_state->__pyx_n_s_STATE_RUN); + Py_VISIT(traverse_module_state->__pyx_n_s_STATE_SUSPEND); + Py_VISIT(traverse_module_state->__pyx_n_s_SUPPORT_GEVENT); + Py_VISIT(traverse_module_state->__pyx_n_s_SafeCallWrapper); + Py_VISIT(traverse_module_state->__pyx_n_s_SafeCallWrapper___reduce_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_SafeCallWrapper___setstate_cytho); + Py_VISIT(traverse_module_state->__pyx_n_s_SafeCallWrapper_get_method_objec); + Py_VISIT(traverse_module_state->__pyx_kp_s_State_s_Stop_s_Cmd_s_Kill_s); + Py_VISIT(traverse_module_state->__pyx_n_s_StopAsyncIteration); + Py_VISIT(traverse_module_state->__pyx_n_s_StopIteration); + Py_VISIT(traverse_module_state->__pyx_kp_s_Stop_inside_ipython_call); + Py_VISIT(traverse_module_state->__pyx_n_s_SystemExit); + Py_VISIT(traverse_module_state->__pyx_n_s_TRACE_PROPERTY); + Py_VISIT(traverse_module_state->__pyx_n_s_Thread); + Py_VISIT(traverse_module_state->__pyx_n_s_ThreadTracer); + Py_VISIT(traverse_module_state->__pyx_n_s_ThreadTracer___reduce_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_ThreadTracer___setstate_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_TopLevelThreadTracerNoBackFrame); + Py_VISIT(traverse_module_state->__pyx_n_s_TopLevelThreadTracerNoBackFrame_2); + Py_VISIT(traverse_module_state->__pyx_n_s_TopLevelThreadTracerNoBackFrame_3); + Py_VISIT(traverse_module_state->__pyx_n_s_TopLevelThreadTracerNoBackFrame_4); + Py_VISIT(traverse_module_state->__pyx_n_s_TopLevelThreadTracerNoBackFrame_5); + Py_VISIT(traverse_module_state->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle); + Py_VISIT(traverse_module_state->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_2); + Py_VISIT(traverse_module_state->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_3); + Py_VISIT(traverse_module_state->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_4); + Py_VISIT(traverse_module_state->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_5); + Py_VISIT(traverse_module_state->__pyx_n_s_TryExceptContainerObj); + Py_VISIT(traverse_module_state->__pyx_n_s_TryExceptContainerObj___reduce); + Py_VISIT(traverse_module_state->__pyx_n_s_TryExceptContainerObj___setstat); + Py_VISIT(traverse_module_state->__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); + Py_VISIT(traverse_module_state->__pyx_kp_s_Unable_to_get_topmost_frame_for); + Py_VISIT(traverse_module_state->__pyx_kp_s__10); + Py_VISIT(traverse_module_state->__pyx_kp_u__10); + Py_VISIT(traverse_module_state->__pyx_n_s__19); + Py_VISIT(traverse_module_state->__pyx_kp_s__4); + Py_VISIT(traverse_module_state->__pyx_kp_s__8); + Py_VISIT(traverse_module_state->__pyx_kp_s__9); + Py_VISIT(traverse_module_state->__pyx_n_s_abs_real_path_and_base); + Py_VISIT(traverse_module_state->__pyx_n_s_absolute_filename); + Py_VISIT(traverse_module_state->__pyx_n_s_active); + Py_VISIT(traverse_module_state->__pyx_n_s_add); + Py_VISIT(traverse_module_state->__pyx_n_s_add_additional_info); + Py_VISIT(traverse_module_state->__pyx_n_s_add_command); + Py_VISIT(traverse_module_state->__pyx_n_s_add_exception_to_frame); + Py_VISIT(traverse_module_state->__pyx_n_s_additional_info); + Py_VISIT(traverse_module_state->__pyx_n_s_any_thread_stepping); + Py_VISIT(traverse_module_state->__pyx_n_s_append); + Py_VISIT(traverse_module_state->__pyx_n_s_apply_files_filter); + Py_VISIT(traverse_module_state->__pyx_n_s_apply_to_settrace); + Py_VISIT(traverse_module_state->__pyx_n_s_arg); + Py_VISIT(traverse_module_state->__pyx_n_s_args); + Py_VISIT(traverse_module_state->__pyx_n_s_args_2); + Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines); + Py_VISIT(traverse_module_state->__pyx_n_s_basename); + Py_VISIT(traverse_module_state->__pyx_n_s_bootstrap); + Py_VISIT(traverse_module_state->__pyx_n_s_bootstrap_2); + Py_VISIT(traverse_module_state->__pyx_n_s_bootstrap_inner); + Py_VISIT(traverse_module_state->__pyx_n_s_bootstrap_inner_2); + Py_VISIT(traverse_module_state->__pyx_n_s_break_on_caught_exceptions); + Py_VISIT(traverse_module_state->__pyx_n_s_break_on_user_uncaught_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_breakpoints); + Py_VISIT(traverse_module_state->__pyx_n_s_call); + Py_VISIT(traverse_module_state->__pyx_n_s_call_2); + Py_VISIT(traverse_module_state->__pyx_n_s_can_skip); + Py_VISIT(traverse_module_state->__pyx_n_s_canonical_normalized_filename); + Py_VISIT(traverse_module_state->__pyx_kp_s_cell); + Py_VISIT(traverse_module_state->__pyx_n_s_check_excs); + Py_VISIT(traverse_module_state->__pyx_n_s_check_trace_obj); + Py_VISIT(traverse_module_state->__pyx_n_s_checkcache); + Py_VISIT(traverse_module_state->__pyx_n_s_children_variants); + Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem); + Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); + Py_VISIT(traverse_module_state->__pyx_n_s_cmd_factory); + Py_VISIT(traverse_module_state->__pyx_n_s_cmd_step_into); + Py_VISIT(traverse_module_state->__pyx_n_s_cmd_step_over); + Py_VISIT(traverse_module_state->__pyx_n_s_co_filename); + Py_VISIT(traverse_module_state->__pyx_n_s_co_firstlineno); + Py_VISIT(traverse_module_state->__pyx_n_s_co_flags); + Py_VISIT(traverse_module_state->__pyx_n_s_co_name); + Py_VISIT(traverse_module_state->__pyx_n_s_collect_return_info); + Py_VISIT(traverse_module_state->__pyx_n_s_collect_try_except_info); + Py_VISIT(traverse_module_state->__pyx_n_s_compile); + Py_VISIT(traverse_module_state->__pyx_n_s_condition); + Py_VISIT(traverse_module_state->__pyx_n_s_constant_to_str); + Py_VISIT(traverse_module_state->__pyx_n_s_constructed_tid_to_last_frame); + Py_VISIT(traverse_module_state->__pyx_n_s_container_obj); + Py_VISIT(traverse_module_state->__pyx_n_s_critical); + Py_VISIT(traverse_module_state->__pyx_n_s_curr_stat); + Py_VISIT(traverse_module_state->__pyx_n_s_current_frames); + Py_VISIT(traverse_module_state->__pyx_n_s_custom_key); + Py_VISIT(traverse_module_state->__pyx_n_s_debug); + Py_VISIT(traverse_module_state->__pyx_n_s_dict); + Py_VISIT(traverse_module_state->__pyx_n_s_dict_2); + Py_VISIT(traverse_module_state->__pyx_n_s_dis); + Py_VISIT(traverse_module_state->__pyx_kp_u_disable); + Py_VISIT(traverse_module_state->__pyx_n_s_disable_tracing); + Py_VISIT(traverse_module_state->__pyx_n_s_do_wait_suspend); + Py_VISIT(traverse_module_state->__pyx_kp_u_enable); + Py_VISIT(traverse_module_state->__pyx_n_s_enable_tracing); + Py_VISIT(traverse_module_state->__pyx_n_s_encode); + Py_VISIT(traverse_module_state->__pyx_n_s_endswith); + Py_VISIT(traverse_module_state->__pyx_n_s_enter); + Py_VISIT(traverse_module_state->__pyx_n_s_event); + Py_VISIT(traverse_module_state->__pyx_n_s_exc_break); + Py_VISIT(traverse_module_state->__pyx_n_s_exc_break_caught); + Py_VISIT(traverse_module_state->__pyx_n_s_exc_break_user); + Py_VISIT(traverse_module_state->__pyx_n_s_exc_info); + Py_VISIT(traverse_module_state->__pyx_n_s_exc_lineno); + Py_VISIT(traverse_module_state->__pyx_n_s_except_line); + Py_VISIT(traverse_module_state->__pyx_n_s_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_exception_break); + Py_VISIT(traverse_module_state->__pyx_n_s_exception_breakpoint); + Py_VISIT(traverse_module_state->__pyx_n_s_exception_type); + Py_VISIT(traverse_module_state->__pyx_n_s_exclude_exception_by_filter); + Py_VISIT(traverse_module_state->__pyx_n_s_exec); + Py_VISIT(traverse_module_state->__pyx_n_s_execfile); + Py_VISIT(traverse_module_state->__pyx_n_s_exit); + Py_VISIT(traverse_module_state->__pyx_n_s_expression); + Py_VISIT(traverse_module_state->__pyx_n_s_f); + Py_VISIT(traverse_module_state->__pyx_n_s_f_back); + Py_VISIT(traverse_module_state->__pyx_n_s_f_code); + Py_VISIT(traverse_module_state->__pyx_n_s_f_globals); + Py_VISIT(traverse_module_state->__pyx_n_s_f_lasti); + Py_VISIT(traverse_module_state->__pyx_n_s_f_lineno); + Py_VISIT(traverse_module_state->__pyx_n_s_f_locals); + Py_VISIT(traverse_module_state->__pyx_n_s_f_trace); + Py_VISIT(traverse_module_state->__pyx_n_s_f_unhandled); + Py_VISIT(traverse_module_state->__pyx_n_s_filename); + Py_VISIT(traverse_module_state->__pyx_n_s_filename_to_lines_where_exceptio); + Py_VISIT(traverse_module_state->__pyx_n_s_filename_to_stat_info); + Py_VISIT(traverse_module_state->__pyx_n_s_findlinestarts); + Py_VISIT(traverse_module_state->__pyx_n_s_fix_top_level_trace_and_get_trac); + Py_VISIT(traverse_module_state->__pyx_n_s_force_only_unhandled_tracer); + Py_VISIT(traverse_module_state->__pyx_n_s_frame); + Py_VISIT(traverse_module_state->__pyx_n_s_frame_cache_key); + Py_VISIT(traverse_module_state->__pyx_n_s_frame_id_to_frame); + Py_VISIT(traverse_module_state->__pyx_n_s_frame_skips_cache); + Py_VISIT(traverse_module_state->__pyx_n_s_frame_trace_dispatch); + Py_VISIT(traverse_module_state->__pyx_n_s_from_user_input); + Py_VISIT(traverse_module_state->__pyx_n_s_func_name); + Py_VISIT(traverse_module_state->__pyx_n_s_function_breakpoint_name_to_brea); + Py_VISIT(traverse_module_state->__pyx_kp_u_gc); + Py_VISIT(traverse_module_state->__pyx_n_s_get); + Py_VISIT(traverse_module_state->__pyx_n_s_get_abs_path_real_path_and_base); + Py_VISIT(traverse_module_state->__pyx_n_s_get_breakpoint); + Py_VISIT(traverse_module_state->__pyx_n_s_get_clsname_for_code); + Py_VISIT(traverse_module_state->__pyx_n_s_get_current_thread_id); + Py_VISIT(traverse_module_state->__pyx_n_s_get_exception_breakpoint); + Py_VISIT(traverse_module_state->__pyx_n_s_get_file_type); + Py_VISIT(traverse_module_state->__pyx_n_s_get_global_debugger); + Py_VISIT(traverse_module_state->__pyx_n_s_get_internal_queue_and_event); + Py_VISIT(traverse_module_state->__pyx_n_s_get_method_object); + Py_VISIT(traverse_module_state->__pyx_n_s_get_related_thread); + Py_VISIT(traverse_module_state->__pyx_n_s_get_smart_step_into_variant_from); + Py_VISIT(traverse_module_state->__pyx_n_s_get_thread_id); + Py_VISIT(traverse_module_state->__pyx_n_s_get_topmost_frame); + Py_VISIT(traverse_module_state->__pyx_n_s_get_trace_dispatch_func); + Py_VISIT(traverse_module_state->__pyx_n_s_getline); + Py_VISIT(traverse_module_state->__pyx_n_s_getstate); + Py_VISIT(traverse_module_state->__pyx_n_s_global_cache_frame_skips); + Py_VISIT(traverse_module_state->__pyx_n_s_global_cache_skips); + Py_VISIT(traverse_module_state->__pyx_n_s_global_notify_skipped_step_in_l); + Py_VISIT(traverse_module_state->__pyx_n_s_handle_breakpoint_condition); + Py_VISIT(traverse_module_state->__pyx_n_s_handle_breakpoint_expression); + Py_VISIT(traverse_module_state->__pyx_n_s_handle_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_handle_user_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_has_condition); + Py_VISIT(traverse_module_state->__pyx_n_s_has_plugin_exception_breaks); + Py_VISIT(traverse_module_state->__pyx_n_s_has_plugin_line_breaks); + Py_VISIT(traverse_module_state->__pyx_n_s_i); + Py_VISIT(traverse_module_state->__pyx_n_s_id); + Py_VISIT(traverse_module_state->__pyx_n_s_ident); + Py_VISIT(traverse_module_state->__pyx_n_s_ident_2); + Py_VISIT(traverse_module_state->__pyx_n_s_ignore_exception_trace); + Py_VISIT(traverse_module_state->__pyx_n_s_ignore_exceptions_thrown_in_line); + Py_VISIT(traverse_module_state->__pyx_n_s_ignore_system_exit_code); + Py_VISIT(traverse_module_state->__pyx_n_s_import); + Py_VISIT(traverse_module_state->__pyx_n_s_in_project_scope); + Py_VISIT(traverse_module_state->__pyx_n_s_info); + Py_VISIT(traverse_module_state->__pyx_n_s_initial_trace_obj); + Py_VISIT(traverse_module_state->__pyx_n_s_initializing); + Py_VISIT(traverse_module_state->__pyx_kp_s_invalid); + Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); + Py_VISIT(traverse_module_state->__pyx_n_s_is_files_filter_enabled); + Py_VISIT(traverse_module_state->__pyx_n_s_is_line_in_except_block); + Py_VISIT(traverse_module_state->__pyx_n_s_is_line_in_try_block); + Py_VISIT(traverse_module_state->__pyx_n_s_is_logpoint); + Py_VISIT(traverse_module_state->__pyx_n_s_is_stepping); + Py_VISIT(traverse_module_state->__pyx_n_s_is_thread_alive); + Py_VISIT(traverse_module_state->__pyx_n_s_is_unhandled_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_is_unwind); + Py_VISIT(traverse_module_state->__pyx_n_s_is_user_uncaught); + Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); + Py_VISIT(traverse_module_state->__pyx_n_s_j); + Py_VISIT(traverse_module_state->__pyx_n_s_just_raised); + Py_VISIT(traverse_module_state->__pyx_n_s_kwargs); + Py_VISIT(traverse_module_state->__pyx_kp_s_lambda); + Py_VISIT(traverse_module_state->__pyx_n_s_last_raise_line); + Py_VISIT(traverse_module_state->__pyx_n_s_last_stat); + Py_VISIT(traverse_module_state->__pyx_n_s_line); + Py_VISIT(traverse_module_state->__pyx_n_s_linecache); + Py_VISIT(traverse_module_state->__pyx_n_s_lines); + Py_VISIT(traverse_module_state->__pyx_n_s_lines_ignored); + Py_VISIT(traverse_module_state->__pyx_n_s_linesep); + Py_VISIT(traverse_module_state->__pyx_n_s_main); + Py_VISIT(traverse_module_state->__pyx_n_s_main_2); + Py_VISIT(traverse_module_state->__pyx_n_s_make_console_message); + Py_VISIT(traverse_module_state->__pyx_n_s_make_io_message); + Py_VISIT(traverse_module_state->__pyx_n_s_match); + Py_VISIT(traverse_module_state->__pyx_n_s_maybe_user_uncaught_exc_info); + Py_VISIT(traverse_module_state->__pyx_n_s_merged); + Py_VISIT(traverse_module_state->__pyx_n_s_method_object); + Py_VISIT(traverse_module_state->__pyx_kp_s_module); + Py_VISIT(traverse_module_state->__pyx_n_s_name); + Py_VISIT(traverse_module_state->__pyx_n_s_name_2); + Py_VISIT(traverse_module_state->__pyx_n_s_new); + Py_VISIT(traverse_module_state->__pyx_n_s_next_additional_info); + Py_VISIT(traverse_module_state->__pyx_n_s_notify_on_first_raise_only); + Py_VISIT(traverse_module_state->__pyx_n_s_notify_skipped_step_in_because_o); + Py_VISIT(traverse_module_state->__pyx_n_s_notify_thread_not_alive); + Py_VISIT(traverse_module_state->__pyx_n_s_original_call); + Py_VISIT(traverse_module_state->__pyx_n_s_original_step_cmd); + Py_VISIT(traverse_module_state->__pyx_n_s_os); + Py_VISIT(traverse_module_state->__pyx_n_s_os_path); + Py_VISIT(traverse_module_state->__pyx_n_s_path); + Py_VISIT(traverse_module_state->__pyx_n_s_pickle); + Py_VISIT(traverse_module_state->__pyx_n_s_plugin); + Py_VISIT(traverse_module_state->__pyx_n_s_pop); + Py_VISIT(traverse_module_state->__pyx_n_s_prev_user_uncaught_exc_info); + Py_VISIT(traverse_module_state->__pyx_n_s_py_db); + Py_VISIT(traverse_module_state->__pyx_kp_s_pyc); + Py_VISIT(traverse_module_state->__pyx_n_s_pydb_disposed); + Py_VISIT(traverse_module_state->__pyx_n_s_pydev_bundle); + Py_VISIT(traverse_module_state->__pyx_n_s_pydev_bundle__pydev_saved_modul); + Py_VISIT(traverse_module_state->__pyx_n_s_pydev_bundle_pydev_is_thread_al); + Py_VISIT(traverse_module_state->__pyx_n_s_pydev_bundle_pydev_log); + Py_VISIT(traverse_module_state->__pyx_n_s_pydev_do_not_trace); + Py_VISIT(traverse_module_state->__pyx_kp_s_pydev_execfile_py); + Py_VISIT(traverse_module_state->__pyx_n_s_pydev_log); + Py_VISIT(traverse_module_state->__pyx_n_s_pydev_log_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_pydev_monkey); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_bundle); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_bundle_pydevd_bytecode_u); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_bundle_pydevd_comm_const); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_bundle_pydevd_constants); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_bundle_pydevd_cython); + Py_VISIT(traverse_module_state->__pyx_kp_s_pydevd_bundle_pydevd_cython_pyx); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_bundle_pydevd_frame_util); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_bundle_pydevd_utils); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_dont_trace); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_file_utils); + Py_VISIT(traverse_module_state->__pyx_kp_s_pydevd_py); + Py_VISIT(traverse_module_state->__pyx_kp_s_pydevd_traceproperty_py); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_tracing); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_PyDBAdditionalThr); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_PyDBFrame); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_SafeCallWrapper); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_ThreadTracer); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TopLevelThreadTra); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_TopLevelThreadTra_2); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle__TryExceptContain); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable); + Py_VISIT(traverse_module_state->__pyx_n_s_qname); + Py_VISIT(traverse_module_state->__pyx_n_s_quitting); + Py_VISIT(traverse_module_state->__pyx_n_s_raise_lines); + Py_VISIT(traverse_module_state->__pyx_n_s_raise_lines_in_except); + Py_VISIT(traverse_module_state->__pyx_n_s_re); + Py_VISIT(traverse_module_state->__pyx_n_s_reduce); + Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex); + Py_VISIT(traverse_module_state->__pyx_n_s_ref); + Py_VISIT(traverse_module_state->__pyx_n_s_remove_additional_info); + Py_VISIT(traverse_module_state->__pyx_n_s_remove_exception_from_frame); + Py_VISIT(traverse_module_state->__pyx_n_s_remove_return_values_flag); + Py_VISIT(traverse_module_state->__pyx_n_s_result); + Py_VISIT(traverse_module_state->__pyx_n_s_ret); + Py_VISIT(traverse_module_state->__pyx_n_s_return); + Py_VISIT(traverse_module_state->__pyx_n_s_return_line); + Py_VISIT(traverse_module_state->__pyx_n_s_returns); + Py_VISIT(traverse_module_state->__pyx_n_s_rfind); + Py_VISIT(traverse_module_state->__pyx_n_s_run); + Py_VISIT(traverse_module_state->__pyx_kp_s_s_raised_from_within_the_callba); + Py_VISIT(traverse_module_state->__pyx_kp_s_s_s); + Py_VISIT(traverse_module_state->__pyx_n_s_self); + Py_VISIT(traverse_module_state->__pyx_n_s_send_caught_exception_stack); + Py_VISIT(traverse_module_state->__pyx_n_s_send_caught_exception_stack_proc); + Py_VISIT(traverse_module_state->__pyx_n_s_set); + Py_VISIT(traverse_module_state->__pyx_n_s_set_additional_thread_info); + Py_VISIT(traverse_module_state->__pyx_n_s_set_additional_thread_info_lock); + Py_VISIT(traverse_module_state->__pyx_n_s_set_suspend); + Py_VISIT(traverse_module_state->__pyx_n_s_set_trace_for_frame_and_parents); + Py_VISIT(traverse_module_state->__pyx_n_s_setstate); + Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_should_stop); + Py_VISIT(traverse_module_state->__pyx_n_s_should_stop_on_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_should_trace_hook); + Py_VISIT(traverse_module_state->__pyx_n_s_show_return_values); + Py_VISIT(traverse_module_state->__pyx_n_s_skip_on_exceptions_thrown_in_sam); + Py_VISIT(traverse_module_state->__pyx_n_s_spec); + Py_VISIT(traverse_module_state->__pyx_n_s_st_mtime); + Py_VISIT(traverse_module_state->__pyx_n_s_st_size); + Py_VISIT(traverse_module_state->__pyx_n_s_startswith); + Py_VISIT(traverse_module_state->__pyx_n_s_stat); + Py_VISIT(traverse_module_state->__pyx_n_s_state); + Py_VISIT(traverse_module_state->__pyx_n_s_stop); + Py_VISIT(traverse_module_state->__pyx_n_s_stop_on_unhandled_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_stopped); + Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); + Py_VISIT(traverse_module_state->__pyx_n_s_suspend); + Py_VISIT(traverse_module_state->__pyx_n_s_suspend_other_threads); + Py_VISIT(traverse_module_state->__pyx_n_s_suspend_policy); + Py_VISIT(traverse_module_state->__pyx_n_s_suspended_at_unhandled); + Py_VISIT(traverse_module_state->__pyx_n_s_sys); + Py_VISIT(traverse_module_state->__pyx_n_s_t); + Py_VISIT(traverse_module_state->__pyx_n_s_tb_frame); + Py_VISIT(traverse_module_state->__pyx_n_s_tb_lineno); + Py_VISIT(traverse_module_state->__pyx_n_s_tb_next); + Py_VISIT(traverse_module_state->__pyx_n_s_test); + Py_VISIT(traverse_module_state->__pyx_n_s_thread); + Py_VISIT(traverse_module_state->__pyx_kp_s_thread__ident_is_None_in__get_re); + Py_VISIT(traverse_module_state->__pyx_n_s_thread_trace_func); + Py_VISIT(traverse_module_state->__pyx_n_s_thread_tracer); + Py_VISIT(traverse_module_state->__pyx_n_s_threading); + Py_VISIT(traverse_module_state->__pyx_n_s_threading_active); + Py_VISIT(traverse_module_state->__pyx_n_s_threading_current_thread); + Py_VISIT(traverse_module_state->__pyx_n_s_threading_get_ident); + Py_VISIT(traverse_module_state->__pyx_n_s_top_level_thread_tracer); + Py_VISIT(traverse_module_state->__pyx_n_s_top_level_thread_tracer_no_back); + Py_VISIT(traverse_module_state->__pyx_n_s_top_level_thread_tracer_unhandle); + Py_VISIT(traverse_module_state->__pyx_n_s_trace); + Py_VISIT(traverse_module_state->__pyx_n_s_trace_dispatch); + Py_VISIT(traverse_module_state->__pyx_n_s_trace_dispatch_and_unhandled_exc); + Py_VISIT(traverse_module_state->__pyx_n_s_trace_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_trace_obj); + Py_VISIT(traverse_module_state->__pyx_n_s_trace_unhandled_exceptions); + Py_VISIT(traverse_module_state->__pyx_n_s_try_exc_info); + Py_VISIT(traverse_module_state->__pyx_n_s_try_except_info); + Py_VISIT(traverse_module_state->__pyx_n_s_try_except_infos); + Py_VISIT(traverse_module_state->__pyx_n_s_update); + Py_VISIT(traverse_module_state->__pyx_n_s_update_stepping_info); + Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate); + Py_VISIT(traverse_module_state->__pyx_kp_s_utf_8); + Py_VISIT(traverse_module_state->__pyx_n_s_valid_try_except_infos); + Py_VISIT(traverse_module_state->__pyx_n_s_value); + Py_VISIT(traverse_module_state->__pyx_n_s_values); + Py_VISIT(traverse_module_state->__pyx_n_s_version); + Py_VISIT(traverse_module_state->__pyx_n_s_was_just_raised); + Py_VISIT(traverse_module_state->__pyx_n_s_weak_thread); + Py_VISIT(traverse_module_state->__pyx_n_s_weakref); + Py_VISIT(traverse_module_state->__pyx_n_s_writer); + Py_VISIT(traverse_module_state->__pyx_int_0); + Py_VISIT(traverse_module_state->__pyx_int_1); + Py_VISIT(traverse_module_state->__pyx_int_2); + Py_VISIT(traverse_module_state->__pyx_int_11); + Py_VISIT(traverse_module_state->__pyx_int_111); + Py_VISIT(traverse_module_state->__pyx_int_137); + Py_VISIT(traverse_module_state->__pyx_int_160); + Py_VISIT(traverse_module_state->__pyx_int_2424557); + Py_VISIT(traverse_module_state->__pyx_int_16751766); + Py_VISIT(traverse_module_state->__pyx_int_18997755); + Py_VISIT(traverse_module_state->__pyx_int_61391470); + Py_VISIT(traverse_module_state->__pyx_int_63705258); + Py_VISIT(traverse_module_state->__pyx_int_64458794); + Py_VISIT(traverse_module_state->__pyx_int_66451433); + Py_VISIT(traverse_module_state->__pyx_int_70528507); + Py_VISIT(traverse_module_state->__pyx_int_84338306); + Py_VISIT(traverse_module_state->__pyx_int_125568891); + Py_VISIT(traverse_module_state->__pyx_int_169093275); + Py_VISIT(traverse_module_state->__pyx_int_171613889); + Py_VISIT(traverse_module_state->__pyx_int_192493205); + Py_VISIT(traverse_module_state->__pyx_int_210464433); + Py_VISIT(traverse_module_state->__pyx_int_221489684); + Py_VISIT(traverse_module_state->__pyx_int_230645316); + Py_VISIT(traverse_module_state->__pyx_int_232881363); + Py_VISIT(traverse_module_state->__pyx_int_255484337); + Py_VISIT(traverse_module_state->__pyx_int_neg_1); + Py_VISIT(traverse_module_state->__pyx_slice__2); + Py_VISIT(traverse_module_state->__pyx_slice__6); + Py_VISIT(traverse_module_state->__pyx_tuple__3); + Py_VISIT(traverse_module_state->__pyx_tuple__5); + Py_VISIT(traverse_module_state->__pyx_tuple__7); + Py_VISIT(traverse_module_state->__pyx_tuple__11); + Py_VISIT(traverse_module_state->__pyx_tuple__12); + Py_VISIT(traverse_module_state->__pyx_tuple__13); + Py_VISIT(traverse_module_state->__pyx_tuple__14); + Py_VISIT(traverse_module_state->__pyx_tuple__15); + Py_VISIT(traverse_module_state->__pyx_tuple__16); + Py_VISIT(traverse_module_state->__pyx_tuple__17); + Py_VISIT(traverse_module_state->__pyx_tuple__18); + Py_VISIT(traverse_module_state->__pyx_tuple__20); + Py_VISIT(traverse_module_state->__pyx_tuple__23); + Py_VISIT(traverse_module_state->__pyx_tuple__26); + Py_VISIT(traverse_module_state->__pyx_tuple__28); + Py_VISIT(traverse_module_state->__pyx_tuple__30); + Py_VISIT(traverse_module_state->__pyx_tuple__32); + Py_VISIT(traverse_module_state->__pyx_tuple__36); + Py_VISIT(traverse_module_state->__pyx_tuple__37); + Py_VISIT(traverse_module_state->__pyx_tuple__39); + Py_VISIT(traverse_module_state->__pyx_tuple__40); + Py_VISIT(traverse_module_state->__pyx_tuple__41); + Py_VISIT(traverse_module_state->__pyx_tuple__42); + Py_VISIT(traverse_module_state->__pyx_tuple__46); + Py_VISIT(traverse_module_state->__pyx_tuple__49); + Py_VISIT(traverse_module_state->__pyx_tuple__51); + Py_VISIT(traverse_module_state->__pyx_tuple__53); + Py_VISIT(traverse_module_state->__pyx_tuple__57); + Py_VISIT(traverse_module_state->__pyx_tuple__59); + Py_VISIT(traverse_module_state->__pyx_tuple__60); + Py_VISIT(traverse_module_state->__pyx_tuple__62); + Py_VISIT(traverse_module_state->__pyx_tuple__67); + Py_VISIT(traverse_module_state->__pyx_tuple__69); + Py_VISIT(traverse_module_state->__pyx_tuple__71); + Py_VISIT(traverse_module_state->__pyx_tuple__76); + Py_VISIT(traverse_module_state->__pyx_tuple__85); + Py_VISIT(traverse_module_state->__pyx_codeobj__21); + Py_VISIT(traverse_module_state->__pyx_codeobj__22); + Py_VISIT(traverse_module_state->__pyx_codeobj__24); + Py_VISIT(traverse_module_state->__pyx_codeobj__25); + Py_VISIT(traverse_module_state->__pyx_codeobj__27); + Py_VISIT(traverse_module_state->__pyx_codeobj__29); + Py_VISIT(traverse_module_state->__pyx_codeobj__31); + Py_VISIT(traverse_module_state->__pyx_codeobj__33); + Py_VISIT(traverse_module_state->__pyx_codeobj__34); + Py_VISIT(traverse_module_state->__pyx_codeobj__35); + Py_VISIT(traverse_module_state->__pyx_codeobj__38); + Py_VISIT(traverse_module_state->__pyx_codeobj__43); + Py_VISIT(traverse_module_state->__pyx_codeobj__44); + Py_VISIT(traverse_module_state->__pyx_codeobj__45); + Py_VISIT(traverse_module_state->__pyx_codeobj__47); + Py_VISIT(traverse_module_state->__pyx_codeobj__48); + Py_VISIT(traverse_module_state->__pyx_codeobj__50); + Py_VISIT(traverse_module_state->__pyx_codeobj__52); + Py_VISIT(traverse_module_state->__pyx_codeobj__54); + Py_VISIT(traverse_module_state->__pyx_codeobj__55); + Py_VISIT(traverse_module_state->__pyx_codeobj__56); + Py_VISIT(traverse_module_state->__pyx_codeobj__58); + Py_VISIT(traverse_module_state->__pyx_codeobj__61); + Py_VISIT(traverse_module_state->__pyx_codeobj__63); + Py_VISIT(traverse_module_state->__pyx_codeobj__64); + Py_VISIT(traverse_module_state->__pyx_codeobj__65); + Py_VISIT(traverse_module_state->__pyx_codeobj__66); + Py_VISIT(traverse_module_state->__pyx_codeobj__68); + Py_VISIT(traverse_module_state->__pyx_codeobj__70); + Py_VISIT(traverse_module_state->__pyx_codeobj__72); + Py_VISIT(traverse_module_state->__pyx_codeobj__73); + Py_VISIT(traverse_module_state->__pyx_codeobj__74); + Py_VISIT(traverse_module_state->__pyx_codeobj__75); + Py_VISIT(traverse_module_state->__pyx_codeobj__77); + Py_VISIT(traverse_module_state->__pyx_codeobj__78); + Py_VISIT(traverse_module_state->__pyx_codeobj__79); + Py_VISIT(traverse_module_state->__pyx_codeobj__80); + Py_VISIT(traverse_module_state->__pyx_codeobj__81); + Py_VISIT(traverse_module_state->__pyx_codeobj__82); + Py_VISIT(traverse_module_state->__pyx_codeobj__83); + Py_VISIT(traverse_module_state->__pyx_codeobj__84); + Py_VISIT(traverse_module_state->__pyx_codeobj__86); + Py_VISIT(traverse_module_state->__pyx_codeobj__87); + Py_VISIT(traverse_module_state->__pyx_codeobj__88); + Py_VISIT(traverse_module_state->__pyx_codeobj__89); + Py_VISIT(traverse_module_state->__pyx_codeobj__90); + Py_VISIT(traverse_module_state->__pyx_codeobj__91); + Py_VISIT(traverse_module_state->__pyx_codeobj__92); + return 0; +} +#endif +/* #### Code section: module_state_defines ### */ +#define __pyx_d __pyx_mstate_global->__pyx_d +#define __pyx_b __pyx_mstate_global->__pyx_b +#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime +#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple +#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes +#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode +#ifdef __Pyx_CyFunction_USED +#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType +#endif +#ifdef __Pyx_FusedFunction_USED +#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType +#endif +#ifdef __Pyx_Generator_USED +#define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType +#endif +#ifdef __Pyx_IterableCoroutine_USED +#define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType +#endif +#ifdef __Pyx_Coroutine_USED +#define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType +#endif +#ifdef __Pyx_Coroutine_USED +#define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType +#endif +#if CYTHON_USE_MODULE_STATE +#endif +#if CYTHON_USE_MODULE_STATE +#endif +#if CYTHON_USE_MODULE_STATE +#endif +#if CYTHON_USE_MODULE_STATE +#endif +#define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type +#if CYTHON_USE_MODULE_STATE +#endif +#if CYTHON_USE_MODULE_STATE +#endif +#if CYTHON_USE_MODULE_STATE +#endif +#if CYTHON_USE_MODULE_STATE +#define __pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo __pyx_mstate_global->__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo +#define __pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj __pyx_mstate_global->__pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj +#define __pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame __pyx_mstate_global->__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame +#define __pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper __pyx_mstate_global->__pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper +#define __pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions __pyx_mstate_global->__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions +#define __pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame __pyx_mstate_global->__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame +#define __pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer __pyx_mstate_global->__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer +#endif +#define __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo __pyx_mstate_global->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo +#define __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj __pyx_mstate_global->__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj +#define __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame __pyx_mstate_global->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame +#define __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper __pyx_mstate_global->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper +#define __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions __pyx_mstate_global->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions +#define __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame __pyx_mstate_global->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame +#define __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer __pyx_mstate_global->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer +#define __pyx_kp_s_ __pyx_mstate_global->__pyx_kp_s_ +#define __pyx_kp_s_1 __pyx_mstate_global->__pyx_kp_s_1 +#define __pyx_n_s_ALL __pyx_mstate_global->__pyx_n_s_ALL +#define __pyx_n_s_AttributeError __pyx_mstate_global->__pyx_n_s_AttributeError +#define __pyx_n_s_CMD_SET_FUNCTION_BREAK __pyx_mstate_global->__pyx_n_s_CMD_SET_FUNCTION_BREAK +#define __pyx_n_s_DEBUG_START __pyx_mstate_global->__pyx_n_s_DEBUG_START +#define __pyx_n_s_DEBUG_START_PY3K __pyx_mstate_global->__pyx_n_s_DEBUG_START_PY3K +#define __pyx_n_s_EXCEPTION_TYPE_HANDLED __pyx_mstate_global->__pyx_n_s_EXCEPTION_TYPE_HANDLED +#define __pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED __pyx_mstate_global->__pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED +#define __pyx_kp_s_Error_in_linecache_checkcache_r __pyx_mstate_global->__pyx_kp_s_Error_in_linecache_checkcache_r +#define __pyx_kp_s_Error_in_linecache_getline_r_s_f __pyx_mstate_global->__pyx_kp_s_Error_in_linecache_getline_r_s_f +#define __pyx_n_s_ForkSafeLock __pyx_mstate_global->__pyx_n_s_ForkSafeLock +#define __pyx_n_s_GeneratorExit __pyx_mstate_global->__pyx_n_s_GeneratorExit +#define __pyx_n_s_IGNORE_EXCEPTION_TAG __pyx_mstate_global->__pyx_n_s_IGNORE_EXCEPTION_TAG +#define __pyx_kp_s_IgnoreException __pyx_mstate_global->__pyx_kp_s_IgnoreException +#define __pyx_kp_s_Ignore_exception_s_in_library_s __pyx_mstate_global->__pyx_kp_s_Ignore_exception_s_in_library_s +#define __pyx_n_s_ImportError __pyx_mstate_global->__pyx_n_s_ImportError +#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0 +#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2 +#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3 +#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4 +#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5 +#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6 +#define __pyx_n_s_KeyboardInterrupt __pyx_mstate_global->__pyx_n_s_KeyboardInterrupt +#define __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER __pyx_mstate_global->__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER +#define __pyx_n_s_NO_FTRACE __pyx_mstate_global->__pyx_n_s_NO_FTRACE +#define __pyx_n_s_NameError __pyx_mstate_global->__pyx_n_s_NameError +#define __pyx_n_s_None __pyx_mstate_global->__pyx_n_s_None +#define __pyx_kp_s_Not_used_in_sys_monitoring_mode __pyx_mstate_global->__pyx_kp_s_Not_used_in_sys_monitoring_mode +#define __pyx_n_s_PYDEVD_IPYTHON_CONTEXT __pyx_mstate_global->__pyx_n_s_PYDEVD_IPYTHON_CONTEXT +#define __pyx_n_s_PYDEVD_USE_SYS_MONITORING __pyx_mstate_global->__pyx_n_s_PYDEVD_USE_SYS_MONITORING +#define __pyx_n_s_PYDEV_FILE __pyx_mstate_global->__pyx_n_s_PYDEV_FILE +#define __pyx_n_s_PYTHON_SUSPEND __pyx_mstate_global->__pyx_n_s_PYTHON_SUSPEND +#define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError +#define __pyx_n_s_PyDBAdditionalThreadInfo __pyx_mstate_global->__pyx_n_s_PyDBAdditionalThreadInfo +#define __pyx_n_s_PyDBAdditionalThreadInfo___reduc __pyx_mstate_global->__pyx_n_s_PyDBAdditionalThreadInfo___reduc +#define __pyx_n_s_PyDBAdditionalThreadInfo___setst __pyx_mstate_global->__pyx_n_s_PyDBAdditionalThreadInfo___setst +#define __pyx_n_s_PyDBAdditionalThreadInfo__get_re __pyx_mstate_global->__pyx_n_s_PyDBAdditionalThreadInfo__get_re +#define __pyx_n_s_PyDBAdditionalThreadInfo__is_ste __pyx_mstate_global->__pyx_n_s_PyDBAdditionalThreadInfo__is_ste +#define __pyx_n_s_PyDBAdditionalThreadInfo_get_top __pyx_mstate_global->__pyx_n_s_PyDBAdditionalThreadInfo_get_top +#define __pyx_n_s_PyDBAdditionalThreadInfo_update __pyx_mstate_global->__pyx_n_s_PyDBAdditionalThreadInfo_update +#define __pyx_n_s_PyDBFrame __pyx_mstate_global->__pyx_n_s_PyDBFrame +#define __pyx_n_s_PyDBFrame___reduce_cython __pyx_mstate_global->__pyx_n_s_PyDBFrame___reduce_cython +#define __pyx_n_s_PyDBFrame___setstate_cython __pyx_mstate_global->__pyx_n_s_PyDBFrame___setstate_cython +#define __pyx_n_s_PyDBFrame_do_wait_suspend __pyx_mstate_global->__pyx_n_s_PyDBFrame_do_wait_suspend +#define __pyx_n_s_PyDBFrame_handle_user_exception __pyx_mstate_global->__pyx_n_s_PyDBFrame_handle_user_exception +#define __pyx_n_s_PyDBFrame_set_suspend __pyx_mstate_global->__pyx_n_s_PyDBFrame_set_suspend +#define __pyx_n_s_PyDBFrame_trace_dispatch __pyx_mstate_global->__pyx_n_s_PyDBFrame_trace_dispatch +#define __pyx_n_s_PyDBFrame_trace_exception __pyx_mstate_global->__pyx_n_s_PyDBFrame_trace_exception +#define __pyx_n_s_RETURN_VALUES_DICT __pyx_mstate_global->__pyx_n_s_RETURN_VALUES_DICT +#define __pyx_n_s_RuntimeError __pyx_mstate_global->__pyx_n_s_RuntimeError +#define __pyx_n_s_STATE_RUN __pyx_mstate_global->__pyx_n_s_STATE_RUN +#define __pyx_n_s_STATE_SUSPEND __pyx_mstate_global->__pyx_n_s_STATE_SUSPEND +#define __pyx_n_s_SUPPORT_GEVENT __pyx_mstate_global->__pyx_n_s_SUPPORT_GEVENT +#define __pyx_n_s_SafeCallWrapper __pyx_mstate_global->__pyx_n_s_SafeCallWrapper +#define __pyx_n_s_SafeCallWrapper___reduce_cython __pyx_mstate_global->__pyx_n_s_SafeCallWrapper___reduce_cython +#define __pyx_n_s_SafeCallWrapper___setstate_cytho __pyx_mstate_global->__pyx_n_s_SafeCallWrapper___setstate_cytho +#define __pyx_n_s_SafeCallWrapper_get_method_objec __pyx_mstate_global->__pyx_n_s_SafeCallWrapper_get_method_objec +#define __pyx_kp_s_State_s_Stop_s_Cmd_s_Kill_s __pyx_mstate_global->__pyx_kp_s_State_s_Stop_s_Cmd_s_Kill_s +#define __pyx_n_s_StopAsyncIteration __pyx_mstate_global->__pyx_n_s_StopAsyncIteration +#define __pyx_n_s_StopIteration __pyx_mstate_global->__pyx_n_s_StopIteration +#define __pyx_kp_s_Stop_inside_ipython_call __pyx_mstate_global->__pyx_kp_s_Stop_inside_ipython_call +#define __pyx_n_s_SystemExit __pyx_mstate_global->__pyx_n_s_SystemExit +#define __pyx_n_s_TRACE_PROPERTY __pyx_mstate_global->__pyx_n_s_TRACE_PROPERTY +#define __pyx_n_s_Thread __pyx_mstate_global->__pyx_n_s_Thread +#define __pyx_n_s_ThreadTracer __pyx_mstate_global->__pyx_n_s_ThreadTracer +#define __pyx_n_s_ThreadTracer___reduce_cython __pyx_mstate_global->__pyx_n_s_ThreadTracer___reduce_cython +#define __pyx_n_s_ThreadTracer___setstate_cython __pyx_mstate_global->__pyx_n_s_ThreadTracer___setstate_cython +#define __pyx_n_s_TopLevelThreadTracerNoBackFrame __pyx_mstate_global->__pyx_n_s_TopLevelThreadTracerNoBackFrame +#define __pyx_n_s_TopLevelThreadTracerNoBackFrame_2 __pyx_mstate_global->__pyx_n_s_TopLevelThreadTracerNoBackFrame_2 +#define __pyx_n_s_TopLevelThreadTracerNoBackFrame_3 __pyx_mstate_global->__pyx_n_s_TopLevelThreadTracerNoBackFrame_3 +#define __pyx_n_s_TopLevelThreadTracerNoBackFrame_4 __pyx_mstate_global->__pyx_n_s_TopLevelThreadTracerNoBackFrame_4 +#define __pyx_n_s_TopLevelThreadTracerNoBackFrame_5 __pyx_mstate_global->__pyx_n_s_TopLevelThreadTracerNoBackFrame_5 +#define __pyx_n_s_TopLevelThreadTracerOnlyUnhandle __pyx_mstate_global->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle +#define __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_2 __pyx_mstate_global->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_2 +#define __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_3 __pyx_mstate_global->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_3 +#define __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_4 __pyx_mstate_global->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_4 +#define __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_5 __pyx_mstate_global->__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_5 +#define __pyx_n_s_TryExceptContainerObj __pyx_mstate_global->__pyx_n_s_TryExceptContainerObj +#define __pyx_n_s_TryExceptContainerObj___reduce __pyx_mstate_global->__pyx_n_s_TryExceptContainerObj___reduce +#define __pyx_n_s_TryExceptContainerObj___setstat __pyx_mstate_global->__pyx_n_s_TryExceptContainerObj___setstat +#define __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA __pyx_mstate_global->__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA +#define __pyx_kp_s_Unable_to_get_topmost_frame_for __pyx_mstate_global->__pyx_kp_s_Unable_to_get_topmost_frame_for +#define __pyx_kp_s__10 __pyx_mstate_global->__pyx_kp_s__10 +#define __pyx_kp_u__10 __pyx_mstate_global->__pyx_kp_u__10 +#define __pyx_n_s__19 __pyx_mstate_global->__pyx_n_s__19 +#define __pyx_kp_s__4 __pyx_mstate_global->__pyx_kp_s__4 +#define __pyx_kp_s__8 __pyx_mstate_global->__pyx_kp_s__8 +#define __pyx_kp_s__9 __pyx_mstate_global->__pyx_kp_s__9 +#define __pyx_n_s_abs_real_path_and_base __pyx_mstate_global->__pyx_n_s_abs_real_path_and_base +#define __pyx_n_s_absolute_filename __pyx_mstate_global->__pyx_n_s_absolute_filename +#define __pyx_n_s_active __pyx_mstate_global->__pyx_n_s_active +#define __pyx_n_s_add __pyx_mstate_global->__pyx_n_s_add +#define __pyx_n_s_add_additional_info __pyx_mstate_global->__pyx_n_s_add_additional_info +#define __pyx_n_s_add_command __pyx_mstate_global->__pyx_n_s_add_command +#define __pyx_n_s_add_exception_to_frame __pyx_mstate_global->__pyx_n_s_add_exception_to_frame +#define __pyx_n_s_additional_info __pyx_mstate_global->__pyx_n_s_additional_info +#define __pyx_n_s_any_thread_stepping __pyx_mstate_global->__pyx_n_s_any_thread_stepping +#define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append +#define __pyx_n_s_apply_files_filter __pyx_mstate_global->__pyx_n_s_apply_files_filter +#define __pyx_n_s_apply_to_settrace __pyx_mstate_global->__pyx_n_s_apply_to_settrace +#define __pyx_n_s_arg __pyx_mstate_global->__pyx_n_s_arg +#define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args +#define __pyx_n_s_args_2 __pyx_mstate_global->__pyx_n_s_args_2 +#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines +#define __pyx_n_s_basename __pyx_mstate_global->__pyx_n_s_basename +#define __pyx_n_s_bootstrap __pyx_mstate_global->__pyx_n_s_bootstrap +#define __pyx_n_s_bootstrap_2 __pyx_mstate_global->__pyx_n_s_bootstrap_2 +#define __pyx_n_s_bootstrap_inner __pyx_mstate_global->__pyx_n_s_bootstrap_inner +#define __pyx_n_s_bootstrap_inner_2 __pyx_mstate_global->__pyx_n_s_bootstrap_inner_2 +#define __pyx_n_s_break_on_caught_exceptions __pyx_mstate_global->__pyx_n_s_break_on_caught_exceptions +#define __pyx_n_s_break_on_user_uncaught_exception __pyx_mstate_global->__pyx_n_s_break_on_user_uncaught_exception +#define __pyx_n_s_breakpoints __pyx_mstate_global->__pyx_n_s_breakpoints +#define __pyx_n_s_call __pyx_mstate_global->__pyx_n_s_call +#define __pyx_n_s_call_2 __pyx_mstate_global->__pyx_n_s_call_2 +#define __pyx_n_s_can_skip __pyx_mstate_global->__pyx_n_s_can_skip +#define __pyx_n_s_canonical_normalized_filename __pyx_mstate_global->__pyx_n_s_canonical_normalized_filename +#define __pyx_kp_s_cell __pyx_mstate_global->__pyx_kp_s_cell +#define __pyx_n_s_check_excs __pyx_mstate_global->__pyx_n_s_check_excs +#define __pyx_n_s_check_trace_obj __pyx_mstate_global->__pyx_n_s_check_trace_obj +#define __pyx_n_s_checkcache __pyx_mstate_global->__pyx_n_s_checkcache +#define __pyx_n_s_children_variants __pyx_mstate_global->__pyx_n_s_children_variants +#define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem +#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback +#define __pyx_n_s_cmd_factory __pyx_mstate_global->__pyx_n_s_cmd_factory +#define __pyx_n_s_cmd_step_into __pyx_mstate_global->__pyx_n_s_cmd_step_into +#define __pyx_n_s_cmd_step_over __pyx_mstate_global->__pyx_n_s_cmd_step_over +#define __pyx_n_s_co_filename __pyx_mstate_global->__pyx_n_s_co_filename +#define __pyx_n_s_co_firstlineno __pyx_mstate_global->__pyx_n_s_co_firstlineno +#define __pyx_n_s_co_flags __pyx_mstate_global->__pyx_n_s_co_flags +#define __pyx_n_s_co_name __pyx_mstate_global->__pyx_n_s_co_name +#define __pyx_n_s_collect_return_info __pyx_mstate_global->__pyx_n_s_collect_return_info +#define __pyx_n_s_collect_try_except_info __pyx_mstate_global->__pyx_n_s_collect_try_except_info +#define __pyx_n_s_compile __pyx_mstate_global->__pyx_n_s_compile +#define __pyx_n_s_condition __pyx_mstate_global->__pyx_n_s_condition +#define __pyx_n_s_constant_to_str __pyx_mstate_global->__pyx_n_s_constant_to_str +#define __pyx_n_s_constructed_tid_to_last_frame __pyx_mstate_global->__pyx_n_s_constructed_tid_to_last_frame +#define __pyx_n_s_container_obj __pyx_mstate_global->__pyx_n_s_container_obj +#define __pyx_n_s_critical __pyx_mstate_global->__pyx_n_s_critical +#define __pyx_n_s_curr_stat __pyx_mstate_global->__pyx_n_s_curr_stat +#define __pyx_n_s_current_frames __pyx_mstate_global->__pyx_n_s_current_frames +#define __pyx_n_s_custom_key __pyx_mstate_global->__pyx_n_s_custom_key +#define __pyx_n_s_debug __pyx_mstate_global->__pyx_n_s_debug +#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict +#define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2 +#define __pyx_n_s_dis __pyx_mstate_global->__pyx_n_s_dis +#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable +#define __pyx_n_s_disable_tracing __pyx_mstate_global->__pyx_n_s_disable_tracing +#define __pyx_n_s_do_wait_suspend __pyx_mstate_global->__pyx_n_s_do_wait_suspend +#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable +#define __pyx_n_s_enable_tracing __pyx_mstate_global->__pyx_n_s_enable_tracing +#define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode +#define __pyx_n_s_endswith __pyx_mstate_global->__pyx_n_s_endswith +#define __pyx_n_s_enter __pyx_mstate_global->__pyx_n_s_enter +#define __pyx_n_s_event __pyx_mstate_global->__pyx_n_s_event +#define __pyx_n_s_exc_break __pyx_mstate_global->__pyx_n_s_exc_break +#define __pyx_n_s_exc_break_caught __pyx_mstate_global->__pyx_n_s_exc_break_caught +#define __pyx_n_s_exc_break_user __pyx_mstate_global->__pyx_n_s_exc_break_user +#define __pyx_n_s_exc_info __pyx_mstate_global->__pyx_n_s_exc_info +#define __pyx_n_s_exc_lineno __pyx_mstate_global->__pyx_n_s_exc_lineno +#define __pyx_n_s_except_line __pyx_mstate_global->__pyx_n_s_except_line +#define __pyx_n_s_exception __pyx_mstate_global->__pyx_n_s_exception +#define __pyx_n_s_exception_break __pyx_mstate_global->__pyx_n_s_exception_break +#define __pyx_n_s_exception_breakpoint __pyx_mstate_global->__pyx_n_s_exception_breakpoint +#define __pyx_n_s_exception_type __pyx_mstate_global->__pyx_n_s_exception_type +#define __pyx_n_s_exclude_exception_by_filter __pyx_mstate_global->__pyx_n_s_exclude_exception_by_filter +#define __pyx_n_s_exec __pyx_mstate_global->__pyx_n_s_exec +#define __pyx_n_s_execfile __pyx_mstate_global->__pyx_n_s_execfile +#define __pyx_n_s_exit __pyx_mstate_global->__pyx_n_s_exit +#define __pyx_n_s_expression __pyx_mstate_global->__pyx_n_s_expression +#define __pyx_n_s_f __pyx_mstate_global->__pyx_n_s_f +#define __pyx_n_s_f_back __pyx_mstate_global->__pyx_n_s_f_back +#define __pyx_n_s_f_code __pyx_mstate_global->__pyx_n_s_f_code +#define __pyx_n_s_f_globals __pyx_mstate_global->__pyx_n_s_f_globals +#define __pyx_n_s_f_lasti __pyx_mstate_global->__pyx_n_s_f_lasti +#define __pyx_n_s_f_lineno __pyx_mstate_global->__pyx_n_s_f_lineno +#define __pyx_n_s_f_locals __pyx_mstate_global->__pyx_n_s_f_locals +#define __pyx_n_s_f_trace __pyx_mstate_global->__pyx_n_s_f_trace +#define __pyx_n_s_f_unhandled __pyx_mstate_global->__pyx_n_s_f_unhandled +#define __pyx_n_s_filename __pyx_mstate_global->__pyx_n_s_filename +#define __pyx_n_s_filename_to_lines_where_exceptio __pyx_mstate_global->__pyx_n_s_filename_to_lines_where_exceptio +#define __pyx_n_s_filename_to_stat_info __pyx_mstate_global->__pyx_n_s_filename_to_stat_info +#define __pyx_n_s_findlinestarts __pyx_mstate_global->__pyx_n_s_findlinestarts +#define __pyx_n_s_fix_top_level_trace_and_get_trac __pyx_mstate_global->__pyx_n_s_fix_top_level_trace_and_get_trac +#define __pyx_n_s_force_only_unhandled_tracer __pyx_mstate_global->__pyx_n_s_force_only_unhandled_tracer +#define __pyx_n_s_frame __pyx_mstate_global->__pyx_n_s_frame +#define __pyx_n_s_frame_cache_key __pyx_mstate_global->__pyx_n_s_frame_cache_key +#define __pyx_n_s_frame_id_to_frame __pyx_mstate_global->__pyx_n_s_frame_id_to_frame +#define __pyx_n_s_frame_skips_cache __pyx_mstate_global->__pyx_n_s_frame_skips_cache +#define __pyx_n_s_frame_trace_dispatch __pyx_mstate_global->__pyx_n_s_frame_trace_dispatch +#define __pyx_n_s_from_user_input __pyx_mstate_global->__pyx_n_s_from_user_input +#define __pyx_n_s_func_name __pyx_mstate_global->__pyx_n_s_func_name +#define __pyx_n_s_function_breakpoint_name_to_brea __pyx_mstate_global->__pyx_n_s_function_breakpoint_name_to_brea +#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc +#define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get +#define __pyx_n_s_get_abs_path_real_path_and_base __pyx_mstate_global->__pyx_n_s_get_abs_path_real_path_and_base +#define __pyx_n_s_get_breakpoint __pyx_mstate_global->__pyx_n_s_get_breakpoint +#define __pyx_n_s_get_clsname_for_code __pyx_mstate_global->__pyx_n_s_get_clsname_for_code +#define __pyx_n_s_get_current_thread_id __pyx_mstate_global->__pyx_n_s_get_current_thread_id +#define __pyx_n_s_get_exception_breakpoint __pyx_mstate_global->__pyx_n_s_get_exception_breakpoint +#define __pyx_n_s_get_file_type __pyx_mstate_global->__pyx_n_s_get_file_type +#define __pyx_n_s_get_global_debugger __pyx_mstate_global->__pyx_n_s_get_global_debugger +#define __pyx_n_s_get_internal_queue_and_event __pyx_mstate_global->__pyx_n_s_get_internal_queue_and_event +#define __pyx_n_s_get_method_object __pyx_mstate_global->__pyx_n_s_get_method_object +#define __pyx_n_s_get_related_thread __pyx_mstate_global->__pyx_n_s_get_related_thread +#define __pyx_n_s_get_smart_step_into_variant_from __pyx_mstate_global->__pyx_n_s_get_smart_step_into_variant_from +#define __pyx_n_s_get_thread_id __pyx_mstate_global->__pyx_n_s_get_thread_id +#define __pyx_n_s_get_topmost_frame __pyx_mstate_global->__pyx_n_s_get_topmost_frame +#define __pyx_n_s_get_trace_dispatch_func __pyx_mstate_global->__pyx_n_s_get_trace_dispatch_func +#define __pyx_n_s_getline __pyx_mstate_global->__pyx_n_s_getline +#define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate +#define __pyx_n_s_global_cache_frame_skips __pyx_mstate_global->__pyx_n_s_global_cache_frame_skips +#define __pyx_n_s_global_cache_skips __pyx_mstate_global->__pyx_n_s_global_cache_skips +#define __pyx_n_s_global_notify_skipped_step_in_l __pyx_mstate_global->__pyx_n_s_global_notify_skipped_step_in_l +#define __pyx_n_s_handle_breakpoint_condition __pyx_mstate_global->__pyx_n_s_handle_breakpoint_condition +#define __pyx_n_s_handle_breakpoint_expression __pyx_mstate_global->__pyx_n_s_handle_breakpoint_expression +#define __pyx_n_s_handle_exception __pyx_mstate_global->__pyx_n_s_handle_exception +#define __pyx_n_s_handle_user_exception __pyx_mstate_global->__pyx_n_s_handle_user_exception +#define __pyx_n_s_has_condition __pyx_mstate_global->__pyx_n_s_has_condition +#define __pyx_n_s_has_plugin_exception_breaks __pyx_mstate_global->__pyx_n_s_has_plugin_exception_breaks +#define __pyx_n_s_has_plugin_line_breaks __pyx_mstate_global->__pyx_n_s_has_plugin_line_breaks +#define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i +#define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id +#define __pyx_n_s_ident __pyx_mstate_global->__pyx_n_s_ident +#define __pyx_n_s_ident_2 __pyx_mstate_global->__pyx_n_s_ident_2 +#define __pyx_n_s_ignore_exception_trace __pyx_mstate_global->__pyx_n_s_ignore_exception_trace +#define __pyx_n_s_ignore_exceptions_thrown_in_line __pyx_mstate_global->__pyx_n_s_ignore_exceptions_thrown_in_line +#define __pyx_n_s_ignore_system_exit_code __pyx_mstate_global->__pyx_n_s_ignore_system_exit_code +#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import +#define __pyx_n_s_in_project_scope __pyx_mstate_global->__pyx_n_s_in_project_scope +#define __pyx_n_s_info __pyx_mstate_global->__pyx_n_s_info +#define __pyx_n_s_initial_trace_obj __pyx_mstate_global->__pyx_n_s_initial_trace_obj +#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing +#define __pyx_kp_s_invalid __pyx_mstate_global->__pyx_kp_s_invalid +#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine +#define __pyx_n_s_is_files_filter_enabled __pyx_mstate_global->__pyx_n_s_is_files_filter_enabled +#define __pyx_n_s_is_line_in_except_block __pyx_mstate_global->__pyx_n_s_is_line_in_except_block +#define __pyx_n_s_is_line_in_try_block __pyx_mstate_global->__pyx_n_s_is_line_in_try_block +#define __pyx_n_s_is_logpoint __pyx_mstate_global->__pyx_n_s_is_logpoint +#define __pyx_n_s_is_stepping __pyx_mstate_global->__pyx_n_s_is_stepping +#define __pyx_n_s_is_thread_alive __pyx_mstate_global->__pyx_n_s_is_thread_alive +#define __pyx_n_s_is_unhandled_exception __pyx_mstate_global->__pyx_n_s_is_unhandled_exception +#define __pyx_n_s_is_unwind __pyx_mstate_global->__pyx_n_s_is_unwind +#define __pyx_n_s_is_user_uncaught __pyx_mstate_global->__pyx_n_s_is_user_uncaught +#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled +#define __pyx_n_s_j __pyx_mstate_global->__pyx_n_s_j +#define __pyx_n_s_just_raised __pyx_mstate_global->__pyx_n_s_just_raised +#define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs +#define __pyx_kp_s_lambda __pyx_mstate_global->__pyx_kp_s_lambda +#define __pyx_n_s_last_raise_line __pyx_mstate_global->__pyx_n_s_last_raise_line +#define __pyx_n_s_last_stat __pyx_mstate_global->__pyx_n_s_last_stat +#define __pyx_n_s_line __pyx_mstate_global->__pyx_n_s_line +#define __pyx_n_s_linecache __pyx_mstate_global->__pyx_n_s_linecache +#define __pyx_n_s_lines __pyx_mstate_global->__pyx_n_s_lines +#define __pyx_n_s_lines_ignored __pyx_mstate_global->__pyx_n_s_lines_ignored +#define __pyx_n_s_linesep __pyx_mstate_global->__pyx_n_s_linesep +#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main +#define __pyx_n_s_main_2 __pyx_mstate_global->__pyx_n_s_main_2 +#define __pyx_n_s_make_console_message __pyx_mstate_global->__pyx_n_s_make_console_message +#define __pyx_n_s_make_io_message __pyx_mstate_global->__pyx_n_s_make_io_message +#define __pyx_n_s_match __pyx_mstate_global->__pyx_n_s_match +#define __pyx_n_s_maybe_user_uncaught_exc_info __pyx_mstate_global->__pyx_n_s_maybe_user_uncaught_exc_info +#define __pyx_n_s_merged __pyx_mstate_global->__pyx_n_s_merged +#define __pyx_n_s_method_object __pyx_mstate_global->__pyx_n_s_method_object +#define __pyx_kp_s_module __pyx_mstate_global->__pyx_kp_s_module +#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name +#define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2 +#define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new +#define __pyx_n_s_next_additional_info __pyx_mstate_global->__pyx_n_s_next_additional_info +#define __pyx_n_s_notify_on_first_raise_only __pyx_mstate_global->__pyx_n_s_notify_on_first_raise_only +#define __pyx_n_s_notify_skipped_step_in_because_o __pyx_mstate_global->__pyx_n_s_notify_skipped_step_in_because_o +#define __pyx_n_s_notify_thread_not_alive __pyx_mstate_global->__pyx_n_s_notify_thread_not_alive +#define __pyx_n_s_original_call __pyx_mstate_global->__pyx_n_s_original_call +#define __pyx_n_s_original_step_cmd __pyx_mstate_global->__pyx_n_s_original_step_cmd +#define __pyx_n_s_os __pyx_mstate_global->__pyx_n_s_os +#define __pyx_n_s_os_path __pyx_mstate_global->__pyx_n_s_os_path +#define __pyx_n_s_path __pyx_mstate_global->__pyx_n_s_path +#define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle +#define __pyx_n_s_plugin __pyx_mstate_global->__pyx_n_s_plugin +#define __pyx_n_s_pop __pyx_mstate_global->__pyx_n_s_pop +#define __pyx_n_s_prev_user_uncaught_exc_info __pyx_mstate_global->__pyx_n_s_prev_user_uncaught_exc_info +#define __pyx_n_s_py_db __pyx_mstate_global->__pyx_n_s_py_db +#define __pyx_kp_s_pyc __pyx_mstate_global->__pyx_kp_s_pyc +#define __pyx_n_s_pydb_disposed __pyx_mstate_global->__pyx_n_s_pydb_disposed +#define __pyx_n_s_pydev_bundle __pyx_mstate_global->__pyx_n_s_pydev_bundle +#define __pyx_n_s_pydev_bundle__pydev_saved_modul __pyx_mstate_global->__pyx_n_s_pydev_bundle__pydev_saved_modul +#define __pyx_n_s_pydev_bundle_pydev_is_thread_al __pyx_mstate_global->__pyx_n_s_pydev_bundle_pydev_is_thread_al +#define __pyx_n_s_pydev_bundle_pydev_log __pyx_mstate_global->__pyx_n_s_pydev_bundle_pydev_log +#define __pyx_n_s_pydev_do_not_trace __pyx_mstate_global->__pyx_n_s_pydev_do_not_trace +#define __pyx_kp_s_pydev_execfile_py __pyx_mstate_global->__pyx_kp_s_pydev_execfile_py +#define __pyx_n_s_pydev_log __pyx_mstate_global->__pyx_n_s_pydev_log +#define __pyx_n_s_pydev_log_exception __pyx_mstate_global->__pyx_n_s_pydev_log_exception +#define __pyx_n_s_pydev_monkey __pyx_mstate_global->__pyx_n_s_pydev_monkey +#define __pyx_n_s_pydevd __pyx_mstate_global->__pyx_n_s_pydevd +#define __pyx_n_s_pydevd_bundle __pyx_mstate_global->__pyx_n_s_pydevd_bundle +#define __pyx_n_s_pydevd_bundle_pydevd_bytecode_u __pyx_mstate_global->__pyx_n_s_pydevd_bundle_pydevd_bytecode_u +#define __pyx_n_s_pydevd_bundle_pydevd_comm_const __pyx_mstate_global->__pyx_n_s_pydevd_bundle_pydevd_comm_const +#define __pyx_n_s_pydevd_bundle_pydevd_constants __pyx_mstate_global->__pyx_n_s_pydevd_bundle_pydevd_constants +#define __pyx_n_s_pydevd_bundle_pydevd_cython __pyx_mstate_global->__pyx_n_s_pydevd_bundle_pydevd_cython +#define __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx __pyx_mstate_global->__pyx_kp_s_pydevd_bundle_pydevd_cython_pyx +#define __pyx_n_s_pydevd_bundle_pydevd_frame_util __pyx_mstate_global->__pyx_n_s_pydevd_bundle_pydevd_frame_util +#define __pyx_n_s_pydevd_bundle_pydevd_utils __pyx_mstate_global->__pyx_n_s_pydevd_bundle_pydevd_utils +#define __pyx_n_s_pydevd_dont_trace __pyx_mstate_global->__pyx_n_s_pydevd_dont_trace +#define __pyx_n_s_pydevd_file_utils __pyx_mstate_global->__pyx_n_s_pydevd_file_utils +#define __pyx_kp_s_pydevd_py __pyx_mstate_global->__pyx_kp_s_pydevd_py +#define __pyx_kp_s_pydevd_traceproperty_py __pyx_mstate_global->__pyx_kp_s_pydevd_traceproperty_py +#define __pyx_n_s_pydevd_tracing __pyx_mstate_global->__pyx_n_s_pydevd_tracing +#define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError +#define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum +#define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result +#define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state +#define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type +#define __pyx_n_s_pyx_unpickle_PyDBAdditionalThr __pyx_mstate_global->__pyx_n_s_pyx_unpickle_PyDBAdditionalThr +#define __pyx_n_s_pyx_unpickle_PyDBFrame __pyx_mstate_global->__pyx_n_s_pyx_unpickle_PyDBFrame +#define __pyx_n_s_pyx_unpickle_SafeCallWrapper __pyx_mstate_global->__pyx_n_s_pyx_unpickle_SafeCallWrapper +#define __pyx_n_s_pyx_unpickle_ThreadTracer __pyx_mstate_global->__pyx_n_s_pyx_unpickle_ThreadTracer +#define __pyx_n_s_pyx_unpickle_TopLevelThreadTra __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TopLevelThreadTra +#define __pyx_n_s_pyx_unpickle_TopLevelThreadTra_2 __pyx_mstate_global->__pyx_n_s_pyx_unpickle_TopLevelThreadTra_2 +#define __pyx_n_s_pyx_unpickle__TryExceptContain __pyx_mstate_global->__pyx_n_s_pyx_unpickle__TryExceptContain +#define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable +#define __pyx_n_s_qname __pyx_mstate_global->__pyx_n_s_qname +#define __pyx_n_s_quitting __pyx_mstate_global->__pyx_n_s_quitting +#define __pyx_n_s_raise_lines __pyx_mstate_global->__pyx_n_s_raise_lines +#define __pyx_n_s_raise_lines_in_except __pyx_mstate_global->__pyx_n_s_raise_lines_in_except +#define __pyx_n_s_re __pyx_mstate_global->__pyx_n_s_re +#define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce +#define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython +#define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex +#define __pyx_n_s_ref __pyx_mstate_global->__pyx_n_s_ref +#define __pyx_n_s_remove_additional_info __pyx_mstate_global->__pyx_n_s_remove_additional_info +#define __pyx_n_s_remove_exception_from_frame __pyx_mstate_global->__pyx_n_s_remove_exception_from_frame +#define __pyx_n_s_remove_return_values_flag __pyx_mstate_global->__pyx_n_s_remove_return_values_flag +#define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result +#define __pyx_n_s_ret __pyx_mstate_global->__pyx_n_s_ret +#define __pyx_n_s_return __pyx_mstate_global->__pyx_n_s_return +#define __pyx_n_s_return_line __pyx_mstate_global->__pyx_n_s_return_line +#define __pyx_n_s_returns __pyx_mstate_global->__pyx_n_s_returns +#define __pyx_n_s_rfind __pyx_mstate_global->__pyx_n_s_rfind +#define __pyx_n_s_run __pyx_mstate_global->__pyx_n_s_run +#define __pyx_kp_s_s_raised_from_within_the_callba __pyx_mstate_global->__pyx_kp_s_s_raised_from_within_the_callba +#define __pyx_kp_s_s_s __pyx_mstate_global->__pyx_kp_s_s_s +#define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self +#define __pyx_n_s_send_caught_exception_stack __pyx_mstate_global->__pyx_n_s_send_caught_exception_stack +#define __pyx_n_s_send_caught_exception_stack_proc __pyx_mstate_global->__pyx_n_s_send_caught_exception_stack_proc +#define __pyx_n_s_set __pyx_mstate_global->__pyx_n_s_set +#define __pyx_n_s_set_additional_thread_info __pyx_mstate_global->__pyx_n_s_set_additional_thread_info +#define __pyx_n_s_set_additional_thread_info_lock __pyx_mstate_global->__pyx_n_s_set_additional_thread_info_lock +#define __pyx_n_s_set_suspend __pyx_mstate_global->__pyx_n_s_set_suspend +#define __pyx_n_s_set_trace_for_frame_and_parents __pyx_mstate_global->__pyx_n_s_set_trace_for_frame_and_parents +#define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate +#define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython +#define __pyx_n_s_should_stop __pyx_mstate_global->__pyx_n_s_should_stop +#define __pyx_n_s_should_stop_on_exception __pyx_mstate_global->__pyx_n_s_should_stop_on_exception +#define __pyx_n_s_should_trace_hook __pyx_mstate_global->__pyx_n_s_should_trace_hook +#define __pyx_n_s_show_return_values __pyx_mstate_global->__pyx_n_s_show_return_values +#define __pyx_n_s_skip_on_exceptions_thrown_in_sam __pyx_mstate_global->__pyx_n_s_skip_on_exceptions_thrown_in_sam +#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec +#define __pyx_n_s_st_mtime __pyx_mstate_global->__pyx_n_s_st_mtime +#define __pyx_n_s_st_size __pyx_mstate_global->__pyx_n_s_st_size +#define __pyx_n_s_startswith __pyx_mstate_global->__pyx_n_s_startswith +#define __pyx_n_s_stat __pyx_mstate_global->__pyx_n_s_stat +#define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state +#define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop +#define __pyx_n_s_stop_on_unhandled_exception __pyx_mstate_global->__pyx_n_s_stop_on_unhandled_exception +#define __pyx_n_s_stopped __pyx_mstate_global->__pyx_n_s_stopped +#define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource +#define __pyx_n_s_suspend __pyx_mstate_global->__pyx_n_s_suspend +#define __pyx_n_s_suspend_other_threads __pyx_mstate_global->__pyx_n_s_suspend_other_threads +#define __pyx_n_s_suspend_policy __pyx_mstate_global->__pyx_n_s_suspend_policy +#define __pyx_n_s_suspended_at_unhandled __pyx_mstate_global->__pyx_n_s_suspended_at_unhandled +#define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys +#define __pyx_n_s_t __pyx_mstate_global->__pyx_n_s_t +#define __pyx_n_s_tb_frame __pyx_mstate_global->__pyx_n_s_tb_frame +#define __pyx_n_s_tb_lineno __pyx_mstate_global->__pyx_n_s_tb_lineno +#define __pyx_n_s_tb_next __pyx_mstate_global->__pyx_n_s_tb_next +#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test +#define __pyx_n_s_thread __pyx_mstate_global->__pyx_n_s_thread +#define __pyx_kp_s_thread__ident_is_None_in__get_re __pyx_mstate_global->__pyx_kp_s_thread__ident_is_None_in__get_re +#define __pyx_n_s_thread_trace_func __pyx_mstate_global->__pyx_n_s_thread_trace_func +#define __pyx_n_s_thread_tracer __pyx_mstate_global->__pyx_n_s_thread_tracer +#define __pyx_n_s_threading __pyx_mstate_global->__pyx_n_s_threading +#define __pyx_n_s_threading_active __pyx_mstate_global->__pyx_n_s_threading_active +#define __pyx_n_s_threading_current_thread __pyx_mstate_global->__pyx_n_s_threading_current_thread +#define __pyx_n_s_threading_get_ident __pyx_mstate_global->__pyx_n_s_threading_get_ident +#define __pyx_n_s_top_level_thread_tracer __pyx_mstate_global->__pyx_n_s_top_level_thread_tracer +#define __pyx_n_s_top_level_thread_tracer_no_back __pyx_mstate_global->__pyx_n_s_top_level_thread_tracer_no_back +#define __pyx_n_s_top_level_thread_tracer_unhandle __pyx_mstate_global->__pyx_n_s_top_level_thread_tracer_unhandle +#define __pyx_n_s_trace __pyx_mstate_global->__pyx_n_s_trace +#define __pyx_n_s_trace_dispatch __pyx_mstate_global->__pyx_n_s_trace_dispatch +#define __pyx_n_s_trace_dispatch_and_unhandled_exc __pyx_mstate_global->__pyx_n_s_trace_dispatch_and_unhandled_exc +#define __pyx_n_s_trace_exception __pyx_mstate_global->__pyx_n_s_trace_exception +#define __pyx_n_s_trace_obj __pyx_mstate_global->__pyx_n_s_trace_obj +#define __pyx_n_s_trace_unhandled_exceptions __pyx_mstate_global->__pyx_n_s_trace_unhandled_exceptions +#define __pyx_n_s_try_exc_info __pyx_mstate_global->__pyx_n_s_try_exc_info +#define __pyx_n_s_try_except_info __pyx_mstate_global->__pyx_n_s_try_except_info +#define __pyx_n_s_try_except_infos __pyx_mstate_global->__pyx_n_s_try_except_infos +#define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update +#define __pyx_n_s_update_stepping_info __pyx_mstate_global->__pyx_n_s_update_stepping_info +#define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate +#define __pyx_kp_s_utf_8 __pyx_mstate_global->__pyx_kp_s_utf_8 +#define __pyx_n_s_valid_try_except_infos __pyx_mstate_global->__pyx_n_s_valid_try_except_infos +#define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value +#define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values +#define __pyx_n_s_version __pyx_mstate_global->__pyx_n_s_version +#define __pyx_n_s_was_just_raised __pyx_mstate_global->__pyx_n_s_was_just_raised +#define __pyx_n_s_weak_thread __pyx_mstate_global->__pyx_n_s_weak_thread +#define __pyx_n_s_weakref __pyx_mstate_global->__pyx_n_s_weakref +#define __pyx_n_s_writer __pyx_mstate_global->__pyx_n_s_writer +#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 +#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 +#define __pyx_int_2 __pyx_mstate_global->__pyx_int_2 +#define __pyx_int_11 __pyx_mstate_global->__pyx_int_11 +#define __pyx_int_111 __pyx_mstate_global->__pyx_int_111 +#define __pyx_int_137 __pyx_mstate_global->__pyx_int_137 +#define __pyx_int_160 __pyx_mstate_global->__pyx_int_160 +#define __pyx_int_2424557 __pyx_mstate_global->__pyx_int_2424557 +#define __pyx_int_16751766 __pyx_mstate_global->__pyx_int_16751766 +#define __pyx_int_18997755 __pyx_mstate_global->__pyx_int_18997755 +#define __pyx_int_61391470 __pyx_mstate_global->__pyx_int_61391470 +#define __pyx_int_63705258 __pyx_mstate_global->__pyx_int_63705258 +#define __pyx_int_64458794 __pyx_mstate_global->__pyx_int_64458794 +#define __pyx_int_66451433 __pyx_mstate_global->__pyx_int_66451433 +#define __pyx_int_70528507 __pyx_mstate_global->__pyx_int_70528507 +#define __pyx_int_84338306 __pyx_mstate_global->__pyx_int_84338306 +#define __pyx_int_125568891 __pyx_mstate_global->__pyx_int_125568891 +#define __pyx_int_169093275 __pyx_mstate_global->__pyx_int_169093275 +#define __pyx_int_171613889 __pyx_mstate_global->__pyx_int_171613889 +#define __pyx_int_192493205 __pyx_mstate_global->__pyx_int_192493205 +#define __pyx_int_210464433 __pyx_mstate_global->__pyx_int_210464433 +#define __pyx_int_221489684 __pyx_mstate_global->__pyx_int_221489684 +#define __pyx_int_230645316 __pyx_mstate_global->__pyx_int_230645316 +#define __pyx_int_232881363 __pyx_mstate_global->__pyx_int_232881363 +#define __pyx_int_255484337 __pyx_mstate_global->__pyx_int_255484337 +#define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1 +#define __pyx_slice__2 __pyx_mstate_global->__pyx_slice__2 +#define __pyx_slice__6 __pyx_mstate_global->__pyx_slice__6 +#define __pyx_tuple__3 __pyx_mstate_global->__pyx_tuple__3 +#define __pyx_tuple__5 __pyx_mstate_global->__pyx_tuple__5 +#define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7 +#define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11 +#define __pyx_tuple__12 __pyx_mstate_global->__pyx_tuple__12 +#define __pyx_tuple__13 __pyx_mstate_global->__pyx_tuple__13 +#define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14 +#define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15 +#define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16 +#define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17 +#define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18 +#define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20 +#define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23 +#define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26 +#define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28 +#define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30 +#define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32 +#define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36 +#define __pyx_tuple__37 __pyx_mstate_global->__pyx_tuple__37 +#define __pyx_tuple__39 __pyx_mstate_global->__pyx_tuple__39 +#define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40 +#define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41 +#define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42 +#define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46 +#define __pyx_tuple__49 __pyx_mstate_global->__pyx_tuple__49 +#define __pyx_tuple__51 __pyx_mstate_global->__pyx_tuple__51 +#define __pyx_tuple__53 __pyx_mstate_global->__pyx_tuple__53 +#define __pyx_tuple__57 __pyx_mstate_global->__pyx_tuple__57 +#define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59 +#define __pyx_tuple__60 __pyx_mstate_global->__pyx_tuple__60 +#define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62 +#define __pyx_tuple__67 __pyx_mstate_global->__pyx_tuple__67 +#define __pyx_tuple__69 __pyx_mstate_global->__pyx_tuple__69 +#define __pyx_tuple__71 __pyx_mstate_global->__pyx_tuple__71 +#define __pyx_tuple__76 __pyx_mstate_global->__pyx_tuple__76 +#define __pyx_tuple__85 __pyx_mstate_global->__pyx_tuple__85 +#define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21 +#define __pyx_codeobj__22 __pyx_mstate_global->__pyx_codeobj__22 +#define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24 +#define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25 +#define __pyx_codeobj__27 __pyx_mstate_global->__pyx_codeobj__27 +#define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29 +#define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31 +#define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33 +#define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34 +#define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35 +#define __pyx_codeobj__38 __pyx_mstate_global->__pyx_codeobj__38 +#define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43 +#define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44 +#define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45 +#define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47 +#define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48 +#define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50 +#define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52 +#define __pyx_codeobj__54 __pyx_mstate_global->__pyx_codeobj__54 +#define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55 +#define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56 +#define __pyx_codeobj__58 __pyx_mstate_global->__pyx_codeobj__58 +#define __pyx_codeobj__61 __pyx_mstate_global->__pyx_codeobj__61 +#define __pyx_codeobj__63 __pyx_mstate_global->__pyx_codeobj__63 +#define __pyx_codeobj__64 __pyx_mstate_global->__pyx_codeobj__64 +#define __pyx_codeobj__65 __pyx_mstate_global->__pyx_codeobj__65 +#define __pyx_codeobj__66 __pyx_mstate_global->__pyx_codeobj__66 +#define __pyx_codeobj__68 __pyx_mstate_global->__pyx_codeobj__68 +#define __pyx_codeobj__70 __pyx_mstate_global->__pyx_codeobj__70 +#define __pyx_codeobj__72 __pyx_mstate_global->__pyx_codeobj__72 +#define __pyx_codeobj__73 __pyx_mstate_global->__pyx_codeobj__73 +#define __pyx_codeobj__74 __pyx_mstate_global->__pyx_codeobj__74 +#define __pyx_codeobj__75 __pyx_mstate_global->__pyx_codeobj__75 +#define __pyx_codeobj__77 __pyx_mstate_global->__pyx_codeobj__77 +#define __pyx_codeobj__78 __pyx_mstate_global->__pyx_codeobj__78 +#define __pyx_codeobj__79 __pyx_mstate_global->__pyx_codeobj__79 +#define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80 +#define __pyx_codeobj__81 __pyx_mstate_global->__pyx_codeobj__81 +#define __pyx_codeobj__82 __pyx_mstate_global->__pyx_codeobj__82 +#define __pyx_codeobj__83 __pyx_mstate_global->__pyx_codeobj__83 +#define __pyx_codeobj__84 __pyx_mstate_global->__pyx_codeobj__84 +#define __pyx_codeobj__86 __pyx_mstate_global->__pyx_codeobj__86 +#define __pyx_codeobj__87 __pyx_mstate_global->__pyx_codeobj__87 +#define __pyx_codeobj__88 __pyx_mstate_global->__pyx_codeobj__88 +#define __pyx_codeobj__89 __pyx_mstate_global->__pyx_codeobj__89 +#define __pyx_codeobj__90 __pyx_mstate_global->__pyx_codeobj__90 +#define __pyx_codeobj__91 __pyx_mstate_global->__pyx_codeobj__91 +#define __pyx_codeobj__92 __pyx_mstate_global->__pyx_codeobj__92 +/* #### Code section: module_code ### */ + +/* "_pydevd_bundle/pydevd_cython.pyx":76 + * # fmt: on + * + * def __init__(self): # <<<<<<<<<<<<<< + * self.pydev_state = STATE_RUN # STATE_RUN or STATE_SUSPEND + * self.pydev_step_stop = None + */ + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo___init__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo___init__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":77 + * + * def __init__(self): + * self.pydev_state = STATE_RUN # STATE_RUN or STATE_SUSPEND # <<<<<<<<<<<<<< + * self.pydev_step_stop = None + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_STATE_RUN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->pydev_state = __pyx_t_2; + + /* "_pydevd_bundle/pydevd_cython.pyx":78 + * def __init__(self): + * self.pydev_state = STATE_RUN # STATE_RUN or STATE_SUSPEND + * self.pydev_step_stop = None # <<<<<<<<<<<<<< + * + * # Note: we have `pydev_original_step_cmd` and `pydev_step_cmd` because the original is to + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pydev_step_stop); + __Pyx_DECREF(__pyx_v_self->pydev_step_stop); + __pyx_v_self->pydev_step_stop = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":86 + * # method the strategy is changed to a step in). + * + * self.pydev_original_step_cmd = -1 # Something as CMD_STEP_INTO, CMD_STEP_OVER, etc. # <<<<<<<<<<<<<< + * self.pydev_step_cmd = -1 # Something as CMD_STEP_INTO, CMD_STEP_OVER, etc. + * + */ + __pyx_v_self->pydev_original_step_cmd = -1; + + /* "_pydevd_bundle/pydevd_cython.pyx":87 + * + * self.pydev_original_step_cmd = -1 # Something as CMD_STEP_INTO, CMD_STEP_OVER, etc. + * self.pydev_step_cmd = -1 # Something as CMD_STEP_INTO, CMD_STEP_OVER, etc. # <<<<<<<<<<<<<< + * + * self.pydev_notify_kill = False + */ + __pyx_v_self->pydev_step_cmd = -1; + + /* "_pydevd_bundle/pydevd_cython.pyx":89 + * self.pydev_step_cmd = -1 # Something as CMD_STEP_INTO, CMD_STEP_OVER, etc. + * + * self.pydev_notify_kill = False # <<<<<<<<<<<<<< + * self.pydev_django_resolve_frame = False + * self.pydev_call_from_jinja2 = None + */ + __pyx_v_self->pydev_notify_kill = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":90 + * + * self.pydev_notify_kill = False + * self.pydev_django_resolve_frame = False # <<<<<<<<<<<<<< + * self.pydev_call_from_jinja2 = None + * self.pydev_call_inside_jinja2 = None + */ + __pyx_v_self->pydev_django_resolve_frame = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":91 + * self.pydev_notify_kill = False + * self.pydev_django_resolve_frame = False + * self.pydev_call_from_jinja2 = None # <<<<<<<<<<<<<< + * self.pydev_call_inside_jinja2 = None + * self.is_tracing = 0 + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pydev_call_from_jinja2); + __Pyx_DECREF(__pyx_v_self->pydev_call_from_jinja2); + __pyx_v_self->pydev_call_from_jinja2 = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":92 + * self.pydev_django_resolve_frame = False + * self.pydev_call_from_jinja2 = None + * self.pydev_call_inside_jinja2 = None # <<<<<<<<<<<<<< + * self.is_tracing = 0 + * self.conditional_breakpoint_exception = None + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pydev_call_inside_jinja2); + __Pyx_DECREF(__pyx_v_self->pydev_call_inside_jinja2); + __pyx_v_self->pydev_call_inside_jinja2 = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":93 + * self.pydev_call_from_jinja2 = None + * self.pydev_call_inside_jinja2 = None + * self.is_tracing = 0 # <<<<<<<<<<<<<< + * self.conditional_breakpoint_exception = None + * self.pydev_message = "" + */ + __pyx_v_self->is_tracing = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":94 + * self.pydev_call_inside_jinja2 = None + * self.is_tracing = 0 + * self.conditional_breakpoint_exception = None # <<<<<<<<<<<<<< + * self.pydev_message = "" + * self.suspend_type = PYTHON_SUSPEND + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->conditional_breakpoint_exception); + __Pyx_DECREF(__pyx_v_self->conditional_breakpoint_exception); + __pyx_v_self->conditional_breakpoint_exception = ((PyObject*)Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":95 + * self.is_tracing = 0 + * self.conditional_breakpoint_exception = None + * self.pydev_message = "" # <<<<<<<<<<<<<< + * self.suspend_type = PYTHON_SUSPEND + * self.pydev_next_line = -1 + */ + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_GIVEREF(__pyx_kp_s_); + __Pyx_GOTREF(__pyx_v_self->pydev_message); + __Pyx_DECREF(__pyx_v_self->pydev_message); + __pyx_v_self->pydev_message = __pyx_kp_s_; + + /* "_pydevd_bundle/pydevd_cython.pyx":96 + * self.conditional_breakpoint_exception = None + * self.pydev_message = "" + * self.suspend_type = PYTHON_SUSPEND # <<<<<<<<<<<<<< + * self.pydev_next_line = -1 + * self.pydev_func_name = ".invalid." # Must match the type in cython + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PYTHON_SUSPEND); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->suspend_type = __pyx_t_2; + + /* "_pydevd_bundle/pydevd_cython.pyx":97 + * self.pydev_message = "" + * self.suspend_type = PYTHON_SUSPEND + * self.pydev_next_line = -1 # <<<<<<<<<<<<<< + * self.pydev_func_name = ".invalid." # Must match the type in cython + * self.suspended_at_unhandled = False + */ + __pyx_v_self->pydev_next_line = -1; + + /* "_pydevd_bundle/pydevd_cython.pyx":98 + * self.suspend_type = PYTHON_SUSPEND + * self.pydev_next_line = -1 + * self.pydev_func_name = ".invalid." # Must match the type in cython # <<<<<<<<<<<<<< + * self.suspended_at_unhandled = False + * self.trace_suspend_type = "trace" # 'trace' or 'frame_eval' + */ + __Pyx_INCREF(__pyx_kp_s_invalid); + __Pyx_GIVEREF(__pyx_kp_s_invalid); + __Pyx_GOTREF(__pyx_v_self->pydev_func_name); + __Pyx_DECREF(__pyx_v_self->pydev_func_name); + __pyx_v_self->pydev_func_name = __pyx_kp_s_invalid; + + /* "_pydevd_bundle/pydevd_cython.pyx":99 + * self.pydev_next_line = -1 + * self.pydev_func_name = ".invalid." # Must match the type in cython + * self.suspended_at_unhandled = False # <<<<<<<<<<<<<< + * self.trace_suspend_type = "trace" # 'trace' or 'frame_eval' + * self.top_level_thread_tracer_no_back_frames = [] + */ + __pyx_v_self->suspended_at_unhandled = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":100 + * self.pydev_func_name = ".invalid." # Must match the type in cython + * self.suspended_at_unhandled = False + * self.trace_suspend_type = "trace" # 'trace' or 'frame_eval' # <<<<<<<<<<<<<< + * self.top_level_thread_tracer_no_back_frames = [] + * self.top_level_thread_tracer_unhandled = None + */ + __Pyx_INCREF(__pyx_n_s_trace); + __Pyx_GIVEREF(__pyx_n_s_trace); + __Pyx_GOTREF(__pyx_v_self->trace_suspend_type); + __Pyx_DECREF(__pyx_v_self->trace_suspend_type); + __pyx_v_self->trace_suspend_type = __pyx_n_s_trace; + + /* "_pydevd_bundle/pydevd_cython.pyx":101 + * self.suspended_at_unhandled = False + * self.trace_suspend_type = "trace" # 'trace' or 'frame_eval' + * self.top_level_thread_tracer_no_back_frames = [] # <<<<<<<<<<<<<< + * self.top_level_thread_tracer_unhandled = None + * self.thread_tracer = None + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->top_level_thread_tracer_no_back_frames); + __Pyx_DECREF(__pyx_v_self->top_level_thread_tracer_no_back_frames); + __pyx_v_self->top_level_thread_tracer_no_back_frames = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":102 + * self.trace_suspend_type = "trace" # 'trace' or 'frame_eval' + * self.top_level_thread_tracer_no_back_frames = [] + * self.top_level_thread_tracer_unhandled = None # <<<<<<<<<<<<<< + * self.thread_tracer = None + * self.step_in_initial_location = None + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->top_level_thread_tracer_unhandled); + __Pyx_DECREF(__pyx_v_self->top_level_thread_tracer_unhandled); + __pyx_v_self->top_level_thread_tracer_unhandled = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":103 + * self.top_level_thread_tracer_no_back_frames = [] + * self.top_level_thread_tracer_unhandled = None + * self.thread_tracer = None # <<<<<<<<<<<<<< + * self.step_in_initial_location = None + * self.pydev_smart_parent_offset = -1 + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->thread_tracer); + __Pyx_DECREF(__pyx_v_self->thread_tracer); + __pyx_v_self->thread_tracer = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":104 + * self.top_level_thread_tracer_unhandled = None + * self.thread_tracer = None + * self.step_in_initial_location = None # <<<<<<<<<<<<<< + * self.pydev_smart_parent_offset = -1 + * self.pydev_smart_child_offset = -1 + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->step_in_initial_location); + __Pyx_DECREF(__pyx_v_self->step_in_initial_location); + __pyx_v_self->step_in_initial_location = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":105 + * self.thread_tracer = None + * self.step_in_initial_location = None + * self.pydev_smart_parent_offset = -1 # <<<<<<<<<<<<<< + * self.pydev_smart_child_offset = -1 + * self.pydev_smart_step_into_variants = () + */ + __pyx_v_self->pydev_smart_parent_offset = -1; + + /* "_pydevd_bundle/pydevd_cython.pyx":106 + * self.step_in_initial_location = None + * self.pydev_smart_parent_offset = -1 + * self.pydev_smart_child_offset = -1 # <<<<<<<<<<<<<< + * self.pydev_smart_step_into_variants = () + * self.target_id_to_smart_step_into_variant = {} + */ + __pyx_v_self->pydev_smart_child_offset = -1; + + /* "_pydevd_bundle/pydevd_cython.pyx":107 + * self.pydev_smart_parent_offset = -1 + * self.pydev_smart_child_offset = -1 + * self.pydev_smart_step_into_variants = () # <<<<<<<<<<<<<< + * self.target_id_to_smart_step_into_variant = {} + * + */ + __Pyx_INCREF(__pyx_empty_tuple); + __Pyx_GIVEREF(__pyx_empty_tuple); + __Pyx_GOTREF(__pyx_v_self->pydev_smart_step_into_variants); + __Pyx_DECREF(__pyx_v_self->pydev_smart_step_into_variants); + __pyx_v_self->pydev_smart_step_into_variants = __pyx_empty_tuple; + + /* "_pydevd_bundle/pydevd_cython.pyx":108 + * self.pydev_smart_child_offset = -1 + * self.pydev_smart_step_into_variants = () + * self.target_id_to_smart_step_into_variant = {} # <<<<<<<<<<<<<< + * + * # Flag to indicate ipython use-case where each line will be executed as a call/line/return + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->target_id_to_smart_step_into_variant); + __Pyx_DECREF(__pyx_v_self->target_id_to_smart_step_into_variant); + __pyx_v_self->target_id_to_smart_step_into_variant = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":120 + * # + * # See: https://github.com/microsoft/debugpy/issues/869#issuecomment-1132141003 + * self.pydev_use_scoped_step_frame = False # <<<<<<<<<<<<<< + * self.weak_thread = None + * + */ + __pyx_v_self->pydev_use_scoped_step_frame = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":121 + * # See: https://github.com/microsoft/debugpy/issues/869#issuecomment-1132141003 + * self.pydev_use_scoped_step_frame = False + * self.weak_thread = None # <<<<<<<<<<<<<< + * + * # Purpose: detect if this thread is suspended and actually in the wait loop + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->weak_thread); + __Pyx_DECREF(__pyx_v_self->weak_thread); + __pyx_v_self->weak_thread = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":126 + * # at this time (otherwise it may be suspended but still didn't reach a point. + * # to pause). + * self.is_in_wait_loop = False # <<<<<<<<<<<<<< + * + * # fmt: off + */ + __pyx_v_self->is_in_wait_loop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":76 + * # fmt: on + * + * def __init__(self): # <<<<<<<<<<<<<< + * self.pydev_state = STATE_RUN # STATE_RUN or STATE_SUSPEND + * self.pydev_step_stop = None + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":130 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef object _get_related_thread(self): # <<<<<<<<<<<<<< + * # ELSE + * # def _get_related_thread(self): + */ + +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_3_get_related_thread(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo__get_related_thread(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_v_thread = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_related_thread", 1); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_related_thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_3_get_related_thread)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "_pydevd_bundle/pydevd_cython.pyx":135 + * # ENDIF + * # fmt: on + * if self.pydev_notify_kill: # Already killed # <<<<<<<<<<<<<< + * return None + * + */ + if (__pyx_v_self->pydev_notify_kill) { + + /* "_pydevd_bundle/pydevd_cython.pyx":136 + * # fmt: on + * if self.pydev_notify_kill: # Already killed + * return None # <<<<<<<<<<<<<< + * + * if self.weak_thread is None: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":135 + * # ENDIF + * # fmt: on + * if self.pydev_notify_kill: # Already killed # <<<<<<<<<<<<<< + * return None + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":138 + * return None + * + * if self.weak_thread is None: # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_6 = (__pyx_v_self->weak_thread == Py_None); + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":139 + * + * if self.weak_thread is None: + * return None # <<<<<<<<<<<<<< + * + * thread = self.weak_thread() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":138 + * return None + * + * if self.weak_thread is None: # <<<<<<<<<<<<<< + * return None + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":141 + * return None + * + * thread = self.weak_thread() # <<<<<<<<<<<<<< + * if thread is None: + * return False + */ + __Pyx_INCREF(__pyx_v_self->weak_thread); + __pyx_t_2 = __pyx_v_self->weak_thread; __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_v_thread = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":142 + * + * thread = self.weak_thread() + * if thread is None: # <<<<<<<<<<<<<< + * return False + * + */ + __pyx_t_6 = (__pyx_v_thread == Py_None); + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":143 + * thread = self.weak_thread() + * if thread is None: + * return False # <<<<<<<<<<<<<< + * + * if not is_thread_alive(thread): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":142 + * + * thread = self.weak_thread() + * if thread is None: # <<<<<<<<<<<<<< + * return False + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":145 + * return False + * + * if not is_thread_alive(thread): # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_thread}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = (!__pyx_t_6); + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":146 + * + * if not is_thread_alive(thread): + * return None # <<<<<<<<<<<<<< + * + * if thread._ident is None: # Can this happen? + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":145 + * return False + * + * if not is_thread_alive(thread): # <<<<<<<<<<<<<< + * return None + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":148 + * return None + * + * if thread._ident is None: # Can this happen? # <<<<<<<<<<<<<< + * pydev_log.critical("thread._ident is None in _get_related_thread!") + * return None + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_ident); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (__pyx_t_1 == Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":149 + * + * if thread._ident is None: # Can this happen? + * pydev_log.critical("thread._ident is None in _get_related_thread!") # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_critical); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_thread__ident_is_None_in__get_re}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":150 + * if thread._ident is None: # Can this happen? + * pydev_log.critical("thread._ident is None in _get_related_thread!") + * return None # <<<<<<<<<<<<<< + * + * if threading._active.get(thread._ident) is not thread: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":148 + * return None + * + * if thread._ident is None: # Can this happen? # <<<<<<<<<<<<<< + * pydev_log.critical("thread._ident is None in _get_related_thread!") + * return None + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":152 + * return None + * + * if threading._active.get(thread._ident) is not thread: # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_active); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_ident); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_t_7 = (__pyx_t_1 != __pyx_v_thread); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":153 + * + * if threading._active.get(thread._ident) is not thread: + * return None # <<<<<<<<<<<<<< + * + * return thread + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":152 + * return None + * + * if threading._active.get(thread._ident) is not thread: # <<<<<<<<<<<<<< + * return None + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":155 + * return None + * + * return thread # <<<<<<<<<<<<<< + * + * # fmt: off + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_thread); + __pyx_r = __pyx_v_thread; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":130 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef object _get_related_thread(self): # <<<<<<<<<<<<<< + * # ELSE + * # def _get_related_thread(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo._get_related_thread", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_thread); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_3_get_related_thread(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_3_get_related_thread = {"_get_related_thread", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_3_get_related_thread, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_3_get_related_thread(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_related_thread (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("_get_related_thread", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_get_related_thread", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_2_get_related_thread(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_2_get_related_thread(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_related_thread", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo__get_related_thread(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo._get_related_thread", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":159 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef bint _is_stepping(self): # <<<<<<<<<<<<<< + * # ELSE + * # def _is_stepping(self): + */ + +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_5_is_stepping(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo__is_stepping(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, int __pyx_skip_dispatch) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_is_stepping", 1); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_stepping); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_5_is_stepping)) { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "_pydevd_bundle/pydevd_cython.pyx":164 + * # ENDIF + * # fmt: on + * if self.pydev_state == STATE_RUN and self.pydev_step_cmd != -1: # <<<<<<<<<<<<<< + * # This means actually stepping in a step operation. + * return True + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_STATE_RUN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { + } else { + __pyx_t_6 = __pyx_t_7; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_7 = (__pyx_v_self->pydev_step_cmd != -1L); + __pyx_t_6 = __pyx_t_7; + __pyx_L4_bool_binop_done:; + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":166 + * if self.pydev_state == STATE_RUN and self.pydev_step_cmd != -1: + * # This means actually stepping in a step operation. + * return True # <<<<<<<<<<<<<< + * + * if self.pydev_state == STATE_SUSPEND and self.is_in_wait_loop: + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":164 + * # ENDIF + * # fmt: on + * if self.pydev_state == STATE_RUN and self.pydev_step_cmd != -1: # <<<<<<<<<<<<<< + * # This means actually stepping in a step operation. + * return True + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":168 + * return True + * + * if self.pydev_state == STATE_SUSPEND and self.is_in_wait_loop: # <<<<<<<<<<<<<< + * # This means stepping because it was suspended but still didn't + * # reach a suspension point. + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_STATE_SUSPEND); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_7) { + } else { + __pyx_t_6 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_6 = __pyx_v_self->is_in_wait_loop; + __pyx_L7_bool_binop_done:; + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":171 + * # This means stepping because it was suspended but still didn't + * # reach a suspension point. + * return True # <<<<<<<<<<<<<< + * + * return False + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":168 + * return True + * + * if self.pydev_state == STATE_SUSPEND and self.is_in_wait_loop: # <<<<<<<<<<<<<< + * # This means stepping because it was suspended but still didn't + * # reach a suspension point. + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":173 + * return True + * + * return False # <<<<<<<<<<<<<< + * + * # fmt: off + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":159 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef bint _is_stepping(self): # <<<<<<<<<<<<<< + * # ELSE + * # def _is_stepping(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo._is_stepping", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_5_is_stepping(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_5_is_stepping = {"_is_stepping", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_5_is_stepping, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_5_is_stepping(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_is_stepping (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("_is_stepping", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_is_stepping", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_4_is_stepping(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_4_is_stepping(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_is_stepping", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo__is_stepping(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo._is_stepping", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":177 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef get_topmost_frame(self, thread): # <<<<<<<<<<<<<< + * # ELSE + * # def get_topmost_frame(self, thread): + */ + +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_7get_topmost_frame(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_get_topmost_frame(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_thread, int __pyx_skip_dispatch) { + PyObject *__pyx_v_current_frames = NULL; + PyObject *__pyx_v_topmost_frame = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_topmost_frame", 1); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_topmost_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_7get_topmost_frame)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_thread}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "_pydevd_bundle/pydevd_cython.pyx":188 + * """ + * # sys._current_frames(): dictionary with thread id -> topmost frame + * current_frames = _current_frames() # <<<<<<<<<<<<<< + * topmost_frame = current_frames.get(thread._ident) + * if topmost_frame is None: + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_current_frames); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_v_current_frames = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":189 + * # sys._current_frames(): dictionary with thread id -> topmost frame + * current_frames = _current_frames() + * topmost_frame = current_frames.get(thread._ident) # <<<<<<<<<<<<<< + * if topmost_frame is None: + * # Note: this is expected for dummy threads (so, getting the topmost frame should be + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_frames, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_ident); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_v_topmost_frame = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":190 + * current_frames = _current_frames() + * topmost_frame = current_frames.get(thread._ident) + * if topmost_frame is None: # <<<<<<<<<<<<<< + * # Note: this is expected for dummy threads (so, getting the topmost frame should be + * # treated as optional). + */ + __pyx_t_6 = (__pyx_v_topmost_frame == Py_None); + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":193 + * # Note: this is expected for dummy threads (so, getting the topmost frame should be + * # treated as optional). + * pydev_log.info( # <<<<<<<<<<<<<< + * "Unable to get topmost frame for thread: %s, thread.ident: %s, id(thread): %s\nCurrent frames: %s.\n" "GEVENT_SUPPORT: %s", + * thread, + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":196 + * "Unable to get topmost frame for thread: %s, thread.ident: %s, id(thread): %s\nCurrent frames: %s.\n" "GEVENT_SUPPORT: %s", + * thread, + * thread.ident, # <<<<<<<<<<<<<< + * id(thread), + * current_frames, + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_ident_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "_pydevd_bundle/pydevd_cython.pyx":197 + * thread, + * thread.ident, + * id(thread), # <<<<<<<<<<<<<< + * current_frames, + * SUPPORT_GEVENT, + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "_pydevd_bundle/pydevd_cython.pyx":199 + * id(thread), + * current_frames, + * SUPPORT_GEVENT, # <<<<<<<<<<<<<< + * ) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_SUPPORT_GEVENT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[7] = {__pyx_t_8, __pyx_kp_s_Unable_to_get_topmost_frame_for, __pyx_v_thread, __pyx_t_2, __pyx_t_4, __pyx_v_current_frames, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":190 + * current_frames = _current_frames() + * topmost_frame = current_frames.get(thread._ident) + * if topmost_frame is None: # <<<<<<<<<<<<<< + * # Note: this is expected for dummy threads (so, getting the topmost frame should be + * # treated as optional). + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":202 + * ) + * + * return topmost_frame # <<<<<<<<<<<<<< + * + * # fmt: off + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_topmost_frame); + __pyx_r = __pyx_v_topmost_frame; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":177 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef get_topmost_frame(self, thread): # <<<<<<<<<<<<<< + * # ELSE + * # def get_topmost_frame(self, thread): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.get_topmost_frame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_current_frames); + __Pyx_XDECREF(__pyx_v_topmost_frame); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_7get_topmost_frame(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_6get_topmost_frame, "\n Gets the topmost frame for the given thread. Note that it may be None\n and callers should remove the reference to the frame as soon as possible\n to avoid disturbing user code.\n "); +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_7get_topmost_frame = {"get_topmost_frame", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_7get_topmost_frame, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_6get_topmost_frame}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_7get_topmost_frame(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_thread = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_topmost_frame (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_thread,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_thread)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 177, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_topmost_frame") < 0)) __PYX_ERR(0, 177, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v_thread = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_topmost_frame", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 177, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.get_topmost_frame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_6get_topmost_frame(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), __pyx_v_thread); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_6get_topmost_frame(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_thread) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_topmost_frame", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_get_topmost_frame(__pyx_v_self, __pyx_v_thread, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.get_topmost_frame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":206 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef update_stepping_info(self): # <<<<<<<<<<<<<< + * # ELSE + * # def update_stepping_info(self): + */ + +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_9update_stepping_info(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_update_stepping_info(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_stepping_info", 1); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_update_stepping_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_9update_stepping_info)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "_pydevd_bundle/pydevd_cython.pyx":211 + * # ENDIF + * # fmt: on + * _update_stepping_info(self) # <<<<<<<<<<<<<< + * + * def __str__(self): + */ + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython__update_stepping_info(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":206 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef update_stepping_info(self): # <<<<<<<<<<<<<< + * # ELSE + * # def update_stepping_info(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.update_stepping_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_9update_stepping_info(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_9update_stepping_info = {"update_stepping_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_9update_stepping_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_9update_stepping_info(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_stepping_info (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("update_stepping_info", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "update_stepping_info", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_8update_stepping_info(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_8update_stepping_info(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_stepping_info", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_update_stepping_info(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.update_stepping_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":213 + * _update_stepping_info(self) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "State:%s Stop:%s Cmd: %s Kill:%s" % (self.pydev_state, self.pydev_step_stop, self.pydev_step_cmd, self.pydev_notify_kill) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11__str__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_10__str__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_10__str__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":214 + * + * def __str__(self): + * return "State:%s Stop:%s Cmd: %s Kill:%s" % (self.pydev_state, self.pydev_step_stop, self.pydev_step_cmd, self.pydev_notify_kill) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_step_cmd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->pydev_notify_kill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->pydev_step_stop); + __Pyx_GIVEREF(__pyx_v_self->pydev_step_stop); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->pydev_step_stop)) __PYX_ERR(0, 214, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_State_s_Stop_s_Cmd_s_Kill_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":213 + * _update_stepping_info(self) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "State:%s Stop:%s Cmd: %s Kill:%s" % (self.pydev_state, self.pydev_step_stop, self.pydev_step_cmd, self.pydev_notify_kill) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":2 + * cdef class PyDBAdditionalThreadInfo: + * cdef public int pydev_state # <<<<<<<<<<<<<< + * cdef public object pydev_step_stop # Actually, it's a frame or None + * cdef public int pydev_original_step_cmd + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11pydev_state_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11pydev_state_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11pydev_state___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11pydev_state___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_state.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11pydev_state_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11pydev_state_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11pydev_state_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11pydev_state_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2, __pyx_L1_error) + __pyx_v_self->pydev_state = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_state.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":3 + * cdef class PyDBAdditionalThreadInfo: + * cdef public int pydev_state + * cdef public object pydev_step_stop # Actually, it's a frame or None # <<<<<<<<<<<<<< + * cdef public int pydev_original_step_cmd + * cdef public int pydev_step_cmd + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pydev_step_stop); + __pyx_r = __pyx_v_self->pydev_step_stop; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->pydev_step_stop); + __Pyx_DECREF(__pyx_v_self->pydev_step_stop); + __pyx_v_self->pydev_step_stop = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pydev_step_stop); + __Pyx_DECREF(__pyx_v_self->pydev_step_stop); + __pyx_v_self->pydev_step_stop = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":4 + * cdef public int pydev_state + * cdef public object pydev_step_stop # Actually, it's a frame or None + * cdef public int pydev_original_step_cmd # <<<<<<<<<<<<<< + * cdef public int pydev_step_cmd + * cdef public bint pydev_notify_kill + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_23pydev_original_step_cmd_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_23pydev_original_step_cmd_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_23pydev_original_step_cmd___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_23pydev_original_step_cmd___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_original_step_cmd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_original_step_cmd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_23pydev_original_step_cmd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_23pydev_original_step_cmd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_23pydev_original_step_cmd_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_23pydev_original_step_cmd_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_v_self->pydev_original_step_cmd = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_original_step_cmd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":5 + * cdef public object pydev_step_stop # Actually, it's a frame or None + * cdef public int pydev_original_step_cmd + * cdef public int pydev_step_cmd # <<<<<<<<<<<<<< + * cdef public bint pydev_notify_kill + * cdef public object pydev_smart_step_stop # Actually, it's a frame or None + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_14pydev_step_cmd_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_14pydev_step_cmd_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_14pydev_step_cmd___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_14pydev_step_cmd___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_step_cmd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_step_cmd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_14pydev_step_cmd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_14pydev_step_cmd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_14pydev_step_cmd_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_14pydev_step_cmd_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 5, __pyx_L1_error) + __pyx_v_self->pydev_step_cmd = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_step_cmd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":6 + * cdef public int pydev_original_step_cmd + * cdef public int pydev_step_cmd + * cdef public bint pydev_notify_kill # <<<<<<<<<<<<<< + * cdef public object pydev_smart_step_stop # Actually, it's a frame or None + * cdef public bint pydev_django_resolve_frame + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_17pydev_notify_kill_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_17pydev_notify_kill_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_17pydev_notify_kill___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_17pydev_notify_kill___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->pydev_notify_kill); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_notify_kill.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_17pydev_notify_kill_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_17pydev_notify_kill_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_17pydev_notify_kill_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_17pydev_notify_kill_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 6, __pyx_L1_error) + __pyx_v_self->pydev_notify_kill = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_notify_kill.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":7 + * cdef public int pydev_step_cmd + * cdef public bint pydev_notify_kill + * cdef public object pydev_smart_step_stop # Actually, it's a frame or None # <<<<<<<<<<<<<< + * cdef public bint pydev_django_resolve_frame + * cdef public object pydev_call_from_jinja2 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pydev_smart_step_stop); + __pyx_r = __pyx_v_self->pydev_smart_step_stop; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->pydev_smart_step_stop); + __Pyx_DECREF(__pyx_v_self->pydev_smart_step_stop); + __pyx_v_self->pydev_smart_step_stop = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pydev_smart_step_stop); + __Pyx_DECREF(__pyx_v_self->pydev_smart_step_stop); + __pyx_v_self->pydev_smart_step_stop = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":8 + * cdef public bint pydev_notify_kill + * cdef public object pydev_smart_step_stop # Actually, it's a frame or None + * cdef public bint pydev_django_resolve_frame # <<<<<<<<<<<<<< + * cdef public object pydev_call_from_jinja2 + * cdef public object pydev_call_inside_jinja2 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_26pydev_django_resolve_frame_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_26pydev_django_resolve_frame_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_26pydev_django_resolve_frame___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_26pydev_django_resolve_frame___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->pydev_django_resolve_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_django_resolve_frame.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_26pydev_django_resolve_frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_26pydev_django_resolve_frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_26pydev_django_resolve_frame_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_26pydev_django_resolve_frame_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 8, __pyx_L1_error) + __pyx_v_self->pydev_django_resolve_frame = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_django_resolve_frame.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":9 + * cdef public object pydev_smart_step_stop # Actually, it's a frame or None + * cdef public bint pydev_django_resolve_frame + * cdef public object pydev_call_from_jinja2 # <<<<<<<<<<<<<< + * cdef public object pydev_call_inside_jinja2 + * cdef public int is_tracing + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pydev_call_from_jinja2); + __pyx_r = __pyx_v_self->pydev_call_from_jinja2; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->pydev_call_from_jinja2); + __Pyx_DECREF(__pyx_v_self->pydev_call_from_jinja2); + __pyx_v_self->pydev_call_from_jinja2 = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pydev_call_from_jinja2); + __Pyx_DECREF(__pyx_v_self->pydev_call_from_jinja2); + __pyx_v_self->pydev_call_from_jinja2 = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":10 + * cdef public bint pydev_django_resolve_frame + * cdef public object pydev_call_from_jinja2 + * cdef public object pydev_call_inside_jinja2 # <<<<<<<<<<<<<< + * cdef public int is_tracing + * cdef public tuple conditional_breakpoint_exception + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pydev_call_inside_jinja2); + __pyx_r = __pyx_v_self->pydev_call_inside_jinja2; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->pydev_call_inside_jinja2); + __Pyx_DECREF(__pyx_v_self->pydev_call_inside_jinja2); + __pyx_v_self->pydev_call_inside_jinja2 = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pydev_call_inside_jinja2); + __Pyx_DECREF(__pyx_v_self->pydev_call_inside_jinja2); + __pyx_v_self->pydev_call_inside_jinja2 = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":11 + * cdef public object pydev_call_from_jinja2 + * cdef public object pydev_call_inside_jinja2 + * cdef public int is_tracing # <<<<<<<<<<<<<< + * cdef public tuple conditional_breakpoint_exception + * cdef public str pydev_message + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_10is_tracing_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_10is_tracing_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_10is_tracing___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_10is_tracing___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->is_tracing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.is_tracing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_10is_tracing_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_10is_tracing_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_10is_tracing_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_10is_tracing_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 11, __pyx_L1_error) + __pyx_v_self->is_tracing = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.is_tracing.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":12 + * cdef public object pydev_call_inside_jinja2 + * cdef public int is_tracing + * cdef public tuple conditional_breakpoint_exception # <<<<<<<<<<<<<< + * cdef public str pydev_message + * cdef public int suspend_type + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->conditional_breakpoint_exception); + __pyx_r = __pyx_v_self->conditional_breakpoint_exception; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->conditional_breakpoint_exception); + __Pyx_DECREF(__pyx_v_self->conditional_breakpoint_exception); + __pyx_v_self->conditional_breakpoint_exception = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.conditional_breakpoint_exception.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->conditional_breakpoint_exception); + __Pyx_DECREF(__pyx_v_self->conditional_breakpoint_exception); + __pyx_v_self->conditional_breakpoint_exception = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":13 + * cdef public int is_tracing + * cdef public tuple conditional_breakpoint_exception + * cdef public str pydev_message # <<<<<<<<<<<<<< + * cdef public int suspend_type + * cdef public int pydev_next_line + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pydev_message); + __pyx_r = __pyx_v_self->pydev_message; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_value))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->pydev_message); + __Pyx_DECREF(__pyx_v_self->pydev_message); + __pyx_v_self->pydev_message = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_message.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pydev_message); + __Pyx_DECREF(__pyx_v_self->pydev_message); + __pyx_v_self->pydev_message = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":14 + * cdef public tuple conditional_breakpoint_exception + * cdef public str pydev_message + * cdef public int suspend_type # <<<<<<<<<<<<<< + * cdef public int pydev_next_line + * cdef public str pydev_func_name + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_12suspend_type_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_12suspend_type_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_12suspend_type___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_12suspend_type___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->suspend_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.suspend_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_12suspend_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_12suspend_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_12suspend_type_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_12suspend_type_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 14, __pyx_L1_error) + __pyx_v_self->suspend_type = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.suspend_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":15 + * cdef public str pydev_message + * cdef public int suspend_type + * cdef public int pydev_next_line # <<<<<<<<<<<<<< + * cdef public str pydev_func_name + * cdef public bint suspended_at_unhandled + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_next_line_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_next_line_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_next_line___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_next_line___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_next_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_next_line.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_next_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_next_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_next_line_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_next_line_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 15, __pyx_L1_error) + __pyx_v_self->pydev_next_line = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_next_line.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":16 + * cdef public int suspend_type + * cdef public int pydev_next_line + * cdef public str pydev_func_name # <<<<<<<<<<<<<< + * cdef public bint suspended_at_unhandled + * cdef public str trace_suspend_type + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pydev_func_name); + __pyx_r = __pyx_v_self->pydev_func_name; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_value))) __PYX_ERR(1, 16, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->pydev_func_name); + __Pyx_DECREF(__pyx_v_self->pydev_func_name); + __pyx_v_self->pydev_func_name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_func_name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pydev_func_name); + __Pyx_DECREF(__pyx_v_self->pydev_func_name); + __pyx_v_self->pydev_func_name = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":17 + * cdef public int pydev_next_line + * cdef public str pydev_func_name + * cdef public bint suspended_at_unhandled # <<<<<<<<<<<<<< + * cdef public str trace_suspend_type + * cdef public object top_level_thread_tracer_no_back_frames + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22suspended_at_unhandled_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22suspended_at_unhandled_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22suspended_at_unhandled___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22suspended_at_unhandled___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->suspended_at_unhandled); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.suspended_at_unhandled.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22suspended_at_unhandled_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22suspended_at_unhandled_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22suspended_at_unhandled_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22suspended_at_unhandled_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 17, __pyx_L1_error) + __pyx_v_self->suspended_at_unhandled = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.suspended_at_unhandled.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":18 + * cdef public str pydev_func_name + * cdef public bint suspended_at_unhandled + * cdef public str trace_suspend_type # <<<<<<<<<<<<<< + * cdef public object top_level_thread_tracer_no_back_frames + * cdef public object top_level_thread_tracer_unhandled + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->trace_suspend_type); + __pyx_r = __pyx_v_self->trace_suspend_type; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_value))) __PYX_ERR(1, 18, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->trace_suspend_type); + __Pyx_DECREF(__pyx_v_self->trace_suspend_type); + __pyx_v_self->trace_suspend_type = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.trace_suspend_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->trace_suspend_type); + __Pyx_DECREF(__pyx_v_self->trace_suspend_type); + __pyx_v_self->trace_suspend_type = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":19 + * cdef public bint suspended_at_unhandled + * cdef public str trace_suspend_type + * cdef public object top_level_thread_tracer_no_back_frames # <<<<<<<<<<<<<< + * cdef public object top_level_thread_tracer_unhandled + * cdef public object thread_tracer + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->top_level_thread_tracer_no_back_frames); + __pyx_r = __pyx_v_self->top_level_thread_tracer_no_back_frames; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->top_level_thread_tracer_no_back_frames); + __Pyx_DECREF(__pyx_v_self->top_level_thread_tracer_no_back_frames); + __pyx_v_self->top_level_thread_tracer_no_back_frames = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->top_level_thread_tracer_no_back_frames); + __Pyx_DECREF(__pyx_v_self->top_level_thread_tracer_no_back_frames); + __pyx_v_self->top_level_thread_tracer_no_back_frames = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":20 + * cdef public str trace_suspend_type + * cdef public object top_level_thread_tracer_no_back_frames + * cdef public object top_level_thread_tracer_unhandled # <<<<<<<<<<<<<< + * cdef public object thread_tracer + * cdef public object step_in_initial_location + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->top_level_thread_tracer_unhandled); + __pyx_r = __pyx_v_self->top_level_thread_tracer_unhandled; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->top_level_thread_tracer_unhandled); + __Pyx_DECREF(__pyx_v_self->top_level_thread_tracer_unhandled); + __pyx_v_self->top_level_thread_tracer_unhandled = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->top_level_thread_tracer_unhandled); + __Pyx_DECREF(__pyx_v_self->top_level_thread_tracer_unhandled); + __pyx_v_self->top_level_thread_tracer_unhandled = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":21 + * cdef public object top_level_thread_tracer_no_back_frames + * cdef public object top_level_thread_tracer_unhandled + * cdef public object thread_tracer # <<<<<<<<<<<<<< + * cdef public object step_in_initial_location + * cdef public int pydev_smart_parent_offset + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->thread_tracer); + __pyx_r = __pyx_v_self->thread_tracer; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->thread_tracer); + __Pyx_DECREF(__pyx_v_self->thread_tracer); + __pyx_v_self->thread_tracer = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->thread_tracer); + __Pyx_DECREF(__pyx_v_self->thread_tracer); + __pyx_v_self->thread_tracer = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":22 + * cdef public object top_level_thread_tracer_unhandled + * cdef public object thread_tracer + * cdef public object step_in_initial_location # <<<<<<<<<<<<<< + * cdef public int pydev_smart_parent_offset + * cdef public int pydev_smart_child_offset + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->step_in_initial_location); + __pyx_r = __pyx_v_self->step_in_initial_location; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->step_in_initial_location); + __Pyx_DECREF(__pyx_v_self->step_in_initial_location); + __pyx_v_self->step_in_initial_location = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->step_in_initial_location); + __Pyx_DECREF(__pyx_v_self->step_in_initial_location); + __pyx_v_self->step_in_initial_location = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":23 + * cdef public object thread_tracer + * cdef public object step_in_initial_location + * cdef public int pydev_smart_parent_offset # <<<<<<<<<<<<<< + * cdef public int pydev_smart_child_offset + * cdef public tuple pydev_smart_step_into_variants + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_25pydev_smart_parent_offset_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_25pydev_smart_parent_offset_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_25pydev_smart_parent_offset___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_25pydev_smart_parent_offset___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_smart_parent_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_smart_parent_offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_25pydev_smart_parent_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_25pydev_smart_parent_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_25pydev_smart_parent_offset_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_25pydev_smart_parent_offset_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 23, __pyx_L1_error) + __pyx_v_self->pydev_smart_parent_offset = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_smart_parent_offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":24 + * cdef public object step_in_initial_location + * cdef public int pydev_smart_parent_offset + * cdef public int pydev_smart_child_offset # <<<<<<<<<<<<<< + * cdef public tuple pydev_smart_step_into_variants + * cdef public dict target_id_to_smart_step_into_variant + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_smart_child_offset_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_smart_child_offset_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_smart_child_offset___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_smart_child_offset___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_smart_child_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_smart_child_offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_smart_child_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_smart_child_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_smart_child_offset_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_smart_child_offset_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 24, __pyx_L1_error) + __pyx_v_self->pydev_smart_child_offset = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_smart_child_offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":25 + * cdef public int pydev_smart_parent_offset + * cdef public int pydev_smart_child_offset + * cdef public tuple pydev_smart_step_into_variants # <<<<<<<<<<<<<< + * cdef public dict target_id_to_smart_step_into_variant + * cdef public bint pydev_use_scoped_step_frame + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pydev_smart_step_into_variants); + __pyx_r = __pyx_v_self->pydev_smart_step_into_variants; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(1, 25, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->pydev_smart_step_into_variants); + __Pyx_DECREF(__pyx_v_self->pydev_smart_step_into_variants); + __pyx_v_self->pydev_smart_step_into_variants = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_smart_step_into_variants.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pydev_smart_step_into_variants); + __Pyx_DECREF(__pyx_v_self->pydev_smart_step_into_variants); + __pyx_v_self->pydev_smart_step_into_variants = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":26 + * cdef public int pydev_smart_child_offset + * cdef public tuple pydev_smart_step_into_variants + * cdef public dict target_id_to_smart_step_into_variant # <<<<<<<<<<<<<< + * cdef public bint pydev_use_scoped_step_frame + * cdef public object weak_thread + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->target_id_to_smart_step_into_variant); + __pyx_r = __pyx_v_self->target_id_to_smart_step_into_variant; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_value))) __PYX_ERR(1, 26, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->target_id_to_smart_step_into_variant); + __Pyx_DECREF(__pyx_v_self->target_id_to_smart_step_into_variant); + __pyx_v_self->target_id_to_smart_step_into_variant = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.target_id_to_smart_step_into_variant.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->target_id_to_smart_step_into_variant); + __Pyx_DECREF(__pyx_v_self->target_id_to_smart_step_into_variant); + __pyx_v_self->target_id_to_smart_step_into_variant = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":27 + * cdef public tuple pydev_smart_step_into_variants + * cdef public dict target_id_to_smart_step_into_variant + * cdef public bint pydev_use_scoped_step_frame # <<<<<<<<<<<<<< + * cdef public object weak_thread + * cdef public bint is_in_wait_loop + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_27pydev_use_scoped_step_frame_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_27pydev_use_scoped_step_frame_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_27pydev_use_scoped_step_frame___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_27pydev_use_scoped_step_frame___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->pydev_use_scoped_step_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_use_scoped_step_frame.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_27pydev_use_scoped_step_frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_27pydev_use_scoped_step_frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_27pydev_use_scoped_step_frame_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_27pydev_use_scoped_step_frame_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 27, __pyx_L1_error) + __pyx_v_self->pydev_use_scoped_step_frame = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.pydev_use_scoped_step_frame.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":28 + * cdef public dict target_id_to_smart_step_into_variant + * cdef public bint pydev_use_scoped_step_frame + * cdef public object weak_thread # <<<<<<<<<<<<<< + * cdef public bint is_in_wait_loop + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->weak_thread); + __pyx_r = __pyx_v_self->weak_thread; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->weak_thread); + __Pyx_DECREF(__pyx_v_self->weak_thread); + __pyx_v_self->weak_thread = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->weak_thread); + __Pyx_DECREF(__pyx_v_self->weak_thread); + __pyx_v_self->weak_thread = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pxd":29 + * cdef public bint pydev_use_scoped_step_frame + * cdef public object weak_thread + * cdef public bint is_in_wait_loop # <<<<<<<<<<<<<< + * + * cpdef get_topmost_frame(self, thread) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15is_in_wait_loop_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15is_in_wait_loop_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15is_in_wait_loop___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15is_in_wait_loop___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_in_wait_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.is_in_wait_loop.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15is_in_wait_loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15is_in_wait_loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15is_in_wait_loop_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15is_in_wait_loop_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 29, __pyx_L1_error) + __pyx_v_self->is_in_wait_loop = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.is_in_wait_loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_12__reduce_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_12__reduce_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + int __pyx_t_15; + int __pyx_t_16; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 1); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.conditional_breakpoint_exception, self.is_in_wait_loop, self.is_tracing, self.pydev_call_from_jinja2, self.pydev_call_inside_jinja2, self.pydev_django_resolve_frame, self.pydev_func_name, self.pydev_message, self.pydev_next_line, self.pydev_notify_kill, self.pydev_original_step_cmd, self.pydev_smart_child_offset, self.pydev_smart_parent_offset, self.pydev_smart_step_into_variants, self.pydev_smart_step_stop, self.pydev_state, self.pydev_step_cmd, self.pydev_step_stop, self.pydev_use_scoped_step_frame, self.step_in_initial_location, self.suspend_type, self.suspended_at_unhandled, self.target_id_to_smart_step_into_variant, self.thread_tracer, self.top_level_thread_tracer_no_back_frames, self.top_level_thread_tracer_unhandled, self.trace_suspend_type, self.weak_thread) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_in_wait_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->is_tracing); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->pydev_django_resolve_frame); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_next_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->pydev_notify_kill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_original_step_cmd); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_smart_child_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_smart_parent_offset); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_state); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_self->pydev_step_cmd); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyBool_FromLong(__pyx_v_self->pydev_use_scoped_step_frame); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_self->suspend_type); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyBool_FromLong(__pyx_v_self->suspended_at_unhandled); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = PyTuple_New(28); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_INCREF(__pyx_v_self->conditional_breakpoint_exception); + __Pyx_GIVEREF(__pyx_v_self->conditional_breakpoint_exception); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_self->conditional_breakpoint_exception)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->pydev_call_from_jinja2); + __Pyx_GIVEREF(__pyx_v_self->pydev_call_from_jinja2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_v_self->pydev_call_from_jinja2)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->pydev_call_inside_jinja2); + __Pyx_GIVEREF(__pyx_v_self->pydev_call_inside_jinja2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_v_self->pydev_call_inside_jinja2)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->pydev_func_name); + __Pyx_GIVEREF(__pyx_v_self->pydev_func_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 6, __pyx_v_self->pydev_func_name)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->pydev_message); + __Pyx_GIVEREF(__pyx_v_self->pydev_message); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 7, __pyx_v_self->pydev_message)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 8, __pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 9, __pyx_t_5)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 10, __pyx_t_6)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_7); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 11, __pyx_t_7)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_8); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 12, __pyx_t_8)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->pydev_smart_step_into_variants); + __Pyx_GIVEREF(__pyx_v_self->pydev_smart_step_into_variants); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 13, __pyx_v_self->pydev_smart_step_into_variants)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->pydev_smart_step_stop); + __Pyx_GIVEREF(__pyx_v_self->pydev_smart_step_stop); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 14, __pyx_v_self->pydev_smart_step_stop)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_9); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 15, __pyx_t_9)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_10); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 16, __pyx_t_10)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->pydev_step_stop); + __Pyx_GIVEREF(__pyx_v_self->pydev_step_stop); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 17, __pyx_v_self->pydev_step_stop)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_11); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 18, __pyx_t_11)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->step_in_initial_location); + __Pyx_GIVEREF(__pyx_v_self->step_in_initial_location); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 19, __pyx_v_self->step_in_initial_location)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_12); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 20, __pyx_t_12)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_13); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 21, __pyx_t_13)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->target_id_to_smart_step_into_variant); + __Pyx_GIVEREF(__pyx_v_self->target_id_to_smart_step_into_variant); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 22, __pyx_v_self->target_id_to_smart_step_into_variant)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->thread_tracer); + __Pyx_GIVEREF(__pyx_v_self->thread_tracer); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 23, __pyx_v_self->thread_tracer)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->top_level_thread_tracer_no_back_frames); + __Pyx_GIVEREF(__pyx_v_self->top_level_thread_tracer_no_back_frames); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 24, __pyx_v_self->top_level_thread_tracer_no_back_frames)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->top_level_thread_tracer_unhandled); + __Pyx_GIVEREF(__pyx_v_self->top_level_thread_tracer_unhandled); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 25, __pyx_v_self->top_level_thread_tracer_unhandled)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->trace_suspend_type); + __Pyx_GIVEREF(__pyx_v_self->trace_suspend_type); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 26, __pyx_v_self->trace_suspend_type)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->weak_thread); + __Pyx_GIVEREF(__pyx_v_self->weak_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 27, __pyx_v_self->weak_thread)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_t_9 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; + __pyx_t_13 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_14); + __pyx_t_14 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.conditional_breakpoint_exception, self.is_in_wait_loop, self.is_tracing, self.pydev_call_from_jinja2, self.pydev_call_inside_jinja2, self.pydev_django_resolve_frame, self.pydev_func_name, self.pydev_message, self.pydev_next_line, self.pydev_notify_kill, self.pydev_original_step_cmd, self.pydev_smart_child_offset, self.pydev_smart_parent_offset, self.pydev_smart_step_into_variants, self.pydev_smart_step_stop, self.pydev_state, self.pydev_step_cmd, self.pydev_step_stop, self.pydev_use_scoped_step_frame, self.step_in_initial_location, self.suspend_type, self.suspended_at_unhandled, self.target_id_to_smart_step_into_variant, self.thread_tracer, self.top_level_thread_tracer_no_back_frames, self.top_level_thread_tracer_unhandled, self.trace_suspend_type, self.weak_thread) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_14 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_v__dict = __pyx_t_14; + __pyx_t_14 = 0; + + /* "(tree fragment)":7 + * state = (self.conditional_breakpoint_exception, self.is_in_wait_loop, self.is_tracing, self.pydev_call_from_jinja2, self.pydev_call_inside_jinja2, self.pydev_django_resolve_frame, self.pydev_func_name, self.pydev_message, self.pydev_next_line, self.pydev_notify_kill, self.pydev_original_step_cmd, self.pydev_smart_child_offset, self.pydev_smart_parent_offset, self.pydev_smart_step_into_variants, self.pydev_smart_step_stop, self.pydev_state, self.pydev_step_cmd, self.pydev_step_stop, self.pydev_use_scoped_step_frame, self.step_in_initial_location, self.suspend_type, self.suspended_at_unhandled, self.target_id_to_smart_step_into_variant, self.thread_tracer, self.top_level_thread_tracer_no_back_frames, self.top_level_thread_tracer_unhandled, self.trace_suspend_type, self.weak_thread) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_15 = (__pyx_v__dict != Py_None); + if (__pyx_t_15) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v__dict)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_13 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_13)); + __pyx_t_13 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.conditional_breakpoint_exception is not None or self.pydev_call_from_jinja2 is not None or self.pydev_call_inside_jinja2 is not None or self.pydev_func_name is not None or self.pydev_message is not None or self.pydev_smart_step_into_variants is not None or self.pydev_smart_step_stop is not None or self.pydev_step_stop is not None or self.step_in_initial_location is not None or self.target_id_to_smart_step_into_variant is not None or self.thread_tracer is not None or self.top_level_thread_tracer_no_back_frames is not None or self.top_level_thread_tracer_unhandled is not None or self.trace_suspend_type is not None or self.weak_thread is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.conditional_breakpoint_exception, self.is_in_wait_loop, self.is_tracing, self.pydev_call_from_jinja2, self.pydev_call_inside_jinja2, self.pydev_django_resolve_frame, self.pydev_func_name, self.pydev_message, self.pydev_next_line, self.pydev_notify_kill, self.pydev_original_step_cmd, self.pydev_smart_child_offset, self.pydev_smart_parent_offset, self.pydev_smart_step_into_variants, self.pydev_smart_step_stop, self.pydev_state, self.pydev_step_cmd, self.pydev_step_stop, self.pydev_use_scoped_step_frame, self.step_in_initial_location, self.suspend_type, self.suspended_at_unhandled, self.target_id_to_smart_step_into_variant, self.thread_tracer, self.top_level_thread_tracer_no_back_frames, self.top_level_thread_tracer_unhandled, self.trace_suspend_type, self.weak_thread) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.conditional_breakpoint_exception is not None or self.pydev_call_from_jinja2 is not None or self.pydev_call_inside_jinja2 is not None or self.pydev_func_name is not None or self.pydev_message is not None or self.pydev_smart_step_into_variants is not None or self.pydev_smart_step_stop is not None or self.pydev_step_stop is not None or self.step_in_initial_location is not None or self.target_id_to_smart_step_into_variant is not None or self.thread_tracer is not None or self.top_level_thread_tracer_no_back_frames is not None or self.top_level_thread_tracer_unhandled is not None or self.trace_suspend_type is not None or self.weak_thread is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_PyDBAdditionalThreadInfo, (type(self), 0xd33aa14, None), state + */ + /*else*/ { + __pyx_t_16 = (__pyx_v_self->conditional_breakpoint_exception != ((PyObject*)Py_None)); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->pydev_call_from_jinja2 != Py_None); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->pydev_call_inside_jinja2 != Py_None); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->pydev_func_name != ((PyObject*)Py_None)); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->pydev_message != ((PyObject*)Py_None)); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->pydev_smart_step_into_variants != ((PyObject*)Py_None)); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->pydev_smart_step_stop != Py_None); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->pydev_step_stop != Py_None); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->step_in_initial_location != Py_None); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->target_id_to_smart_step_into_variant != ((PyObject*)Py_None)); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->thread_tracer != Py_None); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->top_level_thread_tracer_no_back_frames != Py_None); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->top_level_thread_tracer_unhandled != Py_None); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->trace_suspend_type != ((PyObject*)Py_None)); + if (!__pyx_t_16) { + } else { + __pyx_t_15 = __pyx_t_16; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_self->weak_thread != Py_None); + __pyx_t_15 = __pyx_t_16; + __pyx_L4_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_15; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.conditional_breakpoint_exception is not None or self.pydev_call_from_jinja2 is not None or self.pydev_call_inside_jinja2 is not None or self.pydev_func_name is not None or self.pydev_message is not None or self.pydev_smart_step_into_variants is not None or self.pydev_smart_step_stop is not None or self.pydev_step_stop is not None or self.step_in_initial_location is not None or self.target_id_to_smart_step_into_variant is not None or self.thread_tracer is not None or self.top_level_thread_tracer_no_back_frames is not None or self.top_level_thread_tracer_unhandled is not None or self.trace_suspend_type is not None or self.weak_thread is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_PyDBAdditionalThreadInfo, (type(self), 0xd33aa14, None), state + * else: + */ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.conditional_breakpoint_exception is not None or self.pydev_call_from_jinja2 is not None or self.pydev_call_inside_jinja2 is not None or self.pydev_func_name is not None or self.pydev_message is not None or self.pydev_smart_step_into_variants is not None or self.pydev_smart_step_stop is not None or self.pydev_step_stop is not None or self.step_in_initial_location is not None or self.target_id_to_smart_step_into_variant is not None or self.thread_tracer is not None or self.top_level_thread_tracer_no_back_frames is not None or self.top_level_thread_tracer_unhandled is not None or self.trace_suspend_type is not None or self.weak_thread is not None + * if use_setstate: + * return __pyx_unpickle_PyDBAdditionalThreadInfo, (type(self), 0xd33aa14, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_PyDBAdditionalThreadInfo, (type(self), 0xd33aa14, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_pyx_unpickle_PyDBAdditionalThr); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_221489684); + __Pyx_GIVEREF(__pyx_int_221489684); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_int_221489684)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 2, Py_None)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_GIVEREF(__pyx_t_13); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_14); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_14)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_v_state)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_13 = 0; + __pyx_t_14 = 0; + __pyx_r = __pyx_t_12; + __pyx_t_12 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.conditional_breakpoint_exception is not None or self.pydev_call_from_jinja2 is not None or self.pydev_call_inside_jinja2 is not None or self.pydev_func_name is not None or self.pydev_message is not None or self.pydev_smart_step_into_variants is not None or self.pydev_smart_step_stop is not None or self.pydev_step_stop is not None or self.step_in_initial_location is not None or self.target_id_to_smart_step_into_variant is not None or self.thread_tracer is not None or self.top_level_thread_tracer_no_back_frames is not None or self.top_level_thread_tracer_unhandled is not None or self.trace_suspend_type is not None or self.weak_thread is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_PyDBAdditionalThreadInfo, (type(self), 0xd33aa14, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_PyDBAdditionalThreadInfo, (type(self), 0xd33aa14, None), state + * else: + * return __pyx_unpickle_PyDBAdditionalThreadInfo, (type(self), 0xd33aa14, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_pyx_unpickle_PyDBAdditionalThr); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_221489684); + __Pyx_GIVEREF(__pyx_int_221489684); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_int_221489684)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_v_state)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_GIVEREF(__pyx_t_12); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_14); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_14)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_12 = 0; + __pyx_t_14 = 0; + __pyx_r = __pyx_t_13; + __pyx_t_13 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PyDBAdditionalThreadInfo, (type(self), 0xd33aa14, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 16, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_14__setstate_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_14__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 1); + + /* "(tree fragment)":17 + * return __pyx_unpickle_PyDBAdditionalThreadInfo, (type(self), 0xd33aa14, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBAdditionalThreadInfo__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PyDBAdditionalThreadInfo, (type(self), 0xd33aa14, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":223 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef set_additional_thread_info(thread): # <<<<<<<<<<<<<< + * # ELSE + * # def set_additional_thread_info(thread): + */ + +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_1set_additional_thread_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_set_additional_thread_info(PyObject *__pyx_v_thread, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_v_additional_info = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + unsigned int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19 = NULL; + int __pyx_t_20; + int __pyx_t_21; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_additional_thread_info", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":228 + * # ENDIF + * # fmt: on + * try: # <<<<<<<<<<<<<< + * additional_info = thread.additional_info + * if additional_info is None: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":229 + * # fmt: on + * try: + * additional_info = thread.additional_info # <<<<<<<<<<<<<< + * if additional_info is None: + * raise AttributeError() + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_additional_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_additional_info = __pyx_t_4; + __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":230 + * try: + * additional_info = thread.additional_info + * if additional_info is None: # <<<<<<<<<<<<<< + * raise AttributeError() + * except: + */ + __pyx_t_5 = (__pyx_v_additional_info == Py_None); + if (unlikely(__pyx_t_5)) { + + /* "_pydevd_bundle/pydevd_cython.pyx":231 + * additional_info = thread.additional_info + * if additional_info is None: + * raise AttributeError() # <<<<<<<<<<<<<< + * except: + * with _set_additional_thread_info_lock: + */ + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 231, __pyx_L3_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":230 + * try: + * additional_info = thread.additional_info + * if additional_info is None: # <<<<<<<<<<<<<< + * raise AttributeError() + * except: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":228 + * # ENDIF + * # fmt: on + * try: # <<<<<<<<<<<<<< + * additional_info = thread.additional_info + * if additional_info is None: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":232 + * if additional_info is None: + * raise AttributeError() + * except: # <<<<<<<<<<<<<< + * with _set_additional_thread_info_lock: + * # If it's not there, set it within a lock to avoid any racing + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.set_additional_thread_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 232, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + + /* "_pydevd_bundle/pydevd_cython.pyx":233 + * raise AttributeError() + * except: + * with _set_additional_thread_info_lock: # <<<<<<<<<<<<<< + * # If it's not there, set it within a lock to avoid any racing + * # conditions. + */ + /*with:*/ { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_set_additional_thread_info_lock); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 233, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_8, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 233, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = __Pyx_PyObject_LookupSpecial(__pyx_t_8, __pyx_n_s_enter); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 233, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = NULL; + __pyx_t_13 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + __pyx_t_13 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; + __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 0+__pyx_t_13); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 233, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":236 + * # If it's not there, set it within a lock to avoid any racing + * # conditions. + * try: # <<<<<<<<<<<<<< + * additional_info = thread.additional_info + * except: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_19); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":237 + * # conditions. + * try: + * additional_info = thread.additional_info # <<<<<<<<<<<<<< + * except: + * additional_info = None + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_additional_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 237, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_additional_info, __pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":236 + * # If it's not there, set it within a lock to avoid any racing + * # conditions. + * try: # <<<<<<<<<<<<<< + * additional_info = thread.additional_info + * except: + */ + } + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + goto __pyx_L33_try_end; + __pyx_L26_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":238 + * try: + * additional_info = thread.additional_info + * except: # <<<<<<<<<<<<<< + * additional_info = None + * + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.set_additional_thread_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 238, __pyx_L28_except_error) + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + + /* "_pydevd_bundle/pydevd_cython.pyx":239 + * additional_info = thread.additional_info + * except: + * additional_info = None # <<<<<<<<<<<<<< + * + * if additional_info is None: + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_additional_info, Py_None); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L27_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":236 + * # If it's not there, set it within a lock to avoid any racing + * # conditions. + * try: # <<<<<<<<<<<<<< + * additional_info = thread.additional_info + * except: + */ + __pyx_L28_except_error:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); + goto __pyx_L18_error; + __pyx_L27_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); + __pyx_L33_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":241 + * additional_info = None + * + * if additional_info is None: # <<<<<<<<<<<<<< + * # Note: don't call PyDBAdditionalThreadInfo constructor at this + * # point as it can piggy-back into the debugger which could + */ + __pyx_t_5 = (__pyx_v_additional_info == Py_None); + if (__pyx_t_5) { + + /* "_pydevd_bundle/pydevd_cython.pyx":246 + * # get here again, rather get the global ref which was pre-created + * # and add a new entry only after we set thread.additional_info. + * additional_info = _next_additional_info[0] # <<<<<<<<<<<<<< + * thread.additional_info = additional_info + * additional_info.weak_thread = weakref.ref(thread) + */ + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_next_additional_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 246, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 246, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF_SET(__pyx_v_additional_info, __pyx_t_10); + __pyx_t_10 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":247 + * # and add a new entry only after we set thread.additional_info. + * additional_info = _next_additional_info[0] + * thread.additional_info = additional_info # <<<<<<<<<<<<<< + * additional_info.weak_thread = weakref.ref(thread) + * add_additional_info(additional_info) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_thread, __pyx_n_s_additional_info, __pyx_v_additional_info) < 0) __PYX_ERR(0, 247, __pyx_L18_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":248 + * additional_info = _next_additional_info[0] + * thread.additional_info = additional_info + * additional_info.weak_thread = weakref.ref(thread) # <<<<<<<<<<<<<< + * add_additional_info(additional_info) + * del _next_additional_info[:] + */ + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_weakref); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 248, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_ref); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 248, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = NULL; + __pyx_t_13 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_13 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_thread}; + __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 248, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_additional_info, __pyx_n_s_weak_thread, __pyx_t_10) < 0) __PYX_ERR(0, 248, __pyx_L18_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":249 + * thread.additional_info = additional_info + * additional_info.weak_thread = weakref.ref(thread) + * add_additional_info(additional_info) # <<<<<<<<<<<<<< + * del _next_additional_info[:] + * _next_additional_info.append(PyDBAdditionalThreadInfo()) + */ + if (!(likely(((__pyx_v_additional_info) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_additional_info, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 249, __pyx_L18_error) + __pyx_t_10 = __pyx_f_14_pydevd_bundle_13pydevd_cython_add_additional_info(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_additional_info), 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 249, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":250 + * additional_info.weak_thread = weakref.ref(thread) + * add_additional_info(additional_info) + * del _next_additional_info[:] # <<<<<<<<<<<<<< + * _next_additional_info.append(PyDBAdditionalThreadInfo()) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_next_additional_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 250, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_PyObject_DelSlice(__pyx_t_10, 0, 0, NULL, NULL, &__pyx_slice__2, 0, 0, 1) < 0) __PYX_ERR(0, 250, __pyx_L18_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":251 + * add_additional_info(additional_info) + * del _next_additional_info[:] + * _next_additional_info.append(PyDBAdditionalThreadInfo()) # <<<<<<<<<<<<<< + * + * return additional_info + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_next_additional_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 251, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 251, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_20 = __Pyx_PyObject_Append(__pyx_t_10, __pyx_t_8); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 251, __pyx_L18_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":241 + * additional_info = None + * + * if additional_info is None: # <<<<<<<<<<<<<< + * # Note: don't call PyDBAdditionalThreadInfo constructor at this + * # point as it can piggy-back into the debugger which could + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":233 + * raise AttributeError() + * except: + * with _set_additional_thread_info_lock: # <<<<<<<<<<<<<< + * # If it's not there, set it within a lock to avoid any racing + * # conditions. + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + goto __pyx_L25_try_end; + __pyx_L18_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.set_additional_thread_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 233, __pyx_L20_except_error) + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __pyx_t_12 = PyTuple_Pack(3, __pyx_t_8, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 233, __pyx_L20_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 233, __pyx_L20_except_error) + __Pyx_GOTREF(__pyx_t_19); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_19); + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + if (__pyx_t_5 < 0) __PYX_ERR(0, 233, __pyx_L20_except_error) + __pyx_t_21 = (!__pyx_t_5); + if (unlikely(__pyx_t_21)) { + __Pyx_GIVEREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ErrRestoreWithState(__pyx_t_8, __pyx_t_10, __pyx_t_11); + __pyx_t_8 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; + __PYX_ERR(0, 233, __pyx_L20_except_error) + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L19_exception_handled; + } + __pyx_L20_except_error:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); + goto __pyx_L5_except_error; + __pyx_L19_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); + __pyx_L25_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_9) { + __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__3, NULL); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 233, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + } + goto __pyx_L17; + } + __pyx_L17:; + } + goto __pyx_L40; + __pyx_L12_error:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L5_except_error; + __pyx_L40:; + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L4_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":228 + * # ENDIF + * # fmt: on + * try: # <<<<<<<<<<<<<< + * additional_info = thread.additional_info + * if additional_info is None: + */ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":253 + * _next_additional_info.append(PyDBAdditionalThreadInfo()) + * + * return additional_info # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_v_additional_info)) { __Pyx_RaiseUnboundLocalError("additional_info"); __PYX_ERR(0, 253, __pyx_L1_error) } + __Pyx_INCREF(__pyx_v_additional_info); + __pyx_r = __pyx_v_additional_info; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":223 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef set_additional_thread_info(thread): # <<<<<<<<<<<<<< + * # ELSE + * # def set_additional_thread_info(thread): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.set_additional_thread_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_additional_info); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_1set_additional_thread_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_1set_additional_thread_info = {"set_additional_thread_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_1set_additional_thread_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_1set_additional_thread_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_thread = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_additional_thread_info (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_thread,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_thread)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 223, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_additional_thread_info") < 0)) __PYX_ERR(0, 223, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v_thread = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("set_additional_thread_info", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 223, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.set_additional_thread_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_set_additional_thread_info(__pyx_self, __pyx_v_thread); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_set_additional_thread_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_thread) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_additional_thread_info", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython_set_additional_thread_info(__pyx_v_thread, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.set_additional_thread_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":272 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _update_stepping_info(PyDBAdditionalThreadInfo info): # <<<<<<<<<<<<<< + * # ELSE + * # def _update_stepping_info(info): + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython__update_stepping_info(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info) { + PyObject *__pyx_v_new_all_infos = NULL; + PyObject *__pyx_v_new_stepping = NULL; + PyObject *__pyx_v_py_db = NULL; + PyObject *__pyx_v_thread = NULL; + PyObject *__pyx_v_thread_id = NULL; + CYTHON_UNUSED PyObject *__pyx_v__queue = NULL; + PyObject *__pyx_v_event = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_t_13; + int __pyx_t_14; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + int __pyx_t_17; + int __pyx_t_18; + PyObject *(*__pyx_t_19)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_update_stepping_info", 0); + __Pyx_INCREF((PyObject *)__pyx_v_info); + + /* "_pydevd_bundle/pydevd_cython.pyx":281 + * global _all_infos + * + * with _update_infos_lock: # <<<<<<<<<<<<<< + * # Removes entries that are no longer valid. + * new_all_infos = set() + */ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_14_pydevd_bundle_13pydevd_cython__update_infos_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_v_14_pydevd_bundle_13pydevd_cython__update_infos_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 281, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":283 + * with _update_infos_lock: + * # Removes entries that are no longer valid. + * new_all_infos = set() # <<<<<<<<<<<<<< + * for info in _all_infos: + * if info._get_related_thread() is not None: + */ + __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_new_all_infos = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":284 + * # Removes entries that are no longer valid. + * new_all_infos = set() + * for info in _all_infos: # <<<<<<<<<<<<<< + * if info._get_related_thread() is not None: + * new_all_infos.add(info) + */ + __pyx_t_9 = 0; + __pyx_t_3 = __Pyx_set_iterator(__pyx_v_14_pydevd_bundle_13pydevd_cython__all_infos, 1, (&__pyx_t_10), (&__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_3; + __pyx_t_3 = 0; + while (1) { + __pyx_t_12 = __Pyx_set_iter_next(__pyx_t_2, __pyx_t_10, &__pyx_t_9, &__pyx_t_3, __pyx_t_11); + if (unlikely(__pyx_t_12 == 0)) break; + if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 284, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 284, __pyx_L7_error) + __Pyx_DECREF_SET(__pyx_v_info, ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":285 + * new_all_infos = set() + * for info in _all_infos: + * if info._get_related_thread() is not None: # <<<<<<<<<<<<<< + * new_all_infos.add(info) + * _all_infos = new_all_infos + */ + __pyx_t_3 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_info->__pyx_vtab)->_get_related_thread(__pyx_v_info, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_13 = (__pyx_t_3 != Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_13) { + + /* "_pydevd_bundle/pydevd_cython.pyx":286 + * for info in _all_infos: + * if info._get_related_thread() is not None: + * new_all_infos.add(info) # <<<<<<<<<<<<<< + * _all_infos = new_all_infos + * + */ + __pyx_t_14 = PySet_Add(__pyx_v_new_all_infos, ((PyObject *)__pyx_v_info)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 286, __pyx_L7_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":285 + * new_all_infos = set() + * for info in _all_infos: + * if info._get_related_thread() is not None: # <<<<<<<<<<<<<< + * new_all_infos.add(info) + * _all_infos = new_all_infos + */ + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":287 + * if info._get_related_thread() is not None: + * new_all_infos.add(info) + * _all_infos = new_all_infos # <<<<<<<<<<<<<< + * + * new_stepping = set() + */ + __Pyx_INCREF(__pyx_v_new_all_infos); + __Pyx_XGOTREF(__pyx_v_14_pydevd_bundle_13pydevd_cython__all_infos); + __Pyx_DECREF_SET(__pyx_v_14_pydevd_bundle_13pydevd_cython__all_infos, __pyx_v_new_all_infos); + __Pyx_GIVEREF(__pyx_v_new_all_infos); + + /* "_pydevd_bundle/pydevd_cython.pyx":289 + * _all_infos = new_all_infos + * + * new_stepping = set() # <<<<<<<<<<<<<< + * for info in _all_infos: + * if info._is_stepping(): + */ + __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_new_stepping = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":290 + * + * new_stepping = set() + * for info in _all_infos: # <<<<<<<<<<<<<< + * if info._is_stepping(): + * new_stepping.add(info) + */ + __pyx_t_10 = 0; + __pyx_t_3 = __Pyx_set_iterator(__pyx_v_14_pydevd_bundle_13pydevd_cython__all_infos, 1, (&__pyx_t_9), (&__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_3; + __pyx_t_3 = 0; + while (1) { + __pyx_t_12 = __Pyx_set_iter_next(__pyx_t_2, __pyx_t_9, &__pyx_t_10, &__pyx_t_3, __pyx_t_11); + if (unlikely(__pyx_t_12 == 0)) break; + if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 290, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 290, __pyx_L7_error) + __Pyx_DECREF_SET(__pyx_v_info, ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":291 + * new_stepping = set() + * for info in _all_infos: + * if info._is_stepping(): # <<<<<<<<<<<<<< + * new_stepping.add(info) + * _infos_stepping = new_stepping + */ + __pyx_t_13 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_info->__pyx_vtab)->_is_stepping(__pyx_v_info, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 291, __pyx_L7_error) + if (__pyx_t_13) { + + /* "_pydevd_bundle/pydevd_cython.pyx":292 + * for info in _all_infos: + * if info._is_stepping(): + * new_stepping.add(info) # <<<<<<<<<<<<<< + * _infos_stepping = new_stepping + * + */ + __pyx_t_14 = PySet_Add(__pyx_v_new_stepping, ((PyObject *)__pyx_v_info)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 292, __pyx_L7_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":291 + * new_stepping = set() + * for info in _all_infos: + * if info._is_stepping(): # <<<<<<<<<<<<<< + * new_stepping.add(info) + * _infos_stepping = new_stepping + */ + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":293 + * if info._is_stepping(): + * new_stepping.add(info) + * _infos_stepping = new_stepping # <<<<<<<<<<<<<< + * + * py_db = get_global_debugger() + */ + __Pyx_INCREF(__pyx_v_new_stepping); + __Pyx_XGOTREF(__pyx_v_14_pydevd_bundle_13pydevd_cython__infos_stepping); + __Pyx_DECREF_SET(__pyx_v_14_pydevd_bundle_13pydevd_cython__infos_stepping, __pyx_v_new_stepping); + __Pyx_GIVEREF(__pyx_v_new_stepping); + + /* "_pydevd_bundle/pydevd_cython.pyx":281 + * global _all_infos + * + * with _update_infos_lock: # <<<<<<<<<<<<<< + * # Removes entries that are no longer valid. + * new_all_infos = set() + */ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython._update_stepping_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 281, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_15 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 281, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 281, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_16); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (__pyx_t_13 < 0) __PYX_ERR(0, 281, __pyx_L9_except_error) + __pyx_t_17 = (!__pyx_t_13); + if (unlikely(__pyx_t_17)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_4); + __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 281, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L22; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L22:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":295 + * _infos_stepping = new_stepping + * + * py_db = get_global_debugger() # <<<<<<<<<<<<<< + * if py_db is not None and not py_db.pydb_disposed: + * thread = info.weak_thread() + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_global_debugger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v_py_db = __pyx_t_4; + __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":296 + * + * py_db = get_global_debugger() + * if py_db is not None and not py_db.pydb_disposed: # <<<<<<<<<<<<<< + * thread = info.weak_thread() + * if thread is not None: + */ + __pyx_t_13 = (__pyx_v_py_db != Py_None); + if (__pyx_t_13) { + } else { + __pyx_t_17 = __pyx_t_13; + goto __pyx_L24_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_pydb_disposed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_18 = (!__pyx_t_13); + __pyx_t_17 = __pyx_t_18; + __pyx_L24_bool_binop_done:; + if (__pyx_t_17) { + + /* "_pydevd_bundle/pydevd_cython.pyx":297 + * py_db = get_global_debugger() + * if py_db is not None and not py_db.pydb_disposed: + * thread = info.weak_thread() # <<<<<<<<<<<<<< + * if thread is not None: + * thread_id = get_thread_id(thread) + */ + __Pyx_INCREF(__pyx_v_info->weak_thread); + __pyx_t_3 = __pyx_v_info->weak_thread; __pyx_t_2 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v_thread = __pyx_t_4; + __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":298 + * if py_db is not None and not py_db.pydb_disposed: + * thread = info.weak_thread() + * if thread is not None: # <<<<<<<<<<<<<< + * thread_id = get_thread_id(thread) + * _queue, event = py_db.get_internal_queue_and_event(thread_id) + */ + __pyx_t_17 = (__pyx_v_thread != Py_None); + if (__pyx_t_17) { + + /* "_pydevd_bundle/pydevd_cython.pyx":299 + * thread = info.weak_thread() + * if thread is not None: + * thread_id = get_thread_id(thread) # <<<<<<<<<<<<<< + * _queue, event = py_db.get_internal_queue_and_event(thread_id) + * event.set() + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_thread_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_thread}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v_thread_id = __pyx_t_4; + __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":300 + * if thread is not None: + * thread_id = get_thread_id(thread) + * _queue, event = py_db.get_internal_queue_and_event(thread_id) # <<<<<<<<<<<<<< + * event.set() + * + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_internal_queue_and_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_thread_id}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 300, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_3 = PyList_GET_ITEM(sequence, 0); + __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + #else + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_15 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_15); + index = 0; __pyx_t_3 = __pyx_t_19(__pyx_t_15); if (unlikely(!__pyx_t_3)) goto __pyx_L27_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_2 = __pyx_t_19(__pyx_t_15); if (unlikely(!__pyx_t_2)) goto __pyx_L27_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_15), 2) < 0) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_19 = NULL; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L28_unpacking_done; + __pyx_L27_unpacking_failed:; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_19 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_L28_unpacking_done:; + } + __pyx_v__queue = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_event = __pyx_t_2; + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":301 + * thread_id = get_thread_id(thread) + * _queue, event = py_db.get_internal_queue_and_event(thread_id) + * event.set() # <<<<<<<<<<<<<< + * + * # fmt: off + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_event, __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":298 + * if py_db is not None and not py_db.pydb_disposed: + * thread = info.weak_thread() + * if thread is not None: # <<<<<<<<<<<<<< + * thread_id = get_thread_id(thread) + * _queue, event = py_db.get_internal_queue_and_event(thread_id) + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":296 + * + * py_db = get_global_debugger() + * if py_db is not None and not py_db.pydb_disposed: # <<<<<<<<<<<<<< + * thread = info.weak_thread() + * if thread is not None: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":272 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _update_stepping_info(PyDBAdditionalThreadInfo info): # <<<<<<<<<<<<<< + * # ELSE + * # def _update_stepping_info(info): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython._update_stepping_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_new_all_infos); + __Pyx_XDECREF(__pyx_v_new_stepping); + __Pyx_XDECREF(__pyx_v_py_db); + __Pyx_XDECREF(__pyx_v_thread); + __Pyx_XDECREF(__pyx_v_thread_id); + __Pyx_XDECREF(__pyx_v__queue); + __Pyx_XDECREF(__pyx_v_event); + __Pyx_XDECREF((PyObject *)__pyx_v_info); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":305 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef add_additional_info(PyDBAdditionalThreadInfo info): # <<<<<<<<<<<<<< + * # ELSE + * # def add_additional_info(info): + */ + +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_3add_additional_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_add_additional_info(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_additional_info", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":310 + * # ENDIF + * # fmt: on + * with _update_infos_lock: # <<<<<<<<<<<<<< + * _all_infos.add(info) + * if info._is_stepping(): + */ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_14_pydevd_bundle_13pydevd_cython__update_infos_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_v_14_pydevd_bundle_13pydevd_cython__update_infos_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":311 + * # fmt: on + * with _update_infos_lock: + * _all_infos.add(info) # <<<<<<<<<<<<<< + * if info._is_stepping(): + * _infos_stepping.add(info) + */ + if (unlikely(__pyx_v_14_pydevd_bundle_13pydevd_cython__all_infos == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); + __PYX_ERR(0, 311, __pyx_L7_error) + } + __pyx_t_9 = PySet_Add(__pyx_v_14_pydevd_bundle_13pydevd_cython__all_infos, ((PyObject *)__pyx_v_info)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 311, __pyx_L7_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":312 + * with _update_infos_lock: + * _all_infos.add(info) + * if info._is_stepping(): # <<<<<<<<<<<<<< + * _infos_stepping.add(info) + * + */ + __pyx_t_10 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_info->__pyx_vtab)->_is_stepping(__pyx_v_info, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 312, __pyx_L7_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":313 + * _all_infos.add(info) + * if info._is_stepping(): + * _infos_stepping.add(info) # <<<<<<<<<<<<<< + * + * # fmt: off + */ + if (unlikely(__pyx_v_14_pydevd_bundle_13pydevd_cython__infos_stepping == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); + __PYX_ERR(0, 313, __pyx_L7_error) + } + __pyx_t_9 = PySet_Add(__pyx_v_14_pydevd_bundle_13pydevd_cython__infos_stepping, ((PyObject *)__pyx_v_info)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 313, __pyx_L7_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":312 + * with _update_infos_lock: + * _all_infos.add(info) + * if info._is_stepping(): # <<<<<<<<<<<<<< + * _infos_stepping.add(info) + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":310 + * # ENDIF + * # fmt: on + * with _update_infos_lock: # <<<<<<<<<<<<<< + * _all_infos.add(info) + * if info._is_stepping(): + */ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.add_additional_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 310, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_11 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 310, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 310, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_10 < 0) __PYX_ERR(0, 310, __pyx_L9_except_error) + __pyx_t_13 = (!__pyx_t_10); + if (unlikely(__pyx_t_13)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_4); + __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 310, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L17; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L17:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":305 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef add_additional_info(PyDBAdditionalThreadInfo info): # <<<<<<<<<<<<<< + * # ELSE + * # def add_additional_info(info): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.add_additional_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_3add_additional_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_3add_additional_info = {"add_additional_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_3add_additional_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_3add_additional_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_additional_info (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_info,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_info)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 305, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_additional_info") < 0)) __PYX_ERR(0, 305, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_additional_info", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 305, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.add_additional_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, 1, "info", 0))) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_2add_additional_info(__pyx_self, __pyx_v_info); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2add_additional_info(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_additional_info", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython_add_additional_info(__pyx_v_info, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.add_additional_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":317 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef remove_additional_info(PyDBAdditionalThreadInfo info): # <<<<<<<<<<<<<< + * # ELSE + * # def remove_additional_info(info): + */ + +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_5remove_additional_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_remove_additional_info(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("remove_additional_info", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":322 + * # ENDIF + * # fmt: on + * with _update_infos_lock: # <<<<<<<<<<<<<< + * _all_infos.discard(info) + * _infos_stepping.discard(info) + */ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_14_pydevd_bundle_13pydevd_cython__update_infos_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_v_14_pydevd_bundle_13pydevd_cython__update_infos_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":323 + * # fmt: on + * with _update_infos_lock: + * _all_infos.discard(info) # <<<<<<<<<<<<<< + * _infos_stepping.discard(info) + * + */ + if (unlikely(__pyx_v_14_pydevd_bundle_13pydevd_cython__all_infos == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "discard"); + __PYX_ERR(0, 323, __pyx_L7_error) + } + __pyx_t_9 = __Pyx_PySet_Discard(__pyx_v_14_pydevd_bundle_13pydevd_cython__all_infos, ((PyObject *)__pyx_v_info)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 323, __pyx_L7_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":324 + * with _update_infos_lock: + * _all_infos.discard(info) + * _infos_stepping.discard(info) # <<<<<<<<<<<<<< + * + * + */ + if (unlikely(__pyx_v_14_pydevd_bundle_13pydevd_cython__infos_stepping == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "discard"); + __PYX_ERR(0, 324, __pyx_L7_error) + } + __pyx_t_9 = __Pyx_PySet_Discard(__pyx_v_14_pydevd_bundle_13pydevd_cython__infos_stepping, ((PyObject *)__pyx_v_info)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 324, __pyx_L7_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":322 + * # ENDIF + * # fmt: on + * with _update_infos_lock: # <<<<<<<<<<<<<< + * _all_infos.discard(info) + * _infos_stepping.discard(info) + */ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.remove_additional_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 322, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_10 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 322, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_12 < 0) __PYX_ERR(0, 322, __pyx_L9_except_error) + __pyx_t_13 = (!__pyx_t_12); + if (unlikely(__pyx_t_13)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_4); + __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 322, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":317 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef remove_additional_info(PyDBAdditionalThreadInfo info): # <<<<<<<<<<<<<< + * # ELSE + * # def remove_additional_info(info): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.remove_additional_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_5remove_additional_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_5remove_additional_info = {"remove_additional_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_5remove_additional_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_5remove_additional_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("remove_additional_info (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_info,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_info)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 317, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove_additional_info") < 0)) __PYX_ERR(0, 317, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("remove_additional_info", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 317, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.remove_additional_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, 1, "info", 0))) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_4remove_additional_info(__pyx_self, __pyx_v_info); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_4remove_additional_info(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("remove_additional_info", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython_remove_additional_info(__pyx_v_info, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.remove_additional_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":329 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef bint any_thread_stepping(): # <<<<<<<<<<<<<< + * # ELSE + * # def any_thread_stepping(): + */ + +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_7any_thread_stepping(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static int __pyx_f_14_pydevd_bundle_13pydevd_cython_any_thread_stepping(CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_r; + int __pyx_t_1; + + /* "_pydevd_bundle/pydevd_cython.pyx":334 + * # ENDIF + * # fmt: on + * return bool(_infos_stepping) # <<<<<<<<<<<<<< + * import linecache + * import os.path + */ + __pyx_t_1 = (__pyx_v_14_pydevd_bundle_13pydevd_cython__infos_stepping != Py_None)&&(PySet_GET_SIZE(__pyx_v_14_pydevd_bundle_13pydevd_cython__infos_stepping) != 0); + __pyx_r = (!(!__pyx_t_1)); + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":329 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef bint any_thread_stepping(): # <<<<<<<<<<<<<< + * # ELSE + * # def any_thread_stepping(): + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_7any_thread_stepping(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_7any_thread_stepping = {"any_thread_stepping", (PyCFunction)__pyx_pw_14_pydevd_bundle_13pydevd_cython_7any_thread_stepping, METH_NOARGS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_7any_thread_stepping(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("any_thread_stepping (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_6any_thread_stepping(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_6any_thread_stepping(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("any_thread_stepping", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython_any_thread_stepping(0); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.any_thread_stepping", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":359 + * except ImportError: + * + * def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): # <<<<<<<<<<<<<< + * return None + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9get_smart_step_into_variant_from_frame_offset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9get_smart_step_into_variant_from_frame_offset = {"get_smart_step_into_variant_from_frame_offset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9get_smart_step_into_variant_from_frame_offset, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9get_smart_step_into_variant_from_frame_offset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_args = 0; + CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_smart_step_into_variant_from_frame_offset (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_smart_step_into_variant_from_frame_offset", 1))) return NULL; + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_8get_smart_step_into_variant_from_frame_offset(__pyx_self, __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + __Pyx_DECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_8get_smart_step_into_variant_from_frame_offset(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_smart_step_into_variant_from_frame_offset", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":360 + * + * def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): + * return None # <<<<<<<<<<<<<< + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":359 + * except ImportError: + * + * def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): # <<<<<<<<<<<<<< + * return None + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":395 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): # <<<<<<<<<<<<<< + * # ELSE + * # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_11is_unhandled_exception(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_11is_unhandled_exception = {"is_unhandled_exception", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_11is_unhandled_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_11is_unhandled_exception(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_container_obj = 0; + PyObject *__pyx_v_py_db = 0; + PyObject *__pyx_v_frame = 0; + int __pyx_v_last_raise_line; + PyObject *__pyx_v_raise_lines = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_unhandled_exception (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_container_obj,&__pyx_n_s_py_db,&__pyx_n_s_frame,&__pyx_n_s_last_raise_line,&__pyx_n_s_raise_lines,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_container_obj)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 395, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_py_db)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 395, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("is_unhandled_exception", 1, 5, 5, 1); __PYX_ERR(0, 395, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 395, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("is_unhandled_exception", 1, 5, 5, 2); __PYX_ERR(0, 395, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_last_raise_line)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 395, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("is_unhandled_exception", 1, 5, 5, 3); __PYX_ERR(0, 395, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_raise_lines)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[4]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 395, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("is_unhandled_exception", 1, 5, 5, 4); __PYX_ERR(0, 395, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_unhandled_exception") < 0)) __PYX_ERR(0, 395, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); + } + __pyx_v_container_obj = values[0]; + __pyx_v_py_db = values[1]; + __pyx_v_frame = values[2]; + __pyx_v_last_raise_line = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_last_raise_line == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 395, __pyx_L3_error) + __pyx_v_raise_lines = ((PyObject*)values[4]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("is_unhandled_exception", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 395, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.is_unhandled_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_raise_lines), (&PySet_Type), 1, "raise_lines", 1))) __PYX_ERR(0, 395, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_10is_unhandled_exception(__pyx_self, __pyx_v_container_obj, __pyx_v_py_db, __pyx_v_frame, __pyx_v_last_raise_line, __pyx_v_raise_lines); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_10is_unhandled_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_container_obj, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame, int __pyx_v_last_raise_line, PyObject *__pyx_v_raise_lines) { + PyObject *__pyx_v_try_except_infos = NULL; + PyObject *__pyx_v_valid_try_except_infos = NULL; + PyObject *__pyx_v_try_except_info = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + unsigned int __pyx_t_6; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + PyObject *(*__pyx_t_9)(PyObject *); + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_unhandled_exception", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":399 + * # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): + * # ENDIF + * if frame.f_lineno in raise_lines: # <<<<<<<<<<<<<< + * return True + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_raise_lines == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 399, __pyx_L1_error) + } + __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_t_1, __pyx_v_raise_lines, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":400 + * # ENDIF + * if frame.f_lineno in raise_lines: + * return True # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":399 + * # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): + * # ENDIF + * if frame.f_lineno in raise_lines: # <<<<<<<<<<<<<< + * return True + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":403 + * + * else: + * try_except_infos = container_obj.try_except_infos # <<<<<<<<<<<<<< + * if try_except_infos is None: + * container_obj.try_except_infos = try_except_infos = py_db.collect_try_except_info(frame.f_code) + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_container_obj, __pyx_n_s_try_except_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_try_except_infos = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":404 + * else: + * try_except_infos = container_obj.try_except_infos + * if try_except_infos is None: # <<<<<<<<<<<<<< + * container_obj.try_except_infos = try_except_infos = py_db.collect_try_except_info(frame.f_code) + * + */ + __pyx_t_2 = (__pyx_v_try_except_infos == Py_None); + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":405 + * try_except_infos = container_obj.try_except_infos + * if try_except_infos is None: + * container_obj.try_except_infos = try_except_infos = py_db.collect_try_except_info(frame.f_code) # <<<<<<<<<<<<<< + * + * if not try_except_infos: + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_collect_try_except_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_container_obj, __pyx_n_s_try_except_infos, __pyx_t_1) < 0) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_INCREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_try_except_infos, __pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":404 + * else: + * try_except_infos = container_obj.try_except_infos + * if try_except_infos is None: # <<<<<<<<<<<<<< + * container_obj.try_except_infos = try_except_infos = py_db.collect_try_except_info(frame.f_code) + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":407 + * container_obj.try_except_infos = try_except_infos = py_db.collect_try_except_info(frame.f_code) + * + * if not try_except_infos: # <<<<<<<<<<<<<< + * # Consider the last exception as unhandled because there's no try..except in it. + * return True + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_try_except_infos); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_7 = (!__pyx_t_2); + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":409 + * if not try_except_infos: + * # Consider the last exception as unhandled because there's no try..except in it. + * return True # <<<<<<<<<<<<<< + * else: + * # Now, consider only the try..except for the raise + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":407 + * container_obj.try_except_infos = try_except_infos = py_db.collect_try_except_info(frame.f_code) + * + * if not try_except_infos: # <<<<<<<<<<<<<< + * # Consider the last exception as unhandled because there's no try..except in it. + * return True + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":412 + * else: + * # Now, consider only the try..except for the raise + * valid_try_except_infos = [] # <<<<<<<<<<<<<< + * for try_except_info in try_except_infos: + * if try_except_info.is_line_in_try_block(last_raise_line): + */ + /*else*/ { + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_valid_try_except_infos = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":413 + * # Now, consider only the try..except for the raise + * valid_try_except_infos = [] + * for try_except_info in try_except_infos: # <<<<<<<<<<<<<< + * if try_except_info.is_line_in_try_block(last_raise_line): + * valid_try_except_infos.append(try_except_info) + */ + if (likely(PyList_CheckExact(__pyx_v_try_except_infos)) || PyTuple_CheckExact(__pyx_v_try_except_infos)) { + __pyx_t_1 = __pyx_v_try_except_infos; __Pyx_INCREF(__pyx_t_1); + __pyx_t_8 = 0; + __pyx_t_9 = NULL; + } else { + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_try_except_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 413, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_9)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 413, __pyx_L1_error) + #endif + if (__pyx_t_8 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 413, __pyx_L1_error) + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 413, __pyx_L1_error) + #endif + if (__pyx_t_8 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 413, __pyx_L1_error) + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_9(__pyx_t_1); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 413, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_try_except_info, __pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":414 + * valid_try_except_infos = [] + * for try_except_info in try_except_infos: + * if try_except_info.is_line_in_try_block(last_raise_line): # <<<<<<<<<<<<<< + * valid_try_except_infos.append(try_except_info) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_try_except_info, __pyx_n_s_is_line_in_try_block); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_last_raise_line); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = NULL; + __pyx_t_6 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_5}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":415 + * for try_except_info in try_except_infos: + * if try_except_info.is_line_in_try_block(last_raise_line): + * valid_try_except_infos.append(try_except_info) # <<<<<<<<<<<<<< + * + * if not valid_try_except_infos: + */ + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_valid_try_except_infos, __pyx_v_try_except_info); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 415, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":414 + * valid_try_except_infos = [] + * for try_except_info in try_except_infos: + * if try_except_info.is_line_in_try_block(last_raise_line): # <<<<<<<<<<<<<< + * valid_try_except_infos.append(try_except_info) + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":413 + * # Now, consider only the try..except for the raise + * valid_try_except_infos = [] + * for try_except_info in try_except_infos: # <<<<<<<<<<<<<< + * if try_except_info.is_line_in_try_block(last_raise_line): + * valid_try_except_infos.append(try_except_info) + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":417 + * valid_try_except_infos.append(try_except_info) + * + * if not valid_try_except_infos: # <<<<<<<<<<<<<< + * return True + * + */ + __pyx_t_7 = (PyList_GET_SIZE(__pyx_v_valid_try_except_infos) != 0); + __pyx_t_2 = (!__pyx_t_7); + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":418 + * + * if not valid_try_except_infos: + * return True # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":417 + * valid_try_except_infos.append(try_except_info) + * + * if not valid_try_except_infos: # <<<<<<<<<<<<<< + * return True + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":425 + * # where one try..except is inside the other with only a raise + * # and it's gotten in the except line. + * for try_except_info in try_except_infos: # <<<<<<<<<<<<<< + * if try_except_info.is_line_in_except_block(frame.f_lineno): + * if frame.f_lineno == try_except_info.except_line or frame.f_lineno in try_except_info.raise_lines_in_except: + */ + /*else*/ { + if (likely(PyList_CheckExact(__pyx_v_try_except_infos)) || PyTuple_CheckExact(__pyx_v_try_except_infos)) { + __pyx_t_1 = __pyx_v_try_except_infos; __Pyx_INCREF(__pyx_t_1); + __pyx_t_8 = 0; + __pyx_t_9 = NULL; + } else { + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_try_except_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 425, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_9)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 425, __pyx_L1_error) + #endif + if (__pyx_t_8 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 425, __pyx_L1_error) + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 425, __pyx_L1_error) + #endif + if (__pyx_t_8 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 425, __pyx_L1_error) + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_9(__pyx_t_1); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 425, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_try_except_info, __pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":426 + * # and it's gotten in the except line. + * for try_except_info in try_except_infos: + * if try_except_info.is_line_in_except_block(frame.f_lineno): # <<<<<<<<<<<<<< + * if frame.f_lineno == try_except_info.except_line or frame.f_lineno in try_except_info.raise_lines_in_except: + * # In a raise inside a try..except block or some except which doesn't + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_try_except_info, __pyx_n_s_is_line_in_except_block); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = NULL; + __pyx_t_6 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_5}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":427 + * for try_except_info in try_except_infos: + * if try_except_info.is_line_in_except_block(frame.f_lineno): + * if frame.f_lineno == try_except_info.except_line or frame.f_lineno in try_except_info.raise_lines_in_except: # <<<<<<<<<<<<<< + * # In a raise inside a try..except block or some except which doesn't + * # match the raised exception. + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_try_except_info, __pyx_n_s_except_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_try_except_info, __pyx_n_s_raise_lines_in_except); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __pyx_t_7; + __pyx_L15_bool_binop_done:; + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":430 + * # In a raise inside a try..except block or some except which doesn't + * # match the raised exception. + * return True # <<<<<<<<<<<<<< + * return False + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":427 + * for try_except_info in try_except_infos: + * if try_except_info.is_line_in_except_block(frame.f_lineno): + * if frame.f_lineno == try_except_info.except_line or frame.f_lineno in try_except_info.raise_lines_in_except: # <<<<<<<<<<<<<< + * # In a raise inside a try..except block or some except which doesn't + * # match the raised exception. + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":426 + * # and it's gotten in the except line. + * for try_except_info in try_except_infos: + * if try_except_info.is_line_in_except_block(frame.f_lineno): # <<<<<<<<<<<<<< + * if frame.f_lineno == try_except_info.except_line or frame.f_lineno in try_except_info.raise_lines_in_except: + * # In a raise inside a try..except block or some except which doesn't + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":425 + * # where one try..except is inside the other with only a raise + * # and it's gotten in the except line. + * for try_except_info in try_except_infos: # <<<<<<<<<<<<<< + * if try_except_info.is_line_in_except_block(frame.f_lineno): + * if frame.f_lineno == try_except_info.except_line or frame.f_lineno in try_except_info.raise_lines_in_except: + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":431 + * # match the raised exception. + * return True + * return False # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":395 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): # <<<<<<<<<<<<<< + * # ELSE + * # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.is_unhandled_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_try_except_infos); + __Pyx_XDECREF(__pyx_v_valid_try_except_infos); + __Pyx_XDECREF(__pyx_v_try_except_info); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":437 + * cdef class _TryExceptContainerObj: + * cdef public list try_except_infos; + * def __init__(self): # <<<<<<<<<<<<<< + * self.try_except_infos = None + * # ELSE + */ + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj___init__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj___init__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":438 + * cdef public list try_except_infos; + * def __init__(self): + * self.try_except_infos = None # <<<<<<<<<<<<<< + * # ELSE + * # class _TryExceptContainerObj(object): + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->try_except_infos); + __Pyx_DECREF(__pyx_v_self->try_except_infos); + __pyx_v_self->try_except_infos = ((PyObject*)Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":437 + * cdef class _TryExceptContainerObj: + * cdef public list try_except_infos; + * def __init__(self): # <<<<<<<<<<<<<< + * self.try_except_infos = None + * # ELSE + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":436 + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef class _TryExceptContainerObj: + * cdef public list try_except_infos; # <<<<<<<<<<<<<< + * def __init__(self): + * self.try_except_infos = None + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->try_except_infos); + __pyx_r = __pyx_v_self->try_except_infos; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(0, 436, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->try_except_infos); + __Pyx_DECREF(__pyx_v_self->try_except_infos); + __pyx_v_self->try_except_infos = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython._TryExceptContainerObj.try_except_infos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->try_except_infos); + __Pyx_DECREF(__pyx_v_self->try_except_infos); + __pyx_v_self->try_except_infos = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_2__reduce_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_2__reduce_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 1); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.try_except_infos,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->try_except_infos); + __Pyx_GIVEREF(__pyx_v_self->try_except_infos); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->try_except_infos)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.try_except_infos,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.try_except_infos,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_2 = (__pyx_v__dict != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.try_except_infos is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.try_except_infos,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.try_except_infos is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle__TryExceptContainerObj, (type(self), 0xdbf5e44, None), state + */ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->try_except_infos != ((PyObject*)Py_None)); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.try_except_infos is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__TryExceptContainerObj, (type(self), 0xdbf5e44, None), state + * else: + */ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.try_except_infos is not None + * if use_setstate: + * return __pyx_unpickle__TryExceptContainerObj, (type(self), 0xdbf5e44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle__TryExceptContainerObj, (type(self), 0xdbf5e44, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle__TryExceptContain); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_230645316); + __Pyx_GIVEREF(__pyx_int_230645316); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_230645316)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.try_except_infos is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__TryExceptContainerObj, (type(self), 0xdbf5e44, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle__TryExceptContainerObj, (type(self), 0xdbf5e44, None), state + * else: + * return __pyx_unpickle__TryExceptContainerObj, (type(self), 0xdbf5e44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__TryExceptContainerObj__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle__TryExceptContain); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_230645316); + __Pyx_GIVEREF(__pyx_int_230645316); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_230645316)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython._TryExceptContainerObj.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle__TryExceptContainerObj, (type(self), 0xdbf5e44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__TryExceptContainerObj__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 16, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython._TryExceptContainerObj.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_4__setstate_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_4__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 1); + + /* "(tree fragment)":17 + * return __pyx_unpickle__TryExceptContainerObj, (type(self), 0xdbf5e44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__TryExceptContainerObj__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle__TryExceptContainerObj__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__TryExceptContainerObj, (type(self), 0xdbf5e44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__TryExceptContainerObj__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython._TryExceptContainerObj.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":469 + * cdef int should_skip + * cdef object exc_info + * def __init__(self, tuple args): # <<<<<<<<<<<<<< + * self._args = args # In the cython version we don't need to pass the frame + * self.should_skip = -1 # On cythonized version, put in instance. + */ + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_args)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 469, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 469, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + } + __pyx_v_args = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 469, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame___init__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v_args); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame___init__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_args) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":470 + * cdef object exc_info + * def __init__(self, tuple args): + * self._args = args # In the cython version we don't need to pass the frame # <<<<<<<<<<<<<< + * self.should_skip = -1 # On cythonized version, put in instance. + * self.exc_info = () + */ + __Pyx_INCREF(__pyx_v_args); + __Pyx_GIVEREF(__pyx_v_args); + __Pyx_GOTREF(__pyx_v_self->_args); + __Pyx_DECREF(__pyx_v_self->_args); + __pyx_v_self->_args = __pyx_v_args; + + /* "_pydevd_bundle/pydevd_cython.pyx":471 + * def __init__(self, tuple args): + * self._args = args # In the cython version we don't need to pass the frame + * self.should_skip = -1 # On cythonized version, put in instance. # <<<<<<<<<<<<<< + * self.exc_info = () + * # ELSE + */ + __pyx_v_self->should_skip = -1; + + /* "_pydevd_bundle/pydevd_cython.pyx":472 + * self._args = args # In the cython version we don't need to pass the frame + * self.should_skip = -1 # On cythonized version, put in instance. + * self.exc_info = () # <<<<<<<<<<<<<< + * # ELSE + * # should_skip = -1 # Default value in class (put in instance on set). + */ + __Pyx_INCREF(__pyx_empty_tuple); + __Pyx_GIVEREF(__pyx_empty_tuple); + __Pyx_GOTREF(__pyx_v_self->exc_info); + __Pyx_DECREF(__pyx_v_self->exc_info); + __pyx_v_self->exc_info = __pyx_empty_tuple; + + /* "_pydevd_bundle/pydevd_cython.pyx":469 + * cdef int should_skip + * cdef object exc_info + * def __init__(self, tuple args): # <<<<<<<<<<<<<< + * self._args = args # In the cython version we don't need to pass the frame + * self.should_skip = -1 # On cythonized version, put in instance. + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":490 + * # ENDIF + * + * def set_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< + * self._args[0].set_suspend(*args, **kwargs) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_3set_suspend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_3set_suspend = {"set_suspend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_3set_suspend, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_3set_suspend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_kwargs = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_suspend (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_suspend", 1))) return NULL; + if (unlikely(__pyx_kwds)) { + __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues); + if (unlikely(!__pyx_v_kwargs)) return NULL; + __Pyx_GOTREF(__pyx_v_kwargs); + } else { + __pyx_v_kwargs = PyDict_New(); + if (unlikely(!__pyx_v_kwargs)) return NULL; + __Pyx_GOTREF(__pyx_v_kwargs); + } + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_2set_suspend(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + __Pyx_DECREF(__pyx_v_args); + __Pyx_DECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_2set_suspend(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_suspend", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":491 + * + * def set_suspend(self, *args, **kwargs): + * self._args[0].set_suspend(*args, **kwargs) # <<<<<<<<<<<<<< + * + * def do_wait_suspend(self, *args, **kwargs): + */ + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 491, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":490 + * # ENDIF + * + * def set_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< + * self._args[0].set_suspend(*args, **kwargs) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.set_suspend", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":493 + * self._args[0].set_suspend(*args, **kwargs) + * + * def do_wait_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< + * self._args[0].do_wait_suspend(*args, **kwargs) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_5do_wait_suspend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_5do_wait_suspend = {"do_wait_suspend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_5do_wait_suspend, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_5do_wait_suspend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_kwargs = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("do_wait_suspend (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "do_wait_suspend", 1))) return NULL; + if (unlikely(__pyx_kwds)) { + __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues); + if (unlikely(!__pyx_v_kwargs)) return NULL; + __Pyx_GOTREF(__pyx_v_kwargs); + } else { + __pyx_v_kwargs = PyDict_New(); + if (unlikely(!__pyx_v_kwargs)) return NULL; + __Pyx_GOTREF(__pyx_v_kwargs); + } + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_4do_wait_suspend(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + __Pyx_DECREF(__pyx_v_args); + __Pyx_DECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_4do_wait_suspend(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("do_wait_suspend", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":494 + * + * def do_wait_suspend(self, *args, **kwargs): + * self._args[0].do_wait_suspend(*args, **kwargs) # <<<<<<<<<<<<<< + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 494, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":493 + * self._args[0].set_suspend(*args, **kwargs) + * + * def do_wait_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< + * self._args[0].do_wait_suspend(*args, **kwargs) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.do_wait_suspend", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":497 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def trace_exception(self, frame, str event, arg): # <<<<<<<<<<<<<< + * cdef bint should_stop; + * cdef tuple exc_info; + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_7trace_exception(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_7trace_exception = {"trace_exception", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_7trace_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_7trace_exception(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_event = 0; + PyObject *__pyx_v_arg = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("trace_exception (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,&__pyx_n_s_event,&__pyx_n_s_arg,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 497, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_event)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 497, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_exception", 1, 3, 3, 1); __PYX_ERR(0, 497, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 497, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_exception", 1, 3, 3, 2); __PYX_ERR(0, 497, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_exception") < 0)) __PYX_ERR(0, 497, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v_frame = values[0]; + __pyx_v_event = ((PyObject*)values[1]); + __pyx_v_arg = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("trace_exception", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 497, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), (&PyString_Type), 1, "event", 1))) __PYX_ERR(0, 497, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exception(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v_frame, __pyx_v_event, __pyx_v_arg); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exception(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { + int __pyx_v_should_stop; + PyObject *__pyx_v_exc_info = 0; + PyObject *__pyx_v_frame_skips_cache = NULL; + PyObject *__pyx_v_frame_cache_key = NULL; + PyObject *__pyx_v_custom_key = NULL; + PyObject *__pyx_v_container_obj = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + unsigned int __pyx_t_8; + PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("trace_exception", 0); + __Pyx_INCREF(__pyx_v_frame); + + /* "_pydevd_bundle/pydevd_cython.pyx":503 + * # def trace_exception(self, frame, event, arg): + * # ENDIF + * if event == "exception": # <<<<<<<<<<<<<< + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info + */ + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 503, __pyx_L1_error) + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":504 + * # ENDIF + * if event == "exception": + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) # <<<<<<<<<<<<<< + * self.exc_info = exc_info + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_should_stop_on_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 504, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 504, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 504, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[7] = {__pyx_t_7, __pyx_t_4, __pyx_t_5, __pyx_v_frame, __pyx_t_6, __pyx_v_arg, __pyx_v_self->exc_info}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 6+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 504, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_3 = PyList_GET_ITEM(sequence, 0); + __pyx_t_6 = PyList_GET_ITEM(sequence, 1); + __pyx_t_5 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + #else + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); + index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 2; __pyx_t_5 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 3) < 0) __PYX_ERR(0, 504, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L5_unpacking_done; + __pyx_L4_unpacking_failed:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 504, __pyx_L1_error) + __pyx_L5_unpacking_done:; + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!(likely(PyTuple_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_5))) __PYX_ERR(0, 504, __pyx_L1_error) + __pyx_v_should_stop = __pyx_t_1; + __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_v_exc_info = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":505 + * if event == "exception": + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info # <<<<<<<<<<<<<< + * + * if should_stop: + */ + __Pyx_INCREF(__pyx_v_exc_info); + __Pyx_GIVEREF(__pyx_v_exc_info); + __Pyx_GOTREF(__pyx_v_self->exc_info); + __Pyx_DECREF(__pyx_v_self->exc_info); + __pyx_v_self->exc_info = __pyx_v_exc_info; + + /* "_pydevd_bundle/pydevd_cython.pyx":507 + * self.exc_info = exc_info + * + * if should_stop: # <<<<<<<<<<<<<< + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch + */ + if (__pyx_v_should_stop) { + + /* "_pydevd_bundle/pydevd_cython.pyx":508 + * + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< + * return self.trace_dispatch + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_handle_exception); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 508, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 508, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_EXCEPTION_TYPE_HANDLED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_7, __pyx_t_6, __pyx_t_3, __pyx_v_frame, __pyx_v_arg, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 5+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":509 + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch # <<<<<<<<<<<<<< + * + * elif event == "return": + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":508 + * + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< + * return self.trace_dispatch + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":507 + * self.exc_info = exc_info + * + * if should_stop: # <<<<<<<<<<<<<< + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":503 + * # def trace_exception(self, frame, event, arg): + * # ENDIF + * if event == "exception": # <<<<<<<<<<<<<< + * should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + * self.exc_info = exc_info + */ + goto __pyx_L3; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":511 + * return self.trace_dispatch + * + * elif event == "return": # <<<<<<<<<<<<<< + * exc_info = self.exc_info + * if exc_info and arg is None: + */ + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 511, __pyx_L1_error) + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":512 + * + * elif event == "return": + * exc_info = self.exc_info # <<<<<<<<<<<<<< + * if exc_info and arg is None: + * frame_skips_cache, frame_cache_key = self._args[4], self._args[5] + */ + if (!(likely(PyTuple_CheckExact(__pyx_v_self->exc_info))||((__pyx_v_self->exc_info) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_self->exc_info))) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_t_2 = __pyx_v_self->exc_info; + __Pyx_INCREF(__pyx_t_2); + __pyx_v_exc_info = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":513 + * elif event == "return": + * exc_info = self.exc_info + * if exc_info and arg is None: # <<<<<<<<<<<<<< + * frame_skips_cache, frame_cache_key = self._args[4], self._args[5] + * custom_key = (frame_cache_key, "try_exc_info") + */ + __pyx_t_10 = (__pyx_v_exc_info != Py_None)&&(PyTuple_GET_SIZE(__pyx_v_exc_info) != 0); + if (__pyx_t_10) { + } else { + __pyx_t_1 = __pyx_t_10; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_10 = (__pyx_v_arg == Py_None); + __pyx_t_1 = __pyx_t_10; + __pyx_L9_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":514 + * exc_info = self.exc_info + * if exc_info and arg is None: + * frame_skips_cache, frame_cache_key = self._args[4], self._args[5] # <<<<<<<<<<<<<< + * custom_key = (frame_cache_key, "try_exc_info") + * container_obj = frame_skips_cache.get(custom_key) + */ + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 514, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 514, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_frame_skips_cache = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_frame_cache_key = __pyx_t_5; + __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":515 + * if exc_info and arg is None: + * frame_skips_cache, frame_cache_key = self._args[4], self._args[5] + * custom_key = (frame_cache_key, "try_exc_info") # <<<<<<<<<<<<<< + * container_obj = frame_skips_cache.get(custom_key) + * if container_obj is None: + */ + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_frame_cache_key); + __Pyx_GIVEREF(__pyx_v_frame_cache_key); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_frame_cache_key)) __PYX_ERR(0, 515, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_try_exc_info); + __Pyx_GIVEREF(__pyx_n_s_try_exc_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_try_exc_info)) __PYX_ERR(0, 515, __pyx_L1_error); + __pyx_v_custom_key = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":516 + * frame_skips_cache, frame_cache_key = self._args[4], self._args[5] + * custom_key = (frame_cache_key, "try_exc_info") + * container_obj = frame_skips_cache.get(custom_key) # <<<<<<<<<<<<<< + * if container_obj is None: + * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame_skips_cache, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_custom_key}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_v_container_obj = __pyx_t_5; + __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":517 + * custom_key = (frame_cache_key, "try_exc_info") + * container_obj = frame_skips_cache.get(custom_key) + * if container_obj is None: # <<<<<<<<<<<<<< + * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() + * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and self.handle_user_exception( + */ + __pyx_t_1 = (__pyx_v_container_obj == Py_None); + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":518 + * container_obj = frame_skips_cache.get(custom_key) + * if container_obj is None: + * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() # <<<<<<<<<<<<<< + * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and self.handle_user_exception( + * frame + */ + __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_container_obj, __pyx_t_5); + if (unlikely((PyObject_SetItem(__pyx_v_frame_skips_cache, __pyx_v_custom_key, __pyx_t_5) < 0))) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":517 + * custom_key = (frame_cache_key, "try_exc_info") + * container_obj = frame_skips_cache.get(custom_key) + * if container_obj is None: # <<<<<<<<<<<<<< + * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() + * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and self.handle_user_exception( + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":519 + * if container_obj is None: + * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() + * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and self.handle_user_exception( # <<<<<<<<<<<<<< + * frame + * ): + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_unhandled_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 519, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_exc_info == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 519, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_exc_info == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 519, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_7, __pyx_v_container_obj, __pyx_t_4, __pyx_v_frame, __pyx_t_3, __pyx_t_6}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 5+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_10) { + } else { + __pyx_t_1 = __pyx_t_10; + goto __pyx_L13_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_user_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "_pydevd_bundle/pydevd_cython.pyx":520 + * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() + * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and self.handle_user_exception( + * frame # <<<<<<<<<<<<<< + * ): + * return self.trace_dispatch + */ + __pyx_t_6 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_frame}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":519 + * if container_obj is None: + * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() + * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and self.handle_user_exception( # <<<<<<<<<<<<<< + * frame + * ): + */ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __pyx_t_10; + __pyx_L13_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":522 + * frame + * ): + * return self.trace_dispatch # <<<<<<<<<<<<<< + * + * return self.trace_exception + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":519 + * if container_obj is None: + * container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() + * if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and self.handle_user_exception( # <<<<<<<<<<<<<< + * frame + * ): + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":513 + * elif event == "return": + * exc_info = self.exc_info + * if exc_info and arg is None: # <<<<<<<<<<<<<< + * frame_skips_cache, frame_cache_key = self._args[4], self._args[5] + * custom_key = (frame_cache_key, "try_exc_info") + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":511 + * return self.trace_dispatch + * + * elif event == "return": # <<<<<<<<<<<<<< + * exc_info = self.exc_info + * if exc_info and arg is None: + */ + } + __pyx_L3:; + + /* "_pydevd_bundle/pydevd_cython.pyx":524 + * return self.trace_dispatch + * + * return self.trace_exception # <<<<<<<<<<<<<< + * + * def handle_user_exception(self, frame): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":497 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def trace_exception(self, frame, str event, arg): # <<<<<<<<<<<<<< + * cdef bint should_stop; + * cdef tuple exc_info; + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_exc_info); + __Pyx_XDECREF(__pyx_v_frame_skips_cache); + __Pyx_XDECREF(__pyx_v_frame_cache_key); + __Pyx_XDECREF(__pyx_v_custom_key); + __Pyx_XDECREF(__pyx_v_container_obj); + __Pyx_XDECREF(__pyx_v_frame); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":526 + * return self.trace_exception + * + * def handle_user_exception(self, frame): # <<<<<<<<<<<<<< + * exc_info = self.exc_info + * if exc_info: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception = {"handle_user_exception", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_frame = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("handle_user_exception (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 526, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_user_exception") < 0)) __PYX_ERR(0, 526, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v_frame = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("handle_user_exception", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 526, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.handle_user_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_8handle_user_exception(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v_frame); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_8handle_user_exception(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame) { + PyObject *__pyx_v_exc_info = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_user_exception", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":527 + * + * def handle_user_exception(self, frame): + * exc_info = self.exc_info # <<<<<<<<<<<<<< + * if exc_info: + * return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) + */ + __pyx_t_1 = __pyx_v_self->exc_info; + __Pyx_INCREF(__pyx_t_1); + __pyx_v_exc_info = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":528 + * def handle_user_exception(self, frame): + * exc_info = self.exc_info + * if exc_info: # <<<<<<<<<<<<<< + * return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) + * return False + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_exc_info); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 528, __pyx_L1_error) + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":529 + * exc_info = self.exc_info + * if exc_info: + * return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) # <<<<<<<<<<<<<< + * return False + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_handle_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 529, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 529, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_exc_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_8, __pyx_t_4, __pyx_t_5, __pyx_v_frame, __pyx_t_6, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_9, 5+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":528 + * def handle_user_exception(self, frame): + * exc_info = self.exc_info + * if exc_info: # <<<<<<<<<<<<<< + * return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) + * return False + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":530 + * if exc_info: + * return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) + * return False # <<<<<<<<<<<<<< + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":526 + * return self.trace_exception + * + * def handle_user_exception(self, frame): # <<<<<<<<<<<<<< + * exc_info = self.exc_info + * if exc_info: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.handle_user_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_exc_info); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":533 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef get_func_name(self, frame): # <<<<<<<<<<<<<< + * cdef str func_name + * # ELSE + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_get_func_name(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame) { + PyObject *__pyx_v_func_name = 0; + PyObject *__pyx_v_code_obj = NULL; + PyObject *__pyx_v_cls_name = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + unsigned int __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_func_name", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":538 + * # def get_func_name(self, frame): + * # ENDIF + * code_obj = frame.f_code # <<<<<<<<<<<<<< + * func_name = code_obj.co_name + * try: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_code_obj = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":539 + * # ENDIF + * code_obj = frame.f_code + * func_name = code_obj.co_name # <<<<<<<<<<<<<< + * try: + * cls_name = get_clsname_for_code(code_obj, frame) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_code_obj, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_v_func_name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":540 + * code_obj = frame.f_code + * func_name = code_obj.co_name + * try: # <<<<<<<<<<<<<< + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":541 + * func_name = code_obj.co_name + * try: + * cls_name = get_clsname_for_code(code_obj, frame) # <<<<<<<<<<<<<< + * if cls_name is not None: + * return "%s.%s" % (cls_name, func_name) + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_get_clsname_for_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_code_obj, __pyx_v_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_v_cls_name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":542 + * try: + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: # <<<<<<<<<<<<<< + * return "%s.%s" % (cls_name, func_name) + * else: + */ + __pyx_t_8 = (__pyx_v_cls_name != Py_None); + if (__pyx_t_8) { + + /* "_pydevd_bundle/pydevd_cython.pyx":543 + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: + * return "%s.%s" % (cls_name, func_name) # <<<<<<<<<<<<<< + * else: + * return func_name + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_cls_name); + __Pyx_GIVEREF(__pyx_v_cls_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cls_name)) __PYX_ERR(0, 543, __pyx_L3_error); + __Pyx_INCREF(__pyx_v_func_name); + __Pyx_GIVEREF(__pyx_v_func_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_func_name)) __PYX_ERR(0, 543, __pyx_L3_error); + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 543, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L7_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":542 + * try: + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: # <<<<<<<<<<<<<< + * return "%s.%s" % (cls_name, func_name) + * else: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":545 + * return "%s.%s" % (cls_name, func_name) + * else: + * return func_name # <<<<<<<<<<<<<< + * except: + * pydev_log.exception() + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_func_name); + __pyx_r = __pyx_v_func_name; + goto __pyx_L7_try_return; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":540 + * code_obj = frame.f_code + * func_name = code_obj.co_name + * try: # <<<<<<<<<<<<<< + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: + */ + } + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":546 + * else: + * return func_name + * except: # <<<<<<<<<<<<<< + * pydev_log.exception() + * return func_name + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.get_func_name", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_6) < 0) __PYX_ERR(0, 546, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_6); + + /* "_pydevd_bundle/pydevd_cython.pyx":547 + * return func_name + * except: + * pydev_log.exception() # <<<<<<<<<<<<<< + * return func_name + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 547, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 547, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + __pyx_t_7 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + __pyx_t_7 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 547, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":548 + * except: + * pydev_log.exception() + * return func_name # <<<<<<<<<<<<<< + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_func_name); + __pyx_r = __pyx_v_func_name; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L6_except_return; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":540 + * code_obj = frame.f_code + * func_name = code_obj.co_name + * try: # <<<<<<<<<<<<<< + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: + */ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L1_error; + __pyx_L7_try_return:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L0; + __pyx_L6_except_return:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L0; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":533 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef get_func_name(self, frame): # <<<<<<<<<<<<<< + * cdef str func_name + * # ELSE + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.get_func_name", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_func_name); + __Pyx_XDECREF(__pyx_v_code_obj); + __Pyx_XDECREF(__pyx_v_cls_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":551 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _show_return_values(self, frame, arg): # <<<<<<<<<<<<<< + * # ELSE + * # def _show_return_values(self, frame, arg): + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__show_return_values(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_arg) { + PyObject *__pyx_v_f_locals_back = NULL; + PyObject *__pyx_v_return_values_dict = NULL; + PyObject *__pyx_v_name = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_t_13; + char const *__pyx_t_14; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_show_return_values", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":555 + * # def _show_return_values(self, frame, arg): + * # ENDIF + * try: # <<<<<<<<<<<<<< + * try: + * f_locals_back = getattr(frame.f_back, "f_locals", None) + */ + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":556 + * # ENDIF + * try: + * try: # <<<<<<<<<<<<<< + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":557 + * try: + * try: + * f_locals_back = getattr(frame.f_back, "f_locals", None) # <<<<<<<<<<<<<< + * if f_locals_back is not None: + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 557, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_GetAttr3(__pyx_t_4, __pyx_n_s_f_locals, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 557, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_f_locals_back = __pyx_t_5; + __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":558 + * try: + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: # <<<<<<<<<<<<<< + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + * if return_values_dict is None: + */ + __pyx_t_6 = (__pyx_v_f_locals_back != Py_None); + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":559 + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) # <<<<<<<<<<<<<< + * if return_values_dict is None: + * return_values_dict = {} + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_locals_back, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 559, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_7, Py_None}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 559, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_v_return_values_dict = __pyx_t_5; + __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":560 + * if f_locals_back is not None: + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + * if return_values_dict is None: # <<<<<<<<<<<<<< + * return_values_dict = {} + * f_locals_back[RETURN_VALUES_DICT] = return_values_dict + */ + __pyx_t_6 = (__pyx_v_return_values_dict == Py_None); + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":561 + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + * if return_values_dict is None: + * return_values_dict = {} # <<<<<<<<<<<<<< + * f_locals_back[RETURN_VALUES_DICT] = return_values_dict + * name = self.get_func_name(frame) + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 561, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_return_values_dict, __pyx_t_5); + __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":562 + * if return_values_dict is None: + * return_values_dict = {} + * f_locals_back[RETURN_VALUES_DICT] = return_values_dict # <<<<<<<<<<<<<< + * name = self.get_func_name(frame) + * return_values_dict[name] = arg + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely((PyObject_SetItem(__pyx_v_f_locals_back, __pyx_t_5, __pyx_v_return_values_dict) < 0))) __PYX_ERR(0, 562, __pyx_L6_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":560 + * if f_locals_back is not None: + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + * if return_values_dict is None: # <<<<<<<<<<<<<< + * return_values_dict = {} + * f_locals_back[RETURN_VALUES_DICT] = return_values_dict + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":563 + * return_values_dict = {} + * f_locals_back[RETURN_VALUES_DICT] = return_values_dict + * name = self.get_func_name(frame) # <<<<<<<<<<<<<< + * return_values_dict[name] = arg + * except: + */ + __pyx_t_5 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->get_func_name(__pyx_v_self, __pyx_v_frame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 563, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_name = __pyx_t_5; + __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":564 + * f_locals_back[RETURN_VALUES_DICT] = return_values_dict + * name = self.get_func_name(frame) + * return_values_dict[name] = arg # <<<<<<<<<<<<<< + * except: + * pydev_log.exception() + */ + if (unlikely((PyObject_SetItem(__pyx_v_return_values_dict, __pyx_v_name, __pyx_v_arg) < 0))) __PYX_ERR(0, 564, __pyx_L6_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":558 + * try: + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: # <<<<<<<<<<<<<< + * return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + * if return_values_dict is None: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":556 + * # ENDIF + * try: + * try: # <<<<<<<<<<<<<< + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L11_try_end; + __pyx_L6_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":565 + * name = self.get_func_name(frame) + * return_values_dict[name] = arg + * except: # <<<<<<<<<<<<<< + * pydev_log.exception() + * finally: + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._show_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 565, __pyx_L8_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_7); + + /* "_pydevd_bundle/pydevd_cython.pyx":566 + * return_values_dict[name] = arg + * except: + * pydev_log.exception() # <<<<<<<<<<<<<< + * finally: + * f_locals_back = None + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 566, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 566, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 566, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L7_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":556 + * # ENDIF + * try: + * try: # <<<<<<<<<<<<<< + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: + */ + __pyx_L8_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L4_error; + __pyx_L7_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L11_try_end:; + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":568 + * pydev_log.exception() + * finally: + * f_locals_back = None # <<<<<<<<<<<<<< + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f_locals_back, Py_None); + goto __pyx_L5; + } + __pyx_L4_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename; + { + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f_locals_back, Py_None); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + } + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ErrRestore(__pyx_t_3, __pyx_t_2, __pyx_t_1); + __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; + __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14; + goto __pyx_L1_error; + } + __pyx_L5:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":551 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _show_return_values(self, frame, arg): # <<<<<<<<<<<<<< + * # ELSE + * # def _show_return_values(self, frame, arg): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._show_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_f_locals_back); + __Pyx_XDECREF(__pyx_v_return_values_dict); + __Pyx_XDECREF(__pyx_v_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":571 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _remove_return_values(self, py_db, frame): # <<<<<<<<<<<<<< + * # ELSE + * # def _remove_return_values(self, py_db, frame): + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__remove_return_values(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame) { + PyObject *__pyx_v_f_locals_back = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + unsigned int __pyx_t_8; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_t_13; + char const *__pyx_t_14; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_remove_return_values", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":575 + * # def _remove_return_values(self, py_db, frame): + * # ENDIF + * try: # <<<<<<<<<<<<<< + * try: + * # Showing return values was turned off, we should remove them from locals dict. + */ + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":576 + * # ENDIF + * try: + * try: # <<<<<<<<<<<<<< + * # Showing return values was turned off, we should remove them from locals dict. + * # The values can be in the current frame or in the back one + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":579 + * # Showing return values was turned off, we should remove them from locals dict. + * # The values can be in the current frame or in the back one + * frame.f_locals.pop(RETURN_VALUES_DICT, None) # <<<<<<<<<<<<<< + * + * f_locals_back = getattr(frame.f_back, "f_locals", None) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 579, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_pop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 579, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 579, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_5, Py_None}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 579, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":581 + * frame.f_locals.pop(RETURN_VALUES_DICT, None) + * + * f_locals_back = getattr(frame.f_back, "f_locals", None) # <<<<<<<<<<<<<< + * if f_locals_back is not None: + * f_locals_back.pop(RETURN_VALUES_DICT, None) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_GetAttr3(__pyx_t_4, __pyx_n_s_f_locals, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 581, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_f_locals_back = __pyx_t_6; + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":582 + * + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: # <<<<<<<<<<<<<< + * f_locals_back.pop(RETURN_VALUES_DICT, None) + * except: + */ + __pyx_t_9 = (__pyx_v_f_locals_back != Py_None); + if (__pyx_t_9) { + + /* "_pydevd_bundle/pydevd_cython.pyx":583 + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: + * f_locals_back.pop(RETURN_VALUES_DICT, None) # <<<<<<<<<<<<<< + * except: + * pydev_log.exception() + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_locals_back, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 583, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_5, Py_None}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 583, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":582 + * + * f_locals_back = getattr(frame.f_back, "f_locals", None) + * if f_locals_back is not None: # <<<<<<<<<<<<<< + * f_locals_back.pop(RETURN_VALUES_DICT, None) + * except: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":576 + * # ENDIF + * try: + * try: # <<<<<<<<<<<<<< + * # Showing return values was turned off, we should remove them from locals dict. + * # The values can be in the current frame or in the back one + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L11_try_end; + __pyx_L6_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":584 + * if f_locals_back is not None: + * f_locals_back.pop(RETURN_VALUES_DICT, None) + * except: # <<<<<<<<<<<<<< + * pydev_log.exception() + * finally: + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._remove_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 584, __pyx_L8_except_error) + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + + /* "_pydevd_bundle/pydevd_cython.pyx":585 + * f_locals_back.pop(RETURN_VALUES_DICT, None) + * except: + * pydev_log.exception() # <<<<<<<<<<<<<< + * finally: + * f_locals_back = None + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 585, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 585, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 585, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L7_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":576 + * # ENDIF + * try: + * try: # <<<<<<<<<<<<<< + * # Showing return values was turned off, we should remove them from locals dict. + * # The values can be in the current frame or in the back one + */ + __pyx_L8_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L4_error; + __pyx_L7_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L11_try_end:; + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":587 + * pydev_log.exception() + * finally: + * f_locals_back = None # <<<<<<<<<<<<<< + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f_locals_back, Py_None); + goto __pyx_L5; + } + __pyx_L4_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename; + { + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f_locals_back, Py_None); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + } + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ErrRestore(__pyx_t_3, __pyx_t_2, __pyx_t_1); + __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; + __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14; + goto __pyx_L1_error; + } + __pyx_L5:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":571 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _remove_return_values(self, py_db, frame): # <<<<<<<<<<<<<< + * # ELSE + * # def _remove_return_values(self, py_db, frame): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._remove_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_f_locals_back); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":590 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _get_unfiltered_back_frame(self, py_db, frame): # <<<<<<<<<<<<<< + * # ELSE + * # def _get_unfiltered_back_frame(self, py_db, frame): + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__get_unfiltered_back_frame(CYTHON_UNUSED struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame) { + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + unsigned int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_unfiltered_back_frame", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":594 + * # def _get_unfiltered_back_frame(self, py_db, frame): + * # ENDIF + * f = frame.f_back # <<<<<<<<<<<<<< + * while f is not None: + * if not py_db.is_files_filter_enabled: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_f = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":595 + * # ENDIF + * f = frame.f_back + * while f is not None: # <<<<<<<<<<<<<< + * if not py_db.is_files_filter_enabled: + * return f + */ + while (1) { + __pyx_t_2 = (__pyx_v_f != Py_None); + if (!__pyx_t_2) break; + + /* "_pydevd_bundle/pydevd_cython.pyx":596 + * f = frame.f_back + * while f is not None: + * if not py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * return f + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 596, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (!__pyx_t_2); + if (__pyx_t_3) { + + /* "_pydevd_bundle/pydevd_cython.pyx":597 + * while f is not None: + * if not py_db.is_files_filter_enabled: + * return f # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_f); + __pyx_r = __pyx_v_f; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":596 + * f = frame.f_back + * while f is not None: + * if not py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * return f + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":600 + * + * else: + * if py_db.apply_files_filter(f, f.f_code.co_filename, False): # <<<<<<<<<<<<<< + * f = f.f_back + * + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_f, __pyx_t_6, Py_False}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + + /* "_pydevd_bundle/pydevd_cython.pyx":601 + * else: + * if py_db.apply_files_filter(f, f.f_code.co_filename, False): + * f = f.f_back # <<<<<<<<<<<<<< + * + * else: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":600 + * + * else: + * if py_db.apply_files_filter(f, f.f_code.co_filename, False): # <<<<<<<<<<<<<< + * f = f.f_back + * + */ + goto __pyx_L6; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":604 + * + * else: + * return f # <<<<<<<<<<<<<< + * + * return f + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_f); + __pyx_r = __pyx_v_f; + goto __pyx_L0; + } + __pyx_L6:; + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":606 + * return f + * + * return f # <<<<<<<<<<<<<< + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_f); + __pyx_r = __pyx_v_f; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":590 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _get_unfiltered_back_frame(self, py_db, frame): # <<<<<<<<<<<<<< + * # ELSE + * # def _get_unfiltered_back_frame(self, py_db, frame): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._get_unfiltered_back_frame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":609 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _is_same_frame(self, target_frame, current_frame): # <<<<<<<<<<<<<< + * cdef PyDBAdditionalThreadInfo info; + * # ELSE + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__is_same_frame(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_target_frame, PyObject *__pyx_v_current_frame) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info = 0; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_is_same_frame", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":614 + * # def _is_same_frame(self, target_frame, current_frame): + * # ENDIF + * if target_frame is current_frame: # <<<<<<<<<<<<<< + * return True + * + */ + __pyx_t_1 = (__pyx_v_target_frame == __pyx_v_current_frame); + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":615 + * # ENDIF + * if target_frame is current_frame: + * return True # <<<<<<<<<<<<<< + * + * info = self._args[2] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":614 + * # def _is_same_frame(self, target_frame, current_frame): + * # ENDIF + * if target_frame is current_frame: # <<<<<<<<<<<<<< + * return True + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":617 + * return True + * + * info = self._args[2] # <<<<<<<<<<<<<< + * if info.pydev_use_scoped_step_frame: + * # If using scoped step we don't check the target, we just need to check + */ + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 617, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_v_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":618 + * + * info = self._args[2] + * if info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * # If using scoped step we don't check the target, we just need to check + * # if the current matches the same heuristic where the target was defined. + */ + if (__pyx_v_info->pydev_use_scoped_step_frame) { + + /* "_pydevd_bundle/pydevd_cython.pyx":621 + * # If using scoped step we don't check the target, we just need to check + * # if the current matches the same heuristic where the target was defined. + * if target_frame is not None and current_frame is not None: # <<<<<<<<<<<<<< + * if target_frame.f_code.co_filename == current_frame.f_code.co_filename: + * # The co_name may be different (it may include the line number), but + */ + __pyx_t_3 = (__pyx_v_target_frame != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_current_frame != Py_None); + __pyx_t_1 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":622 + * # if the current matches the same heuristic where the target was defined. + * if target_frame is not None and current_frame is not None: + * if target_frame.f_code.co_filename == current_frame.f_code.co_filename: # <<<<<<<<<<<<<< + * # The co_name may be different (it may include the line number), but + * # the filename must still be the same. + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_target_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":625 + * # The co_name may be different (it may include the line number), but + * # the filename must still be the same. + * f = current_frame.f_back # <<<<<<<<<<<<<< + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f = f.f_back + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_f = __pyx_t_2; + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":626 + * # the filename must still be the same. + * f = current_frame.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: # <<<<<<<<<<<<<< + * f = f.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + */ + __pyx_t_3 = (__pyx_v_f != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L10_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":627 + * f = current_frame.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f = f.f_back # <<<<<<<<<<<<<< + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + * return True + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":628 + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f = f.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: # <<<<<<<<<<<<<< + * return True + * + */ + __pyx_t_3 = (__pyx_v_f != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L13_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L13_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":629 + * f = f.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + * return True # <<<<<<<<<<<<<< + * + * return False + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":628 + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f = f.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: # <<<<<<<<<<<<<< + * return True + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":626 + * # the filename must still be the same. + * f = current_frame.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: # <<<<<<<<<<<<<< + * f = f.f_back + * if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":622 + * # if the current matches the same heuristic where the target was defined. + * if target_frame is not None and current_frame is not None: + * if target_frame.f_code.co_filename == current_frame.f_code.co_filename: # <<<<<<<<<<<<<< + * # The co_name may be different (it may include the line number), but + * # the filename must still be the same. + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":621 + * # If using scoped step we don't check the target, we just need to check + * # if the current matches the same heuristic where the target was defined. + * if target_frame is not None and current_frame is not None: # <<<<<<<<<<<<<< + * if target_frame.f_code.co_filename == current_frame.f_code.co_filename: + * # The co_name may be different (it may include the line number), but + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":618 + * + * info = self._args[2] + * if info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * # If using scoped step we don't check the target, we just need to check + * # if the current matches the same heuristic where the target was defined. + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":631 + * return True + * + * return False # <<<<<<<<<<<<<< + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":609 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef _is_same_frame(self, target_frame, current_frame): # <<<<<<<<<<<<<< + * cdef PyDBAdditionalThreadInfo info; + * # ELSE + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame._is_same_frame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_info); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":634 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< + * cdef tuple abs_path_canonical_path_and_base; + * cdef bint is_exception_event; + */ + +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispatch(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg, int __pyx_skip_dispatch) { + PyObject *__pyx_v_abs_path_canonical_path_and_base = 0; + int __pyx_v_is_exception_event; + int __pyx_v_has_exception_breakpoints; + int __pyx_v_can_skip; + int __pyx_v_stop; + int __pyx_v_stop_on_plugin_breakpoint; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info = 0; + int __pyx_v_step_cmd; + int __pyx_v_line; + int __pyx_v_is_line; + int __pyx_v_is_call; + int __pyx_v_is_return; + int __pyx_v_should_stop; + PyObject *__pyx_v_breakpoints_for_file = 0; + PyObject *__pyx_v_stop_info = 0; + PyObject *__pyx_v_curr_func_name = 0; + PyObject *__pyx_v_frame_skips_cache = 0; + PyObject *__pyx_v_frame_cache_key = 0; + PyObject *__pyx_v_line_cache_key = 0; + int __pyx_v_breakpoints_in_line_cache; + int __pyx_v_breakpoints_in_frame_cache; + int __pyx_v_has_breakpoint_in_frame; + int __pyx_v_bp_line; + PyObject *__pyx_v_bp = 0; + int __pyx_v_pydev_smart_parent_offset; + int __pyx_v_pydev_smart_child_offset; + PyObject *__pyx_v_pydev_smart_step_into_variants = 0; + PyObject *__pyx_v_py_db = NULL; + PyObject *__pyx_v_thread = NULL; + PyObject *__pyx_v_plugin_manager = NULL; + PyObject *__pyx_v_stop_frame = NULL; + PyObject *__pyx_v_function_breakpoint_on_call_event = NULL; + PyObject *__pyx_v_returns_cache_key = NULL; + PyObject *__pyx_v_return_lines = NULL; + PyObject *__pyx_v_x = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_v_exc_info = NULL; + PyObject *__pyx_v_func_lines = NULL; + PyObject *__pyx_v_offset_and_lineno = NULL; + PyObject *__pyx_v_breakpoint = NULL; + PyObject *__pyx_v_stop_reason = NULL; + PyObject *__pyx_v_bp_type = NULL; + PyObject *__pyx_v_new_frame = NULL; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_eval_result = NULL; + PyObject *__pyx_v_cmd = NULL; + PyObject *__pyx_v_exc = NULL; + long __pyx_v_should_skip; + PyObject *__pyx_v_plugin_stop = NULL; + PyObject *__pyx_v_force_check_project_scope = NULL; + PyObject *__pyx_v_filename = NULL; + PyObject *__pyx_v_f2 = NULL; + PyObject *__pyx_v_back = NULL; + PyObject *__pyx_v_smart_step_into_variant = NULL; + PyObject *__pyx_v_children_variants = NULL; + PyObject *__pyx_v_f_code = NULL; + PyObject *__pyx_v_back_absolute_filename = NULL; + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_v_base = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + int __pyx_t_10; + int __pyx_t_11; + int __pyx_t_12; + Py_ssize_t __pyx_t_13; + PyObject *(*__pyx_t_14)(PyObject *); + PyObject *(*__pyx_t_15)(PyObject *); + int __pyx_t_16; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19 = NULL; + int __pyx_t_20; + Py_ssize_t __pyx_t_21; + PyObject *__pyx_t_22 = NULL; + char const *__pyx_t_23; + PyObject *__pyx_t_24 = NULL; + PyObject *__pyx_t_25 = NULL; + PyObject *__pyx_t_26 = NULL; + PyObject *__pyx_t_27 = NULL; + PyObject *__pyx_t_28 = NULL; + PyObject *__pyx_t_29 = NULL; + char const *__pyx_t_30; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("trace_dispatch", 0); + __Pyx_INCREF(__pyx_v_frame); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "_pydevd_bundle/pydevd_cython.pyx":674 + * # generation be better split among what each part does). + * + * try: # <<<<<<<<<<<<<< + * # DEBUG = '_debugger_case_yield_from.py' in frame.f_code.co_filename + * py_db, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args + */ + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":676 + * try: + * # DEBUG = '_debugger_case_yield_from.py' in frame.f_code.co_filename + * py_db, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args # <<<<<<<<<<<<<< + * # if DEBUG: print('frame trace_dispatch %s %s %s %s %s %s, stop: %s' % (frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename, event, constant_to_str(info.pydev_step_cmd), arg, info.pydev_step_stop)) + * info.is_tracing += 1 + */ + __pyx_t_1 = __pyx_v_self->_args; + __Pyx_INCREF(__pyx_t_1); + if (likely(__pyx_t_1 != Py_None)) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 6)) { + if (size > 6) __Pyx_RaiseTooManyValuesError(6); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 676, __pyx_L4_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 4); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 5); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + #else + { + Py_ssize_t i; + PyObject** temps[6] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8}; + for (i=0; i < 6; i++) { + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 676, __pyx_L4_error) + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 676, __pyx_L4_error) + } + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 676, __pyx_L4_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 676, __pyx_L4_error) + if (!(likely(PyDict_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_7))) __PYX_ERR(0, 676, __pyx_L4_error) + __pyx_v_py_db = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_abs_path_canonical_path_and_base = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + __pyx_v_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_4); + __pyx_t_4 = 0; + __pyx_v_thread = __pyx_t_6; + __pyx_t_6 = 0; + __pyx_v_frame_skips_cache = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + __pyx_v_frame_cache_key = __pyx_t_8; + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":678 + * py_db, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args + * # if DEBUG: print('frame trace_dispatch %s %s %s %s %s %s, stop: %s' % (frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename, event, constant_to_str(info.pydev_step_cmd), arg, info.pydev_step_stop)) + * info.is_tracing += 1 # <<<<<<<<<<<<<< + * + * # TODO: This shouldn't be needed. The fact that frame.f_lineno + */ + __pyx_v_info->is_tracing = (__pyx_v_info->is_tracing + 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":683 + * # is None seems like a bug in Python 3.11. + * # Reported in: https://github.com/python/cpython/issues/94485 + * line = frame.f_lineno or 0 # Workaround or case where frame.f_lineno is None # <<<<<<<<<<<<<< + * line_cache_key = (frame_cache_key, line) + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 683, __pyx_L4_error) + if (!__pyx_t_10) { + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L4_error) + __pyx_t_9 = __pyx_t_11; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = 0; + __pyx_L6_bool_binop_done:; + __pyx_v_line = __pyx_t_9; + + /* "_pydevd_bundle/pydevd_cython.pyx":684 + * # Reported in: https://github.com/python/cpython/issues/94485 + * line = frame.f_lineno or 0 # Workaround or case where frame.f_lineno is None + * line_cache_key = (frame_cache_key, line) # <<<<<<<<<<<<<< + * + * if py_db.pydb_disposed: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 684, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_frame_cache_key); + __Pyx_GIVEREF(__pyx_v_frame_cache_key); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_frame_cache_key)) __PYX_ERR(0, 684, __pyx_L4_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1)) __PYX_ERR(0, 684, __pyx_L4_error); + __pyx_t_1 = 0; + __pyx_v_line_cache_key = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":686 + * line_cache_key = (frame_cache_key, line) + * + * if py_db.pydb_disposed: # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE + * + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_pydb_disposed); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 686, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 686, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":687 + * + * if py_db.pydb_disposed: + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * + * plugin_manager = py_db.plugin + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 687, __pyx_L4_error) + if (__pyx_t_10) { + __Pyx_INCREF(Py_None); + __pyx_t_8 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __pyx_t_1; + __pyx_t_1 = 0; + } + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L3_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":686 + * line_cache_key = (frame_cache_key, line) + * + * if py_db.pydb_disposed: # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":689 + * return None if event == "call" else NO_FTRACE + * + * plugin_manager = py_db.plugin # <<<<<<<<<<<<<< + * has_exception_breakpoints = ( + * py_db.break_on_caught_exceptions or py_db.break_on_user_uncaught_exceptions or py_db.has_plugin_exception_breaks + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_plugin); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 689, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_v_plugin_manager = __pyx_t_8; + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":691 + * plugin_manager = py_db.plugin + * has_exception_breakpoints = ( + * py_db.break_on_caught_exceptions or py_db.break_on_user_uncaught_exceptions or py_db.has_plugin_exception_breaks # <<<<<<<<<<<<<< + * ) + * + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_break_on_caught_exceptions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 691, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 691, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_break_on_user_uncaught_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 691, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 691, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 691, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 691, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_10 = __pyx_t_12; + __pyx_L9_bool_binop_done:; + __pyx_v_has_exception_breakpoints = __pyx_t_10; + + /* "_pydevd_bundle/pydevd_cython.pyx":694 + * ) + * + * stop_frame = info.pydev_step_stop # <<<<<<<<<<<<<< + * step_cmd = info.pydev_step_cmd + * function_breakpoint_on_call_event = None + */ + __pyx_t_8 = __pyx_v_info->pydev_step_stop; + __Pyx_INCREF(__pyx_t_8); + __pyx_v_stop_frame = __pyx_t_8; + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":695 + * + * stop_frame = info.pydev_step_stop + * step_cmd = info.pydev_step_cmd # <<<<<<<<<<<<<< + * function_breakpoint_on_call_event = None + * + */ + __pyx_t_9 = __pyx_v_info->pydev_step_cmd; + __pyx_v_step_cmd = __pyx_t_9; + + /* "_pydevd_bundle/pydevd_cython.pyx":696 + * stop_frame = info.pydev_step_stop + * step_cmd = info.pydev_step_cmd + * function_breakpoint_on_call_event = None # <<<<<<<<<<<<<< + * + * if frame.f_code.co_flags & 0xA0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80 + */ + __Pyx_INCREF(Py_None); + __pyx_v_function_breakpoint_on_call_event = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":698 + * function_breakpoint_on_call_event = None + * + * if frame.f_code.co_flags & 0xA0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80 # <<<<<<<<<<<<<< + * # Dealing with coroutines and generators: + * # When in a coroutine we change the perceived event to the debugger because + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 698, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_co_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_AndObjC(__pyx_t_1, __pyx_int_160, 0xA0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 698, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 698, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":702 + * # When in a coroutine we change the perceived event to the debugger because + * # a call, StopIteration exception and return are usually just pausing/unpausing it. + * if event == "line": # <<<<<<<<<<<<<< + * is_line = True + * is_call = False + */ + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 702, __pyx_L4_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":703 + * # a call, StopIteration exception and return are usually just pausing/unpausing it. + * if event == "line": + * is_line = True # <<<<<<<<<<<<<< + * is_call = False + * is_return = False + */ + __pyx_v_is_line = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":704 + * if event == "line": + * is_line = True + * is_call = False # <<<<<<<<<<<<<< + * is_return = False + * is_exception_event = False + */ + __pyx_v_is_call = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":705 + * is_line = True + * is_call = False + * is_return = False # <<<<<<<<<<<<<< + * is_exception_event = False + * + */ + __pyx_v_is_return = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":706 + * is_call = False + * is_return = False + * is_exception_event = False # <<<<<<<<<<<<<< + * + * elif event == "return": + */ + __pyx_v_is_exception_event = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":702 + * # When in a coroutine we change the perceived event to the debugger because + * # a call, StopIteration exception and return are usually just pausing/unpausing it. + * if event == "line": # <<<<<<<<<<<<<< + * is_line = True + * is_call = False + */ + goto __pyx_L13; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":708 + * is_exception_event = False + * + * elif event == "return": # <<<<<<<<<<<<<< + * is_line = False + * is_call = False + */ + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 708, __pyx_L4_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":709 + * + * elif event == "return": + * is_line = False # <<<<<<<<<<<<<< + * is_call = False + * is_return = True + */ + __pyx_v_is_line = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":710 + * elif event == "return": + * is_line = False + * is_call = False # <<<<<<<<<<<<<< + * is_return = True + * is_exception_event = False + */ + __pyx_v_is_call = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":711 + * is_line = False + * is_call = False + * is_return = True # <<<<<<<<<<<<<< + * is_exception_event = False + * + */ + __pyx_v_is_return = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":712 + * is_call = False + * is_return = True + * is_exception_event = False # <<<<<<<<<<<<<< + * + * returns_cache_key = (frame_cache_key, "returns") + */ + __pyx_v_is_exception_event = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":714 + * is_exception_event = False + * + * returns_cache_key = (frame_cache_key, "returns") # <<<<<<<<<<<<<< + * return_lines = frame_skips_cache.get(returns_cache_key) + * if return_lines is None: + */ + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 714, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_frame_cache_key); + __Pyx_GIVEREF(__pyx_v_frame_cache_key); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_frame_cache_key)) __PYX_ERR(0, 714, __pyx_L4_error); + __Pyx_INCREF(__pyx_n_s_returns); + __Pyx_GIVEREF(__pyx_n_s_returns); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_returns)) __PYX_ERR(0, 714, __pyx_L4_error); + __pyx_v_returns_cache_key = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":715 + * + * returns_cache_key = (frame_cache_key, "returns") + * return_lines = frame_skips_cache.get(returns_cache_key) # <<<<<<<<<<<<<< + * if return_lines is None: + * # Note: we're collecting the return lines by inspecting the bytecode as + */ + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 715, __pyx_L4_error) + } + __pyx_t_8 = __Pyx_PyDict_GetItemDefault(__pyx_v_frame_skips_cache, __pyx_v_returns_cache_key, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 715, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_v_return_lines = __pyx_t_8; + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":716 + * returns_cache_key = (frame_cache_key, "returns") + * return_lines = frame_skips_cache.get(returns_cache_key) + * if return_lines is None: # <<<<<<<<<<<<<< + * # Note: we're collecting the return lines by inspecting the bytecode as + * # there are multiple returns and multiple stop iterations when awaiting and + */ + __pyx_t_10 = (__pyx_v_return_lines == Py_None); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":721 + * # it doesn't give any clear indication when a coroutine or generator is + * # finishing or just pausing. + * return_lines = set() # <<<<<<<<<<<<<< + * for x in py_db.collect_return_info(frame.f_code): + * # Note: cython does not support closures in cpdefs (so we can't use + */ + __pyx_t_8 = PySet_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 721, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF_SET(__pyx_v_return_lines, __pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":722 + * # finishing or just pausing. + * return_lines = set() + * for x in py_db.collect_return_info(frame.f_code): # <<<<<<<<<<<<<< + * # Note: cython does not support closures in cpdefs (so we can't use + * # a list comprehension). + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_collect_return_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 722, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 722, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { + __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1); + __pyx_t_13 = 0; + __pyx_t_14 = NULL; + } else { + __pyx_t_13 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 722, __pyx_L4_error) + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + for (;;) { + if (likely(!__pyx_t_14)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 722, __pyx_L4_error) + #endif + if (__pyx_t_13 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_8); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 722, __pyx_L4_error) + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 722, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + #endif + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 722, __pyx_L4_error) + #endif + if (__pyx_t_13 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_8); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 722, __pyx_L4_error) + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 722, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + #endif + } + } else { + __pyx_t_8 = __pyx_t_14(__pyx_t_1); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 722, __pyx_L4_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_8); + } + __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":725 + * # Note: cython does not support closures in cpdefs (so we can't use + * # a list comprehension). + * return_lines.add(x.return_line) # <<<<<<<<<<<<<< + * + * frame_skips_cache[returns_cache_key] = return_lines + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_return_lines, __pyx_n_s_add); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 725, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_return_line); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 725, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 725, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":722 + * # finishing or just pausing. + * return_lines = set() + * for x in py_db.collect_return_info(frame.f_code): # <<<<<<<<<<<<<< + * # Note: cython does not support closures in cpdefs (so we can't use + * # a list comprehension). + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":727 + * return_lines.add(x.return_line) + * + * frame_skips_cache[returns_cache_key] = return_lines # <<<<<<<<<<<<<< + * + * if line not in return_lines: + */ + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 727, __pyx_L4_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_frame_skips_cache, __pyx_v_returns_cache_key, __pyx_v_return_lines) < 0))) __PYX_ERR(0, 727, __pyx_L4_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":716 + * returns_cache_key = (frame_cache_key, "returns") + * return_lines = frame_skips_cache.get(returns_cache_key) + * if return_lines is None: # <<<<<<<<<<<<<< + * # Note: we're collecting the return lines by inspecting the bytecode as + * # there are multiple returns and multiple stop iterations when awaiting and + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":729 + * frame_skips_cache[returns_cache_key] = return_lines + * + * if line not in return_lines: # <<<<<<<<<<<<<< + * # Not really a return (coroutine/generator paused). + * return self.trace_dispatch + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_v_return_lines, Py_NE)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 729, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":731 + * if line not in return_lines: + * # Not really a return (coroutine/generator paused). + * return self.trace_dispatch # <<<<<<<<<<<<<< + * else: + * if self.exc_info: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L3_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":729 + * frame_skips_cache[returns_cache_key] = return_lines + * + * if line not in return_lines: # <<<<<<<<<<<<<< + * # Not really a return (coroutine/generator paused). + * return self.trace_dispatch + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":733 + * return self.trace_dispatch + * else: + * if self.exc_info: # <<<<<<<<<<<<<< + * self.handle_user_exception(frame) + * return self.trace_dispatch + */ + /*else*/ { + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_self->exc_info); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 733, __pyx_L4_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":734 + * else: + * if self.exc_info: + * self.handle_user_exception(frame) # <<<<<<<<<<<<<< + * return self.trace_dispatch + * + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_user_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 734, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":735 + * if self.exc_info: + * self.handle_user_exception(frame) + * return self.trace_dispatch # <<<<<<<<<<<<<< + * + * # Tricky handling: usually when we're on a frame which is about to exit + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L3_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":733 + * return self.trace_dispatch + * else: + * if self.exc_info: # <<<<<<<<<<<<<< + * self.handle_user_exception(frame) + * return self.trace_dispatch + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":753 + * # as the return shouldn't mean that we've actually completed executing a + * # frame in this case). + * if stop_frame is frame and not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * if step_cmd in (108, 159, 107, 144): + * f = self._get_unfiltered_back_frame(py_db, frame) + */ + __pyx_t_12 = (__pyx_v_stop_frame == __pyx_v_frame); + if (__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L21_bool_binop_done; + } + __pyx_t_12 = (!__pyx_v_info->pydev_use_scoped_step_frame); + __pyx_t_10 = __pyx_t_12; + __pyx_L21_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":754 + * # frame in this case). + * if stop_frame is frame and not info.pydev_use_scoped_step_frame: + * if step_cmd in (108, 159, 107, 144): # <<<<<<<<<<<<<< + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: + */ + switch (__pyx_v_step_cmd) { + case 0x6C: + case 0x9F: + case 0x6B: + case 0x90: + + /* "_pydevd_bundle/pydevd_cython.pyx":755 + * if stop_frame is frame and not info.pydev_use_scoped_step_frame: + * if step_cmd in (108, 159, 107, 144): + * f = self._get_unfiltered_back_frame(py_db, frame) # <<<<<<<<<<<<<< + * if f is not None: + * info.pydev_step_cmd = 206 + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_get_unfiltered_back_frame(__pyx_v_self, __pyx_v_py_db, __pyx_v_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_f = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":756 + * if step_cmd in (108, 159, 107, 144): + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 206 + * info.pydev_step_stop = f + */ + __pyx_t_10 = (__pyx_v_f != Py_None); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":757 + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: + * info.pydev_step_cmd = 206 # <<<<<<<<<<<<<< + * info.pydev_step_stop = f + * else: + */ + __pyx_v_info->pydev_step_cmd = 0xCE; + + /* "_pydevd_bundle/pydevd_cython.pyx":758 + * if f is not None: + * info.pydev_step_cmd = 206 + * info.pydev_step_stop = f # <<<<<<<<<<<<<< + * else: + * if step_cmd == 108: + */ + __Pyx_INCREF(__pyx_v_f); + __Pyx_GIVEREF(__pyx_v_f); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = __pyx_v_f; + + /* "_pydevd_bundle/pydevd_cython.pyx":756 + * if step_cmd in (108, 159, 107, 144): + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 206 + * info.pydev_step_stop = f + */ + goto __pyx_L23; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":760 + * info.pydev_step_stop = f + * else: + * if step_cmd == 108: # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 107 + * info.pydev_step_stop = None + */ + /*else*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":764 + * info.pydev_step_stop = None + * + * elif step_cmd == 159: # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 144 + * info.pydev_step_stop = None + */ + switch (__pyx_v_step_cmd) { + case 0x6C: + + /* "_pydevd_bundle/pydevd_cython.pyx":761 + * else: + * if step_cmd == 108: + * info.pydev_step_cmd = 107 # <<<<<<<<<<<<<< + * info.pydev_step_stop = None + * + */ + __pyx_v_info->pydev_step_cmd = 0x6B; + + /* "_pydevd_bundle/pydevd_cython.pyx":762 + * if step_cmd == 108: + * info.pydev_step_cmd = 107 + * info.pydev_step_stop = None # <<<<<<<<<<<<<< + * + * elif step_cmd == 159: + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":760 + * info.pydev_step_stop = f + * else: + * if step_cmd == 108: # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 107 + * info.pydev_step_stop = None + */ + break; + case 0x9F: + + /* "_pydevd_bundle/pydevd_cython.pyx":765 + * + * elif step_cmd == 159: + * info.pydev_step_cmd = 144 # <<<<<<<<<<<<<< + * info.pydev_step_stop = None + * + */ + __pyx_v_info->pydev_step_cmd = 0x90; + + /* "_pydevd_bundle/pydevd_cython.pyx":766 + * elif step_cmd == 159: + * info.pydev_step_cmd = 144 + * info.pydev_step_stop = None # <<<<<<<<<<<<<< + * + * elif step_cmd == 206: + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":764 + * info.pydev_step_stop = None + * + * elif step_cmd == 159: # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 144 + * info.pydev_step_stop = None + */ + break; + default: break; + } + } + __pyx_L23:; + + /* "_pydevd_bundle/pydevd_cython.pyx":754 + * # frame in this case). + * if stop_frame is frame and not info.pydev_use_scoped_step_frame: + * if step_cmd in (108, 159, 107, 144): # <<<<<<<<<<<<<< + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: + */ + break; + case 0xCE: + + /* "_pydevd_bundle/pydevd_cython.pyx":770 + * elif step_cmd == 206: + * # We're exiting this one, so, mark the new coroutine context. + * f = self._get_unfiltered_back_frame(py_db, frame) # <<<<<<<<<<<<<< + * if f is not None: + * info.pydev_step_stop = f + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_get_unfiltered_back_frame(__pyx_v_self, __pyx_v_py_db, __pyx_v_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_f = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":771 + * # We're exiting this one, so, mark the new coroutine context. + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: # <<<<<<<<<<<<<< + * info.pydev_step_stop = f + * else: + */ + __pyx_t_10 = (__pyx_v_f != Py_None); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":772 + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: + * info.pydev_step_stop = f # <<<<<<<<<<<<<< + * else: + * info.pydev_step_cmd = 107 + */ + __Pyx_INCREF(__pyx_v_f); + __Pyx_GIVEREF(__pyx_v_f); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = __pyx_v_f; + + /* "_pydevd_bundle/pydevd_cython.pyx":771 + * # We're exiting this one, so, mark the new coroutine context. + * f = self._get_unfiltered_back_frame(py_db, frame) + * if f is not None: # <<<<<<<<<<<<<< + * info.pydev_step_stop = f + * else: + */ + goto __pyx_L24; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":774 + * info.pydev_step_stop = f + * else: + * info.pydev_step_cmd = 107 # <<<<<<<<<<<<<< + * info.pydev_step_stop = None + * + */ + /*else*/ { + __pyx_v_info->pydev_step_cmd = 0x6B; + + /* "_pydevd_bundle/pydevd_cython.pyx":775 + * else: + * info.pydev_step_cmd = 107 + * info.pydev_step_stop = None # <<<<<<<<<<<<<< + * + * elif event == "exception": + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = Py_None; + } + __pyx_L24:; + + /* "_pydevd_bundle/pydevd_cython.pyx":768 + * info.pydev_step_stop = None + * + * elif step_cmd == 206: # <<<<<<<<<<<<<< + * # We're exiting this one, so, mark the new coroutine context. + * f = self._get_unfiltered_back_frame(py_db, frame) + */ + break; + default: break; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":753 + * # as the return shouldn't mean that we've actually completed executing a + * # frame in this case). + * if stop_frame is frame and not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * if step_cmd in (108, 159, 107, 144): + * f = self._get_unfiltered_back_frame(py_db, frame) + */ + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":708 + * is_exception_event = False + * + * elif event == "return": # <<<<<<<<<<<<<< + * is_line = False + * is_call = False + */ + goto __pyx_L13; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":777 + * info.pydev_step_stop = None + * + * elif event == "exception": # <<<<<<<<<<<<<< + * breakpoints_for_file = None + * if has_exception_breakpoints: + */ + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 777, __pyx_L4_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":778 + * + * elif event == "exception": + * breakpoints_for_file = None # <<<<<<<<<<<<<< + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception( + */ + __Pyx_INCREF(Py_None); + __pyx_v_breakpoints_for_file = ((PyObject*)Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":779 + * elif event == "exception": + * breakpoints_for_file = None + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * should_stop, frame, exc_info = should_stop_on_exception( + * self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + */ + if (__pyx_v_has_exception_breakpoints) { + + /* "_pydevd_bundle/pydevd_cython.pyx":780 + * breakpoints_for_file = None + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception( # <<<<<<<<<<<<<< + * self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + * ) + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_should_stop_on_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 780, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "_pydevd_bundle/pydevd_cython.pyx":781 + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception( + * self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info # <<<<<<<<<<<<<< + * ) + * self.exc_info = exc_info + */ + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 781, __pyx_L4_error) + } + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 781, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 781, __pyx_L4_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 781, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 781, __pyx_L4_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_t_7, __pyx_t_6, __pyx_v_frame, __pyx_t_4, __pyx_v_arg, __pyx_v_self->exc_info}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 780, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 780, __pyx_L4_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_8 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + __pyx_t_6 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + #else + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 780, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 780, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 780, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 780, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); + index = 0; __pyx_t_8 = __pyx_t_15(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L26_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 1; __pyx_t_4 = __pyx_t_15(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L26_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 2; __pyx_t_6 = __pyx_t_15(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L26_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_7), 3) < 0) __PYX_ERR(0, 780, __pyx_L4_error) + __pyx_t_15 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L27_unpacking_done; + __pyx_L26_unpacking_failed:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_15 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 780, __pyx_L4_error) + __pyx_L27_unpacking_done:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":780 + * breakpoints_for_file = None + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception( # <<<<<<<<<<<<<< + * self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + * ) + */ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 780, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_should_stop = __pyx_t_10; + __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_v_exc_info = __pyx_t_6; + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":783 + * self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + * ) + * self.exc_info = exc_info # <<<<<<<<<<<<<< + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + */ + __Pyx_INCREF(__pyx_v_exc_info); + __Pyx_GIVEREF(__pyx_v_exc_info); + __Pyx_GOTREF(__pyx_v_self->exc_info); + __Pyx_DECREF(__pyx_v_self->exc_info); + __pyx_v_self->exc_info = __pyx_v_exc_info; + + /* "_pydevd_bundle/pydevd_cython.pyx":784 + * ) + * self.exc_info = exc_info + * if should_stop: # <<<<<<<<<<<<<< + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch + */ + if (__pyx_v_should_stop) { + + /* "_pydevd_bundle/pydevd_cython.pyx":785 + * self.exc_info = exc_info + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< + * return self.trace_dispatch + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_handle_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 785, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 785, __pyx_L4_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 785, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 785, __pyx_L4_error) + } + __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 785, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_EXCEPTION_TYPE_HANDLED); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 785, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_t_4, __pyx_t_8, __pyx_v_frame, __pyx_v_arg, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 785, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":786 + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch # <<<<<<<<<<<<<< + * + * return self.trace_dispatch + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L3_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":785 + * self.exc_info = exc_info + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< + * return self.trace_dispatch + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":784 + * ) + * self.exc_info = exc_info + * if should_stop: # <<<<<<<<<<<<<< + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":779 + * elif event == "exception": + * breakpoints_for_file = None + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * should_stop, frame, exc_info = should_stop_on_exception( + * self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":788 + * return self.trace_dispatch + * + * return self.trace_dispatch # <<<<<<<<<<<<<< + * else: + * # event == 'call' or event == 'c_XXX' + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L3_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":777 + * info.pydev_step_stop = None + * + * elif event == "exception": # <<<<<<<<<<<<<< + * breakpoints_for_file = None + * if has_exception_breakpoints: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":791 + * else: + * # event == 'call' or event == 'c_XXX' + * return self.trace_dispatch # <<<<<<<<<<<<<< + * + * else: # Not coroutine nor generator + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L3_return; + } + __pyx_L13:; + + /* "_pydevd_bundle/pydevd_cython.pyx":698 + * function_breakpoint_on_call_event = None + * + * if frame.f_code.co_flags & 0xA0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80 # <<<<<<<<<<<<<< + * # Dealing with coroutines and generators: + * # When in a coroutine we change the perceived event to the debugger because + */ + goto __pyx_L12; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":794 + * + * else: # Not coroutine nor generator + * if event == "line": # <<<<<<<<<<<<<< + * is_line = True + * is_call = False + */ + /*else*/ { + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 794, __pyx_L4_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":795 + * else: # Not coroutine nor generator + * if event == "line": + * is_line = True # <<<<<<<<<<<<<< + * is_call = False + * is_return = False + */ + __pyx_v_is_line = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":796 + * if event == "line": + * is_line = True + * is_call = False # <<<<<<<<<<<<<< + * is_return = False + * is_exception_event = False + */ + __pyx_v_is_call = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":797 + * is_line = True + * is_call = False + * is_return = False # <<<<<<<<<<<<<< + * is_exception_event = False + * + */ + __pyx_v_is_return = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":798 + * is_call = False + * is_return = False + * is_exception_event = False # <<<<<<<<<<<<<< + * + * elif event == "return": + */ + __pyx_v_is_exception_event = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":794 + * + * else: # Not coroutine nor generator + * if event == "line": # <<<<<<<<<<<<<< + * is_line = True + * is_call = False + */ + goto __pyx_L30; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":800 + * is_exception_event = False + * + * elif event == "return": # <<<<<<<<<<<<<< + * is_line = False + * is_return = True + */ + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 800, __pyx_L4_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":801 + * + * elif event == "return": + * is_line = False # <<<<<<<<<<<<<< + * is_return = True + * is_call = False + */ + __pyx_v_is_line = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":802 + * elif event == "return": + * is_line = False + * is_return = True # <<<<<<<<<<<<<< + * is_call = False + * is_exception_event = False + */ + __pyx_v_is_return = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":803 + * is_line = False + * is_return = True + * is_call = False # <<<<<<<<<<<<<< + * is_exception_event = False + * + */ + __pyx_v_is_call = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":804 + * is_return = True + * is_call = False + * is_exception_event = False # <<<<<<<<<<<<<< + * + * # If we are in single step mode and something causes us to exit the current frame, we need to make sure we break + */ + __pyx_v_is_exception_event = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":813 + * # @DontTrace comment. + * if ( + * stop_frame is frame # <<<<<<<<<<<<<< + * and not info.pydev_use_scoped_step_frame + * and is_return + */ + __pyx_t_12 = (__pyx_v_stop_frame == __pyx_v_frame); + if (__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L32_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":814 + * if ( + * stop_frame is frame + * and not info.pydev_use_scoped_step_frame # <<<<<<<<<<<<<< + * and is_return + * and step_cmd + */ + __pyx_t_12 = (!__pyx_v_info->pydev_use_scoped_step_frame); + if (__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L32_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":815 + * stop_frame is frame + * and not info.pydev_use_scoped_step_frame + * and is_return # <<<<<<<<<<<<<< + * and step_cmd + * in (108, 109, 159, 160, 128) + */ + if (__pyx_v_is_return) { + } else { + __pyx_t_10 = __pyx_v_is_return; + goto __pyx_L32_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":817 + * and is_return + * and step_cmd + * in (108, 109, 159, 160, 128) # <<<<<<<<<<<<<< + * ): + * if step_cmd in (108, 109, 128): + */ + switch (__pyx_v_step_cmd) { + case 0x6C: + case 0x6D: + case 0x9F: + case 0xA0: + case 0x80: + __pyx_t_12 = 1; + break; + default: + __pyx_t_12 = 0; + break; + } + __pyx_t_16 = __pyx_t_12; + __pyx_t_10 = __pyx_t_16; + __pyx_L32_bool_binop_done:; + + /* "_pydevd_bundle/pydevd_cython.pyx":812 + * # Note: this is especially troublesome when we're skipping code with the + * # @DontTrace comment. + * if ( # <<<<<<<<<<<<<< + * stop_frame is frame + * and not info.pydev_use_scoped_step_frame + */ + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":819 + * in (108, 109, 159, 160, 128) + * ): + * if step_cmd in (108, 109, 128): # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 107 + * else: + */ + switch (__pyx_v_step_cmd) { + case 0x6C: + case 0x6D: + case 0x80: + + /* "_pydevd_bundle/pydevd_cython.pyx":820 + * ): + * if step_cmd in (108, 109, 128): + * info.pydev_step_cmd = 107 # <<<<<<<<<<<<<< + * else: + * info.pydev_step_cmd = 144 + */ + __pyx_v_info->pydev_step_cmd = 0x6B; + + /* "_pydevd_bundle/pydevd_cython.pyx":819 + * in (108, 109, 159, 160, 128) + * ): + * if step_cmd in (108, 109, 128): # <<<<<<<<<<<<<< + * info.pydev_step_cmd = 107 + * else: + */ + break; + default: + + /* "_pydevd_bundle/pydevd_cython.pyx":822 + * info.pydev_step_cmd = 107 + * else: + * info.pydev_step_cmd = 144 # <<<<<<<<<<<<<< + * info.pydev_step_stop = None + * + */ + __pyx_v_info->pydev_step_cmd = 0x90; + break; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":823 + * else: + * info.pydev_step_cmd = 144 + * info.pydev_step_stop = None # <<<<<<<<<<<<<< + * + * if self.exc_info: + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":812 + * # Note: this is especially troublesome when we're skipping code with the + * # @DontTrace comment. + * if ( # <<<<<<<<<<<<<< + * stop_frame is frame + * and not info.pydev_use_scoped_step_frame + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":825 + * info.pydev_step_stop = None + * + * if self.exc_info: # <<<<<<<<<<<<<< + * if self.handle_user_exception(frame): + * return self.trace_dispatch + */ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_self->exc_info); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 825, __pyx_L4_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":826 + * + * if self.exc_info: + * if self.handle_user_exception(frame): # <<<<<<<<<<<<<< + * return self.trace_dispatch + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_user_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 826, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 826, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":827 + * if self.exc_info: + * if self.handle_user_exception(frame): + * return self.trace_dispatch # <<<<<<<<<<<<<< + * + * elif event == "call": + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L3_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":826 + * + * if self.exc_info: + * if self.handle_user_exception(frame): # <<<<<<<<<<<<<< + * return self.trace_dispatch + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":825 + * info.pydev_step_stop = None + * + * if self.exc_info: # <<<<<<<<<<<<<< + * if self.handle_user_exception(frame): + * return self.trace_dispatch + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":800 + * is_exception_event = False + * + * elif event == "return": # <<<<<<<<<<<<<< + * is_line = False + * is_return = True + */ + goto __pyx_L30; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":829 + * return self.trace_dispatch + * + * elif event == "call": # <<<<<<<<<<<<<< + * is_line = False + * is_call = True + */ + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 829, __pyx_L4_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":830 + * + * elif event == "call": + * is_line = False # <<<<<<<<<<<<<< + * is_call = True + * is_return = False + */ + __pyx_v_is_line = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":831 + * elif event == "call": + * is_line = False + * is_call = True # <<<<<<<<<<<<<< + * is_return = False + * is_exception_event = False + */ + __pyx_v_is_call = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":832 + * is_line = False + * is_call = True + * is_return = False # <<<<<<<<<<<<<< + * is_exception_event = False + * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. + */ + __pyx_v_is_return = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":833 + * is_call = True + * is_return = False + * is_exception_event = False # <<<<<<<<<<<<<< + * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. + * function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + */ + __pyx_v_is_exception_event = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":834 + * is_return = False + * is_exception_event = False + * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. # <<<<<<<<<<<<<< + * function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_firstlineno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 834, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 834, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 834, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":835 + * is_exception_event = False + * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. + * function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) # <<<<<<<<<<<<<< + * + * elif event == "exception": + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_function_breakpoint_name_to_brea); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 835, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 835, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 835, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF_SET(__pyx_v_function_breakpoint_on_call_event, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":834 + * is_return = False + * is_exception_event = False + * if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. # <<<<<<<<<<<<<< + * function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":829 + * return self.trace_dispatch + * + * elif event == "call": # <<<<<<<<<<<<<< + * is_line = False + * is_call = True + */ + goto __pyx_L30; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":837 + * function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + * + * elif event == "exception": # <<<<<<<<<<<<<< + * is_exception_event = True + * breakpoints_for_file = None + */ + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 837, __pyx_L4_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":838 + * + * elif event == "exception": + * is_exception_event = True # <<<<<<<<<<<<<< + * breakpoints_for_file = None + * if has_exception_breakpoints: + */ + __pyx_v_is_exception_event = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":839 + * elif event == "exception": + * is_exception_event = True + * breakpoints_for_file = None # <<<<<<<<<<<<<< + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception( + */ + __Pyx_INCREF(Py_None); + __pyx_v_breakpoints_for_file = ((PyObject*)Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":840 + * is_exception_event = True + * breakpoints_for_file = None + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * should_stop, frame, exc_info = should_stop_on_exception( + * self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + */ + if (__pyx_v_has_exception_breakpoints) { + + /* "_pydevd_bundle/pydevd_cython.pyx":841 + * breakpoints_for_file = None + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception( # <<<<<<<<<<<<<< + * self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + * ) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_should_stop_on_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 841, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "_pydevd_bundle/pydevd_cython.pyx":842 + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception( + * self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info # <<<<<<<<<<<<<< + * ) + * self.exc_info = exc_info + */ + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 842, __pyx_L4_error) + } + __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 842, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 842, __pyx_L4_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 842, __pyx_L4_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 842, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_t_8, __pyx_t_1, __pyx_v_frame, __pyx_t_4, __pyx_v_arg, __pyx_v_self->exc_info}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 841, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { + PyObject* sequence = __pyx_t_7; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 841, __pyx_L4_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + __pyx_t_1 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + #else + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 841, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 841, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); + index = 0; __pyx_t_6 = __pyx_t_15(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L40_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_4 = __pyx_t_15(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L40_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 2; __pyx_t_1 = __pyx_t_15(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L40_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_8), 3) < 0) __PYX_ERR(0, 841, __pyx_L4_error) + __pyx_t_15 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L41_unpacking_done; + __pyx_L40_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_15 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 841, __pyx_L4_error) + __pyx_L41_unpacking_done:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":841 + * breakpoints_for_file = None + * if has_exception_breakpoints: + * should_stop, frame, exc_info = should_stop_on_exception( # <<<<<<<<<<<<<< + * self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + * ) + */ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 841, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_should_stop = __pyx_t_10; + __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_v_exc_info = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":844 + * self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + * ) + * self.exc_info = exc_info # <<<<<<<<<<<<<< + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + */ + __Pyx_INCREF(__pyx_v_exc_info); + __Pyx_GIVEREF(__pyx_v_exc_info); + __Pyx_GOTREF(__pyx_v_self->exc_info); + __Pyx_DECREF(__pyx_v_self->exc_info); + __pyx_v_self->exc_info = __pyx_v_exc_info; + + /* "_pydevd_bundle/pydevd_cython.pyx":845 + * ) + * self.exc_info = exc_info + * if should_stop: # <<<<<<<<<<<<<< + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch + */ + if (__pyx_v_should_stop) { + + /* "_pydevd_bundle/pydevd_cython.pyx":846 + * self.exc_info = exc_info + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< + * return self.trace_dispatch + * is_line = False + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_handle_exception); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 846, __pyx_L4_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 846, __pyx_L4_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 846, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_EXCEPTION_TYPE_HANDLED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 846, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_t_4, __pyx_t_6, __pyx_v_frame, __pyx_v_arg, __pyx_t_8}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 846, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 846, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":847 + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch # <<<<<<<<<<<<<< + * is_line = False + * is_return = False + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 847, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L3_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":846 + * self.exc_info = exc_info + * if should_stop: + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): # <<<<<<<<<<<<<< + * return self.trace_dispatch + * is_line = False + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":845 + * ) + * self.exc_info = exc_info + * if should_stop: # <<<<<<<<<<<<<< + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":840 + * is_exception_event = True + * breakpoints_for_file = None + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * should_stop, frame, exc_info = should_stop_on_exception( + * self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":848 + * if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + * return self.trace_dispatch + * is_line = False # <<<<<<<<<<<<<< + * is_return = False + * is_call = False + */ + __pyx_v_is_line = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":849 + * return self.trace_dispatch + * is_line = False + * is_return = False # <<<<<<<<<<<<<< + * is_call = False + * + */ + __pyx_v_is_return = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":850 + * is_line = False + * is_return = False + * is_call = False # <<<<<<<<<<<<<< + * + * else: + */ + __pyx_v_is_call = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":837 + * function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + * + * elif event == "exception": # <<<<<<<<<<<<<< + * is_exception_event = True + * breakpoints_for_file = None + */ + goto __pyx_L30; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":854 + * else: + * # Unexpected: just keep the same trace func (i.e.: event == 'c_XXX'). + * return self.trace_dispatch # <<<<<<<<<<<<<< + * + * if not is_exception_event: + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 854, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L3_return; + } + __pyx_L30:; + } + __pyx_L12:; + + /* "_pydevd_bundle/pydevd_cython.pyx":856 + * return self.trace_dispatch + * + * if not is_exception_event: # <<<<<<<<<<<<<< + * breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1]) + * + */ + __pyx_t_10 = (!__pyx_v_is_exception_event); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":857 + * + * if not is_exception_event: + * breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1]) # <<<<<<<<<<<<<< + * + * can_skip = False + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_breakpoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 857, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_v_abs_path_canonical_path_and_base == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 857, __pyx_L4_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_canonical_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_1}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 857, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + if (!(likely(PyDict_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_7))) __PYX_ERR(0, 857, __pyx_L4_error) + __Pyx_XDECREF_SET(__pyx_v_breakpoints_for_file, ((PyObject*)__pyx_t_7)); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":859 + * breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1]) + * + * can_skip = False # <<<<<<<<<<<<<< + * + * if info.pydev_state == 1: # 1 = 1 + */ + __pyx_v_can_skip = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":861 + * can_skip = False + * + * if info.pydev_state == 1: # 1 = 1 # <<<<<<<<<<<<<< + * # we can skip if: + * # - we have no stop marked + */ + __pyx_t_10 = (__pyx_v_info->pydev_state == 1); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":866 + * # - we should make a step return/step over and we're not in the current frame + * # - we're stepping into a coroutine context and we're not in that context + * if step_cmd == -1: # <<<<<<<<<<<<<< + * can_skip = True + * + */ + __pyx_t_10 = (__pyx_v_step_cmd == -1L); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":867 + * # - we're stepping into a coroutine context and we're not in that context + * if step_cmd == -1: + * can_skip = True # <<<<<<<<<<<<<< + * + * elif step_cmd in ( + */ + __pyx_v_can_skip = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":866 + * # - we should make a step return/step over and we're not in the current frame + * # - we're stepping into a coroutine context and we're not in that context + * if step_cmd == -1: # <<<<<<<<<<<<<< + * can_skip = True + * + */ + goto __pyx_L46; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":869 + * can_skip = True + * + * elif step_cmd in ( # <<<<<<<<<<<<<< + * 108, + * 109, + */ + switch (__pyx_v_step_cmd) { + case 0x6C: + + /* "_pydevd_bundle/pydevd_cython.pyx":870 + * + * elif step_cmd in ( + * 108, # <<<<<<<<<<<<<< + * 109, + * 159, + */ + case 0x6D: + + /* "_pydevd_bundle/pydevd_cython.pyx":871 + * elif step_cmd in ( + * 108, + * 109, # <<<<<<<<<<<<<< + * 159, + * 160, + */ + case 0x9F: + + /* "_pydevd_bundle/pydevd_cython.pyx":872 + * 108, + * 109, + * 159, # <<<<<<<<<<<<<< + * 160, + * ) and not self._is_same_frame(stop_frame, frame): + */ + case 0xA0: + + /* "_pydevd_bundle/pydevd_cython.pyx":869 + * can_skip = True + * + * elif step_cmd in ( # <<<<<<<<<<<<<< + * 108, + * 109, + */ + __pyx_t_16 = 1; + break; + default: + __pyx_t_16 = 0; + break; + } + __pyx_t_12 = __pyx_t_16; + if (__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L47_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":874 + * 159, + * 160, + * ) and not self._is_same_frame(stop_frame, frame): # <<<<<<<<<<<<<< + * can_skip = True + * + */ + __pyx_t_7 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 874, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 874, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_16 = (!__pyx_t_12); + __pyx_t_10 = __pyx_t_16; + __pyx_L47_bool_binop_done:; + + /* "_pydevd_bundle/pydevd_cython.pyx":869 + * can_skip = True + * + * elif step_cmd in ( # <<<<<<<<<<<<<< + * 108, + * 109, + */ + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":875 + * 160, + * ) and not self._is_same_frame(stop_frame, frame): + * can_skip = True # <<<<<<<<<<<<<< + * + * elif step_cmd == 128 and ( + */ + __pyx_v_can_skip = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":869 + * can_skip = True + * + * elif step_cmd in ( # <<<<<<<<<<<<<< + * 108, + * 109, + */ + goto __pyx_L46; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":877 + * can_skip = True + * + * elif step_cmd == 128 and ( # <<<<<<<<<<<<<< + * stop_frame is not None + * and stop_frame is not frame + */ + __pyx_t_16 = (__pyx_v_step_cmd == 0x80); + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L49_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":878 + * + * elif step_cmd == 128 and ( + * stop_frame is not None # <<<<<<<<<<<<<< + * and stop_frame is not frame + * and stop_frame is not frame.f_back + */ + __pyx_t_16 = (__pyx_v_stop_frame != Py_None); + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L49_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":879 + * elif step_cmd == 128 and ( + * stop_frame is not None + * and stop_frame is not frame # <<<<<<<<<<<<<< + * and stop_frame is not frame.f_back + * and (frame.f_back is None or stop_frame is not frame.f_back.f_back) + */ + __pyx_t_16 = (__pyx_v_stop_frame != __pyx_v_frame); + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L49_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":880 + * stop_frame is not None + * and stop_frame is not frame + * and stop_frame is not frame.f_back # <<<<<<<<<<<<<< + * and (frame.f_back is None or stop_frame is not frame.f_back.f_back) + * ): + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 880, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_16 = (__pyx_v_stop_frame != __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L49_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":881 + * and stop_frame is not frame + * and stop_frame is not frame.f_back + * and (frame.f_back is None or stop_frame is not frame.f_back.f_back) # <<<<<<<<<<<<<< + * ): + * can_skip = True + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 881, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_16 = (__pyx_t_7 == Py_None); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L49_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 881, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 881, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_16 = (__pyx_v_stop_frame != __pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_10 = __pyx_t_16; + __pyx_L49_bool_binop_done:; + + /* "_pydevd_bundle/pydevd_cython.pyx":877 + * can_skip = True + * + * elif step_cmd == 128 and ( # <<<<<<<<<<<<<< + * stop_frame is not None + * and stop_frame is not frame + */ + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":883 + * and (frame.f_back is None or stop_frame is not frame.f_back.f_back) + * ): + * can_skip = True # <<<<<<<<<<<<<< + * + * elif step_cmd == 144: + */ + __pyx_v_can_skip = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":877 + * can_skip = True + * + * elif step_cmd == 128 and ( # <<<<<<<<<<<<<< + * stop_frame is not None + * and stop_frame is not frame + */ + goto __pyx_L46; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":885 + * can_skip = True + * + * elif step_cmd == 144: # <<<<<<<<<<<<<< + * if py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( + * frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + */ + __pyx_t_10 = (__pyx_v_step_cmd == 0x90); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":886 + * + * elif step_cmd == 144: + * if py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( # <<<<<<<<<<<<<< + * frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + * ): + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 886, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 886, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_frame, __pyx_t_6, Py_True}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 886, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L56_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":887 + * elif step_cmd == 144: + * if py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( + * frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) # <<<<<<<<<<<<<< + * ): + * can_skip = True + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_16 = (__pyx_t_8 == Py_None); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L56_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 887, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 887, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 887, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_6, __pyx_t_1, Py_True}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 887, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_10 = __pyx_t_16; + __pyx_L56_bool_binop_done:; + + /* "_pydevd_bundle/pydevd_cython.pyx":886 + * + * elif step_cmd == 144: + * if py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( # <<<<<<<<<<<<<< + * frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + * ): + */ + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":889 + * frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + * ): + * can_skip = True # <<<<<<<<<<<<<< + * + * elif step_cmd == 206: + */ + __pyx_v_can_skip = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":886 + * + * elif step_cmd == 144: + * if py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( # <<<<<<<<<<<<<< + * frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + * ): + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":885 + * can_skip = True + * + * elif step_cmd == 144: # <<<<<<<<<<<<<< + * if py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( + * frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + */ + goto __pyx_L46; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":891 + * can_skip = True + * + * elif step_cmd == 206: # <<<<<<<<<<<<<< + * f = frame + * while f is not None: + */ + __pyx_t_10 = (__pyx_v_step_cmd == 0xCE); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":892 + * + * elif step_cmd == 206: + * f = frame # <<<<<<<<<<<<<< + * while f is not None: + * if self._is_same_frame(stop_frame, f): + */ + __Pyx_INCREF(__pyx_v_frame); + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_v_frame); + + /* "_pydevd_bundle/pydevd_cython.pyx":893 + * elif step_cmd == 206: + * f = frame + * while f is not None: # <<<<<<<<<<<<<< + * if self._is_same_frame(stop_frame, f): + * break + */ + while (1) { + __pyx_t_10 = (__pyx_v_f != Py_None); + if (!__pyx_t_10) break; + + /* "_pydevd_bundle/pydevd_cython.pyx":894 + * f = frame + * while f is not None: + * if self._is_same_frame(stop_frame, f): # <<<<<<<<<<<<<< + * break + * f = f.f_back + */ + __pyx_t_8 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_f); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 894, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":895 + * while f is not None: + * if self._is_same_frame(stop_frame, f): + * break # <<<<<<<<<<<<<< + * f = f.f_back + * else: + */ + goto __pyx_L60_break; + + /* "_pydevd_bundle/pydevd_cython.pyx":894 + * f = frame + * while f is not None: + * if self._is_same_frame(stop_frame, f): # <<<<<<<<<<<<<< + * break + * f = f.f_back + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":896 + * if self._is_same_frame(stop_frame, f): + * break + * f = f.f_back # <<<<<<<<<<<<<< + * else: + * can_skip = True + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 896, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_8); + __pyx_t_8 = 0; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":898 + * f = f.f_back + * else: + * can_skip = True # <<<<<<<<<<<<<< + * + * if can_skip: + */ + /*else*/ { + __pyx_v_can_skip = 1; + } + __pyx_L60_break:; + + /* "_pydevd_bundle/pydevd_cython.pyx":891 + * can_skip = True + * + * elif step_cmd == 206: # <<<<<<<<<<<<<< + * f = frame + * while f is not None: + */ + } + __pyx_L46:; + + /* "_pydevd_bundle/pydevd_cython.pyx":900 + * can_skip = True + * + * if can_skip: # <<<<<<<<<<<<<< + * if plugin_manager is not None and (py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): + * can_skip = plugin_manager.can_skip(py_db, frame) + */ + if (__pyx_v_can_skip) { + + /* "_pydevd_bundle/pydevd_cython.pyx":901 + * + * if can_skip: + * if plugin_manager is not None and (py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): # <<<<<<<<<<<<<< + * can_skip = plugin_manager.can_skip(py_db, frame) + * + */ + __pyx_t_16 = (__pyx_v_plugin_manager != Py_None); + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L64_bool_binop_done; + } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 901, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L64_bool_binop_done; + } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 901, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_10 = __pyx_t_16; + __pyx_L64_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":902 + * if can_skip: + * if plugin_manager is not None and (py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): + * can_skip = plugin_manager.can_skip(py_db, frame) # <<<<<<<<<<<<<< + * + * if ( + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_can_skip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 902, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_py_db, __pyx_v_frame}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 902, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 902, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_can_skip = __pyx_t_10; + + /* "_pydevd_bundle/pydevd_cython.pyx":901 + * + * if can_skip: + * if plugin_manager is not None and (py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): # <<<<<<<<<<<<<< + * can_skip = plugin_manager.can_skip(py_db, frame) + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":905 + * + * if ( + * can_skip # <<<<<<<<<<<<<< + * and py_db.show_return_values + * and info.pydev_step_cmd in (108, 159) + */ + if (__pyx_v_can_skip) { + } else { + __pyx_t_10 = __pyx_v_can_skip; + goto __pyx_L68_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":906 + * if ( + * can_skip + * and py_db.show_return_values # <<<<<<<<<<<<<< + * and info.pydev_step_cmd in (108, 159) + * and self._is_same_frame(stop_frame, frame.f_back) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 906, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 906, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L68_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":907 + * can_skip + * and py_db.show_return_values + * and info.pydev_step_cmd in (108, 159) # <<<<<<<<<<<<<< + * and self._is_same_frame(stop_frame, frame.f_back) + * ): + */ + switch (__pyx_v_info->pydev_step_cmd) { + case 0x6C: + case 0x9F: + __pyx_t_16 = 1; + break; + default: + __pyx_t_16 = 0; + break; + } + __pyx_t_12 = __pyx_t_16; + if (__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L68_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":908 + * and py_db.show_return_values + * and info.pydev_step_cmd in (108, 159) + * and self._is_same_frame(stop_frame, frame.f_back) # <<<<<<<<<<<<<< + * ): + * # trace function for showing return values after step over + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 908, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 908, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 908, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_10 = __pyx_t_12; + __pyx_L68_bool_binop_done:; + + /* "_pydevd_bundle/pydevd_cython.pyx":904 + * can_skip = plugin_manager.can_skip(py_db, frame) + * + * if ( # <<<<<<<<<<<<<< + * can_skip + * and py_db.show_return_values + */ + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":911 + * ): + * # trace function for showing return values after step over + * can_skip = False # <<<<<<<<<<<<<< + * + * # Let's check to see if we are in a function that has a breakpoint. If we don't have a breakpoint, + */ + __pyx_v_can_skip = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":904 + * can_skip = plugin_manager.can_skip(py_db, frame) + * + * if ( # <<<<<<<<<<<<<< + * can_skip + * and py_db.show_return_values + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":900 + * can_skip = True + * + * if can_skip: # <<<<<<<<<<<<<< + * if plugin_manager is not None and (py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): + * can_skip = plugin_manager.can_skip(py_db, frame) + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":861 + * can_skip = False + * + * if info.pydev_state == 1: # 1 = 1 # <<<<<<<<<<<<<< + * # we can skip if: + * # - we have no stop marked + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":918 + * # so, that's why the additional checks are there. + * + * if function_breakpoint_on_call_event: # <<<<<<<<<<<<<< + * pass # Do nothing here (just keep on going as we can't skip it). + * + */ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_function_breakpoint_on_call_event); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 918, __pyx_L4_error) + if (__pyx_t_10) { + goto __pyx_L72; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":921 + * pass # Do nothing here (just keep on going as we can't skip it). + * + * elif not breakpoints_for_file: # <<<<<<<<<<<<<< + * if can_skip: + * if has_exception_breakpoints: + */ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoints_for_file); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 921, __pyx_L4_error) + __pyx_t_12 = (!__pyx_t_10); + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":922 + * + * elif not breakpoints_for_file: + * if can_skip: # <<<<<<<<<<<<<< + * if has_exception_breakpoints: + * return self.trace_exception + */ + if (__pyx_v_can_skip) { + + /* "_pydevd_bundle/pydevd_cython.pyx":923 + * elif not breakpoints_for_file: + * if can_skip: + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * return self.trace_exception + * else: + */ + if (__pyx_v_has_exception_breakpoints) { + + /* "_pydevd_bundle/pydevd_cython.pyx":924 + * if can_skip: + * if has_exception_breakpoints: + * return self.trace_exception # <<<<<<<<<<<<<< + * else: + * return None if is_call else NO_FTRACE + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L3_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":923 + * elif not breakpoints_for_file: + * if can_skip: + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * return self.trace_exception + * else: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":926 + * return self.trace_exception + * else: + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + * + * else: + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_7 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 926, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __pyx_t_8; + __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L3_return; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":922 + * + * elif not breakpoints_for_file: + * if can_skip: # <<<<<<<<<<<<<< + * if has_exception_breakpoints: + * return self.trace_exception + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":921 + * pass # Do nothing here (just keep on going as we can't skip it). + * + * elif not breakpoints_for_file: # <<<<<<<<<<<<<< + * if can_skip: + * if has_exception_breakpoints: + */ + goto __pyx_L72; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":930 + * else: + * # When cached, 0 means we don't have a breakpoint and 1 means we have. + * if can_skip: # <<<<<<<<<<<<<< + * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) + * if breakpoints_in_line_cache == 0: + */ + /*else*/ { + if (__pyx_v_can_skip) { + + /* "_pydevd_bundle/pydevd_cython.pyx":931 + * # When cached, 0 means we don't have a breakpoint and 1 means we have. + * if can_skip: + * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) # <<<<<<<<<<<<<< + * if breakpoints_in_line_cache == 0: + * return self.trace_dispatch + */ + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 931, __pyx_L4_error) + } + __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_frame_skips_cache, __pyx_v_line_cache_key, __pyx_int_neg_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 931, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_breakpoints_in_line_cache = __pyx_t_9; + + /* "_pydevd_bundle/pydevd_cython.pyx":932 + * if can_skip: + * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) + * if breakpoints_in_line_cache == 0: # <<<<<<<<<<<<<< + * return self.trace_dispatch + * + */ + __pyx_t_12 = (__pyx_v_breakpoints_in_line_cache == 0); + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":933 + * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) + * if breakpoints_in_line_cache == 0: + * return self.trace_dispatch # <<<<<<<<<<<<<< + * + * breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 933, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L3_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":932 + * if can_skip: + * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) + * if breakpoints_in_line_cache == 0: # <<<<<<<<<<<<<< + * return self.trace_dispatch + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":930 + * else: + * # When cached, 0 means we don't have a breakpoint and 1 means we have. + * if can_skip: # <<<<<<<<<<<<<< + * breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) + * if breakpoints_in_line_cache == 0: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":935 + * return self.trace_dispatch + * + * breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) # <<<<<<<<<<<<<< + * if breakpoints_in_frame_cache != -1: + * # Gotten from cache. + */ + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 935, __pyx_L4_error) + } + __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_frame_skips_cache, __pyx_v_frame_cache_key, __pyx_int_neg_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 935, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 935, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_breakpoints_in_frame_cache = __pyx_t_9; + + /* "_pydevd_bundle/pydevd_cython.pyx":936 + * + * breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) + * if breakpoints_in_frame_cache != -1: # <<<<<<<<<<<<<< + * # Gotten from cache. + * has_breakpoint_in_frame = breakpoints_in_frame_cache == 1 + */ + __pyx_t_12 = (__pyx_v_breakpoints_in_frame_cache != -1L); + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":938 + * if breakpoints_in_frame_cache != -1: + * # Gotten from cache. + * has_breakpoint_in_frame = breakpoints_in_frame_cache == 1 # <<<<<<<<<<<<<< + * + * else: + */ + __pyx_v_has_breakpoint_in_frame = (__pyx_v_breakpoints_in_frame_cache == 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":936 + * + * breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) + * if breakpoints_in_frame_cache != -1: # <<<<<<<<<<<<<< + * # Gotten from cache. + * has_breakpoint_in_frame = breakpoints_in_frame_cache == 1 + */ + goto __pyx_L77; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":941 + * + * else: + * has_breakpoint_in_frame = False # <<<<<<<<<<<<<< + * + * try: + */ + /*else*/ { + __pyx_v_has_breakpoint_in_frame = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":943 + * has_breakpoint_in_frame = False + * + * try: # <<<<<<<<<<<<<< + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_19); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":944 + * + * try: + * func_lines = set() # <<<<<<<<<<<<<< + * for offset_and_lineno in dis.findlinestarts(frame.f_code): + * if offset_and_lineno[1] is not None: + */ + __pyx_t_7 = PySet_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 944, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_func_lines = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":945 + * try: + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): # <<<<<<<<<<<<<< + * if offset_and_lineno[1] is not None: + * func_lines.add(offset_and_lineno[1]) + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_dis); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 945, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_findlinestarts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 945, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 945, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { + __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); + __pyx_t_13 = 0; + __pyx_t_14 = NULL; + } else { + __pyx_t_13 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 945, __pyx_L78_error) + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + for (;;) { + if (likely(!__pyx_t_14)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 945, __pyx_L78_error) + #endif + if (__pyx_t_13 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 945, __pyx_L78_error) + #else + __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 945, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 945, __pyx_L78_error) + #endif + if (__pyx_t_13 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 945, __pyx_L78_error) + #else + __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 945, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + } + } else { + __pyx_t_7 = __pyx_t_14(__pyx_t_1); + if (unlikely(!__pyx_t_7)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 945, __pyx_L78_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_7); + } + __Pyx_XDECREF_SET(__pyx_v_offset_and_lineno, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":946 + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): + * if offset_and_lineno[1] is not None: # <<<<<<<<<<<<<< + * func_lines.add(offset_and_lineno[1]) + * except: + */ + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_offset_and_lineno, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 946, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_12 = (__pyx_t_7 != Py_None); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":947 + * for offset_and_lineno in dis.findlinestarts(frame.f_code): + * if offset_and_lineno[1] is not None: + * func_lines.add(offset_and_lineno[1]) # <<<<<<<<<<<<<< + * except: + * # This is a fallback for implementations where we can't get the function + */ + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_offset_and_lineno, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 947, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_20 = PySet_Add(__pyx_v_func_lines, __pyx_t_7); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 947, __pyx_L78_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":946 + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): + * if offset_and_lineno[1] is not None: # <<<<<<<<<<<<<< + * func_lines.add(offset_and_lineno[1]) + * except: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":945 + * try: + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): # <<<<<<<<<<<<<< + * if offset_and_lineno[1] is not None: + * func_lines.add(offset_and_lineno[1]) + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":943 + * has_breakpoint_in_frame = False + * + * try: # <<<<<<<<<<<<<< + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":967 + * break + * else: + * for bp_line in breakpoints_for_file: # iterate on keys # <<<<<<<<<<<<<< + * if bp_line in func_lines: + * has_breakpoint_in_frame = True + */ + /*else:*/ { + __pyx_t_13 = 0; + if (unlikely(__pyx_v_breakpoints_for_file == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 967, __pyx_L80_except_error) + } + __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_breakpoints_for_file, 1, ((PyObject *)NULL), (&__pyx_t_21), (&__pyx_t_9)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 967, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_7; + __pyx_t_7 = 0; + while (1) { + __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_21, &__pyx_t_13, &__pyx_t_7, NULL, NULL, __pyx_t_9); + if (unlikely(__pyx_t_11 == 0)) break; + if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 967, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 967, __pyx_L80_except_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_bp_line = __pyx_t_11; + + /* "_pydevd_bundle/pydevd_cython.pyx":968 + * else: + * for bp_line in breakpoints_for_file: # iterate on keys + * if bp_line in func_lines: # <<<<<<<<<<<<<< + * has_breakpoint_in_frame = True + * break + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_bp_line); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 968, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_12 = (__Pyx_PySet_ContainsTF(__pyx_t_7, __pyx_v_func_lines, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 968, __pyx_L80_except_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":969 + * for bp_line in breakpoints_for_file: # iterate on keys + * if bp_line in func_lines: + * has_breakpoint_in_frame = True # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_has_breakpoint_in_frame = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":970 + * if bp_line in func_lines: + * has_breakpoint_in_frame = True + * break # <<<<<<<<<<<<<< + * + * # Cache the value (1 or 0 or -1 for default because of cython). + */ + goto __pyx_L89_break; + + /* "_pydevd_bundle/pydevd_cython.pyx":968 + * else: + * for bp_line in breakpoints_for_file: # iterate on keys + * if bp_line in func_lines: # <<<<<<<<<<<<<< + * has_breakpoint_in_frame = True + * break + */ + } + } + __pyx_L89_break:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + goto __pyx_L83_try_end; + __pyx_L78_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":948 + * if offset_and_lineno[1] is not None: + * func_lines.add(offset_and_lineno[1]) + * except: # <<<<<<<<<<<<<< + * # This is a fallback for implementations where we can't get the function + * # lines -- i.e.: jython (in this case clients need to provide the function + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 948, __pyx_L80_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + + /* "_pydevd_bundle/pydevd_cython.pyx":955 + * + * # Checks the breakpoint to see if there is a context match in some function. + * curr_func_name = frame.f_code.co_name # <<<<<<<<<<<<<< + * + * # global context is set with an empty name + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 955, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 955, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(0, 955, __pyx_L80_except_error) + __pyx_v_curr_func_name = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":958 + * + * # global context is set with an empty name + * if curr_func_name in ("?", "", ""): # <<<<<<<<<<<<<< + * curr_func_name = "" + * + */ + __Pyx_INCREF(__pyx_v_curr_func_name); + __pyx_t_22 = __pyx_v_curr_func_name; + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_22, __pyx_kp_s__4, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 958, __pyx_L80_except_error) + if (!__pyx_t_10) { + } else { + __pyx_t_12 = __pyx_t_10; + goto __pyx_L94_bool_binop_done; + } + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_22, __pyx_kp_s_module, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 958, __pyx_L80_except_error) + if (!__pyx_t_10) { + } else { + __pyx_t_12 = __pyx_t_10; + goto __pyx_L94_bool_binop_done; + } + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_22, __pyx_kp_s_lambda, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 958, __pyx_L80_except_error) + __pyx_t_12 = __pyx_t_10; + __pyx_L94_bool_binop_done:; + __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; + __pyx_t_10 = __pyx_t_12; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":959 + * # global context is set with an empty name + * if curr_func_name in ("?", "", ""): + * curr_func_name = "" # <<<<<<<<<<<<<< + * + * for bp in breakpoints_for_file.values(): + */ + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_DECREF_SET(__pyx_v_curr_func_name, __pyx_kp_s_); + + /* "_pydevd_bundle/pydevd_cython.pyx":958 + * + * # global context is set with an empty name + * if curr_func_name in ("?", "", ""): # <<<<<<<<<<<<<< + * curr_func_name = "" + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":961 + * curr_func_name = "" + * + * for bp in breakpoints_for_file.values(): # <<<<<<<<<<<<<< + * # will match either global or some function + * if bp.func_name in ("None", curr_func_name): + */ + __pyx_t_21 = 0; + if (unlikely(__pyx_v_breakpoints_for_file == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 961, __pyx_L80_except_error) + } + __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_breakpoints_for_file, 1, __pyx_n_s_values, (&__pyx_t_13), (&__pyx_t_9)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); + __pyx_t_4 = __pyx_t_6; + __pyx_t_6 = 0; + while (1) { + __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_13, &__pyx_t_21, NULL, &__pyx_t_6, NULL, __pyx_t_9); + if (unlikely(__pyx_t_11 == 0)) break; + if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 961, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_bp, __pyx_t_6); + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":963 + * for bp in breakpoints_for_file.values(): + * # will match either global or some function + * if bp.func_name in ("None", curr_func_name): # <<<<<<<<<<<<<< + * has_breakpoint_in_frame = True + * break + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_bp, __pyx_n_s_func_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 963, __pyx_L80_except_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_None, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 963, __pyx_L80_except_error) + if (!__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L100_bool_binop_done; + } + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_v_curr_func_name, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 963, __pyx_L80_except_error) + __pyx_t_10 = __pyx_t_12; + __pyx_L100_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_12 = __pyx_t_10; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":964 + * # will match either global or some function + * if bp.func_name in ("None", curr_func_name): + * has_breakpoint_in_frame = True # <<<<<<<<<<<<<< + * break + * else: + */ + __pyx_v_has_breakpoint_in_frame = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":965 + * if bp.func_name in ("None", curr_func_name): + * has_breakpoint_in_frame = True + * break # <<<<<<<<<<<<<< + * else: + * for bp_line in breakpoints_for_file: # iterate on keys + */ + goto __pyx_L98_break; + + /* "_pydevd_bundle/pydevd_cython.pyx":963 + * for bp in breakpoints_for_file.values(): + * # will match either global or some function + * if bp.func_name in ("None", curr_func_name): # <<<<<<<<<<<<<< + * has_breakpoint_in_frame = True + * break + */ + } + } + __pyx_L98_break:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L79_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":943 + * has_breakpoint_in_frame = False + * + * try: # <<<<<<<<<<<<<< + * func_lines = set() + * for offset_and_lineno in dis.findlinestarts(frame.f_code): + */ + __pyx_L80_except_error:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); + goto __pyx_L4_error; + __pyx_L79_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); + __pyx_L83_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":973 + * + * # Cache the value (1 or 0 or -1 for default because of cython). + * if has_breakpoint_in_frame: # <<<<<<<<<<<<<< + * frame_skips_cache[frame_cache_key] = 1 + * else: + */ + if (__pyx_v_has_breakpoint_in_frame) { + + /* "_pydevd_bundle/pydevd_cython.pyx":974 + * # Cache the value (1 or 0 or -1 for default because of cython). + * if has_breakpoint_in_frame: + * frame_skips_cache[frame_cache_key] = 1 # <<<<<<<<<<<<<< + * else: + * frame_skips_cache[frame_cache_key] = 0 + */ + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 974, __pyx_L4_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_frame_skips_cache, __pyx_v_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 974, __pyx_L4_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":973 + * + * # Cache the value (1 or 0 or -1 for default because of cython). + * if has_breakpoint_in_frame: # <<<<<<<<<<<<<< + * frame_skips_cache[frame_cache_key] = 1 + * else: + */ + goto __pyx_L102; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":976 + * frame_skips_cache[frame_cache_key] = 1 + * else: + * frame_skips_cache[frame_cache_key] = 0 # <<<<<<<<<<<<<< + * + * if can_skip and not has_breakpoint_in_frame: + */ + /*else*/ { + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 976, __pyx_L4_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_frame_skips_cache, __pyx_v_frame_cache_key, __pyx_int_0) < 0))) __PYX_ERR(0, 976, __pyx_L4_error) + } + __pyx_L102:; + } + __pyx_L77:; + + /* "_pydevd_bundle/pydevd_cython.pyx":978 + * frame_skips_cache[frame_cache_key] = 0 + * + * if can_skip and not has_breakpoint_in_frame: # <<<<<<<<<<<<<< + * if has_exception_breakpoints: + * return self.trace_exception + */ + if (__pyx_v_can_skip) { + } else { + __pyx_t_12 = __pyx_v_can_skip; + goto __pyx_L104_bool_binop_done; + } + __pyx_t_10 = (!__pyx_v_has_breakpoint_in_frame); + __pyx_t_12 = __pyx_t_10; + __pyx_L104_bool_binop_done:; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":979 + * + * if can_skip and not has_breakpoint_in_frame: + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * return self.trace_exception + * else: + */ + if (__pyx_v_has_exception_breakpoints) { + + /* "_pydevd_bundle/pydevd_cython.pyx":980 + * if can_skip and not has_breakpoint_in_frame: + * if has_exception_breakpoints: + * return self.trace_exception # <<<<<<<<<<<<<< + * else: + * return None if is_call else NO_FTRACE + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 980, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L3_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":979 + * + * if can_skip and not has_breakpoint_in_frame: + * if has_exception_breakpoints: # <<<<<<<<<<<<<< + * return self.trace_exception + * else: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":982 + * return self.trace_exception + * else: + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + * + * # We may have hit a breakpoint or we are already in step mode. Either way, let's check what we should do in this frame + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_8 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 982, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_t_7; + __pyx_t_7 = 0; + } + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L3_return; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":978 + * frame_skips_cache[frame_cache_key] = 0 + * + * if can_skip and not has_breakpoint_in_frame: # <<<<<<<<<<<<<< + * if has_exception_breakpoints: + * return self.trace_exception + */ + } + } + __pyx_L72:; + + /* "_pydevd_bundle/pydevd_cython.pyx":856 + * return self.trace_dispatch + * + * if not is_exception_event: # <<<<<<<<<<<<<< + * breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1]) + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":987 + * # if DEBUG: print('NOT skipped: %s %s %s %s' % (frame.f_lineno, frame.f_code.co_name, event, frame.__class__.__name__)) + * + * try: # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = False + * # return is not taken into account for breakpoint hit because we'd have a double-hit in this case + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_17); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":988 + * + * try: + * stop_on_plugin_breakpoint = False # <<<<<<<<<<<<<< + * # return is not taken into account for breakpoint hit because we'd have a double-hit in this case + * # (one for the line and the other for the return). + */ + __pyx_v_stop_on_plugin_breakpoint = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":992 + * # (one for the line and the other for the return). + * + * stop_info = {} # <<<<<<<<<<<<<< + * breakpoint = None + * stop = False + */ + __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 992, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_v_stop_info = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":993 + * + * stop_info = {} + * breakpoint = None # <<<<<<<<<<<<<< + * stop = False + * stop_reason = 111 + */ + __Pyx_INCREF(Py_None); + __pyx_v_breakpoint = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":994 + * stop_info = {} + * breakpoint = None + * stop = False # <<<<<<<<<<<<<< + * stop_reason = 111 + * bp_type = None + */ + __pyx_v_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":995 + * breakpoint = None + * stop = False + * stop_reason = 111 # <<<<<<<<<<<<<< + * bp_type = None + * + */ + __Pyx_INCREF(__pyx_int_111); + __pyx_v_stop_reason = __pyx_int_111; + + /* "_pydevd_bundle/pydevd_cython.pyx":996 + * stop = False + * stop_reason = 111 + * bp_type = None # <<<<<<<<<<<<<< + * + * if function_breakpoint_on_call_event: + */ + __Pyx_INCREF(Py_None); + __pyx_v_bp_type = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":998 + * bp_type = None + * + * if function_breakpoint_on_call_event: # <<<<<<<<<<<<<< + * breakpoint = function_breakpoint_on_call_event + * stop = True + */ + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_function_breakpoint_on_call_event); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 998, __pyx_L107_error) + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":999 + * + * if function_breakpoint_on_call_event: + * breakpoint = function_breakpoint_on_call_event # <<<<<<<<<<<<<< + * stop = True + * new_frame = frame + */ + __Pyx_INCREF(__pyx_v_function_breakpoint_on_call_event); + __Pyx_DECREF_SET(__pyx_v_breakpoint, __pyx_v_function_breakpoint_on_call_event); + + /* "_pydevd_bundle/pydevd_cython.pyx":1000 + * if function_breakpoint_on_call_event: + * breakpoint = function_breakpoint_on_call_event + * stop = True # <<<<<<<<<<<<<< + * new_frame = frame + * stop_reason = CMD_SET_FUNCTION_BREAK + */ + __pyx_v_stop = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1001 + * breakpoint = function_breakpoint_on_call_event + * stop = True + * new_frame = frame # <<<<<<<<<<<<<< + * stop_reason = CMD_SET_FUNCTION_BREAK + * + */ + __Pyx_INCREF(__pyx_v_frame); + __pyx_v_new_frame = __pyx_v_frame; + + /* "_pydevd_bundle/pydevd_cython.pyx":1002 + * stop = True + * new_frame = frame + * stop_reason = CMD_SET_FUNCTION_BREAK # <<<<<<<<<<<<<< + * + * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CMD_SET_FUNCTION_BREAK); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1002, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF_SET(__pyx_v_stop_reason, __pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":998 + * bp_type = None + * + * if function_breakpoint_on_call_event: # <<<<<<<<<<<<<< + * breakpoint = function_breakpoint_on_call_event + * stop = True + */ + goto __pyx_L113; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1004 + * stop_reason = CMD_SET_FUNCTION_BREAK + * + * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: # <<<<<<<<<<<<<< + * breakpoint = breakpoints_for_file[line] + * new_frame = frame + */ + if (__pyx_v_is_line) { + } else { + __pyx_t_12 = __pyx_v_is_line; + goto __pyx_L114_bool_binop_done; + } + __pyx_t_10 = (__pyx_v_info->pydev_state != 2); + if (__pyx_t_10) { + } else { + __pyx_t_12 = __pyx_t_10; + goto __pyx_L114_bool_binop_done; + } + if (unlikely(!__pyx_v_breakpoints_for_file)) { __Pyx_RaiseUnboundLocalError("breakpoints_for_file"); __PYX_ERR(0, 1004, __pyx_L107_error) } + __pyx_t_10 = (__pyx_v_breakpoints_for_file != ((PyObject*)Py_None)); + if (__pyx_t_10) { + } else { + __pyx_t_12 = __pyx_t_10; + goto __pyx_L114_bool_binop_done; + } + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1004, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(!__pyx_v_breakpoints_for_file)) { __Pyx_RaiseUnboundLocalError("breakpoints_for_file"); __PYX_ERR(0, 1004, __pyx_L107_error) } + if (unlikely(__pyx_v_breakpoints_for_file == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1004, __pyx_L107_error) + } + __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_t_8, __pyx_v_breakpoints_for_file, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1004, __pyx_L107_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = __pyx_t_10; + __pyx_L114_bool_binop_done:; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1005 + * + * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: + * breakpoint = breakpoints_for_file[line] # <<<<<<<<<<<<<< + * new_frame = frame + * stop = True + */ + if (unlikely(!__pyx_v_breakpoints_for_file)) { __Pyx_RaiseUnboundLocalError("breakpoints_for_file"); __PYX_ERR(0, 1005, __pyx_L107_error) } + if (unlikely(__pyx_v_breakpoints_for_file == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1005, __pyx_L107_error) + } + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1005, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_breakpoints_for_file, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1005, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v_breakpoint, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1006 + * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: + * breakpoint = breakpoints_for_file[line] + * new_frame = frame # <<<<<<<<<<<<<< + * stop = True + * + */ + __Pyx_INCREF(__pyx_v_frame); + __pyx_v_new_frame = __pyx_v_frame; + + /* "_pydevd_bundle/pydevd_cython.pyx":1007 + * breakpoint = breakpoints_for_file[line] + * new_frame = frame + * stop = True # <<<<<<<<<<<<<< + * + * elif plugin_manager is not None and py_db.has_plugin_line_breaks: + */ + __pyx_v_stop = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1004 + * stop_reason = CMD_SET_FUNCTION_BREAK + * + * elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: # <<<<<<<<<<<<<< + * breakpoint = breakpoints_for_file[line] + * new_frame = frame + */ + goto __pyx_L113; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1009 + * stop = True + * + * elif plugin_manager is not None and py_db.has_plugin_line_breaks: # <<<<<<<<<<<<<< + * result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) + * if result: + */ + __pyx_t_10 = (__pyx_v_plugin_manager != Py_None); + if (__pyx_t_10) { + } else { + __pyx_t_12 = __pyx_t_10; + goto __pyx_L118_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1009, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1009, __pyx_L107_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_12 = __pyx_t_10; + __pyx_L118_bool_binop_done:; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1010 + * + * elif plugin_manager is not None and py_db.has_plugin_line_breaks: + * result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) # <<<<<<<<<<<<<< + * if result: + * stop_on_plugin_breakpoint = True + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_get_breakpoint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1010, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1010, __pyx_L107_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_py_db, __pyx_v_frame, __pyx_v_event, __pyx_t_1}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1010, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_v_result = __pyx_t_7; + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1011 + * elif plugin_manager is not None and py_db.has_plugin_line_breaks: + * result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) + * if result: # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = True + * breakpoint, new_frame, bp_type = result + */ + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1011, __pyx_L107_error) + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1012 + * result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) + * if result: + * stop_on_plugin_breakpoint = True # <<<<<<<<<<<<<< + * breakpoint, new_frame, bp_type = result + * + */ + __pyx_v_stop_on_plugin_breakpoint = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1013 + * if result: + * stop_on_plugin_breakpoint = True + * breakpoint, new_frame, bp_type = result # <<<<<<<<<<<<<< + * + * if breakpoint: + */ + if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { + PyObject* sequence = __pyx_v_result; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1013, __pyx_L107_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_7 = PyList_GET_ITEM(sequence, 0); + __pyx_t_8 = PyList_GET_ITEM(sequence, 1); + __pyx_t_1 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); + #else + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1013, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1013, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_4 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1013, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); + index = 0; __pyx_t_7 = __pyx_t_15(__pyx_t_4); if (unlikely(!__pyx_t_7)) goto __pyx_L121_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 1; __pyx_t_8 = __pyx_t_15(__pyx_t_4); if (unlikely(!__pyx_t_8)) goto __pyx_L121_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 2; __pyx_t_1 = __pyx_t_15(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L121_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_4), 3) < 0) __PYX_ERR(0, 1013, __pyx_L107_error) + __pyx_t_15 = NULL; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L122_unpacking_done; + __pyx_L121_unpacking_failed:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_15 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1013, __pyx_L107_error) + __pyx_L122_unpacking_done:; + } + __Pyx_DECREF_SET(__pyx_v_breakpoint, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_v_new_frame = __pyx_t_8; + __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v_bp_type, __pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1011 + * elif plugin_manager is not None and py_db.has_plugin_line_breaks: + * result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) + * if result: # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = True + * breakpoint, new_frame, bp_type = result + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1009 + * stop = True + * + * elif plugin_manager is not None and py_db.has_plugin_line_breaks: # <<<<<<<<<<<<<< + * result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) + * if result: + */ + } + __pyx_L113:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1015 + * breakpoint, new_frame, bp_type = result + * + * if breakpoint: # <<<<<<<<<<<<<< + * # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint + * # lets do the conditional stuff here + */ + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1015, __pyx_L107_error) + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1018 + * # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint + * # lets do the conditional stuff here + * if breakpoint.expression is not None: # <<<<<<<<<<<<<< + * py_db.handle_breakpoint_expression(breakpoint, info, new_frame) + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_expression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = (__pyx_t_1 != Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1019 + * # lets do the conditional stuff here + * if breakpoint.expression is not None: + * py_db.handle_breakpoint_expression(breakpoint, info, new_frame) # <<<<<<<<<<<<<< + * + * if stop or stop_on_plugin_breakpoint: + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_handle_breakpoint_expression); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1019, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); __PYX_ERR(0, 1019, __pyx_L107_error) } + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_breakpoint, ((PyObject *)__pyx_v_info), __pyx_v_new_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1018 + * # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint + * # lets do the conditional stuff here + * if breakpoint.expression is not None: # <<<<<<<<<<<<<< + * py_db.handle_breakpoint_expression(breakpoint, info, new_frame) + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1021 + * py_db.handle_breakpoint_expression(breakpoint, info, new_frame) + * + * if stop or stop_on_plugin_breakpoint: # <<<<<<<<<<<<<< + * eval_result = False + * if breakpoint.has_condition: + */ + if (!__pyx_v_stop) { + } else { + __pyx_t_12 = __pyx_v_stop; + goto __pyx_L126_bool_binop_done; + } + __pyx_t_12 = __pyx_v_stop_on_plugin_breakpoint; + __pyx_L126_bool_binop_done:; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1022 + * + * if stop or stop_on_plugin_breakpoint: + * eval_result = False # <<<<<<<<<<<<<< + * if breakpoint.has_condition: + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + */ + __Pyx_INCREF(Py_False); + __pyx_v_eval_result = Py_False; + + /* "_pydevd_bundle/pydevd_cython.pyx":1023 + * if stop or stop_on_plugin_breakpoint: + * eval_result = False + * if breakpoint.has_condition: # <<<<<<<<<<<<<< + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + * if not eval_result: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_has_condition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1023, __pyx_L107_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1024 + * eval_result = False + * if breakpoint.has_condition: + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) # <<<<<<<<<<<<<< + * if not eval_result: + * stop = False + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_handle_breakpoint_condition); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1024, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); __PYX_ERR(0, 1024, __pyx_L107_error) } + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_7, ((PyObject *)__pyx_v_info), __pyx_v_breakpoint, __pyx_v_new_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF_SET(__pyx_v_eval_result, __pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1025 + * if breakpoint.has_condition: + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + * if not eval_result: # <<<<<<<<<<<<<< + * stop = False + * stop_on_plugin_breakpoint = False + */ + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_eval_result); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1025, __pyx_L107_error) + __pyx_t_10 = (!__pyx_t_12); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1026 + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + * if not eval_result: + * stop = False # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = False + * + */ + __pyx_v_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1027 + * if not eval_result: + * stop = False + * stop_on_plugin_breakpoint = False # <<<<<<<<<<<<<< + * + * if is_call and ( + */ + __pyx_v_stop_on_plugin_breakpoint = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1025 + * if breakpoint.has_condition: + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + * if not eval_result: # <<<<<<<<<<<<<< + * stop = False + * stop_on_plugin_breakpoint = False + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1023 + * if stop or stop_on_plugin_breakpoint: + * eval_result = False + * if breakpoint.has_condition: # <<<<<<<<<<<<<< + * eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + * if not eval_result: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1021 + * py_db.handle_breakpoint_expression(breakpoint, info, new_frame) + * + * if stop or stop_on_plugin_breakpoint: # <<<<<<<<<<<<<< + * eval_result = False + * if breakpoint.has_condition: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1029 + * stop_on_plugin_breakpoint = False + * + * if is_call and ( # <<<<<<<<<<<<<< + * frame.f_code.co_name in ("", "") or (line == 1 and frame.f_code.co_name.startswith("", "") or (line == 1 and frame.f_code.co_name.startswith("", "") or (line == 1 and frame.f_code.co_name.startswith(". + * + * return self.trace_dispatch # <<<<<<<<<<<<<< + * + * # Handle logpoint (on a logpoint we should never stop). + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1043, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L111_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1029 + * stop_on_plugin_breakpoint = False + * + * if is_call and ( # <<<<<<<<<<<<<< + * frame.f_code.co_name in ("", "") or (line == 1 and frame.f_code.co_name.startswith(" 0: + */ + __pyx_v_stop_on_plugin_breakpoint = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1050 + * stop_on_plugin_breakpoint = False + * + * if info.pydev_message is not None and len(info.pydev_message) > 0: # <<<<<<<<<<<<<< + * cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, "1") + * py_db.writer.add_command(cmd) + */ + __pyx_t_16 = (__pyx_v_info->pydev_message != ((PyObject*)Py_None)); + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L142_bool_binop_done; + } + __pyx_t_8 = __pyx_v_info->pydev_message; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_13 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1050, __pyx_L107_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_16 = (__pyx_t_13 > 0); + __pyx_t_10 = __pyx_t_16; + __pyx_L142_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1051 + * + * if info.pydev_message is not None and len(info.pydev_message) > 0: + * cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, "1") # <<<<<<<<<<<<<< + * py_db.writer.add_command(cmd) + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_cmd_factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_make_io_message); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1051, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_linesep); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1051, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Add(__pyx_v_info->pydev_message, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_1, __pyx_kp_s_1}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1051, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_v_cmd = __pyx_t_8; + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1052 + * if info.pydev_message is not None and len(info.pydev_message) > 0: + * cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, "1") + * py_db.writer.add_command(cmd) # <<<<<<<<<<<<<< + * + * if py_db.show_return_values: + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_writer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1052, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_add_command); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_cmd}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1052, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1050 + * stop_on_plugin_breakpoint = False + * + * if info.pydev_message is not None and len(info.pydev_message) > 0: # <<<<<<<<<<<<<< + * cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, "1") + * py_db.writer.add_command(cmd) + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1046 + * + * # Handle logpoint (on a logpoint we should never stop). + * if (stop or stop_on_plugin_breakpoint) and breakpoint.is_logpoint: # <<<<<<<<<<<<<< + * stop = False + * stop_on_plugin_breakpoint = False + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1015 + * breakpoint, new_frame, bp_type = result + * + * if breakpoint: # <<<<<<<<<<<<<< + * # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint + * # lets do the conditional stuff here + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1054 + * py_db.writer.add_command(cmd) + * + * if py_db.show_return_values: # <<<<<<<<<<<<<< + * if is_return and ( + * ( + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1054, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1054, __pyx_L107_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1055 + * + * if py_db.show_return_values: + * if is_return and ( # <<<<<<<<<<<<<< + * ( + * info.pydev_step_cmd in (108, 159, 128) + */ + if (__pyx_v_is_return) { + } else { + __pyx_t_10 = __pyx_v_is_return; + goto __pyx_L146_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1057 + * if is_return and ( + * ( + * info.pydev_step_cmd in (108, 159, 128) # <<<<<<<<<<<<<< + * and (self._is_same_frame(stop_frame, frame.f_back)) + * ) + */ + switch (__pyx_v_info->pydev_step_cmd) { + case 0x6C: + case 0x9F: + case 0x80: + __pyx_t_16 = 1; + break; + default: + __pyx_t_16 = 0; + break; + } + __pyx_t_12 = __pyx_t_16; + if (!__pyx_t_12) { + goto __pyx_L148_next_or; + } else { + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1058 + * ( + * info.pydev_step_cmd in (108, 159, 128) + * and (self._is_same_frame(stop_frame, frame.f_back)) # <<<<<<<<<<<<<< + * ) + * or (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1058, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1058, __pyx_L107_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L146_bool_binop_done; + } + __pyx_L148_next_or:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1060 + * and (self._is_same_frame(stop_frame, frame.f_back)) + * ) + * or (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) # <<<<<<<<<<<<<< + * or (info.pydev_step_cmd in (107, 206)) + * or ( + */ + switch (__pyx_v_info->pydev_step_cmd) { + case 0x6D: + case 0xA0: + __pyx_t_12 = 1; + break; + default: + __pyx_t_12 = 0; + break; + } + __pyx_t_16 = __pyx_t_12; + if (!__pyx_t_16) { + goto __pyx_L150_next_or; + } else { + } + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1060, __pyx_L107_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L146_bool_binop_done; + } + __pyx_L150_next_or:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1061 + * ) + * or (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) + * or (info.pydev_step_cmd in (107, 206)) # <<<<<<<<<<<<<< + * or ( + * info.pydev_step_cmd == 144 + */ + switch (__pyx_v_info->pydev_step_cmd) { + case 0x6B: + case 0xCE: + __pyx_t_16 = 1; + break; + default: + __pyx_t_16 = 0; + break; + } + __pyx_t_12 = __pyx_t_16; + if (!__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L146_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1063 + * or (info.pydev_step_cmd in (107, 206)) + * or ( + * info.pydev_step_cmd == 144 # <<<<<<<<<<<<<< + * and frame.f_back is not None + * and not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + */ + __pyx_t_12 = (__pyx_v_info->pydev_step_cmd == 0x90); + if (__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L146_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1064 + * or ( + * info.pydev_step_cmd == 144 + * and frame.f_back is not None # <<<<<<<<<<<<<< + * and not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + * ) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1064, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = (__pyx_t_1 != Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L146_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1065 + * info.pydev_step_cmd == 144 + * and frame.f_back is not None + * and not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) # <<<<<<<<<<<<<< + * ) + * ): + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1065, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1065, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1065, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1065, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1065, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_t_7, __pyx_t_4, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1065, __pyx_L107_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_16 = (!__pyx_t_12); + __pyx_t_10 = __pyx_t_16; + __pyx_L146_bool_binop_done:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1055 + * + * if py_db.show_return_values: + * if is_return and ( # <<<<<<<<<<<<<< + * ( + * info.pydev_step_cmd in (108, 159, 128) + */ + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1068 + * ) + * ): + * self._show_return_values(frame, arg) # <<<<<<<<<<<<<< + * + * elif py_db.remove_return_values_flag: + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_show_return_values(__pyx_v_self, __pyx_v_frame, __pyx_v_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1055 + * + * if py_db.show_return_values: + * if is_return and ( # <<<<<<<<<<<<<< + * ( + * info.pydev_step_cmd in (108, 159, 128) + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1054 + * py_db.writer.add_command(cmd) + * + * if py_db.show_return_values: # <<<<<<<<<<<<<< + * if is_return and ( + * ( + */ + goto __pyx_L144; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1070 + * self._show_return_values(frame, arg) + * + * elif py_db.remove_return_values_flag: # <<<<<<<<<<<<<< + * try: + * self._remove_return_values(py_db, frame) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_remove_return_values_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1070, __pyx_L107_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1071 + * + * elif py_db.remove_return_values_flag: + * try: # <<<<<<<<<<<<<< + * self._remove_return_values(py_db, frame) + * finally: + */ + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1072 + * elif py_db.remove_return_values_flag: + * try: + * self._remove_return_values(py_db, frame) # <<<<<<<<<<<<<< + * finally: + * py_db.remove_return_values_flag = False + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_remove_return_values(__pyx_v_self, __pyx_v_py_db, __pyx_v_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L156_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1074 + * self._remove_return_values(py_db, frame) + * finally: + * py_db.remove_return_values_flag = False # <<<<<<<<<<<<<< + * + * if stop: + */ + /*finally:*/ { + /*normal exit:*/{ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_py_db, __pyx_n_s_remove_return_values_flag, Py_False) < 0) __PYX_ERR(0, 1074, __pyx_L107_error) + goto __pyx_L157; + } + __pyx_L156_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_27); + __Pyx_XGOTREF(__pyx_t_28); + __Pyx_XGOTREF(__pyx_t_29); + __pyx_t_9 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_23 = __pyx_filename; + { + if (__Pyx_PyObject_SetAttrStr(__pyx_v_py_db, __pyx_n_s_remove_return_values_flag, Py_False) < 0) __PYX_ERR(0, 1074, __pyx_L159_error) + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29); + } + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_ErrRestore(__pyx_t_24, __pyx_t_25, __pyx_t_26); + __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; + __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_23; + goto __pyx_L107_error; + __pyx_L159_error:; + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29); + } + __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; + __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; + __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0; + __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; + goto __pyx_L107_error; + } + __pyx_L157:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1070 + * self._show_return_values(frame, arg) + * + * elif py_db.remove_return_values_flag: # <<<<<<<<<<<<<< + * try: + * self._remove_return_values(py_db, frame) + */ + } + __pyx_L144:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1076 + * py_db.remove_return_values_flag = False + * + * if stop: # <<<<<<<<<<<<<< + * self.set_suspend( + * thread, + */ + if (__pyx_v_stop) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1077 + * + * if stop: + * self.set_suspend( # <<<<<<<<<<<<<< + * thread, + * stop_reason, + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1079 + * self.set_suspend( + * thread, + * stop_reason, # <<<<<<<<<<<<<< + * suspend_other_threads=breakpoint and breakpoint.suspend_policy == "ALL", + * ) + */ + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1077, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_GIVEREF(__pyx_v_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_thread)) __PYX_ERR(0, 1077, __pyx_L107_error); + __Pyx_INCREF(__pyx_v_stop_reason); + __Pyx_GIVEREF(__pyx_v_stop_reason); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_stop_reason)) __PYX_ERR(0, 1077, __pyx_L107_error); + + /* "_pydevd_bundle/pydevd_cython.pyx":1080 + * thread, + * stop_reason, + * suspend_other_threads=breakpoint and breakpoint.suspend_policy == "ALL", # <<<<<<<<<<<<<< + * ) + * + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1080, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1080, __pyx_L107_error) + if (__pyx_t_10) { + } else { + __Pyx_INCREF(__pyx_v_breakpoint); + __pyx_t_7 = __pyx_v_breakpoint; + goto __pyx_L161_bool_binop_done; + } + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_suspend_policy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1080, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_n_s_ALL, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1080, __pyx_L107_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_7 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L161_bool_binop_done:; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_suspend_other_threads, __pyx_t_7) < 0) __PYX_ERR(0, 1080, __pyx_L107_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1077 + * + * if stop: + * self.set_suspend( # <<<<<<<<<<<<<< + * thread, + * stop_reason, + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1077, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1076 + * py_db.remove_return_values_flag = False + * + * if stop: # <<<<<<<<<<<<<< + * self.set_suspend( + * thread, + */ + goto __pyx_L160; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1083 + * ) + * + * elif stop_on_plugin_breakpoint and plugin_manager is not None: # <<<<<<<<<<<<<< + * result = plugin_manager.suspend(py_db, thread, frame, bp_type) + * if result: + */ + if (__pyx_v_stop_on_plugin_breakpoint) { + } else { + __pyx_t_10 = __pyx_v_stop_on_plugin_breakpoint; + goto __pyx_L163_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_plugin_manager != Py_None); + __pyx_t_10 = __pyx_t_16; + __pyx_L163_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1084 + * + * elif stop_on_plugin_breakpoint and plugin_manager is not None: + * result = plugin_manager.suspend(py_db, thread, frame, bp_type) # <<<<<<<<<<<<<< + * if result: + * frame = result + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_suspend); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_py_db, __pyx_v_thread, __pyx_v_frame, __pyx_v_bp_type}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1084, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1085 + * elif stop_on_plugin_breakpoint and plugin_manager is not None: + * result = plugin_manager.suspend(py_db, thread, frame, bp_type) + * if result: # <<<<<<<<<<<<<< + * frame = result + * + */ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1085, __pyx_L107_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1086 + * result = plugin_manager.suspend(py_db, thread, frame, bp_type) + * if result: + * frame = result # <<<<<<<<<<<<<< + * + * # if thread has a suspend flag, we suspend with a busy wait + */ + __Pyx_INCREF(__pyx_v_result); + __Pyx_DECREF_SET(__pyx_v_frame, __pyx_v_result); + + /* "_pydevd_bundle/pydevd_cython.pyx":1085 + * elif stop_on_plugin_breakpoint and plugin_manager is not None: + * result = plugin_manager.suspend(py_db, thread, frame, bp_type) + * if result: # <<<<<<<<<<<<<< + * frame = result + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1083 + * ) + * + * elif stop_on_plugin_breakpoint and plugin_manager is not None: # <<<<<<<<<<<<<< + * result = plugin_manager.suspend(py_db, thread, frame, bp_type) + * if result: + */ + } + __pyx_L160:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1089 + * + * # if thread has a suspend flag, we suspend with a busy wait + * if info.pydev_state == 2: # <<<<<<<<<<<<<< + * self.do_wait_suspend(thread, frame, event, arg) + * return self.trace_dispatch + */ + __pyx_t_10 = (__pyx_v_info->pydev_state == 2); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1090 + * # if thread has a suspend flag, we suspend with a busy wait + * if info.pydev_state == 2: + * self.do_wait_suspend(thread, frame, event, arg) # <<<<<<<<<<<<<< + * return self.trace_dispatch + * else: + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_thread, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1090, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1091 + * if info.pydev_state == 2: + * self.do_wait_suspend(thread, frame, event, arg) + * return self.trace_dispatch # <<<<<<<<<<<<<< + * else: + * if not breakpoint and is_line: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1091, __pyx_L107_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L111_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1089 + * + * # if thread has a suspend flag, we suspend with a busy wait + * if info.pydev_state == 2: # <<<<<<<<<<<<<< + * self.do_wait_suspend(thread, frame, event, arg) + * return self.trace_dispatch + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1093 + * return self.trace_dispatch + * else: + * if not breakpoint and is_line: # <<<<<<<<<<<<<< + * # No stop from anyone and no breakpoint found in line (cache that). + * frame_skips_cache[line_cache_key] = 0 + */ + /*else*/ { + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1093, __pyx_L107_error) + __pyx_t_12 = (!__pyx_t_16); + if (__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L168_bool_binop_done; + } + __pyx_t_10 = __pyx_v_is_line; + __pyx_L168_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1095 + * if not breakpoint and is_line: + * # No stop from anyone and no breakpoint found in line (cache that). + * frame_skips_cache[line_cache_key] = 0 # <<<<<<<<<<<<<< + * + * except: + */ + if (unlikely(__pyx_v_frame_skips_cache == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1095, __pyx_L107_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_frame_skips_cache, __pyx_v_line_cache_key, __pyx_int_0) < 0))) __PYX_ERR(0, 1095, __pyx_L107_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1093 + * return self.trace_dispatch + * else: + * if not breakpoint and is_line: # <<<<<<<<<<<<<< + * # No stop from anyone and no breakpoint found in line (cache that). + * frame_skips_cache[line_cache_key] = 0 + */ + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":987 + * # if DEBUG: print('NOT skipped: %s %s %s %s' % (frame.f_lineno, frame.f_code.co_name, event, frame.__class__.__name__)) + * + * try: # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = False + * # return is not taken into account for breakpoint hit because we'd have a double-hit in this case + */ + } + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + goto __pyx_L112_try_end; + __pyx_L107_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1097 + * frame_skips_cache[line_cache_key] = 0 + * + * except: # <<<<<<<<<<<<<< + * # Unfortunately Python itself stops the tracing when it originates from + * # the tracing function, so, we can't do much about it (just let the user know). + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_8) < 0) __PYX_ERR(0, 1097, __pyx_L109_except_error) + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_8); + + /* "_pydevd_bundle/pydevd_cython.pyx":1100 + * # Unfortunately Python itself stops the tracing when it originates from + * # the tracing function, so, we can't do much about it (just let the user know). + * exc = sys.exc_info()[0] # <<<<<<<<<<<<<< + * cmd = py_db.cmd_factory.make_console_message( + * "%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n" + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1100, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1100, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_exc = __pyx_t_6; + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1101 + * # the tracing function, so, we can't do much about it (just let the user know). + * exc = sys.exc_info()[0] + * cmd = py_db.cmd_factory.make_console_message( # <<<<<<<<<<<<<< + * "%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n" + * % ( + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_cmd_factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_make_console_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1101, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1104 + * "%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n" + * % ( + * exc, # <<<<<<<<<<<<<< + * thread, + * ) + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1104, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_exc); + __Pyx_GIVEREF(__pyx_v_exc); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_exc)) __PYX_ERR(0, 1104, __pyx_L109_except_error); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_GIVEREF(__pyx_v_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_thread)) __PYX_ERR(0, 1104, __pyx_L109_except_error); + + /* "_pydevd_bundle/pydevd_cython.pyx":1103 + * cmd = py_db.cmd_factory.make_console_message( + * "%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n" + * % ( # <<<<<<<<<<<<<< + * exc, + * thread, + */ + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_raised_from_within_the_callba, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_2}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1101, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_cmd, __pyx_t_6); + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1108 + * ) + * ) + * py_db.writer.add_command(cmd) # <<<<<<<<<<<<<< + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + * pydev_log.exception() + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_writer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1108, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add_command); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1108, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_cmd}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1108, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1109 + * ) + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< + * pydev_log.exception() + * + */ + __pyx_t_10 = PyObject_IsSubclass(__pyx_v_exc, __pyx_tuple__5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1109, __pyx_L109_except_error) + __pyx_t_12 = (!__pyx_t_10); + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1110 + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + * pydev_log.exception() # <<<<<<<<<<<<<< + * + * raise + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1110, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1110, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1110, __pyx_L109_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1109 + * ) + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< + * pydev_log.exception() + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1112 + * pydev_log.exception() + * + * raise # <<<<<<<<<<<<<< + * + * # step handling. We stop when we hit the right frame + */ + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_4, __pyx_t_8); + __pyx_t_7 = 0; __pyx_t_4 = 0; __pyx_t_8 = 0; + __PYX_ERR(0, 1112, __pyx_L109_except_error) + } + + /* "_pydevd_bundle/pydevd_cython.pyx":987 + * # if DEBUG: print('NOT skipped: %s %s %s %s' % (frame.f_lineno, frame.f_code.co_name, event, frame.__class__.__name__)) + * + * try: # <<<<<<<<<<<<<< + * stop_on_plugin_breakpoint = False + * # return is not taken into account for breakpoint hit because we'd have a double-hit in this case + */ + __pyx_L109_except_error:; + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17); + goto __pyx_L4_error; + __pyx_L111_try_return:; + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17); + goto __pyx_L3_return; + __pyx_L112_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1115 + * + * # step handling. We stop when we hit the right frame + * try: # <<<<<<<<<<<<<< + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_19); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1116 + * # step handling. We stop when we hit the right frame + * try: + * should_skip = 0 # <<<<<<<<<<<<<< + * if pydevd_dont_trace.should_trace_hook is not None: + * if self.should_skip == -1: + */ + __pyx_v_should_skip = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1117 + * try: + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< + * if self.should_skip == -1: + * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1117, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1117, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = (__pyx_t_4 != Py_None); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1118 + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: + * if self.should_skip == -1: # <<<<<<<<<<<<<< + * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). + * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code + */ + __pyx_t_12 = (__pyx_v_self->should_skip == -1L); + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1122 + * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code + * # Which will be handled by this frame is read-only, so, we can cache it safely. + * if not pydevd_dont_trace.should_trace_hook(frame.f_code, abs_path_canonical_path_and_base[0]): # <<<<<<<<<<<<<< + * # -1, 0, 1 to be Cython-friendly + * should_skip = self.should_skip = 1 + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1122, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1122, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1122, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_v_abs_path_canonical_path_and_base == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1122, __pyx_L173_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_canonical_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1122, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_8, __pyx_t_6}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1122, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1122, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_10 = (!__pyx_t_12); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1124 + * if not pydevd_dont_trace.should_trace_hook(frame.f_code, abs_path_canonical_path_and_base[0]): + * # -1, 0, 1 to be Cython-friendly + * should_skip = self.should_skip = 1 # <<<<<<<<<<<<<< + * else: + * should_skip = self.should_skip = 0 + */ + __pyx_v_should_skip = 1; + __pyx_v_self->should_skip = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1122 + * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code + * # Which will be handled by this frame is read-only, so, we can cache it safely. + * if not pydevd_dont_trace.should_trace_hook(frame.f_code, abs_path_canonical_path_and_base[0]): # <<<<<<<<<<<<<< + * # -1, 0, 1 to be Cython-friendly + * should_skip = self.should_skip = 1 + */ + goto __pyx_L181; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1126 + * should_skip = self.should_skip = 1 + * else: + * should_skip = self.should_skip = 0 # <<<<<<<<<<<<<< + * else: + * should_skip = self.should_skip + */ + /*else*/ { + __pyx_v_should_skip = 0; + __pyx_v_self->should_skip = 0; + } + __pyx_L181:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1118 + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: + * if self.should_skip == -1: # <<<<<<<<<<<<<< + * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). + * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code + */ + goto __pyx_L180; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1128 + * should_skip = self.should_skip = 0 + * else: + * should_skip = self.should_skip # <<<<<<<<<<<<<< + * + * plugin_stop = False + */ + /*else*/ { + __pyx_t_11 = __pyx_v_self->should_skip; + __pyx_v_should_skip = __pyx_t_11; + } + __pyx_L180:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1117 + * try: + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< + * if self.should_skip == -1: + * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1130 + * should_skip = self.should_skip + * + * plugin_stop = False # <<<<<<<<<<<<<< + * if should_skip: + * stop = False + */ + __Pyx_INCREF(Py_False); + __pyx_v_plugin_stop = Py_False; + + /* "_pydevd_bundle/pydevd_cython.pyx":1131 + * + * plugin_stop = False + * if should_skip: # <<<<<<<<<<<<<< + * stop = False + * + */ + __pyx_t_10 = (__pyx_v_should_skip != 0); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1132 + * plugin_stop = False + * if should_skip: + * stop = False # <<<<<<<<<<<<<< + * + * elif step_cmd in (107, 144, 206): + */ + __pyx_v_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1131 + * + * plugin_stop = False + * if should_skip: # <<<<<<<<<<<<<< + * stop = False + * + */ + goto __pyx_L182; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1134 + * stop = False + * + * elif step_cmd in (107, 144, 206): # <<<<<<<<<<<<<< + * force_check_project_scope = step_cmd == 144 + * if is_line: + */ + switch (__pyx_v_step_cmd) { + case 0x6B: + case 0x90: + case 0xCE: + __pyx_t_10 = 1; + break; + default: + __pyx_t_10 = 0; + break; + } + __pyx_t_12 = __pyx_t_10; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1135 + * + * elif step_cmd in (107, 144, 206): + * force_check_project_scope = step_cmd == 144 # <<<<<<<<<<<<<< + * if is_line: + * if not info.pydev_use_scoped_step_frame: + */ + __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_step_cmd == 0x90)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1135, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_force_check_project_scope = __pyx_t_4; + __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1136 + * elif step_cmd in (107, 144, 206): + * force_check_project_scope = step_cmd == 144 + * if is_line: # <<<<<<<<<<<<<< + * if not info.pydev_use_scoped_step_frame: + * if force_check_project_scope or py_db.is_files_filter_enabled: + */ + if (__pyx_v_is_line) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1137 + * force_check_project_scope = step_cmd == 144 + * if is_line: + * if not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * if force_check_project_scope or py_db.is_files_filter_enabled: + * stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + */ + __pyx_t_12 = (!__pyx_v_info->pydev_use_scoped_step_frame); + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1138 + * if is_line: + * if not info.pydev_use_scoped_step_frame: + * if force_check_project_scope or py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + * else: + */ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_force_check_project_scope); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1138, __pyx_L173_error) + if (!__pyx_t_10) { + } else { + __pyx_t_12 = __pyx_t_10; + goto __pyx_L186_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1138, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1138, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_12 = __pyx_t_10; + __pyx_L186_bool_binop_done:; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1139 + * if not info.pydev_use_scoped_step_frame: + * if force_check_project_scope or py_db.is_files_filter_enabled: + * stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) # <<<<<<<<<<<<<< + * else: + * stop = True + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1139, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1139, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1139, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_frame, __pyx_t_8, __pyx_v_force_check_project_scope}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1139, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_stop = (!__pyx_t_12); + + /* "_pydevd_bundle/pydevd_cython.pyx":1138 + * if is_line: + * if not info.pydev_use_scoped_step_frame: + * if force_check_project_scope or py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + * else: + */ + goto __pyx_L185; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1141 + * stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + * else: + * stop = True # <<<<<<<<<<<<<< + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: + */ + /*else*/ { + __pyx_v_stop = 1; + } + __pyx_L185:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1137 + * force_check_project_scope = step_cmd == 144 + * if is_line: + * if not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * if force_check_project_scope or py_db.is_files_filter_enabled: + * stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + */ + goto __pyx_L184; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1143 + * stop = True + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * # Make sure we check the filtering inside ipython calls too... + * if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): + */ + /*else*/ { + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_force_check_project_scope); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1143, __pyx_L173_error) + if (!__pyx_t_10) { + } else { + __pyx_t_12 = __pyx_t_10; + goto __pyx_L189_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1143, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1143, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_12 = __pyx_t_10; + __pyx_L189_bool_binop_done:; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1145 + * if force_check_project_scope or py_db.is_files_filter_enabled: + * # Make sure we check the filtering inside ipython calls too... + * if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): # <<<<<<<<<<<<<< + * return None if is_call else NO_FTRACE + * + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1145, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1145, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1145, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_v_frame, __pyx_t_6, __pyx_v_force_check_project_scope}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1145, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1145, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_10 = (!(!__pyx_t_12)); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1146 + * # Make sure we check the filtering inside ipython calls too... + * if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + * + * # We can only stop inside the ipython call. + */ + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_4 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1146, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __pyx_t_7; + __pyx_t_7 = 0; + } + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L177_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1145 + * if force_check_project_scope or py_db.is_files_filter_enabled: + * # Make sure we check the filtering inside ipython calls too... + * if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): # <<<<<<<<<<<<<< + * return None if is_call else NO_FTRACE + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1143 + * stop = True + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * # Make sure we check the filtering inside ipython calls too... + * if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1149 + * + * # We can only stop inside the ipython call. + * filename = frame.f_code.co_filename # <<<<<<<<<<<<<< + * if filename.endswith(".pyc"): + * filename = filename[:-1] + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1149, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1149, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_filename = __pyx_t_7; + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1150 + * # We can only stop inside the ipython call. + * filename = frame.f_code.co_filename + * if filename.endswith(".pyc"): # <<<<<<<<<<<<<< + * filename = filename[:-1] + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1150, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_pyc}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1150, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1150, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1151 + * filename = frame.f_code.co_filename + * if filename.endswith(".pyc"): + * filename = filename[:-1] # <<<<<<<<<<<<<< + * + * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): + */ + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_filename, 0, -1L, NULL, NULL, &__pyx_slice__6, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1151, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1150 + * # We can only stop inside the ipython call. + * filename = frame.f_code.co_filename + * if filename.endswith(".pyc"): # <<<<<<<<<<<<<< + * filename = filename[:-1] + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1153 + * filename = filename[:-1] + * + * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): # <<<<<<<<<<<<<< + * f = frame.f_back + * while f is not None: + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1153, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1153, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1153, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1153, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1153, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_12 = (!__pyx_t_10); + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1154 + * + * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): + * f = frame.f_back # <<<<<<<<<<<<<< + * while f is not None: + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1154, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1155 + * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): + * f = frame.f_back + * while f is not None: # <<<<<<<<<<<<<< + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f2 = f.f_back + */ + while (1) { + __pyx_t_12 = (__pyx_v_f != Py_None); + if (!__pyx_t_12) break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1156 + * f = frame.f_back + * while f is not None: + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: # <<<<<<<<<<<<<< + * f2 = f.f_back + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1156, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1156, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1156, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1156, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1156, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1157 + * while f is not None: + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f2 = f.f_back # <<<<<<<<<<<<<< + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + * pydev_log.debug("Stop inside ipython call") + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1157, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_f2, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1158 + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f2 = f.f_back + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: # <<<<<<<<<<<<<< + * pydev_log.debug("Stop inside ipython call") + * stop = True + */ + __pyx_t_10 = (__pyx_v_f2 != Py_None); + if (__pyx_t_10) { + } else { + __pyx_t_12 = __pyx_t_10; + goto __pyx_L198_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f2, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1158, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1158, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1158, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_7, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1158, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1158, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1158, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_12 = __pyx_t_10; + __pyx_L198_bool_binop_done:; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1159 + * f2 = f.f_back + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + * pydev_log.debug("Stop inside ipython call") # <<<<<<<<<<<<<< + * stop = True + * break + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_debug); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1159, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_Stop_inside_ipython_call}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1159, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1160 + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + * pydev_log.debug("Stop inside ipython call") + * stop = True # <<<<<<<<<<<<<< + * break + * f = f.f_back + */ + __pyx_v_stop = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1161 + * pydev_log.debug("Stop inside ipython call") + * stop = True + * break # <<<<<<<<<<<<<< + * f = f.f_back + * + */ + goto __pyx_L195_break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1158 + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + * f2 = f.f_back + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: # <<<<<<<<<<<<<< + * pydev_log.debug("Stop inside ipython call") + * stop = True + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1156 + * f = frame.f_back + * while f is not None: + * if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: # <<<<<<<<<<<<<< + * f2 = f.f_back + * if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1162 + * stop = True + * break + * f = f.f_back # <<<<<<<<<<<<<< + * + * del f + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1162, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_7); + __pyx_t_7 = 0; + } + __pyx_L195_break:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1164 + * f = f.f_back + * + * del f # <<<<<<<<<<<<<< + * + * if not stop: + */ + __Pyx_DECREF(__pyx_v_f); __pyx_v_f = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1153 + * filename = filename[:-1] + * + * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): # <<<<<<<<<<<<<< + * f = frame.f_back + * while f is not None: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1166 + * del f + * + * if not stop: # <<<<<<<<<<<<<< + * # In scoped mode if step in didn't work in this context it won't work + * # afterwards anyways. + */ + __pyx_t_12 = (!__pyx_v_stop); + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1169 + * # In scoped mode if step in didn't work in this context it won't work + * # afterwards anyways. + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + * + * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: + */ + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_7 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1169, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __pyx_t_8; + __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L177_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1166 + * del f + * + * if not stop: # <<<<<<<<<<<<<< + * # In scoped mode if step in didn't work in this context it won't work + * # afterwards anyways. + */ + } + } + __pyx_L184:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1136 + * elif step_cmd in (107, 144, 206): + * force_check_project_scope = step_cmd == 144 + * if is_line: # <<<<<<<<<<<<<< + * if not info.pydev_use_scoped_step_frame: + * if force_check_project_scope or py_db.is_files_filter_enabled: + */ + goto __pyx_L183; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1171 + * return None if is_call else NO_FTRACE + * + * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + * stop = False + */ + if (__pyx_v_is_return) { + } else { + __pyx_t_12 = __pyx_v_is_return; + goto __pyx_L201_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1171, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = (__pyx_t_7 != Py_None); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_10) { + } else { + __pyx_t_12 = __pyx_t_10; + goto __pyx_L201_bool_binop_done; + } + __pyx_t_10 = (!__pyx_v_info->pydev_use_scoped_step_frame); + __pyx_t_12 = __pyx_t_10; + __pyx_L201_bool_binop_done:; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1172 + * + * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: # <<<<<<<<<<<<<< + * stop = False + * else: + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_file_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1172, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1172, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1172, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_PYDEV_FILE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1172, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_7, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1172, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1172, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1173 + * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + * stop = False # <<<<<<<<<<<<<< + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: + */ + __pyx_v_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1172 + * + * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: # <<<<<<<<<<<<<< + * stop = False + * else: + */ + goto __pyx_L204; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1175 + * stop = False + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * stop = not py_db.apply_files_filter( + * frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope + */ + /*else*/ { + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_force_check_project_scope); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1175, __pyx_L173_error) + if (!__pyx_t_10) { + } else { + __pyx_t_12 = __pyx_t_10; + goto __pyx_L206_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1175, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1175, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_12 = __pyx_t_10; + __pyx_L206_bool_binop_done:; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1176 + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: + * stop = not py_db.apply_files_filter( # <<<<<<<<<<<<<< + * frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope + * ) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1176, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "_pydevd_bundle/pydevd_cython.pyx":1177 + * if force_check_project_scope or py_db.is_files_filter_enabled: + * stop = not py_db.apply_files_filter( + * frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope # <<<<<<<<<<<<<< + * ) + * if stop: + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1177, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1177, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1177, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_7, __pyx_t_6, __pyx_v_force_check_project_scope}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1176, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1176 + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: + * stop = not py_db.apply_files_filter( # <<<<<<<<<<<<<< + * frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope + * ) + */ + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1176, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_stop = (!__pyx_t_12); + + /* "_pydevd_bundle/pydevd_cython.pyx":1179 + * frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope + * ) + * if stop: # <<<<<<<<<<<<<< + * # Prevent stopping in a return to the same location we were initially + * # (i.e.: double-stop at the same place due to some filtering). + */ + if (__pyx_v_stop) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1182 + * # Prevent stopping in a return to the same location we were initially + * # (i.e.: double-stop at the same place due to some filtering). + * if info.step_in_initial_location == (frame.f_back, frame.f_back.f_lineno): # <<<<<<<<<<<<<< + * stop = False + * else: + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1182, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1182, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1182, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L173_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(0, 1182, __pyx_L173_error); + __pyx_t_4 = 0; + __pyx_t_6 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_v_info->step_in_initial_location, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1182, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1182, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1183 + * # (i.e.: double-stop at the same place due to some filtering). + * if info.step_in_initial_location == (frame.f_back, frame.f_back.f_lineno): + * stop = False # <<<<<<<<<<<<<< + * else: + * stop = True + */ + __pyx_v_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1182 + * # Prevent stopping in a return to the same location we were initially + * # (i.e.: double-stop at the same place due to some filtering). + * if info.step_in_initial_location == (frame.f_back, frame.f_back.f_lineno): # <<<<<<<<<<<<<< + * stop = False + * else: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1179 + * frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope + * ) + * if stop: # <<<<<<<<<<<<<< + * # Prevent stopping in a return to the same location we were initially + * # (i.e.: double-stop at the same place due to some filtering). + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1175 + * stop = False + * else: + * if force_check_project_scope or py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * stop = not py_db.apply_files_filter( + * frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope + */ + goto __pyx_L205; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1185 + * stop = False + * else: + * stop = True # <<<<<<<<<<<<<< + * else: + * stop = False + */ + /*else*/ { + __pyx_v_stop = 1; + } + __pyx_L205:; + } + __pyx_L204:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1171 + * return None if is_call else NO_FTRACE + * + * elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: # <<<<<<<<<<<<<< + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + * stop = False + */ + goto __pyx_L183; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1187 + * stop = True + * else: + * stop = False # <<<<<<<<<<<<<< + * + * if stop: + */ + /*else*/ { + __pyx_v_stop = 0; + } + __pyx_L183:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1189 + * stop = False + * + * if stop: # <<<<<<<<<<<<<< + * if step_cmd == 206: + * # i.e.: Check if we're stepping into the proper context. + */ + if (__pyx_v_stop) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1190 + * + * if stop: + * if step_cmd == 206: # <<<<<<<<<<<<<< + * # i.e.: Check if we're stepping into the proper context. + * f = frame + */ + __pyx_t_12 = (__pyx_v_step_cmd == 0xCE); + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1192 + * if step_cmd == 206: + * # i.e.: Check if we're stepping into the proper context. + * f = frame # <<<<<<<<<<<<<< + * while f is not None: + * if self._is_same_frame(stop_frame, f): + */ + __Pyx_INCREF(__pyx_v_frame); + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_v_frame); + + /* "_pydevd_bundle/pydevd_cython.pyx":1193 + * # i.e.: Check if we're stepping into the proper context. + * f = frame + * while f is not None: # <<<<<<<<<<<<<< + * if self._is_same_frame(stop_frame, f): + * break + */ + while (1) { + __pyx_t_12 = (__pyx_v_f != Py_None); + if (!__pyx_t_12) break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1194 + * f = frame + * while f is not None: + * if self._is_same_frame(stop_frame, f): # <<<<<<<<<<<<<< + * break + * f = f.f_back + */ + __pyx_t_6 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_f); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1194, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1194, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1195 + * while f is not None: + * if self._is_same_frame(stop_frame, f): + * break # <<<<<<<<<<<<<< + * f = f.f_back + * else: + */ + goto __pyx_L213_break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1194 + * f = frame + * while f is not None: + * if self._is_same_frame(stop_frame, f): # <<<<<<<<<<<<<< + * break + * f = f.f_back + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1196 + * if self._is_same_frame(stop_frame, f): + * break + * f = f.f_back # <<<<<<<<<<<<<< + * else: + * stop = False + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1196, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_6); + __pyx_t_6 = 0; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1198 + * f = f.f_back + * else: + * stop = False # <<<<<<<<<<<<<< + * + * if plugin_manager is not None: + */ + /*else*/ { + __pyx_v_stop = 0; + } + __pyx_L213_break:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1190 + * + * if stop: + * if step_cmd == 206: # <<<<<<<<<<<<<< + * # i.e.: Check if we're stepping into the proper context. + * f = frame + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1189 + * stop = False + * + * if stop: # <<<<<<<<<<<<<< + * if step_cmd == 206: + * # i.e.: Check if we're stepping into the proper context. + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1200 + * stop = False + * + * if plugin_manager is not None: # <<<<<<<<<<<<<< + * result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: + */ + __pyx_t_12 = (__pyx_v_plugin_manager != Py_None); + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1201 + * + * if plugin_manager is not None: + * result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) # <<<<<<<<<<<<<< + * if result: + * stop, plugin_stop = result + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_cmd_step_into); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1201, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1201, __pyx_L173_error) + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1201, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1201, __pyx_L173_error) + } + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1201, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_stop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1201, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[8] = {__pyx_t_2, __pyx_v_py_db, __pyx_v_frame, __pyx_v_event, __pyx_t_4, __pyx_t_7, __pyx_v_stop_info, __pyx_t_3}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 7+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1201, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_6); + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1202 + * if plugin_manager is not None: + * result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: # <<<<<<<<<<<<<< + * stop, plugin_stop = result + * + */ + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1202, __pyx_L173_error) + if (__pyx_t_12) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1203 + * result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: + * stop, plugin_stop = result # <<<<<<<<<<<<<< + * + * elif step_cmd in (108, 159): + */ + if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { + PyObject* sequence = __pyx_v_result; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1203, __pyx_L173_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_8 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + #else + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1203, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1203, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_6 = __pyx_t_15(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L217_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_8 = __pyx_t_15(__pyx_t_3); if (unlikely(!__pyx_t_8)) goto __pyx_L217_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1203, __pyx_L173_error) + __pyx_t_15 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L218_unpacking_done; + __pyx_L217_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_15 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1203, __pyx_L173_error) + __pyx_L218_unpacking_done:; + } + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_stop = __pyx_t_12; + __Pyx_DECREF_SET(__pyx_v_plugin_stop, __pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1202 + * if plugin_manager is not None: + * result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: # <<<<<<<<<<<<<< + * stop, plugin_stop = result + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1200 + * stop = False + * + * if plugin_manager is not None: # <<<<<<<<<<<<<< + * result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1134 + * stop = False + * + * elif step_cmd in (107, 144, 206): # <<<<<<<<<<<<<< + * force_check_project_scope = step_cmd == 144 + * if is_line: + */ + goto __pyx_L182; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1205 + * stop, plugin_stop = result + * + * elif step_cmd in (108, 159): # <<<<<<<<<<<<<< + * # Note: when dealing with a step over my code it's the same as a step over (the + * # difference is that when we return from a frame in one we go to regular step + */ + switch (__pyx_v_step_cmd) { + case 0x6C: + case 0x9F: + __pyx_t_12 = 1; + break; + default: + __pyx_t_12 = 0; + break; + } + __pyx_t_10 = __pyx_t_12; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1209 + * # difference is that when we return from a frame in one we go to regular step + * # into and in the other we go to a step into my code). + * stop = self._is_same_frame(stop_frame, frame) and is_line # <<<<<<<<<<<<<< + * # Note: don't stop on a return for step over, only for line events + * # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. + */ + __pyx_t_8 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1209, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1209, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L219_bool_binop_done; + } + __pyx_t_10 = __pyx_v_is_line; + __pyx_L219_bool_binop_done:; + __pyx_v_stop = __pyx_t_10; + + /* "_pydevd_bundle/pydevd_cython.pyx":1213 + * # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. + * + * if plugin_manager is not None: # <<<<<<<<<<<<<< + * result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: + */ + __pyx_t_10 = (__pyx_v_plugin_manager != Py_None); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1214 + * + * if plugin_manager is not None: + * result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) # <<<<<<<<<<<<<< + * if result: + * stop, plugin_stop = result + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_cmd_step_over); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1214, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1214, __pyx_L173_error) + } + __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1214, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1214, __pyx_L173_error) + } + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1214, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_stop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[8] = {__pyx_t_2, __pyx_v_py_db, __pyx_v_frame, __pyx_v_event, __pyx_t_3, __pyx_t_7, __pyx_v_stop_info, __pyx_t_4}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 7+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1214, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1215 + * if plugin_manager is not None: + * result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: # <<<<<<<<<<<<<< + * stop, plugin_stop = result + * + */ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1215, __pyx_L173_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1216 + * result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: + * stop, plugin_stop = result # <<<<<<<<<<<<<< + * + * elif step_cmd == 128: + */ + if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { + PyObject* sequence = __pyx_v_result; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1216, __pyx_L173_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_8 = PyList_GET_ITEM(sequence, 0); + __pyx_t_6 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + #else + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1216, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1216, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_4 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1216, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); + index = 0; __pyx_t_8 = __pyx_t_15(__pyx_t_4); if (unlikely(!__pyx_t_8)) goto __pyx_L223_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 1; __pyx_t_6 = __pyx_t_15(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L223_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1216, __pyx_L173_error) + __pyx_t_15 = NULL; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L224_unpacking_done; + __pyx_L223_unpacking_failed:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_15 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1216, __pyx_L173_error) + __pyx_L224_unpacking_done:; + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1216, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_stop = __pyx_t_10; + __Pyx_DECREF_SET(__pyx_v_plugin_stop, __pyx_t_6); + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1215 + * if plugin_manager is not None: + * result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: # <<<<<<<<<<<<<< + * stop, plugin_stop = result + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1213 + * # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. + * + * if plugin_manager is not None: # <<<<<<<<<<<<<< + * result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + * if result: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1205 + * stop, plugin_stop = result + * + * elif step_cmd in (108, 159): # <<<<<<<<<<<<<< + * # Note: when dealing with a step over my code it's the same as a step over (the + * # difference is that when we return from a frame in one we go to regular step + */ + goto __pyx_L182; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1218 + * stop, plugin_stop = result + * + * elif step_cmd == 128: # <<<<<<<<<<<<<< + * stop = False + * back = frame.f_back + */ + __pyx_t_10 = (__pyx_v_step_cmd == 0x80); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1219 + * + * elif step_cmd == 128: + * stop = False # <<<<<<<<<<<<<< + * back = frame.f_back + * if self._is_same_frame(stop_frame, frame) and is_return: + */ + __pyx_v_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1220 + * elif step_cmd == 128: + * stop = False + * back = frame.f_back # <<<<<<<<<<<<<< + * if self._is_same_frame(stop_frame, frame) and is_return: + * # We're exiting the smart step into initial frame (so, we probably didn't find our target). + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1220, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_back = __pyx_t_6; + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1221 + * stop = False + * back = frame.f_back + * if self._is_same_frame(stop_frame, frame) and is_return: # <<<<<<<<<<<<<< + * # We're exiting the smart step into initial frame (so, we probably didn't find our target). + * stop = True + */ + __pyx_t_6 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1221, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1221, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L226_bool_binop_done; + } + __pyx_t_10 = __pyx_v_is_return; + __pyx_L226_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1223 + * if self._is_same_frame(stop_frame, frame) and is_return: + * # We're exiting the smart step into initial frame (so, we probably didn't find our target). + * stop = True # <<<<<<<<<<<<<< + * + * elif self._is_same_frame(stop_frame, back) and is_line: + */ + __pyx_v_stop = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1221 + * stop = False + * back = frame.f_back + * if self._is_same_frame(stop_frame, frame) and is_return: # <<<<<<<<<<<<<< + * # We're exiting the smart step into initial frame (so, we probably didn't find our target). + * stop = True + */ + goto __pyx_L225; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1225 + * stop = True + * + * elif self._is_same_frame(stop_frame, back) and is_line: # <<<<<<<<<<<<<< + * if info.pydev_smart_child_offset != -1: + * # i.e.: in this case, we're not interested in the pause in the parent, rather + */ + __pyx_t_6 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1225, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1225, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L228_bool_binop_done; + } + __pyx_t_10 = __pyx_v_is_line; + __pyx_L228_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1226 + * + * elif self._is_same_frame(stop_frame, back) and is_line: + * if info.pydev_smart_child_offset != -1: # <<<<<<<<<<<<<< + * # i.e.: in this case, we're not interested in the pause in the parent, rather + * # we're interested in the pause in the child (when the parent is at the proper place). + */ + __pyx_t_10 = (__pyx_v_info->pydev_smart_child_offset != -1L); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1229 + * # i.e.: in this case, we're not interested in the pause in the parent, rather + * # we're interested in the pause in the child (when the parent is at the proper place). + * stop = False # <<<<<<<<<<<<<< + * + * else: + */ + __pyx_v_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1226 + * + * elif self._is_same_frame(stop_frame, back) and is_line: + * if info.pydev_smart_child_offset != -1: # <<<<<<<<<<<<<< + * # i.e.: in this case, we're not interested in the pause in the parent, rather + * # we're interested in the pause in the child (when the parent is at the proper place). + */ + goto __pyx_L230; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1232 + * + * else: + * pydev_smart_parent_offset = info.pydev_smart_parent_offset # <<<<<<<<<<<<<< + * + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + */ + /*else*/ { + __pyx_t_11 = __pyx_v_info->pydev_smart_parent_offset; + __pyx_v_pydev_smart_parent_offset = __pyx_t_11; + + /* "_pydevd_bundle/pydevd_cython.pyx":1234 + * pydev_smart_parent_offset = info.pydev_smart_parent_offset + * + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants # <<<<<<<<<<<<<< + * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: + * # Preferred mode (when the smart step into variants are available + */ + __pyx_t_6 = __pyx_v_info->pydev_smart_step_into_variants; + __Pyx_INCREF(__pyx_t_6); + __pyx_v_pydev_smart_step_into_variants = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1235 + * + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: # <<<<<<<<<<<<<< + * # Preferred mode (when the smart step into variants are available + * # and the offset is set). + */ + __pyx_t_12 = (__pyx_v_pydev_smart_parent_offset >= 0); + if (__pyx_t_12) { + } else { + __pyx_t_10 = __pyx_t_12; + goto __pyx_L232_bool_binop_done; + } + __pyx_t_12 = (__pyx_v_pydev_smart_step_into_variants != Py_None)&&(PyTuple_GET_SIZE(__pyx_v_pydev_smart_step_into_variants) != 0); + __pyx_t_10 = __pyx_t_12; + __pyx_L232_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1238 + * # Preferred mode (when the smart step into variants are available + * # and the offset is set). + * stop = get_smart_step_into_variant_from_frame_offset( # <<<<<<<<<<<<<< + * back.f_lasti, pydev_smart_step_into_variants + * ) is get_smart_step_into_variant_from_frame_offset( + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1238, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "_pydevd_bundle/pydevd_cython.pyx":1239 + * # and the offset is set). + * stop = get_smart_step_into_variant_from_frame_offset( + * back.f_lasti, pydev_smart_step_into_variants # <<<<<<<<<<<<<< + * ) is get_smart_step_into_variant_from_frame_offset( + * pydev_smart_parent_offset, pydev_smart_step_into_variants + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_lasti); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1239, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_4, __pyx_v_pydev_smart_step_into_variants}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1238, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1240 + * stop = get_smart_step_into_variant_from_frame_offset( + * back.f_lasti, pydev_smart_step_into_variants + * ) is get_smart_step_into_variant_from_frame_offset( # <<<<<<<<<<<<<< + * pydev_smart_parent_offset, pydev_smart_step_into_variants + * ) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1240, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "_pydevd_bundle/pydevd_cython.pyx":1241 + * back.f_lasti, pydev_smart_step_into_variants + * ) is get_smart_step_into_variant_from_frame_offset( + * pydev_smart_parent_offset, pydev_smart_step_into_variants # <<<<<<<<<<<<<< + * ) + * + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_pydev_smart_parent_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1241, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_7, __pyx_v_pydev_smart_step_into_variants}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1240, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_10 = (__pyx_t_6 == __pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_stop = __pyx_t_10; + + /* "_pydevd_bundle/pydevd_cython.pyx":1235 + * + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: # <<<<<<<<<<<<<< + * # Preferred mode (when the smart step into variants are available + * # and the offset is set). + */ + goto __pyx_L231; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1246 + * else: + * # Only the name/line is available, so, check that. + * curr_func_name = frame.f_code.co_name # <<<<<<<<<<<<<< + * + * # global context is set with an empty name + */ + /*else*/ { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1246, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_co_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1246, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!(likely(PyString_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_6))) __PYX_ERR(0, 1246, __pyx_L173_error) + __Pyx_XDECREF_SET(__pyx_v_curr_func_name, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1249 + * + * # global context is set with an empty name + * if curr_func_name in ("?", "") or curr_func_name is None: # <<<<<<<<<<<<<< + * curr_func_name = "" + * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: + */ + __Pyx_INCREF(__pyx_v_curr_func_name); + __pyx_t_22 = __pyx_v_curr_func_name; + __pyx_t_16 = (__Pyx_PyString_Equals(__pyx_t_22, __pyx_kp_s__4, Py_EQ)); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1249, __pyx_L173_error) + if (!__pyx_t_16) { + } else { + __pyx_t_12 = __pyx_t_16; + goto __pyx_L237_bool_binop_done; + } + __pyx_t_16 = (__Pyx_PyString_Equals(__pyx_t_22, __pyx_kp_s_module, Py_EQ)); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1249, __pyx_L173_error) + __pyx_t_12 = __pyx_t_16; + __pyx_L237_bool_binop_done:; + __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; + __pyx_t_16 = __pyx_t_12; + if (!__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L235_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_curr_func_name == ((PyObject*)Py_None)); + __pyx_t_10 = __pyx_t_16; + __pyx_L235_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1250 + * # global context is set with an empty name + * if curr_func_name in ("?", "") or curr_func_name is None: + * curr_func_name = "" # <<<<<<<<<<<<<< + * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: + * stop = True + */ + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_DECREF_SET(__pyx_v_curr_func_name, __pyx_kp_s_); + + /* "_pydevd_bundle/pydevd_cython.pyx":1249 + * + * # global context is set with an empty name + * if curr_func_name in ("?", "") or curr_func_name is None: # <<<<<<<<<<<<<< + * curr_func_name = "" + * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1251 + * if curr_func_name in ("?", "") or curr_func_name is None: + * curr_func_name = "" + * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: # <<<<<<<<<<<<<< + * stop = True + * + */ + __pyx_t_16 = (__Pyx_PyString_Equals(__pyx_v_curr_func_name, __pyx_v_info->pydev_func_name, Py_EQ)); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1251, __pyx_L173_error) + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L240_bool_binop_done; + } + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stop_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1251, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_next_line); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1251, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1251, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1251, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_10 = __pyx_t_16; + __pyx_L240_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1252 + * curr_func_name = "" + * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: + * stop = True # <<<<<<<<<<<<<< + * + * if not stop: + */ + __pyx_v_stop = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1251 + * if curr_func_name in ("?", "") or curr_func_name is None: + * curr_func_name = "" + * if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: # <<<<<<<<<<<<<< + * stop = True + * + */ + } + } + __pyx_L231:; + } + __pyx_L230:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1254 + * stop = True + * + * if not stop: # <<<<<<<<<<<<<< + * # In smart step into, if we didn't hit it in this frame once, that'll + * # not be the case next time either, so, disable tracing for this frame. + */ + __pyx_t_10 = (!__pyx_v_stop); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1257 + * # In smart step into, if we didn't hit it in this frame once, that'll + * # not be the case next time either, so, disable tracing for this frame. + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + * + * elif back is not None and self._is_same_frame(stop_frame, back.f_back) and is_line: + */ + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_4 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1257, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __pyx_t_8; + __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L177_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1254 + * stop = True + * + * if not stop: # <<<<<<<<<<<<<< + * # In smart step into, if we didn't hit it in this frame once, that'll + * # not be the case next time either, so, disable tracing for this frame. + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1225 + * stop = True + * + * elif self._is_same_frame(stop_frame, back) and is_line: # <<<<<<<<<<<<<< + * if info.pydev_smart_child_offset != -1: + * # i.e.: in this case, we're not interested in the pause in the parent, rather + */ + goto __pyx_L225; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1259 + * return None if is_call else NO_FTRACE + * + * elif back is not None and self._is_same_frame(stop_frame, back.f_back) and is_line: # <<<<<<<<<<<<<< + * # Ok, we have to track 2 stops at this point, the parent and the child offset. + * # This happens when handling a step into which targets a function inside a list comprehension + */ + __pyx_t_16 = (__pyx_v_back != Py_None); + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L243_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1259, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1259, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1259, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L243_bool_binop_done; + } + __pyx_t_10 = __pyx_v_is_line; + __pyx_L243_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1263 + * # This happens when handling a step into which targets a function inside a list comprehension + * # or generator (in which case an intermediary frame is created due to an internal function call). + * pydev_smart_parent_offset = info.pydev_smart_parent_offset # <<<<<<<<<<<<<< + * pydev_smart_child_offset = info.pydev_smart_child_offset + * # print('matched back frame', pydev_smart_parent_offset, pydev_smart_child_offset) + */ + __pyx_t_11 = __pyx_v_info->pydev_smart_parent_offset; + __pyx_v_pydev_smart_parent_offset = __pyx_t_11; + + /* "_pydevd_bundle/pydevd_cython.pyx":1264 + * # or generator (in which case an intermediary frame is created due to an internal function call). + * pydev_smart_parent_offset = info.pydev_smart_parent_offset + * pydev_smart_child_offset = info.pydev_smart_child_offset # <<<<<<<<<<<<<< + * # print('matched back frame', pydev_smart_parent_offset, pydev_smart_child_offset) + * # print('parent f_lasti', back.f_back.f_lasti) + */ + __pyx_t_11 = __pyx_v_info->pydev_smart_child_offset; + __pyx_v_pydev_smart_child_offset = __pyx_t_11; + + /* "_pydevd_bundle/pydevd_cython.pyx":1268 + * # print('parent f_lasti', back.f_back.f_lasti) + * # print('child f_lasti', back.f_lasti) + * stop = False # <<<<<<<<<<<<<< + * if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + */ + __pyx_v_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1269 + * # print('child f_lasti', back.f_lasti) + * stop = False + * if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: # <<<<<<<<<<<<<< + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + * + */ + __pyx_t_16 = (__pyx_v_pydev_smart_child_offset >= 0); + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L247_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_pydev_smart_child_offset >= 0); + __pyx_t_10 = __pyx_t_16; + __pyx_L247_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1270 + * stop = False + * if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants # <<<<<<<<<<<<<< + * + * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: + */ + __pyx_t_8 = __pyx_v_info->pydev_smart_step_into_variants; + __Pyx_INCREF(__pyx_t_8); + __pyx_v_pydev_smart_step_into_variants = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1272 + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + * + * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: # <<<<<<<<<<<<<< + * # Note that we don't really check the parent offset, only the offset of + * # the child (because this is a generator, the parent may have moved forward + */ + __pyx_t_16 = (__pyx_v_pydev_smart_parent_offset >= 0); + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L250_bool_binop_done; + } + __pyx_t_16 = (__pyx_v_pydev_smart_step_into_variants != Py_None)&&(PyTuple_GET_SIZE(__pyx_v_pydev_smart_step_into_variants) != 0); + __pyx_t_10 = __pyx_t_16; + __pyx_L250_bool_binop_done:; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1277 + * # already -- and that's ok, so, we just check that the parent frame + * # matches in this case). + * smart_step_into_variant = get_smart_step_into_variant_from_frame_offset( # <<<<<<<<<<<<<< + * pydev_smart_parent_offset, pydev_smart_step_into_variants + * ) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1277, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "_pydevd_bundle/pydevd_cython.pyx":1278 + * # matches in this case). + * smart_step_into_variant = get_smart_step_into_variant_from_frame_offset( + * pydev_smart_parent_offset, pydev_smart_step_into_variants # <<<<<<<<<<<<<< + * ) + * # print('matched parent offset', pydev_smart_parent_offset) + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_pydev_smart_parent_offset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1278, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_pydev_smart_step_into_variants}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1277, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_v_smart_step_into_variant = __pyx_t_8; + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1282 + * # print('matched parent offset', pydev_smart_parent_offset) + * # Ok, now, check the child variant + * children_variants = smart_step_into_variant.children_variants # <<<<<<<<<<<<<< + * stop = children_variants and ( + * get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_smart_step_into_variant, __pyx_n_s_children_variants); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1282, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_v_children_variants = __pyx_t_8; + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1283 + * # Ok, now, check the child variant + * children_variants = smart_step_into_variant.children_variants + * stop = children_variants and ( # <<<<<<<<<<<<<< + * get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) + * is get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants) + */ + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_children_variants); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1283, __pyx_L173_error) + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L252_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1284 + * children_variants = smart_step_into_variant.children_variants + * stop = children_variants and ( + * get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) # <<<<<<<<<<<<<< + * is get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants) + * ) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_lasti); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1284, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_children_variants}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1284, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1285 + * stop = children_variants and ( + * get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) + * is get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants) # <<<<<<<<<<<<<< + * ) + * # print('stop at child', stop) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1285, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_pydev_smart_child_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1285, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_7, __pyx_v_children_variants}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1285, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_t_16 = (__pyx_t_8 == __pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_10 = __pyx_t_16; + __pyx_L252_bool_binop_done:; + __pyx_v_stop = __pyx_t_10; + + /* "_pydevd_bundle/pydevd_cython.pyx":1272 + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + * + * if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: # <<<<<<<<<<<<<< + * # Note that we don't really check the parent offset, only the offset of + * # the child (because this is a generator, the parent may have moved forward + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1269 + * # print('child f_lasti', back.f_lasti) + * stop = False + * if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: # <<<<<<<<<<<<<< + * pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1289 + * # print('stop at child', stop) + * + * if not stop: # <<<<<<<<<<<<<< + * # In smart step into, if we didn't hit it in this frame once, that'll + * # not be the case next time either, so, disable tracing for this frame. + */ + __pyx_t_10 = (!__pyx_v_stop); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1292 + * # In smart step into, if we didn't hit it in this frame once, that'll + * # not be the case next time either, so, disable tracing for this frame. + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + * + * elif step_cmd in (109, 160): + */ + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_4 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1292, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __pyx_t_8; + __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L177_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1289 + * # print('stop at child', stop) + * + * if not stop: # <<<<<<<<<<<<<< + * # In smart step into, if we didn't hit it in this frame once, that'll + * # not be the case next time either, so, disable tracing for this frame. + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1259 + * return None if is_call else NO_FTRACE + * + * elif back is not None and self._is_same_frame(stop_frame, back.f_back) and is_line: # <<<<<<<<<<<<<< + * # Ok, we have to track 2 stops at this point, the parent and the child offset. + * # This happens when handling a step into which targets a function inside a list comprehension + */ + } + __pyx_L225:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1218 + * stop, plugin_stop = result + * + * elif step_cmd == 128: # <<<<<<<<<<<<<< + * stop = False + * back = frame.f_back + */ + goto __pyx_L182; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1294 + * return None if is_call else NO_FTRACE + * + * elif step_cmd in (109, 160): # <<<<<<<<<<<<<< + * stop = is_return and self._is_same_frame(stop_frame, frame) + * + */ + switch (__pyx_v_step_cmd) { + case 0x6D: + case 0xA0: + __pyx_t_10 = 1; + break; + default: + __pyx_t_10 = 0; + break; + } + __pyx_t_16 = __pyx_t_10; + if (__pyx_t_16) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1295 + * + * elif step_cmd in (109, 160): + * stop = is_return and self._is_same_frame(stop_frame, frame) # <<<<<<<<<<<<<< + * + * else: + */ + if (__pyx_v_is_return) { + } else { + __pyx_t_16 = __pyx_v_is_return; + goto __pyx_L255_bool_binop_done; + } + __pyx_t_4 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self->__pyx_vtab)->_is_same_frame(__pyx_v_self, __pyx_v_stop_frame, __pyx_v_frame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1295, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_16 = __pyx_t_10; + __pyx_L255_bool_binop_done:; + __pyx_v_stop = __pyx_t_16; + + /* "_pydevd_bundle/pydevd_cython.pyx":1294 + * return None if is_call else NO_FTRACE + * + * elif step_cmd in (109, 160): # <<<<<<<<<<<<<< + * stop = is_return and self._is_same_frame(stop_frame, frame) + * + */ + goto __pyx_L182; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1298 + * + * else: + * stop = False # <<<<<<<<<<<<<< + * + * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): + */ + /*else*/ { + __pyx_v_stop = 0; + } + __pyx_L182:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1300 + * stop = False + * + * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): # <<<<<<<<<<<<<< + * f_code = getattr(frame.f_back, "f_code", None) + * if f_code is not None: + */ + if (__pyx_v_stop) { + } else { + __pyx_t_16 = __pyx_v_stop; + goto __pyx_L258_bool_binop_done; + } + __pyx_t_10 = (__pyx_v_step_cmd != -1L); + if (__pyx_t_10) { + } else { + __pyx_t_16 = __pyx_t_10; + goto __pyx_L258_bool_binop_done; + } + if (__pyx_v_is_return) { + } else { + __pyx_t_16 = __pyx_v_is_return; + goto __pyx_L258_bool_binop_done; + } + __pyx_t_10 = __Pyx_HasAttr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1300, __pyx_L173_error) + __pyx_t_16 = __pyx_t_10; + __pyx_L258_bool_binop_done:; + if (__pyx_t_16) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1301 + * + * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): + * f_code = getattr(frame.f_back, "f_code", None) # <<<<<<<<<<<<<< + * if f_code is not None: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1301, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_GetAttr3(__pyx_t_4, __pyx_n_s_f_code, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1301, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_f_code = __pyx_t_8; + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1302 + * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): + * f_code = getattr(frame.f_back, "f_code", None) + * if f_code is not None: # <<<<<<<<<<<<<< + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + * stop = False + */ + __pyx_t_16 = (__pyx_v_f_code != Py_None); + if (__pyx_t_16) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1303 + * f_code = getattr(frame.f_back, "f_code", None) + * if f_code is not None: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: # <<<<<<<<<<<<<< + * stop = False + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_file_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1303, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_PYDEV_FILE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyObject_RichCompare(__pyx_t_8, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1303, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_16) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1304 + * if f_code is not None: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + * stop = False # <<<<<<<<<<<<<< + * + * if plugin_stop: + */ + __pyx_v_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1303 + * f_code = getattr(frame.f_back, "f_code", None) + * if f_code is not None: + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: # <<<<<<<<<<<<<< + * stop = False + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1302 + * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): + * f_code = getattr(frame.f_back, "f_code", None) + * if f_code is not None: # <<<<<<<<<<<<<< + * if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + * stop = False + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1300 + * stop = False + * + * if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): # <<<<<<<<<<<<<< + * f_code = getattr(frame.f_back, "f_code", None) + * if f_code is not None: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1306 + * stop = False + * + * if plugin_stop: # <<<<<<<<<<<<<< + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + * elif stop: + */ + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_plugin_stop); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1306, __pyx_L173_error) + if (__pyx_t_16) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1307 + * + * if plugin_stop: + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) # <<<<<<<<<<<<<< + * elif stop: + * if is_line: + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_stop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1307, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1307, __pyx_L173_error) + } + __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_args, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1307, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1307, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_py_db, __pyx_v_frame, __pyx_v_event, __pyx_t_8, __pyx_v_stop_info, __pyx_v_arg, __pyx_t_7}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 7+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1307, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1306 + * stop = False + * + * if plugin_stop: # <<<<<<<<<<<<<< + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + * elif stop: + */ + goto __pyx_L264; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1308 + * if plugin_stop: + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + * elif stop: # <<<<<<<<<<<<<< + * if is_line: + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + */ + if (__pyx_v_stop) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1309 + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + * elif stop: + * if is_line: # <<<<<<<<<<<<<< + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * self.do_wait_suspend(thread, frame, event, arg) + */ + if (__pyx_v_is_line) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1310 + * elif stop: + * if is_line: + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) # <<<<<<<<<<<<<< + * self.do_wait_suspend(thread, frame, event, arg) + * elif is_return: # return event + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1310, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1310, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_GIVEREF(__pyx_v_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_thread)) __PYX_ERR(0, 1310, __pyx_L173_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L173_error); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_original_step_cmd); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1310, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_original_step_cmd, __pyx_t_8) < 0) __PYX_ERR(0, 1310, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1310, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1311 + * if is_line: + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * self.do_wait_suspend(thread, frame, event, arg) # <<<<<<<<<<<<<< + * elif is_return: # return event + * back = frame.f_back + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1311, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_7, __pyx_v_thread, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1311, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1309 + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + * elif stop: + * if is_line: # <<<<<<<<<<<<<< + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * self.do_wait_suspend(thread, frame, event, arg) + */ + goto __pyx_L265; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1312 + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * self.do_wait_suspend(thread, frame, event, arg) + * elif is_return: # return event # <<<<<<<<<<<<<< + * back = frame.f_back + * if back is not None: + */ + if (__pyx_v_is_return) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1313 + * self.do_wait_suspend(thread, frame, event, arg) + * elif is_return: # return event + * back = frame.f_back # <<<<<<<<<<<<<< + * if back is not None: + * # When we get to the pydevd run function, the debugging has actually finished for the main thread + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1313, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_back, __pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1314 + * elif is_return: # return event + * back = frame.f_back + * if back is not None: # <<<<<<<<<<<<<< + * # When we get to the pydevd run function, the debugging has actually finished for the main thread + * # (note that it can still go on for other threads, but for this one, we just make it finish) + */ + __pyx_t_16 = (__pyx_v_back != Py_None); + if (__pyx_t_16) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1318 + * # (note that it can still go on for other threads, but for this one, we just make it finish) + * # So, just setting it to None should be OK + * back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) # <<<<<<<<<<<<<< + * if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): + * back = None + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1318, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_back}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1318, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { + PyObject* sequence = __pyx_t_8; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1318, __pyx_L173_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + __pyx_t_6 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1318, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1318, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1318, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1318, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_4 = __pyx_t_15(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L267_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_7 = __pyx_t_15(__pyx_t_3); if (unlikely(!__pyx_t_7)) goto __pyx_L267_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 2; __pyx_t_6 = __pyx_t_15(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L267_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_3), 3) < 0) __PYX_ERR(0, 1318, __pyx_L173_error) + __pyx_t_15 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L268_unpacking_done; + __pyx_L267_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_15 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1318, __pyx_L173_error) + __pyx_L268_unpacking_done:; + } + __pyx_v_back_absolute_filename = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v__ = __pyx_t_7; + __pyx_t_7 = 0; + __pyx_v_base = __pyx_t_6; + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1319 + * # So, just setting it to None should be OK + * back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) + * if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): # <<<<<<<<<<<<<< + * back = None + * + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1319, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_co_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1319, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1319, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_base); + __Pyx_GIVEREF(__pyx_v_base); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_base)) __PYX_ERR(0, 1319, __pyx_L173_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(0, 1319, __pyx_L173_error); + __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DEBUG_START); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1319, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1319, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1319, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!__pyx_t_10) { + } else { + __pyx_t_16 = __pyx_t_10; + goto __pyx_L270_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_DEBUG_START_PY3K); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1319, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyObject_RichCompare(__pyx_t_8, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1319, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1319, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_16 = __pyx_t_10; + __pyx_L270_bool_binop_done:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_10 = __pyx_t_16; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1320 + * back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) + * if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): + * back = None # <<<<<<<<<<<<<< + * + * elif base == TRACE_PROPERTY: + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_back, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1319 + * # So, just setting it to None should be OK + * back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) + * if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): # <<<<<<<<<<<<<< + * back = None + * + */ + goto __pyx_L269; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1322 + * back = None + * + * elif base == TRACE_PROPERTY: # <<<<<<<<<<<<<< + * # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) + * # if we're in a return, we want it to appear to the user in the previous frame! + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_TRACE_PROPERTY); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1322, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_base, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1322, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1322, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1325 + * # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) + * # if we're in a return, we want it to appear to the user in the previous frame! + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + * + * elif pydevd_dont_trace.should_trace_hook is not None: + */ + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_6 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1325, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __pyx_t_8; + __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L177_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1322 + * back = None + * + * elif base == TRACE_PROPERTY: # <<<<<<<<<<<<<< + * # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) + * # if we're in a return, we want it to appear to the user in the previous frame! + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1327 + * return None if is_call else NO_FTRACE + * + * elif pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< + * if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename): + * # In this case, we'll have to skip the previous one because it shouldn't be traced. + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1327, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_10 = (__pyx_t_8 != Py_None); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1328 + * + * elif pydevd_dont_trace.should_trace_hook is not None: + * if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename): # <<<<<<<<<<<<<< + * # In this case, we'll have to skip the previous one because it shouldn't be traced. + * # Also, we have to reset the tracing, because if the parent's parent (or some + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1328, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1328, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1328, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_v_back_absolute_filename}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1328, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1328, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_16 = (!__pyx_t_10); + if (__pyx_t_16) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1334 + * # we should anymore (so, a step in/over/return may not stop anywhere if no parent is traced). + * # Related test: _debugger_case17a.py + * py_db.set_trace_for_frame_and_parents(thread.ident, back) # <<<<<<<<<<<<<< + * return None if is_call else NO_FTRACE + * + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_set_trace_for_frame_and_parents); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1334, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_ident_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1334, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_v_back}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1334, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1335 + * # Related test: _debugger_case17a.py + * py_db.set_trace_for_frame_and_parents(thread.ident, back) + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + * + * if back is not None: + */ + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_8 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1335, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_t_7; + __pyx_t_7 = 0; + } + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L177_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1328 + * + * elif pydevd_dont_trace.should_trace_hook is not None: + * if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename): # <<<<<<<<<<<<<< + * # In this case, we'll have to skip the previous one because it shouldn't be traced. + * # Also, we have to reset the tracing, because if the parent's parent (or some + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1327 + * return None if is_call else NO_FTRACE + * + * elif pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< + * if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename): + * # In this case, we'll have to skip the previous one because it shouldn't be traced. + */ + } + __pyx_L269:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1314 + * elif is_return: # return event + * back = frame.f_back + * if back is not None: # <<<<<<<<<<<<<< + * # When we get to the pydevd run function, the debugging has actually finished for the main thread + * # (note that it can still go on for other threads, but for this one, we just make it finish) + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1337 + * return None if is_call else NO_FTRACE + * + * if back is not None: # <<<<<<<<<<<<<< + * # if we're in a return, we want it to appear to the user in the previous frame! + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + */ + __pyx_t_16 = (__pyx_v_back != Py_None); + if (__pyx_t_16) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1339 + * if back is not None: + * # if we're in a return, we want it to appear to the user in the previous frame! + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) # <<<<<<<<<<<<<< + * self.do_wait_suspend(thread, back, event, arg) + * else: + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1339, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1339, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1339, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_GIVEREF(__pyx_v_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_thread)) __PYX_ERR(0, 1339, __pyx_L173_error); + __Pyx_GIVEREF(__pyx_t_7); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7)) __PYX_ERR(0, 1339, __pyx_L173_error); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1339, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_original_step_cmd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1339, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_original_step_cmd, __pyx_t_4) < 0) __PYX_ERR(0, 1339, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1339, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1340 + * # if we're in a return, we want it to appear to the user in the previous frame! + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * self.do_wait_suspend(thread, back, event, arg) # <<<<<<<<<<<<<< + * else: + * # in jython we may not have a back frame + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1340, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_thread, __pyx_v_back, __pyx_v_event, __pyx_v_arg}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1340, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1337 + * return None if is_call else NO_FTRACE + * + * if back is not None: # <<<<<<<<<<<<<< + * # if we're in a return, we want it to appear to the user in the previous frame! + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + */ + goto __pyx_L273; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1343 + * else: + * # in jython we may not have a back frame + * info.pydev_step_stop = None # <<<<<<<<<<<<<< + * info.pydev_original_step_cmd = -1 + * info.pydev_step_cmd = -1 + */ + /*else*/ { + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->pydev_step_stop); + __Pyx_DECREF(__pyx_v_info->pydev_step_stop); + __pyx_v_info->pydev_step_stop = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":1344 + * # in jython we may not have a back frame + * info.pydev_step_stop = None + * info.pydev_original_step_cmd = -1 # <<<<<<<<<<<<<< + * info.pydev_step_cmd = -1 + * info.pydev_state = 1 + */ + __pyx_v_info->pydev_original_step_cmd = -1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1345 + * info.pydev_step_stop = None + * info.pydev_original_step_cmd = -1 + * info.pydev_step_cmd = -1 # <<<<<<<<<<<<<< + * info.pydev_state = 1 + * info.update_stepping_info() + */ + __pyx_v_info->pydev_step_cmd = -1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1346 + * info.pydev_original_step_cmd = -1 + * info.pydev_step_cmd = -1 + * info.pydev_state = 1 # <<<<<<<<<<<<<< + * info.update_stepping_info() + * + */ + __pyx_v_info->pydev_state = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1347 + * info.pydev_step_cmd = -1 + * info.pydev_state = 1 + * info.update_stepping_info() # <<<<<<<<<<<<<< + * + * # if we are quitting, let's stop the tracing + */ + __pyx_t_4 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v_info->__pyx_vtab)->update_stepping_info(__pyx_v_info, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1347, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_L273:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1312 + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + * self.do_wait_suspend(thread, frame, event, arg) + * elif is_return: # return event # <<<<<<<<<<<<<< + * back = frame.f_back + * if back is not None: + */ + } + __pyx_L265:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1308 + * if plugin_stop: + * plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + * elif stop: # <<<<<<<<<<<<<< + * if is_line: + * self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + */ + } + __pyx_L264:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1350 + * + * # if we are quitting, let's stop the tracing + * if py_db.quitting: # <<<<<<<<<<<<<< + * return None if is_call else NO_FTRACE + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_quitting); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1350, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1350, __pyx_L173_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_16) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1351 + * # if we are quitting, let's stop the tracing + * if py_db.quitting: + * return None if is_call else NO_FTRACE # <<<<<<<<<<<<<< + * + * return self.trace_dispatch + */ + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_is_call) { + __Pyx_INCREF(Py_None); + __pyx_t_4 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1351, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __pyx_t_7; + __pyx_t_7 = 0; + } + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L177_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1350 + * + * # if we are quitting, let's stop the tracing + * if py_db.quitting: # <<<<<<<<<<<<<< + * return None if is_call else NO_FTRACE + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1353 + * return None if is_call else NO_FTRACE + * + * return self.trace_dispatch # <<<<<<<<<<<<<< + * except: + * # Unfortunately Python itself stops the tracing when it originates from + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1353, __pyx_L173_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L177_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1115 + * + * # step handling. We stop when we hit the right frame + * try: # <<<<<<<<<<<<<< + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: + */ + } + __pyx_L173_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1354 + * + * return self.trace_dispatch + * except: # <<<<<<<<<<<<<< + * # Unfortunately Python itself stops the tracing when it originates from + * # the tracing function, so, we can't do much about it (just let the user know). + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 1354, __pyx_L175_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_6); + + /* "_pydevd_bundle/pydevd_cython.pyx":1357 + * # Unfortunately Python itself stops the tracing when it originates from + * # the tracing function, so, we can't do much about it (just let the user know). + * exc = sys.exc_info()[0] # <<<<<<<<<<<<<< + * cmd = py_db.cmd_factory.make_console_message( + * "%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n" + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1357, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1357, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_exc = __pyx_t_2; + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1358 + * # the tracing function, so, we can't do much about it (just let the user know). + * exc = sys.exc_info()[0] + * cmd = py_db.cmd_factory.make_console_message( # <<<<<<<<<<<<<< + * "%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n" + * % ( + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_cmd_factory); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1358, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_make_console_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1358, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1361 + * "%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n" + * % ( + * exc, # <<<<<<<<<<<<<< + * thread, + * ) + */ + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1361, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_exc); + __Pyx_GIVEREF(__pyx_v_exc); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_exc)) __PYX_ERR(0, 1361, __pyx_L175_except_error); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_GIVEREF(__pyx_v_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_thread)) __PYX_ERR(0, 1361, __pyx_L175_except_error); + + /* "_pydevd_bundle/pydevd_cython.pyx":1360 + * cmd = py_db.cmd_factory.make_console_message( + * "%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n" + * % ( # <<<<<<<<<<<<<< + * exc, + * thread, + */ + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_raised_from_within_the_callba, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_1}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_cmd, __pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1365 + * ) + * ) + * py_db.writer.add_command(cmd) # <<<<<<<<<<<<<< + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + * pydev_log.exception() + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_writer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1365, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add_command); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_cmd}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1365, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1366 + * ) + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< + * pydev_log.exception() + * raise + */ + __pyx_t_16 = PyObject_IsSubclass(__pyx_v_exc, __pyx_tuple__7); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 1366, __pyx_L175_except_error) + __pyx_t_10 = (!__pyx_t_16); + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1367 + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + * pydev_log.exception() # <<<<<<<<<<<<<< + * raise + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1367, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1367, __pyx_L175_except_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1366 + * ) + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< + * pydev_log.exception() + * raise + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1368 + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + * pydev_log.exception() + * raise # <<<<<<<<<<<<<< + * + * finally: + */ + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_7, __pyx_t_6); + __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; + __PYX_ERR(0, 1368, __pyx_L175_except_error) + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1115 + * + * # step handling. We stop when we hit the right frame + * try: # <<<<<<<<<<<<<< + * should_skip = 0 + * if pydevd_dont_trace.should_trace_hook is not None: + */ + __pyx_L175_except_error:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); + goto __pyx_L4_error; + __pyx_L177_try_return:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); + goto __pyx_L3_return; + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1371 + * + * finally: + * info.is_tracing -= 1 # <<<<<<<<<<<<<< + * + * # end trace_dispatch + */ + /*finally:*/ { + __pyx_L4_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_29 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_29, &__pyx_t_28, &__pyx_t_27); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_29); + __Pyx_XGOTREF(__pyx_t_28); + __Pyx_XGOTREF(__pyx_t_27); + __pyx_t_11 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_30 = __pyx_filename; + { + if (unlikely(!__pyx_v_info)) { __Pyx_RaiseUnboundLocalError("info"); __PYX_ERR(0, 1371, __pyx_L279_error) } + if (unlikely(!__pyx_v_info)) { __Pyx_RaiseUnboundLocalError("info"); __PYX_ERR(0, 1371, __pyx_L279_error) } + __pyx_v_info->is_tracing = (__pyx_v_info->is_tracing - 1); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_ExceptionReset(__pyx_t_29, __pyx_t_28, __pyx_t_27); + } + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ErrRestore(__pyx_t_19, __pyx_t_18, __pyx_t_17); + __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_29 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0; + __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_30; + goto __pyx_L1_error; + __pyx_L279_error:; + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_ExceptionReset(__pyx_t_29, __pyx_t_28, __pyx_t_27); + } + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_29 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0; + goto __pyx_L1_error; + } + __pyx_L3_return: { + __pyx_t_27 = __pyx_r; + __pyx_r = 0; + __pyx_v_info->is_tracing = (__pyx_v_info->is_tracing - 1); + __pyx_r = __pyx_t_27; + __pyx_t_27 = 0; + goto __pyx_L0; + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":634 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< + * cdef tuple abs_path_canonical_path_and_base; + * cdef bint is_exception_event; + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_22); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_abs_path_canonical_path_and_base); + __Pyx_XDECREF((PyObject *)__pyx_v_info); + __Pyx_XDECREF(__pyx_v_breakpoints_for_file); + __Pyx_XDECREF(__pyx_v_stop_info); + __Pyx_XDECREF(__pyx_v_curr_func_name); + __Pyx_XDECREF(__pyx_v_frame_skips_cache); + __Pyx_XDECREF(__pyx_v_frame_cache_key); + __Pyx_XDECREF(__pyx_v_line_cache_key); + __Pyx_XDECREF(__pyx_v_bp); + __Pyx_XDECREF(__pyx_v_pydev_smart_step_into_variants); + __Pyx_XDECREF(__pyx_v_py_db); + __Pyx_XDECREF(__pyx_v_thread); + __Pyx_XDECREF(__pyx_v_plugin_manager); + __Pyx_XDECREF(__pyx_v_stop_frame); + __Pyx_XDECREF(__pyx_v_function_breakpoint_on_call_event); + __Pyx_XDECREF(__pyx_v_returns_cache_key); + __Pyx_XDECREF(__pyx_v_return_lines); + __Pyx_XDECREF(__pyx_v_x); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_exc_info); + __Pyx_XDECREF(__pyx_v_func_lines); + __Pyx_XDECREF(__pyx_v_offset_and_lineno); + __Pyx_XDECREF(__pyx_v_breakpoint); + __Pyx_XDECREF(__pyx_v_stop_reason); + __Pyx_XDECREF(__pyx_v_bp_type); + __Pyx_XDECREF(__pyx_v_new_frame); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_eval_result); + __Pyx_XDECREF(__pyx_v_cmd); + __Pyx_XDECREF(__pyx_v_exc); + __Pyx_XDECREF(__pyx_v_plugin_stop); + __Pyx_XDECREF(__pyx_v_force_check_project_scope); + __Pyx_XDECREF(__pyx_v_filename); + __Pyx_XDECREF(__pyx_v_f2); + __Pyx_XDECREF(__pyx_v_back); + __Pyx_XDECREF(__pyx_v_smart_step_into_variant); + __Pyx_XDECREF(__pyx_v_children_variants); + __Pyx_XDECREF(__pyx_v_f_code); + __Pyx_XDECREF(__pyx_v_back_absolute_filename); + __Pyx_XDECREF(__pyx_v__); + __Pyx_XDECREF(__pyx_v_base); + __Pyx_XDECREF(__pyx_v_frame); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch = {"trace_dispatch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_event = 0; + PyObject *__pyx_v_arg = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("trace_dispatch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,&__pyx_n_s_event,&__pyx_n_s_arg,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 634, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_event)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 634, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 3, 3, 1); __PYX_ERR(0, 634, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 634, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 3, 3, 2); __PYX_ERR(0, 634, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_dispatch") < 0)) __PYX_ERR(0, 634, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v_frame = values[0]; + __pyx_v_event = ((PyObject*)values[1]); + __pyx_v_arg = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 634, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), (&PyString_Type), 1, "event", 1))) __PYX_ERR(0, 634, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_10trace_dispatch(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v_frame, __pyx_v_event, __pyx_v_arg); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_10trace_dispatch(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("trace_dispatch", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispatch(__pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_12__reduce_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_12__reduce_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 1); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._args, self.exc_info, self.should_skip) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->should_skip); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_self->_args); + __Pyx_GIVEREF(__pyx_v_self->_args); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_args)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->exc_info); + __Pyx_GIVEREF(__pyx_v_self->exc_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->exc_info)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._args, self.exc_info, self.should_skip) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self._args, self.exc_info, self.should_skip) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._args is not None or self.exc_info is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._args, self.exc_info, self.should_skip) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._args is not None or self.exc_info is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state + */ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->_args != ((PyObject*)Py_None)); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->exc_info != Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._args is not None or self.exc_info is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state + * else: + */ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._args is not None or self.exc_info is not None + * if use_setstate: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_PyDBFrame); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_61391470); + __Pyx_GIVEREF(__pyx_int_61391470); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_61391470)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._args is not None or self.exc_info is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, None), state + * else: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PyDBFrame); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_61391470); + __Pyx_GIVEREF(__pyx_int_61391470); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_61391470)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 16, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14__setstate_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 1); + + /* "(tree fragment)":17 + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBFrame__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1377 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info, is_unwind=False): # <<<<<<<<<<<<<< + * cdef bint should_stop; + * cdef bint was_just_raised; + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_13should_stop_on_exception(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_13should_stop_on_exception = {"should_stop_on_exception", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_13should_stop_on_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_13should_stop_on_exception(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_py_db = 0; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info = 0; + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_thread = 0; + PyObject *__pyx_v_arg = 0; + PyObject *__pyx_v_prev_user_uncaught_exc_info = 0; + PyObject *__pyx_v_is_unwind = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[7] = {0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("should_stop_on_exception (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_py_db,&__pyx_n_s_info,&__pyx_n_s_frame,&__pyx_n_s_thread,&__pyx_n_s_arg,&__pyx_n_s_prev_user_uncaught_exc_info,&__pyx_n_s_is_unwind,0}; + values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False))); + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_py_db)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_info)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("should_stop_on_exception", 0, 6, 7, 1); __PYX_ERR(0, 1377, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("should_stop_on_exception", 0, 6, 7, 2); __PYX_ERR(0, 1377, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_thread)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("should_stop_on_exception", 0, 6, 7, 3); __PYX_ERR(0, 1377, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[4]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("should_stop_on_exception", 0, 6, 7, 4); __PYX_ERR(0, 1377, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 5: + if (likely((values[5] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_prev_user_uncaught_exc_info)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[5]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("should_stop_on_exception", 0, 6, 7, 5); __PYX_ERR(0, 1377, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 6: + if (kw_args > 0) { + PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_is_unwind); + if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "should_stop_on_exception") < 0)) __PYX_ERR(0, 1377, __pyx_L3_error) + } + } else { + switch (__pyx_nargs) { + case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); + values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); + values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_py_db = values[0]; + __pyx_v_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)values[1]); + __pyx_v_frame = values[2]; + __pyx_v_thread = values[3]; + __pyx_v_arg = values[4]; + __pyx_v_prev_user_uncaught_exc_info = values[5]; + __pyx_v_is_unwind = values[6]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("should_stop_on_exception", 0, 6, 7, __pyx_nargs); __PYX_ERR(0, 1377, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.should_stop_on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, 1, "info", 0))) __PYX_ERR(0, 1377, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_12should_stop_on_exception(__pyx_self, __pyx_v_py_db, __pyx_v_info, __pyx_v_frame, __pyx_v_thread, __pyx_v_arg, __pyx_v_prev_user_uncaught_exc_info, __pyx_v_is_unwind); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12should_stop_on_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_info, PyObject *__pyx_v_frame, PyObject *__pyx_v_thread, PyObject *__pyx_v_arg, PyObject *__pyx_v_prev_user_uncaught_exc_info, PyObject *__pyx_v_is_unwind) { + int __pyx_v_should_stop; + int __pyx_v_was_just_raised; + PyObject *__pyx_v_check_excs = 0; + PyObject *__pyx_v_maybe_user_uncaught_exc_info = NULL; + PyObject *__pyx_v_exception = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_v_trace = NULL; + PyObject *__pyx_v_exception_breakpoint = NULL; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_exc_break_user = NULL; + PyObject *__pyx_v_exc_break_caught = NULL; + PyObject *__pyx_v_exc_break = NULL; + PyObject *__pyx_v_is_user_uncaught = NULL; + PyObject *__pyx_v_exc_info = NULL; + PyObject *__pyx_v_lines = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + unsigned int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; + Py_ssize_t __pyx_t_15; + int __pyx_t_16; + PyObject *__pyx_t_17 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("should_stop_on_exception", 0); + __Pyx_INCREF(__pyx_v_frame); + + /* "_pydevd_bundle/pydevd_cython.pyx":1385 + * # ENDIF + * + * should_stop = False # <<<<<<<<<<<<<< + * maybe_user_uncaught_exc_info = prev_user_uncaught_exc_info + * + */ + __pyx_v_should_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1386 + * + * should_stop = False + * maybe_user_uncaught_exc_info = prev_user_uncaught_exc_info # <<<<<<<<<<<<<< + * + * # 2 = 2 + */ + __Pyx_INCREF(__pyx_v_prev_user_uncaught_exc_info); + __pyx_v_maybe_user_uncaught_exc_info = __pyx_v_prev_user_uncaught_exc_info; + + /* "_pydevd_bundle/pydevd_cython.pyx":1389 + * + * # 2 = 2 + * if info.pydev_state != 2: # and breakpoint is not None: # <<<<<<<<<<<<<< + * exception, value, trace = arg + * + */ + __pyx_t_1 = (__pyx_v_info->pydev_state != 2); + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1390 + * # 2 = 2 + * if info.pydev_state != 2: # and breakpoint is not None: + * exception, value, trace = arg # <<<<<<<<<<<<<< + * + * if trace is not None and hasattr(trace, "tb_next"): + */ + if ((likely(PyTuple_CheckExact(__pyx_v_arg))) || (PyList_CheckExact(__pyx_v_arg))) { + PyObject* sequence = __pyx_v_arg; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1390, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_3 = PyList_GET_ITEM(sequence, 1); + __pyx_t_4 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_v_arg); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 1390, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L5_unpacking_done; + __pyx_L4_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1390, __pyx_L1_error) + __pyx_L5_unpacking_done:; + } + __pyx_v_exception = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_value = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_trace = __pyx_t_4; + __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1392 + * exception, value, trace = arg + * + * if trace is not None and hasattr(trace, "tb_next"): # <<<<<<<<<<<<<< + * # on jython trace is None on the first event and it may not have a tb_next. + * + */ + __pyx_t_7 = (__pyx_v_trace != Py_None); + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = __Pyx_HasAttr(__pyx_v_trace, __pyx_n_s_tb_next); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1392, __pyx_L1_error) + __pyx_t_1 = __pyx_t_7; + __pyx_L7_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1395 + * # on jython trace is None on the first event and it may not have a tb_next. + * + * should_stop = False # <<<<<<<<<<<<<< + * exception_breakpoint = None + * try: + */ + __pyx_v_should_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1396 + * + * should_stop = False + * exception_breakpoint = None # <<<<<<<<<<<<<< + * try: + * if py_db.plugin is not None: + */ + __Pyx_INCREF(Py_None); + __pyx_v_exception_breakpoint = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":1397 + * should_stop = False + * exception_breakpoint = None + * try: # <<<<<<<<<<<<<< + * if py_db.plugin is not None: + * result = py_db.plugin.exception_break(py_db, frame, thread, arg, is_unwind) + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1398 + * exception_breakpoint = None + * try: + * if py_db.plugin is not None: # <<<<<<<<<<<<<< + * result = py_db.plugin.exception_break(py_db, frame, thread, arg, is_unwind) + * if result: + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_plugin); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1398, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = (__pyx_t_4 != Py_None); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1399 + * try: + * if py_db.plugin is not None: + * result = py_db.plugin.exception_break(py_db, frame, thread, arg, is_unwind) # <<<<<<<<<<<<<< + * if result: + * should_stop, frame = result + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_plugin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1399, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exception_break); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1399, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_py_db, __pyx_v_frame, __pyx_v_thread, __pyx_v_arg, __pyx_v_is_unwind}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 5+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1399, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_v_result = __pyx_t_4; + __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1400 + * if py_db.plugin is not None: + * result = py_db.plugin.exception_break(py_db, frame, thread, arg, is_unwind) + * if result: # <<<<<<<<<<<<<< + * should_stop, frame = result + * except: + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1400, __pyx_L9_error) + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1401 + * result = py_db.plugin.exception_break(py_db, frame, thread, arg, is_unwind) + * if result: + * should_stop, frame = result # <<<<<<<<<<<<<< + * except: + * pydev_log.exception() + */ + if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { + PyObject* sequence = __pyx_v_result; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1401, __pyx_L9_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1401, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1401, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L17_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L17_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1401, __pyx_L9_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L18_unpacking_done; + __pyx_L17_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1401, __pyx_L9_error) + __pyx_L18_unpacking_done:; + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1401, __pyx_L9_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_should_stop = __pyx_t_1; + __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1400 + * if py_db.plugin is not None: + * result = py_db.plugin.exception_break(py_db, frame, thread, arg, is_unwind) + * if result: # <<<<<<<<<<<<<< + * should_stop, frame = result + * except: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1398 + * exception_breakpoint = None + * try: + * if py_db.plugin is not None: # <<<<<<<<<<<<<< + * result = py_db.plugin.exception_break(py_db, frame, thread, arg, is_unwind) + * if result: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1397 + * should_stop = False + * exception_breakpoint = None + * try: # <<<<<<<<<<<<<< + * if py_db.plugin is not None: + * result = py_db.plugin.exception_break(py_db, frame, thread, arg, is_unwind) + */ + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L14_try_end; + __pyx_L9_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1402 + * if result: + * should_stop, frame = result + * except: # <<<<<<<<<<<<<< + * pydev_log.exception() + * + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.should_stop_on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 1402, __pyx_L11_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + + /* "_pydevd_bundle/pydevd_cython.pyx":1403 + * should_stop, frame = result + * except: + * pydev_log.exception() # <<<<<<<<<<<<<< + * + * if not should_stop: + */ + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1403, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_exception); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1403, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_13))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_13, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1403, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L10_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1397 + * should_stop = False + * exception_breakpoint = None + * try: # <<<<<<<<<<<<<< + * if py_db.plugin is not None: + * result = py_db.plugin.exception_break(py_db, frame, thread, arg, is_unwind) + */ + __pyx_L11_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L10_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __pyx_L14_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1405 + * pydev_log.exception() + * + * if not should_stop: # <<<<<<<<<<<<<< + * # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). + * if exception == SystemExit and py_db.ignore_system_exit_code(value): + */ + __pyx_t_1 = (!__pyx_v_should_stop); + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1407 + * if not should_stop: + * # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). + * if exception == SystemExit and py_db.ignore_system_exit_code(value): # <<<<<<<<<<<<<< + * pass + * + */ + __pyx_t_3 = PyObject_RichCompare(__pyx_v_exception, __pyx_builtin_SystemExit, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1407, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L23_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_ignore_system_exit_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __pyx_t_7; + __pyx_L23_bool_binop_done:; + if (__pyx_t_1) { + goto __pyx_L22; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1410 + * pass + * + * elif exception in (GeneratorExit, StopIteration, StopAsyncIteration): # <<<<<<<<<<<<<< + * # These exceptions are control-flow related (they work as a generator + * # pause), so, we shouldn't stop on them. + */ + __Pyx_INCREF(__pyx_v_exception); + __pyx_t_3 = __pyx_v_exception; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_GeneratorExit, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1410, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L25_bool_binop_done; + } + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_StopIteration, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1410, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L25_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_StopAsyncIteration); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1410, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1410, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_7; + __pyx_L25_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __pyx_t_1; + if (__pyx_t_7) { + goto __pyx_L22; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1415 + * pass + * + * elif ignore_exception_trace(trace): # <<<<<<<<<<<<<< + * pass + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ignore_exception_trace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_trace}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1415, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { + goto __pyx_L22; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1419 + * + * else: + * was_just_raised = trace.tb_next is None # <<<<<<<<<<<<<< + * + * # It was not handled by any plugin, lets check exception breakpoints. + */ + /*else*/ { + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = (__pyx_t_3 == Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_was_just_raised = __pyx_t_7; + + /* "_pydevd_bundle/pydevd_cython.pyx":1422 + * + * # It was not handled by any plugin, lets check exception breakpoints. + * check_excs = [] # <<<<<<<<<<<<<< + * + * # Note: check user unhandled before regular exceptions. + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_check_excs = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1425 + * + * # Note: check user unhandled before regular exceptions. + * exc_break_user = py_db.get_exception_breakpoint(exception, py_db.break_on_user_uncaught_exceptions) # <<<<<<<<<<<<<< + * if exc_break_user is not None: + * check_excs.append((exc_break_user, True)) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_exception_breakpoint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_break_on_user_uncaught_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_exception, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_v_exc_break_user = __pyx_t_3; + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1426 + * # Note: check user unhandled before regular exceptions. + * exc_break_user = py_db.get_exception_breakpoint(exception, py_db.break_on_user_uncaught_exceptions) + * if exc_break_user is not None: # <<<<<<<<<<<<<< + * check_excs.append((exc_break_user, True)) + * + */ + __pyx_t_7 = (__pyx_v_exc_break_user != Py_None); + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1427 + * exc_break_user = py_db.get_exception_breakpoint(exception, py_db.break_on_user_uncaught_exceptions) + * if exc_break_user is not None: + * check_excs.append((exc_break_user, True)) # <<<<<<<<<<<<<< + * + * exc_break_caught = py_db.get_exception_breakpoint(exception, py_db.break_on_caught_exceptions) + */ + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_exc_break_user); + __Pyx_GIVEREF(__pyx_v_exc_break_user); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_exc_break_user)) __PYX_ERR(0, 1427, __pyx_L1_error); + __Pyx_INCREF(Py_True); + __Pyx_GIVEREF(Py_True); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_True)) __PYX_ERR(0, 1427, __pyx_L1_error); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_check_excs, __pyx_t_3); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1427, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1426 + * # Note: check user unhandled before regular exceptions. + * exc_break_user = py_db.get_exception_breakpoint(exception, py_db.break_on_user_uncaught_exceptions) + * if exc_break_user is not None: # <<<<<<<<<<<<<< + * check_excs.append((exc_break_user, True)) + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1429 + * check_excs.append((exc_break_user, True)) + * + * exc_break_caught = py_db.get_exception_breakpoint(exception, py_db.break_on_caught_exceptions) # <<<<<<<<<<<<<< + * if exc_break_caught is not None: + * check_excs.append((exc_break_caught, False)) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_exception_breakpoint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_break_on_caught_exceptions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_exception, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_v_exc_break_caught = __pyx_t_3; + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1430 + * + * exc_break_caught = py_db.get_exception_breakpoint(exception, py_db.break_on_caught_exceptions) + * if exc_break_caught is not None: # <<<<<<<<<<<<<< + * check_excs.append((exc_break_caught, False)) + * + */ + __pyx_t_7 = (__pyx_v_exc_break_caught != Py_None); + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1431 + * exc_break_caught = py_db.get_exception_breakpoint(exception, py_db.break_on_caught_exceptions) + * if exc_break_caught is not None: + * check_excs.append((exc_break_caught, False)) # <<<<<<<<<<<<<< + * + * for exc_break, is_user_uncaught in check_excs: + */ + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1431, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_exc_break_caught); + __Pyx_GIVEREF(__pyx_v_exc_break_caught); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_exc_break_caught)) __PYX_ERR(0, 1431, __pyx_L1_error); + __Pyx_INCREF(Py_False); + __Pyx_GIVEREF(Py_False); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_False)) __PYX_ERR(0, 1431, __pyx_L1_error); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_check_excs, __pyx_t_3); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1431, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1430 + * + * exc_break_caught = py_db.get_exception_breakpoint(exception, py_db.break_on_caught_exceptions) + * if exc_break_caught is not None: # <<<<<<<<<<<<<< + * check_excs.append((exc_break_caught, False)) + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1433 + * check_excs.append((exc_break_caught, False)) + * + * for exc_break, is_user_uncaught in check_excs: # <<<<<<<<<<<<<< + * # Initially mark that it should stop and then go into exclusions. + * should_stop = True + */ + __pyx_t_3 = __pyx_v_check_excs; __Pyx_INCREF(__pyx_t_3); + __pyx_t_15 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1433, __pyx_L1_error) + #endif + if (__pyx_t_15 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_15); __Pyx_INCREF(__pyx_t_2); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(0, 1433, __pyx_L1_error) + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1433, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_5 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); + index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_13); if (unlikely(!__pyx_t_4)) goto __pyx_L32_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_13); if (unlikely(!__pyx_t_5)) goto __pyx_L32_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_13), 2) < 0) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + goto __pyx_L33_unpacking_done; + __pyx_L32_unpacking_failed:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_L33_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_exc_break, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_is_user_uncaught, __pyx_t_5); + __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1435 + * for exc_break, is_user_uncaught in check_excs: + * # Initially mark that it should stop and then go into exclusions. + * should_stop = True # <<<<<<<<<<<<<< + * + * if py_db.exclude_exception_by_filter(exc_break, trace): + */ + __pyx_v_should_stop = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1437 + * should_stop = True + * + * if py_db.exclude_exception_by_filter(exc_break, trace): # <<<<<<<<<<<<<< + * pydev_log.debug( + * "Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_exclude_exception_by_filter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_exc_break, __pyx_v_trace}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1437, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1438 + * + * if py_db.exclude_exception_by_filter(exc_break, trace): + * pydev_log.debug( # <<<<<<<<<<<<<< + * "Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name) + * ) + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1439 + * if py_db.exclude_exception_by_filter(exc_break, trace): + * pydev_log.debug( + * "Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name) # <<<<<<<<<<<<<< + * ) + * should_stop = False + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_exception); + __Pyx_GIVEREF(__pyx_v_exception); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_exception)) __PYX_ERR(0, 1439, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_13); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_13)) __PYX_ERR(0, 1439, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_12); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_12)) __PYX_ERR(0, 1439, __pyx_L1_error); + __pyx_t_13 = 0; + __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyString_Format(__pyx_kp_s_Ignore_exception_s_in_library_s, __pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_12}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1441 + * "Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name) + * ) + * should_stop = False # <<<<<<<<<<<<<< + * + * elif exc_break.condition is not None and not py_db.handle_breakpoint_condition(info, exc_break, frame): + */ + __pyx_v_should_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1437 + * should_stop = True + * + * if py_db.exclude_exception_by_filter(exc_break, trace): # <<<<<<<<<<<<<< + * pydev_log.debug( + * "Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name) + */ + goto __pyx_L34; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1443 + * should_stop = False + * + * elif exc_break.condition is not None and not py_db.handle_breakpoint_condition(info, exc_break, frame): # <<<<<<<<<<<<<< + * should_stop = False + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_condition); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = (__pyx_t_2 != Py_None); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_1) { + } else { + __pyx_t_7 = __pyx_t_1; + goto __pyx_L35_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_handle_breakpoint_condition); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_12, ((PyObject *)__pyx_v_info), __pyx_v_exc_break, __pyx_v_frame}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1443, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_16 = (!__pyx_t_1); + __pyx_t_7 = __pyx_t_16; + __pyx_L35_bool_binop_done:; + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1444 + * + * elif exc_break.condition is not None and not py_db.handle_breakpoint_condition(info, exc_break, frame): + * should_stop = False # <<<<<<<<<<<<<< + * + * elif is_user_uncaught: + */ + __pyx_v_should_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1443 + * should_stop = False + * + * elif exc_break.condition is not None and not py_db.handle_breakpoint_condition(info, exc_break, frame): # <<<<<<<<<<<<<< + * should_stop = False + * + */ + goto __pyx_L34; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1446 + * should_stop = False + * + * elif is_user_uncaught: # <<<<<<<<<<<<<< + * # Note: we don't stop here, we just collect the exc_info to use later on... + * should_stop = False + */ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_is_user_uncaught); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1446, __pyx_L1_error) + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1448 + * elif is_user_uncaught: + * # Note: we don't stop here, we just collect the exc_info to use later on... + * should_stop = False # <<<<<<<<<<<<<< + * if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( + * frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + */ + __pyx_v_should_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1449 + * # Note: we don't stop here, we just collect the exc_info to use later on... + * should_stop = False + * if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( # <<<<<<<<<<<<<< + * frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + * ): + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_12, __pyx_v_frame, __pyx_t_5, Py_True}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = (!__pyx_t_16); + if (__pyx_t_1) { + } else { + __pyx_t_7 = __pyx_t_1; + goto __pyx_L38_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1450 + * should_stop = False + * if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( + * frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) # <<<<<<<<<<<<<< + * ): + * # User uncaught means that we're currently in user code but the code + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = (__pyx_t_2 == Py_None); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_1) { + } else { + __pyx_t_7 = __pyx_t_1; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_f_code); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_13, __pyx_t_5, __pyx_t_12, Py_True}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1450, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = __pyx_t_1; + __pyx_L38_bool_binop_done:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1449 + * # Note: we don't stop here, we just collect the exc_info to use later on... + * should_stop = False + * if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( # <<<<<<<<<<<<<< + * frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + * ): + */ + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1454 + * # User uncaught means that we're currently in user code but the code + * # up the stack is library code. + * exc_info = prev_user_uncaught_exc_info # <<<<<<<<<<<<<< + * if not exc_info: + * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + */ + __Pyx_INCREF(__pyx_v_prev_user_uncaught_exc_info); + __Pyx_XDECREF_SET(__pyx_v_exc_info, __pyx_v_prev_user_uncaught_exc_info); + + /* "_pydevd_bundle/pydevd_cython.pyx":1455 + * # up the stack is library code. + * exc_info = prev_user_uncaught_exc_info + * if not exc_info: # <<<<<<<<<<<<<< + * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + * else: + */ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_exc_info); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1455, __pyx_L1_error) + __pyx_t_1 = (!__pyx_t_7); + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1456 + * exc_info = prev_user_uncaught_exc_info + * if not exc_info: + * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) # <<<<<<<<<<<<<< + * else: + * lines = exc_info[2] + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = PySet_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (PySet_Add(__pyx_t_12, __pyx_t_4) < 0) __PYX_ERR(0, 1456, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_arg); + __Pyx_GIVEREF(__pyx_v_arg); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arg)) __PYX_ERR(0, 1456, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1456, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_12); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_12)) __PYX_ERR(0, 1456, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_12 = 0; + __Pyx_DECREF_SET(__pyx_v_exc_info, __pyx_t_4); + __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1455 + * # up the stack is library code. + * exc_info = prev_user_uncaught_exc_info + * if not exc_info: # <<<<<<<<<<<<<< + * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + * else: + */ + goto __pyx_L41; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1458 + * exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + * else: + * lines = exc_info[2] # <<<<<<<<<<<<<< + * lines.add(frame.f_lineno) + * exc_info = (arg, frame.f_lineno, lines) + */ + /*else*/ { + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_lines, __pyx_t_4); + __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1459 + * else: + * lines = exc_info[2] + * lines.add(frame.f_lineno) # <<<<<<<<<<<<<< + * exc_info = (arg, frame.f_lineno, lines) + * maybe_user_uncaught_exc_info = exc_info + */ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_lines, __pyx_n_s_add); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_12, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1460 + * lines = exc_info[2] + * lines.add(frame.f_lineno) + * exc_info = (arg, frame.f_lineno, lines) # <<<<<<<<<<<<<< + * maybe_user_uncaught_exc_info = exc_info + * else: + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_INCREF(__pyx_v_arg); + __Pyx_GIVEREF(__pyx_v_arg); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_arg)) __PYX_ERR(0, 1460, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_4)) __PYX_ERR(0, 1460, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_lines); + __Pyx_GIVEREF(__pyx_v_lines); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_v_lines)) __PYX_ERR(0, 1460, __pyx_L1_error); + __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_exc_info, __pyx_t_12); + __pyx_t_12 = 0; + } + __pyx_L41:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1461 + * lines.add(frame.f_lineno) + * exc_info = (arg, frame.f_lineno, lines) + * maybe_user_uncaught_exc_info = exc_info # <<<<<<<<<<<<<< + * else: + * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + */ + __Pyx_INCREF(__pyx_v_exc_info); + __Pyx_DECREF_SET(__pyx_v_maybe_user_uncaught_exc_info, __pyx_v_exc_info); + + /* "_pydevd_bundle/pydevd_cython.pyx":1449 + * # Note: we don't stop here, we just collect the exc_info to use later on... + * should_stop = False + * if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( # <<<<<<<<<<<<<< + * frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + * ): + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1446 + * should_stop = False + * + * elif is_user_uncaught: # <<<<<<<<<<<<<< + * # Note: we don't stop here, we just collect the exc_info to use later on... + * should_stop = False + */ + goto __pyx_L34; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1464 + * else: + * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + * if ( # <<<<<<<<<<<<<< + * exc_break.notify_on_first_raise_only + * and py_db.skip_on_exceptions_thrown_in_same_context + */ + /*else*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1465 + * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + * if ( + * exc_break.notify_on_first_raise_only # <<<<<<<<<<<<<< + * and py_db.skip_on_exceptions_thrown_in_same_context + * and not was_just_raised + */ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_notify_on_first_raise_only); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1465, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L43_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1466 + * if ( + * exc_break.notify_on_first_raise_only + * and py_db.skip_on_exceptions_thrown_in_same_context # <<<<<<<<<<<<<< + * and not was_just_raised + * and not just_raised(trace.tb_next) + */ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_skip_on_exceptions_thrown_in_sam); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1466, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1466, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L43_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1467 + * exc_break.notify_on_first_raise_only + * and py_db.skip_on_exceptions_thrown_in_same_context + * and not was_just_raised # <<<<<<<<<<<<<< + * and not just_raised(trace.tb_next) + * ): + */ + __pyx_t_7 = (!__pyx_v_was_just_raised); + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L43_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1468 + * and py_db.skip_on_exceptions_thrown_in_same_context + * and not was_just_raised + * and not just_raised(trace.tb_next) # <<<<<<<<<<<<<< + * ): + * # In this case we never stop if it was just raised, so, to know if it was the first we + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_just_raised); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2}; + __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1468, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_16 = (!__pyx_t_7); + __pyx_t_1 = __pyx_t_16; + __pyx_L43_bool_binop_done:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1464 + * else: + * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + * if ( # <<<<<<<<<<<<<< + * exc_break.notify_on_first_raise_only + * and py_db.skip_on_exceptions_thrown_in_same_context + */ + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1472 + * # In this case we never stop if it was just raised, so, to know if it was the first we + * # need to check if we're in the 2nd method. + * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception # <<<<<<<<<<<<<< + * + * elif ( + */ + __pyx_v_should_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1464 + * else: + * # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + * if ( # <<<<<<<<<<<<<< + * exc_break.notify_on_first_raise_only + * and py_db.skip_on_exceptions_thrown_in_same_context + */ + goto __pyx_L42; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1475 + * + * elif ( + * exc_break.notify_on_first_raise_only # <<<<<<<<<<<<<< + * and not py_db.skip_on_exceptions_thrown_in_same_context + * and not was_just_raised + */ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_notify_on_first_raise_only); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1475, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_16) { + } else { + __pyx_t_1 = __pyx_t_16; + goto __pyx_L47_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1476 + * elif ( + * exc_break.notify_on_first_raise_only + * and not py_db.skip_on_exceptions_thrown_in_same_context # <<<<<<<<<<<<<< + * and not was_just_raised + * ): + */ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_skip_on_exceptions_thrown_in_sam); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1476, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_7 = (!__pyx_t_16); + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L47_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1477 + * exc_break.notify_on_first_raise_only + * and not py_db.skip_on_exceptions_thrown_in_same_context + * and not was_just_raised # <<<<<<<<<<<<<< + * ): + * should_stop = False # I.e.: we stop only when it was just raised + */ + __pyx_t_7 = (!__pyx_v_was_just_raised); + __pyx_t_1 = __pyx_t_7; + __pyx_L47_bool_binop_done:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1474 + * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + * + * elif ( # <<<<<<<<<<<<<< + * exc_break.notify_on_first_raise_only + * and not py_db.skip_on_exceptions_thrown_in_same_context + */ + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1479 + * and not was_just_raised + * ): + * should_stop = False # I.e.: we stop only when it was just raised # <<<<<<<<<<<<<< + * + * elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context: + */ + __pyx_v_should_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1474 + * should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + * + * elif ( # <<<<<<<<<<<<<< + * exc_break.notify_on_first_raise_only + * and not py_db.skip_on_exceptions_thrown_in_same_context + */ + goto __pyx_L42; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1481 + * should_stop = False # I.e.: we stop only when it was just raised + * + * elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context: # <<<<<<<<<<<<<< + * # Option: Don't break if an exception is caught in the same function from which it is thrown + * should_stop = False + */ + if (__pyx_v_was_just_raised) { + } else { + __pyx_t_1 = __pyx_v_was_just_raised; + goto __pyx_L50_bool_binop_done; + } + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_skip_on_exceptions_thrown_in_sam); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1481, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_1 = __pyx_t_7; + __pyx_L50_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1483 + * elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context: + * # Option: Don't break if an exception is caught in the same function from which it is thrown + * should_stop = False # <<<<<<<<<<<<<< + * + * if should_stop: + */ + __pyx_v_should_stop = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1481 + * should_stop = False # I.e.: we stop only when it was just raised + * + * elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context: # <<<<<<<<<<<<<< + * # Option: Don't break if an exception is caught in the same function from which it is thrown + * should_stop = False + */ + } + __pyx_L42:; + } + __pyx_L34:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1485 + * should_stop = False + * + * if should_stop: # <<<<<<<<<<<<<< + * exception_breakpoint = exc_break + * try: + */ + if (__pyx_v_should_stop) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1486 + * + * if should_stop: + * exception_breakpoint = exc_break # <<<<<<<<<<<<<< + * try: + * info.pydev_message = exc_break.qname + */ + __Pyx_INCREF(__pyx_v_exc_break); + __Pyx_DECREF_SET(__pyx_v_exception_breakpoint, __pyx_v_exc_break); + + /* "_pydevd_bundle/pydevd_cython.pyx":1487 + * if should_stop: + * exception_breakpoint = exc_break + * try: # <<<<<<<<<<<<<< + * info.pydev_message = exc_break.qname + * except: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1488 + * exception_breakpoint = exc_break + * try: + * info.pydev_message = exc_break.qname # <<<<<<<<<<<<<< + * except: + * info.pydev_message = exc_break.qname.encode("utf-8") + */ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_qname); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1488, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_12); + if (!(likely(PyString_CheckExact(__pyx_t_12))||((__pyx_t_12) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_12))) __PYX_ERR(0, 1488, __pyx_L53_error) + __Pyx_GIVEREF(__pyx_t_12); + __Pyx_GOTREF(__pyx_v_info->pydev_message); + __Pyx_DECREF(__pyx_v_info->pydev_message); + __pyx_v_info->pydev_message = ((PyObject*)__pyx_t_12); + __pyx_t_12 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1487 + * if should_stop: + * exception_breakpoint = exc_break + * try: # <<<<<<<<<<<<<< + * info.pydev_message = exc_break.qname + * except: + */ + } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L60_try_end; + __pyx_L53_error:; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1489 + * try: + * info.pydev_message = exc_break.qname + * except: # <<<<<<<<<<<<<< + * info.pydev_message = exc_break.qname.encode("utf-8") + * break + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.should_stop_on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 1489, __pyx_L55_except_error) + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + + /* "_pydevd_bundle/pydevd_cython.pyx":1490 + * info.pydev_message = exc_break.qname + * except: + * info.pydev_message = exc_break.qname.encode("utf-8") # <<<<<<<<<<<<<< + * break + * + */ + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_break, __pyx_n_s_qname); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1490, __pyx_L55_except_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_encode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1490, __pyx_L55_except_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_17))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_17); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_17, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_kp_s_utf_8}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1490, __pyx_L55_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + } + if (!(likely(PyString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_5))) __PYX_ERR(0, 1490, __pyx_L55_except_error) + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_info->pydev_message); + __Pyx_DECREF(__pyx_v_info->pydev_message); + __pyx_v_info->pydev_message = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L54_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1487 + * if should_stop: + * exception_breakpoint = exc_break + * try: # <<<<<<<<<<<<<< + * info.pydev_message = exc_break.qname + * except: + */ + __pyx_L55_except_error:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L54_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); + __pyx_L60_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1491 + * except: + * info.pydev_message = exc_break.qname.encode("utf-8") + * break # <<<<<<<<<<<<<< + * + * if should_stop: + */ + goto __pyx_L31_break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1485 + * should_stop = False + * + * if should_stop: # <<<<<<<<<<<<<< + * exception_breakpoint = exc_break + * try: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1433 + * check_excs.append((exc_break_caught, False)) + * + * for exc_break, is_user_uncaught in check_excs: # <<<<<<<<<<<<<< + * # Initially mark that it should stop and then go into exclusions. + * should_stop = True + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L63_for_end; + __pyx_L31_break:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L63_for_end; + __pyx_L63_for_end:; + } + __pyx_L22:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1405 + * pydev_log.exception() + * + * if not should_stop: # <<<<<<<<<<<<<< + * # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). + * if exception == SystemExit and py_db.ignore_system_exit_code(value): + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1493 + * break + * + * if should_stop: # <<<<<<<<<<<<<< + * # Always add exception to frame (must remove later after we proceed). + * add_exception_to_frame(frame, (exception, value, trace)) + */ + if (__pyx_v_should_stop) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1495 + * if should_stop: + * # Always add exception to frame (must remove later after we proceed). + * add_exception_to_frame(frame, (exception, value, trace)) # <<<<<<<<<<<<<< + * + * if exception_breakpoint is not None and exception_breakpoint.expression is not None: + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_exception_to_frame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_exception); + __Pyx_GIVEREF(__pyx_v_exception); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_exception)) __PYX_ERR(0, 1495, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value)) __PYX_ERR(0, 1495, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_trace); + __Pyx_GIVEREF(__pyx_v_trace); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_trace)) __PYX_ERR(0, 1495, __pyx_L1_error); + __pyx_t_12 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_v_frame, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1497 + * add_exception_to_frame(frame, (exception, value, trace)) + * + * if exception_breakpoint is not None and exception_breakpoint.expression is not None: # <<<<<<<<<<<<<< + * py_db.handle_breakpoint_expression(exception_breakpoint, info, frame) + * + */ + __pyx_t_7 = (__pyx_v_exception_breakpoint != Py_None); + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L66_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception_breakpoint, __pyx_n_s_expression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = (__pyx_t_3 != Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __pyx_t_7; + __pyx_L66_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1498 + * + * if exception_breakpoint is not None and exception_breakpoint.expression is not None: + * py_db.handle_breakpoint_expression(exception_breakpoint, info, frame) # <<<<<<<<<<<<<< + * + * return should_stop, frame, maybe_user_uncaught_exc_info + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_handle_breakpoint_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_11 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_11 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_exception_breakpoint, ((PyObject *)__pyx_v_info), __pyx_v_frame}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1497 + * add_exception_to_frame(frame, (exception, value, trace)) + * + * if exception_breakpoint is not None and exception_breakpoint.expression is not None: # <<<<<<<<<<<<<< + * py_db.handle_breakpoint_expression(exception_breakpoint, info, frame) + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1493 + * break + * + * if should_stop: # <<<<<<<<<<<<<< + * # Always add exception to frame (must remove later after we proceed). + * add_exception_to_frame(frame, (exception, value, trace)) + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1392 + * exception, value, trace = arg + * + * if trace is not None and hasattr(trace, "tb_next"): # <<<<<<<<<<<<<< + * # on jython trace is None on the first event and it may not have a tb_next. + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1389 + * + * # 2 = 2 + * if info.pydev_state != 2: # and breakpoint is not None: # <<<<<<<<<<<<<< + * exception, value, trace = arg + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1500 + * py_db.handle_breakpoint_expression(exception_breakpoint, info, frame) + * + * return should_stop, frame, maybe_user_uncaught_exc_info # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_should_stop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1500, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_frame); + __Pyx_GIVEREF(__pyx_v_frame); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_frame)) __PYX_ERR(0, 1500, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_maybe_user_uncaught_exc_info); + __Pyx_GIVEREF(__pyx_v_maybe_user_uncaught_exc_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_maybe_user_uncaught_exc_info)) __PYX_ERR(0, 1500, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1377 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info, is_unwind=False): # <<<<<<<<<<<<<< + * cdef bint should_stop; + * cdef bint was_just_raised; + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.should_stop_on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_check_excs); + __Pyx_XDECREF(__pyx_v_maybe_user_uncaught_exc_info); + __Pyx_XDECREF(__pyx_v_exception); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_trace); + __Pyx_XDECREF(__pyx_v_exception_breakpoint); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_exc_break_user); + __Pyx_XDECREF(__pyx_v_exc_break_caught); + __Pyx_XDECREF(__pyx_v_exc_break); + __Pyx_XDECREF(__pyx_v_is_user_uncaught); + __Pyx_XDECREF(__pyx_v_exc_info); + __Pyx_XDECREF(__pyx_v_lines); + __Pyx_XDECREF(__pyx_v_frame); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1510 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def handle_exception(py_db, thread, frame, arg, str exception_type): # <<<<<<<<<<<<<< + * cdef bint stopped; + * cdef tuple abs_real_path_and_base; + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15handle_exception(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_15handle_exception = {"handle_exception", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_15handle_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15handle_exception(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_py_db = 0; + PyObject *__pyx_v_thread = 0; + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_arg = 0; + PyObject *__pyx_v_exception_type = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("handle_exception (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_py_db,&__pyx_n_s_thread,&__pyx_n_s_frame,&__pyx_n_s_arg,&__pyx_n_s_exception_type,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_py_db)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1510, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_thread)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1510, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("handle_exception", 1, 5, 5, 1); __PYX_ERR(0, 1510, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1510, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("handle_exception", 1, 5, 5, 2); __PYX_ERR(0, 1510, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1510, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("handle_exception", 1, 5, 5, 3); __PYX_ERR(0, 1510, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exception_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[4]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1510, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("handle_exception", 1, 5, 5, 4); __PYX_ERR(0, 1510, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_exception") < 0)) __PYX_ERR(0, 1510, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); + } + __pyx_v_py_db = values[0]; + __pyx_v_thread = values[1]; + __pyx_v_frame = values[2]; + __pyx_v_arg = values[3]; + __pyx_v_exception_type = ((PyObject*)values[4]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("handle_exception", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1510, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exception_type), (&PyString_Type), 1, "exception_type", 1))) __PYX_ERR(0, 1510, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_14handle_exception(__pyx_self, __pyx_v_py_db, __pyx_v_thread, __pyx_v_frame, __pyx_v_arg, __pyx_v_exception_type); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_14handle_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_thread, PyObject *__pyx_v_frame, PyObject *__pyx_v_arg, PyObject *__pyx_v_exception_type) { + int __pyx_v_stopped; + PyObject *__pyx_v_abs_real_path_and_base = 0; + PyObject *__pyx_v_absolute_filename = 0; + PyObject *__pyx_v_canonical_normalized_filename = 0; + PyObject *__pyx_v_lines_ignored = 0; + PyObject *__pyx_v_frame_id_to_frame = 0; + PyObject *__pyx_v_merged = 0; + PyObject *__pyx_v_trace_obj = 0; + PyObject *__pyx_v_initial_trace_obj = NULL; + PyObject *__pyx_v_check_trace_obj = NULL; + PyObject *__pyx_v_curr_stat = NULL; + PyObject *__pyx_v_last_stat = NULL; + PyObject *__pyx_v_from_user_input = NULL; + PyObject *__pyx_v_exc_lineno = NULL; + PyObject *__pyx_v_line = NULL; + PyObject *__pyx_v_f = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + int __pyx_t_16; + int __pyx_t_17; + char const *__pyx_t_18; + PyObject *__pyx_t_19 = NULL; + PyObject *__pyx_t_20 = NULL; + PyObject *__pyx_t_21 = NULL; + PyObject *__pyx_t_22 = NULL; + PyObject *__pyx_t_23 = NULL; + PyObject *__pyx_t_24 = NULL; + char const *__pyx_t_25; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_exception", 0); + __Pyx_INCREF(__pyx_v_py_db); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_INCREF(__pyx_v_frame); + + /* "_pydevd_bundle/pydevd_cython.pyx":1522 + * # def handle_exception(py_db, thread, frame, arg, exception_type): + * # ENDIF + * stopped = False # <<<<<<<<<<<<<< + * try: + * # print('handle_exception', frame.f_lineno, frame.f_code.co_name) + */ + __pyx_v_stopped = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1523 + * # ENDIF + * stopped = False + * try: # <<<<<<<<<<<<<< + * # print('handle_exception', frame.f_lineno, frame.f_code.co_name) + * + */ + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1527 + * + * # We have 3 things in arg: exception type, description, traceback object + * trace_obj = arg[2] # <<<<<<<<<<<<<< + * + * initial_trace_obj = trace_obj + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_arg, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_trace_obj = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1529 + * trace_obj = arg[2] + * + * initial_trace_obj = trace_obj # <<<<<<<<<<<<<< + * if trace_obj.tb_next is None and trace_obj.tb_frame is frame: + * # I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check). + */ + __Pyx_INCREF(__pyx_v_trace_obj); + __pyx_v_initial_trace_obj = __pyx_v_trace_obj; + + /* "_pydevd_bundle/pydevd_cython.pyx":1530 + * + * initial_trace_obj = trace_obj + * if trace_obj.tb_next is None and trace_obj.tb_frame is frame: # <<<<<<<<<<<<<< + * # I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check). + * pass + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1530, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (__pyx_t_1 == Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1530, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (__pyx_t_1 == __pyx_v_frame); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __pyx_t_3; + __pyx_L7_bool_binop_done:; + if (__pyx_t_2) { + goto __pyx_L6; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1535 + * else: + * # Get the trace_obj from where the exception was raised... + * while trace_obj.tb_next is not None: # <<<<<<<<<<<<<< + * trace_obj = trace_obj.tb_next + * + */ + /*else*/ { + while (1) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1535, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__pyx_t_1 != Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_2) break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1536 + * # Get the trace_obj from where the exception was raised... + * while trace_obj.tb_next is not None: + * trace_obj = trace_obj.tb_next # <<<<<<<<<<<<<< + * + * if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1536, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_trace_obj, __pyx_t_1); + __pyx_t_1 = 0; + } + } + __pyx_L6:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1538 + * trace_obj = trace_obj.tb_next + * + * if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: # <<<<<<<<<<<<<< + * for check_trace_obj in (initial_trace_obj, trace_obj): + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_ignore_exceptions_thrown_in_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1538, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1539 + * + * if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: + * for check_trace_obj in (initial_trace_obj, trace_obj): # <<<<<<<<<<<<<< + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + * absolute_filename = abs_real_path_and_base[0] + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1539, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_initial_trace_obj); + __Pyx_GIVEREF(__pyx_v_initial_trace_obj); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_initial_trace_obj)) __PYX_ERR(0, 1539, __pyx_L4_error); + __Pyx_INCREF(__pyx_v_trace_obj); + __Pyx_GIVEREF(__pyx_v_trace_obj); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_trace_obj)) __PYX_ERR(0, 1539, __pyx_L4_error); + __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (__pyx_t_5 >= 2) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1539, __pyx_L4_error) + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1539, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + __Pyx_XDECREF_SET(__pyx_v_check_trace_obj, __pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1540 + * if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: + * for check_trace_obj in (initial_trace_obj, trace_obj): + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) # <<<<<<<<<<<<<< + * absolute_filename = abs_real_path_and_base[0] + * canonical_normalized_filename = abs_real_path_and_base[1] + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1540, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_check_trace_obj, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1540, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1540, __pyx_L4_error) + __Pyx_XDECREF_SET(__pyx_v_abs_real_path_and_base, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1541 + * for check_trace_obj in (initial_trace_obj, trace_obj): + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + * absolute_filename = abs_real_path_and_base[0] # <<<<<<<<<<<<<< + * canonical_normalized_filename = abs_real_path_and_base[1] + * + */ + if (unlikely(__pyx_v_abs_real_path_and_base == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1541, __pyx_L4_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_real_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 1541, __pyx_L4_error) + __Pyx_XDECREF_SET(__pyx_v_absolute_filename, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1542 + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + * absolute_filename = abs_real_path_and_base[0] + * canonical_normalized_filename = abs_real_path_and_base[1] # <<<<<<<<<<<<<< + * + * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + */ + if (unlikely(__pyx_v_abs_real_path_and_base == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1542, __pyx_L4_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 1542, __pyx_L4_error) + __Pyx_XDECREF_SET(__pyx_v_canonical_normalized_filename, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1544 + * canonical_normalized_filename = abs_real_path_and_base[1] + * + * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) # <<<<<<<<<<<<<< + * if lines_ignored is None: + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_filename_to_lines_where_exceptio); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1544, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1544, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_canonical_normalized_filename}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(0, 1544, __pyx_L4_error) + __Pyx_XDECREF_SET(__pyx_v_lines_ignored, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1545 + * + * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * if lines_ignored is None: # <<<<<<<<<<<<<< + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + * + */ + __pyx_t_2 = (__pyx_v_lines_ignored == ((PyObject*)Py_None)); + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1546 + * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * if lines_ignored is None: + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_lines_ignored, __pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_filename_to_lines_where_exceptio); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1546, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely((PyObject_SetItem(__pyx_t_7, __pyx_v_canonical_normalized_filename, __pyx_t_1) < 0))) __PYX_ERR(0, 1546, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1545 + * + * lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * if lines_ignored is None: # <<<<<<<<<<<<<< + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1548 + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + * + * try: # <<<<<<<<<<<<<< + * curr_stat = os.stat(absolute_filename) + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1549 + * + * try: + * curr_stat = os.stat(absolute_filename) # <<<<<<<<<<<<<< + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + * except: + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_os); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1549, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_stat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1549, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_absolute_filename}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_curr_stat, __pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1550 + * try: + * curr_stat = os.stat(absolute_filename) + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) # <<<<<<<<<<<<<< + * except: + * curr_stat = None + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_curr_stat, __pyx_n_s_st_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_curr_stat, __pyx_n_s_st_mtime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1550, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1550, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L15_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6)) __PYX_ERR(0, 1550, __pyx_L15_error); + __pyx_t_1 = 0; + __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_curr_stat, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1548 + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + * + * try: # <<<<<<<<<<<<<< + * curr_stat = os.stat(absolute_filename) + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + */ + } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L22_try_end; + __pyx_L15_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1551 + * curr_stat = os.stat(absolute_filename) + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + * except: # <<<<<<<<<<<<<< + * curr_stat = None + * + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 1551, __pyx_L17_except_error) + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1552 + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + * except: + * curr_stat = None # <<<<<<<<<<<<<< + * + * last_stat = filename_to_stat_info.get(absolute_filename) + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_curr_stat, Py_None); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L16_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1548 + * lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + * + * try: # <<<<<<<<<<<<<< + * curr_stat = os.stat(absolute_filename) + * curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + */ + __pyx_L17_except_error:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + goto __pyx_L4_error; + __pyx_L16_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __pyx_L22_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1554 + * curr_stat = None + * + * last_stat = filename_to_stat_info.get(absolute_filename) # <<<<<<<<<<<<<< + * if last_stat != curr_stat: + * filename_to_stat_info[absolute_filename] = curr_stat + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_filename_to_stat_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1554, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1554, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_absolute_filename}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_last_stat, __pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1555 + * + * last_stat = filename_to_stat_info.get(absolute_filename) + * if last_stat != curr_stat: # <<<<<<<<<<<<<< + * filename_to_stat_info[absolute_filename] = curr_stat + * lines_ignored.clear() + */ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_last_stat, __pyx_v_curr_stat, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1555, __pyx_L4_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1555, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1556 + * last_stat = filename_to_stat_info.get(absolute_filename) + * if last_stat != curr_stat: + * filename_to_stat_info[absolute_filename] = curr_stat # <<<<<<<<<<<<<< + * lines_ignored.clear() + * try: + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_filename_to_stat_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_absolute_filename, __pyx_v_curr_stat) < 0))) __PYX_ERR(0, 1556, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1557 + * if last_stat != curr_stat: + * filename_to_stat_info[absolute_filename] = curr_stat + * lines_ignored.clear() # <<<<<<<<<<<<<< + * try: + * linecache.checkcache(absolute_filename) + */ + if (unlikely(__pyx_v_lines_ignored == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); + __PYX_ERR(0, 1557, __pyx_L4_error) + } + __pyx_t_13 = __Pyx_PyDict_Clear(__pyx_v_lines_ignored); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 1557, __pyx_L4_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1558 + * filename_to_stat_info[absolute_filename] = curr_stat + * lines_ignored.clear() + * try: # <<<<<<<<<<<<<< + * linecache.checkcache(absolute_filename) + * except: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1559 + * lines_ignored.clear() + * try: + * linecache.checkcache(absolute_filename) # <<<<<<<<<<<<<< + * except: + * pydev_log.exception("Error in linecache.checkcache(%r)", absolute_filename) + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_linecache); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1559, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_checkcache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1559, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_absolute_filename}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1559, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1558 + * filename_to_stat_info[absolute_filename] = curr_stat + * lines_ignored.clear() + * try: # <<<<<<<<<<<<<< + * linecache.checkcache(absolute_filename) + * except: + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L33_try_end; + __pyx_L26_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1560 + * try: + * linecache.checkcache(absolute_filename) + * except: # <<<<<<<<<<<<<< + * pydev_log.exception("Error in linecache.checkcache(%r)", absolute_filename) + * + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1560, __pyx_L28_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + + /* "_pydevd_bundle/pydevd_cython.pyx":1561 + * linecache.checkcache(absolute_filename) + * except: + * pydev_log.exception("Error in linecache.checkcache(%r)", absolute_filename) # <<<<<<<<<<<<<< + * + * from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + */ + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1561, __pyx_L28_except_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_exception); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1561, __pyx_L28_except_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_15))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_15, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_kp_s_Error_in_linecache_checkcache_r, __pyx_v_absolute_filename}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1561, __pyx_L28_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L27_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1558 + * filename_to_stat_info[absolute_filename] = curr_stat + * lines_ignored.clear() + * try: # <<<<<<<<<<<<<< + * linecache.checkcache(absolute_filename) + * except: + */ + __pyx_L28_except_error:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); + goto __pyx_L4_error; + __pyx_L27_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); + __pyx_L33_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1555 + * + * last_stat = filename_to_stat_info.get(absolute_filename) + * if last_stat != curr_stat: # <<<<<<<<<<<<<< + * filename_to_stat_info[absolute_filename] = curr_stat + * lines_ignored.clear() + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1563 + * pydev_log.exception("Error in linecache.checkcache(%r)", absolute_filename) + * + * from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) # <<<<<<<<<<<<<< + * if from_user_input: + * merged = {} + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_filename_to_lines_where_exceptio); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1563, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1563, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_canonical_normalized_filename}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1563, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_from_user_input, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1564 + * + * from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * if from_user_input: # <<<<<<<<<<<<<< + * merged = {} + * merged.update(lines_ignored) + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_user_input); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1564, __pyx_L4_error) + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1565 + * from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * if from_user_input: + * merged = {} # <<<<<<<<<<<<<< + * merged.update(lines_ignored) + * # Override what we have with the related entries that the user entered + */ + __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1565, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_merged, ((PyObject*)__pyx_t_7)); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1566 + * if from_user_input: + * merged = {} + * merged.update(lines_ignored) # <<<<<<<<<<<<<< + * # Override what we have with the related entries that the user entered + * merged.update(from_user_input) + */ + __pyx_t_7 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_merged, __pyx_v_lines_ignored); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1566, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1568 + * merged.update(lines_ignored) + * # Override what we have with the related entries that the user entered + * merged.update(from_user_input) # <<<<<<<<<<<<<< + * else: + * merged = lines_ignored + */ + __pyx_t_7 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_merged, __pyx_v_from_user_input); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1568, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1564 + * + * from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + * if from_user_input: # <<<<<<<<<<<<<< + * merged = {} + * merged.update(lines_ignored) + */ + goto __pyx_L36; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1570 + * merged.update(from_user_input) + * else: + * merged = lines_ignored # <<<<<<<<<<<<<< + * + * exc_lineno = check_trace_obj.tb_lineno + */ + /*else*/ { + __Pyx_INCREF(__pyx_v_lines_ignored); + __Pyx_XDECREF_SET(__pyx_v_merged, __pyx_v_lines_ignored); + } + __pyx_L36:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1572 + * merged = lines_ignored + * + * exc_lineno = check_trace_obj.tb_lineno # <<<<<<<<<<<<<< + * + * # print ('lines ignored', lines_ignored) + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_check_trace_obj, __pyx_n_s_tb_lineno); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1572, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_exc_lineno, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1578 + * # print ('merged', merged, 'curr', exc_lineno) + * + * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. # <<<<<<<<<<<<<< + * try: + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + */ + if (unlikely(__pyx_v_merged == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1578, __pyx_L4_error) + } + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_exc_lineno, __pyx_v_merged, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1578, __pyx_L4_error) + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1579 + * + * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. + * try: # <<<<<<<<<<<<<< + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + * except: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1580 + * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. + * try: + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) # <<<<<<<<<<<<<< + * except: + * pydev_log.exception("Error in linecache.getline(%r, %s, f_globals)", absolute_filename, exc_lineno) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_linecache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L38_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getline); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1580, __pyx_L38_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_check_trace_obj, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L38_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_globals); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1580, __pyx_L38_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_absolute_filename, __pyx_v_exc_lineno, __pyx_t_8}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1580, __pyx_L38_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1579 + * + * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. + * try: # <<<<<<<<<<<<<< + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + * except: + */ + } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L45_try_end; + __pyx_L38_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1581 + * try: + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + * except: # <<<<<<<<<<<<<< + * pydev_log.exception("Error in linecache.getline(%r, %s, f_globals)", absolute_filename, exc_lineno) + * line = "" + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1581, __pyx_L40_except_error) + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_8); + + /* "_pydevd_bundle/pydevd_cython.pyx":1582 + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + * except: + * pydev_log.exception("Error in linecache.getline(%r, %s, f_globals)", absolute_filename, exc_lineno) # <<<<<<<<<<<<<< + * line = "" + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1582, __pyx_L40_except_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_exception); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1582, __pyx_L40_except_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_15 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_14))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14); + if (likely(__pyx_t_15)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_14, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_15, __pyx_kp_s_Error_in_linecache_getline_r_s_f, __pyx_v_absolute_filename, __pyx_v_exc_lineno}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1582, __pyx_L40_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1583 + * except: + * pydev_log.exception("Error in linecache.getline(%r, %s, f_globals)", absolute_filename, exc_lineno) + * line = "" # <<<<<<<<<<<<<< + * + * if IGNORE_EXCEPTION_TAG.match(line) is not None: + */ + __Pyx_INCREF(__pyx_kp_s_); + __Pyx_XDECREF_SET(__pyx_v_line, __pyx_kp_s_); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L39_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1579 + * + * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. + * try: # <<<<<<<<<<<<<< + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + * except: + */ + __pyx_L40_except_error:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + goto __pyx_L4_error; + __pyx_L39_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __pyx_L45_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1585 + * line = "" + * + * if IGNORE_EXCEPTION_TAG.match(line) is not None: # <<<<<<<<<<<<<< + * lines_ignored[exc_lineno] = 1 + * return False + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_IGNORE_EXCEPTION_TAG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1585, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_match); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1585, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_line}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1585, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_t_2 = (__pyx_t_8 != Py_None); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1586 + * + * if IGNORE_EXCEPTION_TAG.match(line) is not None: + * lines_ignored[exc_lineno] = 1 # <<<<<<<<<<<<<< + * return False + * else: + */ + if (unlikely(__pyx_v_lines_ignored == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1586, __pyx_L4_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_lines_ignored, __pyx_v_exc_lineno, __pyx_int_1) < 0))) __PYX_ERR(0, 1586, __pyx_L4_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1587 + * if IGNORE_EXCEPTION_TAG.match(line) is not None: + * lines_ignored[exc_lineno] = 1 + * return False # <<<<<<<<<<<<<< + * else: + * # Put in the cache saying not to ignore + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L3_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1585 + * line = "" + * + * if IGNORE_EXCEPTION_TAG.match(line) is not None: # <<<<<<<<<<<<<< + * lines_ignored[exc_lineno] = 1 + * return False + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1590 + * else: + * # Put in the cache saying not to ignore + * lines_ignored[exc_lineno] = 0 # <<<<<<<<<<<<<< + * else: + * # Ok, dict has it already cached, so, let's check it... + */ + /*else*/ { + if (unlikely(__pyx_v_lines_ignored == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1590, __pyx_L4_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_lines_ignored, __pyx_v_exc_lineno, __pyx_int_0) < 0))) __PYX_ERR(0, 1590, __pyx_L4_error) + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1578 + * # print ('merged', merged, 'curr', exc_lineno) + * + * if exc_lineno not in merged: # Note: check on merged but update lines_ignored. # <<<<<<<<<<<<<< + * try: + * line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + */ + goto __pyx_L37; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1593 + * else: + * # Ok, dict has it already cached, so, let's check it... + * if merged.get(exc_lineno, 0): # <<<<<<<<<<<<<< + * return False + * + */ + /*else*/ { + if (unlikely(__pyx_v_merged == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 1593, __pyx_L4_error) + } + __pyx_t_8 = __Pyx_PyDict_GetItemDefault(__pyx_v_merged, __pyx_v_exc_lineno, __pyx_int_0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1593, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1593, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1594 + * # Ok, dict has it already cached, so, let's check it... + * if merged.get(exc_lineno, 0): + * return False # <<<<<<<<<<<<<< + * + * try: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L3_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1593 + * else: + * # Ok, dict has it already cached, so, let's check it... + * if merged.get(exc_lineno, 0): # <<<<<<<<<<<<<< + * return False + * + */ + } + } + __pyx_L37:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1539 + * + * if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: + * for check_trace_obj in (initial_trace_obj, trace_obj): # <<<<<<<<<<<<<< + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + * absolute_filename = abs_real_path_and_base[0] + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1538 + * trace_obj = trace_obj.tb_next + * + * if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: # <<<<<<<<<<<<<< + * for check_trace_obj in (initial_trace_obj, trace_obj): + * abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1596 + * return False + * + * try: # <<<<<<<<<<<<<< + * frame_id_to_frame = {} + * frame_id_to_frame[id(frame)] = frame + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1597 + * + * try: + * frame_id_to_frame = {} # <<<<<<<<<<<<<< + * frame_id_to_frame[id(frame)] = frame + * f = trace_obj.tb_frame + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1597, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_frame_id_to_frame = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1598 + * try: + * frame_id_to_frame = {} + * frame_id_to_frame[id(frame)] = frame # <<<<<<<<<<<<<< + * f = trace_obj.tb_frame + * while f is not None: + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_frame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1598, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely((PyDict_SetItem(__pyx_v_frame_id_to_frame, __pyx_t_4, __pyx_v_frame) < 0))) __PYX_ERR(0, 1598, __pyx_L51_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1599 + * frame_id_to_frame = {} + * frame_id_to_frame[id(frame)] = frame + * f = trace_obj.tb_frame # <<<<<<<<<<<<<< + * while f is not None: + * frame_id_to_frame[id(f)] = f + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace_obj, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1599, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_f = __pyx_t_4; + __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1600 + * frame_id_to_frame[id(frame)] = frame + * f = trace_obj.tb_frame + * while f is not None: # <<<<<<<<<<<<<< + * frame_id_to_frame[id(f)] = f + * f = f.f_back + */ + while (1) { + __pyx_t_2 = (__pyx_v_f != Py_None); + if (!__pyx_t_2) break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1601 + * f = trace_obj.tb_frame + * while f is not None: + * frame_id_to_frame[id(f)] = f # <<<<<<<<<<<<<< + * f = f.f_back + * f = None + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1601, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely((PyDict_SetItem(__pyx_v_frame_id_to_frame, __pyx_t_4, __pyx_v_f) < 0))) __PYX_ERR(0, 1601, __pyx_L51_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1602 + * while f is not None: + * frame_id_to_frame[id(f)] = f + * f = f.f_back # <<<<<<<<<<<<<< + * f = None + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_f_back); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1602, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_4); + __pyx_t_4 = 0; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1603 + * frame_id_to_frame[id(f)] = f + * f = f.f_back + * f = None # <<<<<<<<<<<<<< + * + * stopped = True + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_f, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1605 + * f = None + * + * stopped = True # <<<<<<<<<<<<<< + * py_db.send_caught_exception_stack(thread, arg, id(frame)) + * try: + */ + __pyx_v_stopped = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1606 + * + * stopped = True + * py_db.send_caught_exception_stack(thread, arg, id(frame)) # <<<<<<<<<<<<<< + * try: + * py_db.set_suspend(thread, 137) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_send_caught_exception_stack); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1606, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1606, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_thread, __pyx_v_arg, __pyx_t_7}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1606, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1607 + * stopped = True + * py_db.send_caught_exception_stack(thread, arg, id(frame)) + * try: # <<<<<<<<<<<<<< + * py_db.set_suspend(thread, 137) + * py_db.do_wait_suspend(thread, frame, "exception", arg, exception_type=exception_type) + */ + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1608 + * py_db.send_caught_exception_stack(thread, arg, id(frame)) + * try: + * py_db.set_suspend(thread, 137) # <<<<<<<<<<<<<< + * py_db.do_wait_suspend(thread, frame, "exception", arg, exception_type=exception_type) + * finally: + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1608, __pyx_L60_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_thread, __pyx_int_137}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1608, __pyx_L60_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1609 + * try: + * py_db.set_suspend(thread, 137) + * py_db.do_wait_suspend(thread, frame, "exception", arg, exception_type=exception_type) # <<<<<<<<<<<<<< + * finally: + * py_db.send_caught_exception_stack_proceeded(thread) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1609, __pyx_L60_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1609, __pyx_L60_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_GIVEREF(__pyx_v_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_thread)) __PYX_ERR(0, 1609, __pyx_L60_error); + __Pyx_INCREF(__pyx_v_frame); + __Pyx_GIVEREF(__pyx_v_frame); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_frame)) __PYX_ERR(0, 1609, __pyx_L60_error); + __Pyx_INCREF(__pyx_n_s_exception); + __Pyx_GIVEREF(__pyx_n_s_exception); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_n_s_exception)) __PYX_ERR(0, 1609, __pyx_L60_error); + __Pyx_INCREF(__pyx_v_arg); + __Pyx_GIVEREF(__pyx_v_arg); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_arg)) __PYX_ERR(0, 1609, __pyx_L60_error); + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1609, __pyx_L60_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_exception_type, __pyx_v_exception_type) < 0) __PYX_ERR(0, 1609, __pyx_L60_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1609, __pyx_L60_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1611 + * py_db.do_wait_suspend(thread, frame, "exception", arg, exception_type=exception_type) + * finally: + * py_db.send_caught_exception_stack_proceeded(thread) # <<<<<<<<<<<<<< + * except: + * pydev_log.exception() + */ + /*finally:*/ { + /*normal exit:*/{ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_send_caught_exception_stack_proc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1611, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_thread}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1611, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L61; + } + __pyx_L60_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_24); + __pyx_t_16 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename; + { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_send_caught_exception_stack_proc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1611, __pyx_L63_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_thread}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1611, __pyx_L63_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); + } + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21); + __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; + __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18; + goto __pyx_L51_error; + __pyx_L63_error:; + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); + } + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; + goto __pyx_L51_error; + } + __pyx_L61:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1596 + * return False + * + * try: # <<<<<<<<<<<<<< + * frame_id_to_frame = {} + * frame_id_to_frame[id(frame)] = frame + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L56_try_end; + __pyx_L51_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1612 + * finally: + * py_db.send_caught_exception_stack_proceeded(thread) + * except: # <<<<<<<<<<<<<< + * pydev_log.exception() + * + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 1612, __pyx_L53_except_error) + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + + /* "_pydevd_bundle/pydevd_cython.pyx":1613 + * py_db.send_caught_exception_stack_proceeded(thread) + * except: + * pydev_log.exception() # <<<<<<<<<<<<<< + * + * py_db.set_trace_for_frame_and_parents(thread.ident, frame) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1613, __pyx_L53_except_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_exception); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1613, __pyx_L53_except_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_14))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_14); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_14, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1613, __pyx_L53_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L52_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1596 + * return False + * + * try: # <<<<<<<<<<<<<< + * frame_id_to_frame = {} + * frame_id_to_frame[id(frame)] = frame + */ + __pyx_L53_except_error:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); + goto __pyx_L4_error; + __pyx_L52_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); + __pyx_L56_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1615 + * pydev_log.exception() + * + * py_db.set_trace_for_frame_and_parents(thread.ident, frame) # <<<<<<<<<<<<<< + * finally: + * # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_set_trace_for_frame_and_parents); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1615, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_ident_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1615, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_v_frame}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1615, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1618 + * finally: + * # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. + * remove_exception_from_frame(frame) # <<<<<<<<<<<<<< + * # Clear some local variables... + * frame = None + */ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_remove_exception_from_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_frame}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1620 + * remove_exception_from_frame(frame) + * # Clear some local variables... + * frame = None # <<<<<<<<<<<<<< + * trace_obj = None + * initial_trace_obj = None + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_frame, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1621 + * # Clear some local variables... + * frame = None + * trace_obj = None # <<<<<<<<<<<<<< + * initial_trace_obj = None + * check_trace_obj = None + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_trace_obj, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1622 + * frame = None + * trace_obj = None + * initial_trace_obj = None # <<<<<<<<<<<<<< + * check_trace_obj = None + * f = None + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_initial_trace_obj, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1623 + * trace_obj = None + * initial_trace_obj = None + * check_trace_obj = None # <<<<<<<<<<<<<< + * f = None + * frame_id_to_frame = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_check_trace_obj, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1624 + * initial_trace_obj = None + * check_trace_obj = None + * f = None # <<<<<<<<<<<<<< + * frame_id_to_frame = None + * py_db = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1625 + * check_trace_obj = None + * f = None + * frame_id_to_frame = None # <<<<<<<<<<<<<< + * py_db = None + * thread = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_frame_id_to_frame, ((PyObject*)Py_None)); + + /* "_pydevd_bundle/pydevd_cython.pyx":1626 + * f = None + * frame_id_to_frame = None + * py_db = None # <<<<<<<<<<<<<< + * thread = None + * + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_py_db, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1627 + * frame_id_to_frame = None + * py_db = None + * thread = None # <<<<<<<<<<<<<< + * + * return stopped + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_thread, Py_None); + goto __pyx_L5; + } + __pyx_L4_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_22); + __pyx_t_17 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_25 = __pyx_filename; + { + + /* "_pydevd_bundle/pydevd_cython.pyx":1618 + * finally: + * # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. + * remove_exception_from_frame(frame) # <<<<<<<<<<<<<< + * # Clear some local variables... + * frame = None + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_remove_exception_from_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1618, __pyx_L67_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_frame}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1618, __pyx_L67_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1620 + * remove_exception_from_frame(frame) + * # Clear some local variables... + * frame = None # <<<<<<<<<<<<<< + * trace_obj = None + * initial_trace_obj = None + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_frame, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1621 + * # Clear some local variables... + * frame = None + * trace_obj = None # <<<<<<<<<<<<<< + * initial_trace_obj = None + * check_trace_obj = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_trace_obj, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1622 + * frame = None + * trace_obj = None + * initial_trace_obj = None # <<<<<<<<<<<<<< + * check_trace_obj = None + * f = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_initial_trace_obj, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1623 + * trace_obj = None + * initial_trace_obj = None + * check_trace_obj = None # <<<<<<<<<<<<<< + * f = None + * frame_id_to_frame = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_check_trace_obj, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1624 + * initial_trace_obj = None + * check_trace_obj = None + * f = None # <<<<<<<<<<<<<< + * frame_id_to_frame = None + * py_db = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1625 + * check_trace_obj = None + * f = None + * frame_id_to_frame = None # <<<<<<<<<<<<<< + * py_db = None + * thread = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_frame_id_to_frame, ((PyObject*)Py_None)); + + /* "_pydevd_bundle/pydevd_cython.pyx":1626 + * f = None + * frame_id_to_frame = None + * py_db = None # <<<<<<<<<<<<<< + * thread = None + * + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_py_db, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1627 + * frame_id_to_frame = None + * py_db = None + * thread = None # <<<<<<<<<<<<<< + * + * return stopped + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_thread, Py_None); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_23, __pyx_t_22); + } + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; + __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_25; + goto __pyx_L1_error; + __pyx_L67_error:; + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_23, __pyx_t_22); + } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; + goto __pyx_L1_error; + } + __pyx_L3_return: { + __pyx_t_22 = __pyx_r; + __pyx_r = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1618 + * finally: + * # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. + * remove_exception_from_frame(frame) # <<<<<<<<<<<<<< + * # Clear some local variables... + * frame = None + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_remove_exception_from_frame); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_frame}; + __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1620 + * remove_exception_from_frame(frame) + * # Clear some local variables... + * frame = None # <<<<<<<<<<<<<< + * trace_obj = None + * initial_trace_obj = None + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_frame, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1621 + * # Clear some local variables... + * frame = None + * trace_obj = None # <<<<<<<<<<<<<< + * initial_trace_obj = None + * check_trace_obj = None + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_trace_obj, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1622 + * frame = None + * trace_obj = None + * initial_trace_obj = None # <<<<<<<<<<<<<< + * check_trace_obj = None + * f = None + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_initial_trace_obj, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1623 + * trace_obj = None + * initial_trace_obj = None + * check_trace_obj = None # <<<<<<<<<<<<<< + * f = None + * frame_id_to_frame = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_check_trace_obj, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1624 + * initial_trace_obj = None + * check_trace_obj = None + * f = None # <<<<<<<<<<<<<< + * frame_id_to_frame = None + * py_db = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_f, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1625 + * check_trace_obj = None + * f = None + * frame_id_to_frame = None # <<<<<<<<<<<<<< + * py_db = None + * thread = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_frame_id_to_frame, ((PyObject*)Py_None)); + + /* "_pydevd_bundle/pydevd_cython.pyx":1626 + * f = None + * frame_id_to_frame = None + * py_db = None # <<<<<<<<<<<<<< + * thread = None + * + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_py_db, Py_None); + + /* "_pydevd_bundle/pydevd_cython.pyx":1627 + * frame_id_to_frame = None + * py_db = None + * thread = None # <<<<<<<<<<<<<< + * + * return stopped + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_thread, Py_None); + __pyx_r = __pyx_t_22; + __pyx_t_22 = 0; + goto __pyx_L0; + } + __pyx_L5:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1629 + * thread = None + * + * return stopped # <<<<<<<<<<<<<< + * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive + * from _pydev_bundle.pydev_log import exception as pydev_log_exception + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_stopped); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1510 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def handle_exception(py_db, thread, frame, arg, str exception_type): # <<<<<<<<<<<<<< + * cdef bint stopped; + * cdef tuple abs_real_path_and_base; + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_abs_real_path_and_base); + __Pyx_XDECREF(__pyx_v_absolute_filename); + __Pyx_XDECREF(__pyx_v_canonical_normalized_filename); + __Pyx_XDECREF(__pyx_v_lines_ignored); + __Pyx_XDECREF(__pyx_v_frame_id_to_frame); + __Pyx_XDECREF(__pyx_v_merged); + __Pyx_XDECREF(__pyx_v_trace_obj); + __Pyx_XDECREF(__pyx_v_initial_trace_obj); + __Pyx_XDECREF(__pyx_v_check_trace_obj); + __Pyx_XDECREF(__pyx_v_curr_stat); + __Pyx_XDECREF(__pyx_v_last_stat); + __Pyx_XDECREF(__pyx_v_from_user_input); + __Pyx_XDECREF(__pyx_v_exc_lineno); + __Pyx_XDECREF(__pyx_v_line); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_py_db); + __Pyx_XDECREF(__pyx_v_thread); + __Pyx_XDECREF(__pyx_v_frame); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1674 + * + * + * def notify_skipped_step_in_because_of_filters(py_db, frame): # <<<<<<<<<<<<<< + * global _global_notify_skipped_step_in + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_17notify_skipped_step_in_because_of_filters(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_17notify_skipped_step_in_because_of_filters = {"notify_skipped_step_in_because_of_filters", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_17notify_skipped_step_in_because_of_filters, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_17notify_skipped_step_in_because_of_filters(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_py_db = 0; + PyObject *__pyx_v_frame = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("notify_skipped_step_in_because_of_filters (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_py_db,&__pyx_n_s_frame,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_py_db)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1674, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1674, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("notify_skipped_step_in_because_of_filters", 1, 2, 2, 1); __PYX_ERR(0, 1674, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "notify_skipped_step_in_because_of_filters") < 0)) __PYX_ERR(0, 1674, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + } + __pyx_v_py_db = values[0]; + __pyx_v_frame = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("notify_skipped_step_in_because_of_filters", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1674, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.notify_skipped_step_in_because_of_filters", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_16notify_skipped_step_in_because_of_filters(__pyx_self, __pyx_v_py_db, __pyx_v_frame); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_16notify_skipped_step_in_because_of_filters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + unsigned int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("notify_skipped_step_in_because_of_filters", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1677 + * global _global_notify_skipped_step_in + * + * with _global_notify_skipped_step_in_lock: # <<<<<<<<<<<<<< + * if _global_notify_skipped_step_in: + * # Check with lock in place (callers should actually have checked + */ + /*with:*/ { + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_global_notify_skipped_step_in_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1677, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1677, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1678 + * + * with _global_notify_skipped_step_in_lock: + * if _global_notify_skipped_step_in: # <<<<<<<<<<<<<< + * # Check with lock in place (callers should actually have checked + * # before without the lock in place due to performance). + */ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1678, __pyx_L7_error) + if (__pyx_t_10) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1681 + * # Check with lock in place (callers should actually have checked + * # before without the lock in place due to performance). + * return # <<<<<<<<<<<<<< + * _global_notify_skipped_step_in = True + * py_db.notify_skipped_step_in_because_of_filters(frame) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L11_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":1678 + * + * with _global_notify_skipped_step_in_lock: + * if _global_notify_skipped_step_in: # <<<<<<<<<<<<<< + * # Check with lock in place (callers should actually have checked + * # before without the lock in place due to performance). + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1682 + * # before without the lock in place due to performance). + * return + * _global_notify_skipped_step_in = True # <<<<<<<<<<<<<< + * py_db.notify_skipped_step_in_because_of_filters(frame) + * + */ + __Pyx_INCREF(Py_True); + __Pyx_XGOTREF(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in); + __Pyx_DECREF_SET(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in, ((PyObject*)Py_True)); + __Pyx_GIVEREF(Py_True); + + /* "_pydevd_bundle/pydevd_cython.pyx":1683 + * return + * _global_notify_skipped_step_in = True + * py_db.notify_skipped_step_in_because_of_filters(frame) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_notify_skipped_step_in_because_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1683, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_6 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1677 + * global _global_notify_skipped_step_in + * + * with _global_notify_skipped_step_in_lock: # <<<<<<<<<<<<<< + * if _global_notify_skipped_step_in: + * # Check with lock in place (callers should actually have checked + */ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.notify_skipped_step_in_because_of_filters", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 1677, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1677, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1677, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_10 < 0) __PYX_ERR(0, 1677, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_10); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_4); + __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 1677, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L11_try_return:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L4_return; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_2) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__3, NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L4_return: { + __pyx_t_9 = __pyx_r; + __pyx_r = 0; + if (__pyx_t_2) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__3, NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + } + __pyx_L6:; + } + goto __pyx_L17; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L1_error; + __pyx_L17:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1674 + * + * + * def notify_skipped_step_in_because_of_filters(py_db, frame): # <<<<<<<<<<<<<< + * global _global_notify_skipped_step_in + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.notify_skipped_step_in_because_of_filters", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1690 + * cdef class SafeCallWrapper: + * cdef method_object + * def __init__(self, method_object): # <<<<<<<<<<<<<< + * self.method_object = method_object + * def __call__(self, *args): + */ + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_method_object = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_method_object,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_method_object)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1690, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + } + __pyx_v_method_object = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1690, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.SafeCallWrapper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper___init__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *)__pyx_v_self), __pyx_v_method_object); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper___init__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *__pyx_v_self, PyObject *__pyx_v_method_object) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1691 + * cdef method_object + * def __init__(self, method_object): + * self.method_object = method_object # <<<<<<<<<<<<<< + * def __call__(self, *args): + * #Cannot use 'self' once inside the delegate call since we are borrowing the self reference f_trace field + */ + __Pyx_INCREF(__pyx_v_method_object); + __Pyx_GIVEREF(__pyx_v_method_object); + __Pyx_GOTREF(__pyx_v_self->method_object); + __Pyx_DECREF(__pyx_v_self->method_object); + __pyx_v_self->method_object = __pyx_v_method_object; + + /* "_pydevd_bundle/pydevd_cython.pyx":1690 + * cdef class SafeCallWrapper: + * cdef method_object + * def __init__(self, method_object): # <<<<<<<<<<<<<< + * self.method_object = method_object + * def __call__(self, *args): + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1692 + * def __init__(self, method_object): + * self.method_object = method_object + * def __call__(self, *args): # <<<<<<<<<<<<<< + * #Cannot use 'self' once inside the delegate call since we are borrowing the self reference f_trace field + * #in the frame, and that reference might get destroyed by set trace on frame and parents + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 0))) return NULL; + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_2__call__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *)__pyx_v_self), __pyx_v_args); + + /* function exit code */ + __Pyx_DECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_2__call__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *__pyx_v_self, PyObject *__pyx_v_args) { + PyObject *__pyx_v_method_obj; + PyObject *__pyx_v_ret = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__call__", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1695 + * #Cannot use 'self' once inside the delegate call since we are borrowing the self reference f_trace field + * #in the frame, and that reference might get destroyed by set trace on frame and parents + * cdef PyObject* method_obj = self.method_object # <<<<<<<<<<<<<< + * Py_INCREF(method_obj) + * ret = (method_obj)(*args) + */ + __pyx_v_method_obj = ((PyObject *)__pyx_v_self->method_object); + + /* "_pydevd_bundle/pydevd_cython.pyx":1696 + * #in the frame, and that reference might get destroyed by set trace on frame and parents + * cdef PyObject* method_obj = self.method_object + * Py_INCREF(method_obj) # <<<<<<<<<<<<<< + * ret = (method_obj)(*args) + * Py_XDECREF (method_obj) + */ + Py_INCREF(((PyObject *)__pyx_v_method_obj)); + + /* "_pydevd_bundle/pydevd_cython.pyx":1697 + * cdef PyObject* method_obj = self.method_object + * Py_INCREF(method_obj) + * ret = (method_obj)(*args) # <<<<<<<<<<<<<< + * Py_XDECREF (method_obj) + * return SafeCallWrapper(ret) if ret is not None else None + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_method_obj), __pyx_v_args, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1697, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ret = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1698 + * Py_INCREF(method_obj) + * ret = (method_obj)(*args) + * Py_XDECREF (method_obj) # <<<<<<<<<<<<<< + * return SafeCallWrapper(ret) if ret is not None else None + * def get_method_object(self): + */ + Py_XDECREF(__pyx_v_method_obj); + + /* "_pydevd_bundle/pydevd_cython.pyx":1699 + * ret = (method_obj)(*args) + * Py_XDECREF (method_obj) + * return SafeCallWrapper(ret) if ret is not None else None # <<<<<<<<<<<<<< + * def get_method_object(self): + * return self.method_object + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = (__pyx_v_ret != Py_None); + if (__pyx_t_2) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1692 + * def __init__(self, method_object): + * self.method_object = method_object + * def __call__(self, *args): # <<<<<<<<<<<<<< + * #Cannot use 'self' once inside the delegate call since we are borrowing the self reference f_trace field + * #in the frame, and that reference might get destroyed by set trace on frame and parents + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.SafeCallWrapper.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_ret); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1700 + * Py_XDECREF (method_obj) + * return SafeCallWrapper(ret) if ret is not None else None + * def get_method_object(self): # <<<<<<<<<<<<<< + * return self.method_object + * # ELSE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_5get_method_object(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_5get_method_object = {"get_method_object", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_5get_method_object, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_5get_method_object(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_method_object (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("get_method_object", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_method_object", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_4get_method_object(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_4get_method_object(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_method_object", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1701 + * return SafeCallWrapper(ret) if ret is not None else None + * def get_method_object(self): + * return self.method_object # <<<<<<<<<<<<<< + * # ELSE + * # ENDIF + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->method_object); + __pyx_r = __pyx_v_self->method_object; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1700 + * Py_XDECREF (method_obj) + * return SafeCallWrapper(ret) if ret is not None else None + * def get_method_object(self): # <<<<<<<<<<<<<< + * return self.method_object + * # ELSE + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_6__reduce_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_6__reduce_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 1); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.method_object,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->method_object); + __Pyx_GIVEREF(__pyx_v_self->method_object); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->method_object)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.method_object,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.method_object,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_2 = (__pyx_v__dict != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.method_object is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.method_object,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.method_object is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SafeCallWrapper, (type(self), 0xa14289b, None), state + */ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->method_object != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.method_object is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SafeCallWrapper, (type(self), 0xa14289b, None), state + * else: + */ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.method_object is not None + * if use_setstate: + * return __pyx_unpickle_SafeCallWrapper, (type(self), 0xa14289b, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SafeCallWrapper, (type(self), 0xa14289b, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_SafeCallWrapper); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_169093275); + __Pyx_GIVEREF(__pyx_int_169093275); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_169093275)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.method_object is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SafeCallWrapper, (type(self), 0xa14289b, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SafeCallWrapper, (type(self), 0xa14289b, None), state + * else: + * return __pyx_unpickle_SafeCallWrapper, (type(self), 0xa14289b, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SafeCallWrapper__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_SafeCallWrapper); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_169093275); + __Pyx_GIVEREF(__pyx_int_169093275); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_169093275)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.SafeCallWrapper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SafeCallWrapper, (type(self), 0xa14289b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SafeCallWrapper__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 16, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.SafeCallWrapper.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_8__setstate_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_8__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 1); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SafeCallWrapper, (type(self), 0xa14289b, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SafeCallWrapper__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_SafeCallWrapper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SafeCallWrapper, (type(self), 0xa14289b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SafeCallWrapper__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.SafeCallWrapper.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1707 + * + * + * def fix_top_level_trace_and_get_trace_func(py_db, frame): # <<<<<<<<<<<<<< + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_19fix_top_level_trace_and_get_trace_func(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_19fix_top_level_trace_and_get_trace_func = {"fix_top_level_trace_and_get_trace_func", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_19fix_top_level_trace_and_get_trace_func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_19fix_top_level_trace_and_get_trace_func(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_py_db = 0; + PyObject *__pyx_v_frame = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fix_top_level_trace_and_get_trace_func (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_py_db,&__pyx_n_s_frame,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_py_db)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1707, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1707, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("fix_top_level_trace_and_get_trace_func", 1, 2, 2, 1); __PYX_ERR(0, 1707, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fix_top_level_trace_and_get_trace_func") < 0)) __PYX_ERR(0, 1707, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + } + __pyx_v_py_db = values[0]; + __pyx_v_frame = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("fix_top_level_trace_and_get_trace_func", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1707, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.fix_top_level_trace_and_get_trace_func", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_18fix_top_level_trace_and_get_trace_func(__pyx_self, __pyx_v_py_db, __pyx_v_frame); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_18fix_top_level_trace_and_get_trace_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame) { + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_thread = NULL; + PyObject *__pyx_v_f_unhandled = NULL; + int __pyx_v_force_only_unhandled_tracer; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_v_j = NULL; + PyObject *__pyx_v_t = NULL; + PyObject *__pyx_v_additional_info = NULL; + PyObject *__pyx_v_top_level_thread_tracer = NULL; + PyObject *__pyx_v_f_trace = NULL; + PyObject *__pyx_v_thread_tracer = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + int __pyx_t_15; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("fix_top_level_trace_and_get_trace_func", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1720 + * # where more information is cached (and will also setup the tracing for + * # frames where we should deal with unhandled exceptions). + * thread = None # <<<<<<<<<<<<<< + * # Cache the frame which should be traced to deal with unhandled exceptions. + * # (i.e.: thread entry-points). + */ + __Pyx_INCREF(Py_None); + __pyx_v_thread = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":1724 + * # (i.e.: thread entry-points). + * + * f_unhandled = frame # <<<<<<<<<<<<<< + * # print('called at', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) + * force_only_unhandled_tracer = False + */ + __Pyx_INCREF(__pyx_v_frame); + __pyx_v_f_unhandled = __pyx_v_frame; + + /* "_pydevd_bundle/pydevd_cython.pyx":1726 + * f_unhandled = frame + * # print('called at', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) + * force_only_unhandled_tracer = False # <<<<<<<<<<<<<< + * while f_unhandled is not None: + * # name = splitext(basename(f_unhandled.f_code.co_filename))[0] + */ + __pyx_v_force_only_unhandled_tracer = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1727 + * # print('called at', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) + * force_only_unhandled_tracer = False + * while f_unhandled is not None: # <<<<<<<<<<<<<< + * # name = splitext(basename(f_unhandled.f_code.co_filename))[0] + * + */ + while (1) { + __pyx_t_1 = (__pyx_v_f_unhandled != Py_None); + if (!__pyx_t_1) break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1730 + * # name = splitext(basename(f_unhandled.f_code.co_filename))[0] + * + * name = f_unhandled.f_code.co_filename # <<<<<<<<<<<<<< + * # basename + * i = name.rfind("/") + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 1730, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1732 + * name = f_unhandled.f_code.co_filename + * # basename + * i = name.rfind("/") # <<<<<<<<<<<<<< + * j = name.rfind("\\") + * if j > i: + */ + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_rfind, __pyx_v_name, __pyx_kp_s__8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1733 + * # basename + * i = name.rfind("/") + * j = name.rfind("\\") # <<<<<<<<<<<<<< + * if j > i: + * i = j + */ + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_rfind, __pyx_v_name, __pyx_kp_s__9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1733, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1734 + * i = name.rfind("/") + * j = name.rfind("\\") + * if j > i: # <<<<<<<<<<<<<< + * i = j + * if i >= 0: + */ + __pyx_t_3 = PyObject_RichCompare(__pyx_v_j, __pyx_v_i, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1734, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1734, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1735 + * j = name.rfind("\\") + * if j > i: + * i = j # <<<<<<<<<<<<<< + * if i >= 0: + * name = name[i + 1 :] + */ + __Pyx_INCREF(__pyx_v_j); + __Pyx_DECREF_SET(__pyx_v_i, __pyx_v_j); + + /* "_pydevd_bundle/pydevd_cython.pyx":1734 + * i = name.rfind("/") + * j = name.rfind("\\") + * if j > i: # <<<<<<<<<<<<<< + * i = j + * if i >= 0: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1736 + * if j > i: + * i = j + * if i >= 0: # <<<<<<<<<<<<<< + * name = name[i + 1 :] + * # remove ext + */ + __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1736, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1736, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1737 + * i = j + * if i >= 0: + * name = name[i + 1 :] # <<<<<<<<<<<<<< + * # remove ext + * i = name.rfind(".") + */ + if (unlikely(__pyx_v_name == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1737, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = (__pyx_t_3 == Py_None); + if (__pyx_t_1) { + __pyx_t_4 = 0; + } else { + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1737, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PySequence_GetSlice(__pyx_v_name, __pyx_t_4, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1736 + * if j > i: + * i = j + * if i >= 0: # <<<<<<<<<<<<<< + * name = name[i + 1 :] + * # remove ext + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1739 + * name = name[i + 1 :] + * # remove ext + * i = name.rfind(".") # <<<<<<<<<<<<<< + * if i >= 0: + * name = name[:i] + */ + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_rfind, __pyx_v_name, __pyx_kp_s__10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1740 + * # remove ext + * i = name.rfind(".") + * if i >= 0: # <<<<<<<<<<<<<< + * name = name[:i] + * + */ + __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1740, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1740, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1741 + * i = name.rfind(".") + * if i >= 0: + * name = name[:i] # <<<<<<<<<<<<<< + * + * if name == "threading": + */ + if (unlikely(__pyx_v_name == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1741, __pyx_L1_error) + } + __Pyx_INCREF(__pyx_v_i); + __pyx_t_3 = __pyx_v_i; + __pyx_t_1 = (__pyx_t_3 == Py_None); + if (__pyx_t_1) { + __pyx_t_4 = PY_SSIZE_T_MAX; + } else { + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1741, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PySequence_GetSlice(__pyx_v_name, 0, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1740 + * # remove ext + * i = name.rfind(".") + * if i >= 0: # <<<<<<<<<<<<<< + * name = name[:i] + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1743 + * name = name[:i] + * + * if name == "threading": # <<<<<<<<<<<<<< + * if f_unhandled.f_code.co_name in ("__bootstrap", "_bootstrap"): + * # We need __bootstrap_inner, not __bootstrap. + */ + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_threading, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1743, __pyx_L1_error) + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1744 + * + * if name == "threading": + * if f_unhandled.f_code.co_name in ("__bootstrap", "_bootstrap"): # <<<<<<<<<<<<<< + * # We need __bootstrap_inner, not __bootstrap. + * return None, False + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_bootstrap, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1744, __pyx_L1_error) + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_bootstrap_2, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1744, __pyx_L1_error) + __pyx_t_1 = __pyx_t_6; + __pyx_L10_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = __pyx_t_1; + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1746 + * if f_unhandled.f_code.co_name in ("__bootstrap", "_bootstrap"): + * # We need __bootstrap_inner, not __bootstrap. + * return None, False # <<<<<<<<<<<<<< + * + * elif f_unhandled.f_code.co_name in ("__bootstrap_inner", "_bootstrap_inner"): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_tuple__11); + __pyx_r = __pyx_tuple__11; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1744 + * + * if name == "threading": + * if f_unhandled.f_code.co_name in ("__bootstrap", "_bootstrap"): # <<<<<<<<<<<<<< + * # We need __bootstrap_inner, not __bootstrap. + * return None, False + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1748 + * return None, False + * + * elif f_unhandled.f_code.co_name in ("__bootstrap_inner", "_bootstrap_inner"): # <<<<<<<<<<<<<< + * # Note: be careful not to use threading.currentThread to avoid creating a dummy thread. + * t = f_unhandled.f_locals.get("self") + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_bootstrap_inner, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1748, __pyx_L1_error) + if (!__pyx_t_1) { + } else { + __pyx_t_6 = __pyx_t_1; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_bootstrap_inner_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1748, __pyx_L1_error) + __pyx_t_6 = __pyx_t_1; + __pyx_L12_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __pyx_t_6; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1750 + * elif f_unhandled.f_code.co_name in ("__bootstrap_inner", "_bootstrap_inner"): + * # Note: be careful not to use threading.currentThread to avoid creating a dummy thread. + * t = f_unhandled.f_locals.get("self") # <<<<<<<<<<<<<< + * force_only_unhandled_tracer = True + * if t is not None and isinstance(t, threading.Thread): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_self}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1751 + * # Note: be careful not to use threading.currentThread to avoid creating a dummy thread. + * t = f_unhandled.f_locals.get("self") + * force_only_unhandled_tracer = True # <<<<<<<<<<<<<< + * if t is not None and isinstance(t, threading.Thread): + * thread = t + */ + __pyx_v_force_only_unhandled_tracer = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1752 + * t = f_unhandled.f_locals.get("self") + * force_only_unhandled_tracer = True + * if t is not None and isinstance(t, threading.Thread): # <<<<<<<<<<<<<< + * thread = t + * break + */ + __pyx_t_6 = (__pyx_v_t != Py_None); + if (__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L15_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1752, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1752, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = PyObject_IsInstance(__pyx_v_t, __pyx_t_7); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1752, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = __pyx_t_6; + __pyx_L15_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1753 + * force_only_unhandled_tracer = True + * if t is not None and isinstance(t, threading.Thread): + * thread = t # <<<<<<<<<<<<<< + * break + * + */ + __Pyx_INCREF(__pyx_v_t); + __Pyx_DECREF_SET(__pyx_v_thread, __pyx_v_t); + + /* "_pydevd_bundle/pydevd_cython.pyx":1754 + * if t is not None and isinstance(t, threading.Thread): + * thread = t + * break # <<<<<<<<<<<<<< + * + * elif name == "pydev_monkey": + */ + goto __pyx_L4_break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1752 + * t = f_unhandled.f_locals.get("self") + * force_only_unhandled_tracer = True + * if t is not None and isinstance(t, threading.Thread): # <<<<<<<<<<<<<< + * thread = t + * break + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1748 + * return None, False + * + * elif f_unhandled.f_code.co_name in ("__bootstrap_inner", "_bootstrap_inner"): # <<<<<<<<<<<<<< + * # Note: be careful not to use threading.currentThread to avoid creating a dummy thread. + * t = f_unhandled.f_locals.get("self") + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1743 + * name = name[:i] + * + * if name == "threading": # <<<<<<<<<<<<<< + * if f_unhandled.f_code.co_name in ("__bootstrap", "_bootstrap"): + * # We need __bootstrap_inner, not __bootstrap. + */ + goto __pyx_L8; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1756 + * break + * + * elif name == "pydev_monkey": # <<<<<<<<<<<<<< + * if f_unhandled.f_code.co_name == "__call__": + * force_only_unhandled_tracer = True + */ + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_pydev_monkey, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1756, __pyx_L1_error) + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1757 + * + * elif name == "pydev_monkey": + * if f_unhandled.f_code.co_name == "__call__": # <<<<<<<<<<<<<< + * force_only_unhandled_tracer = True + * break + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_call_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1757, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1758 + * elif name == "pydev_monkey": + * if f_unhandled.f_code.co_name == "__call__": + * force_only_unhandled_tracer = True # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_force_only_unhandled_tracer = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1759 + * if f_unhandled.f_code.co_name == "__call__": + * force_only_unhandled_tracer = True + * break # <<<<<<<<<<<<<< + * + * elif name == "pydevd": + */ + goto __pyx_L4_break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1757 + * + * elif name == "pydev_monkey": + * if f_unhandled.f_code.co_name == "__call__": # <<<<<<<<<<<<<< + * force_only_unhandled_tracer = True + * break + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1756 + * break + * + * elif name == "pydev_monkey": # <<<<<<<<<<<<<< + * if f_unhandled.f_code.co_name == "__call__": + * force_only_unhandled_tracer = True + */ + goto __pyx_L8; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1761 + * break + * + * elif name == "pydevd": # <<<<<<<<<<<<<< + * if f_unhandled.f_code.co_name in ("run", "main"): + * # We need to get to _exec + */ + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_pydevd, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1761, __pyx_L1_error) + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1762 + * + * elif name == "pydevd": + * if f_unhandled.f_code.co_name in ("run", "main"): # <<<<<<<<<<<<<< + * # We need to get to _exec + * return None, False + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_run, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1762, __pyx_L1_error) + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L19_bool_binop_done; + } + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_main, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1762, __pyx_L1_error) + __pyx_t_1 = __pyx_t_6; + __pyx_L19_bool_binop_done:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_6 = __pyx_t_1; + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1764 + * if f_unhandled.f_code.co_name in ("run", "main"): + * # We need to get to _exec + * return None, False # <<<<<<<<<<<<<< + * + * if f_unhandled.f_code.co_name == "_exec": + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_tuple__11); + __pyx_r = __pyx_tuple__11; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1762 + * + * elif name == "pydevd": + * if f_unhandled.f_code.co_name in ("run", "main"): # <<<<<<<<<<<<<< + * # We need to get to _exec + * return None, False + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1766 + * return None, False + * + * if f_unhandled.f_code.co_name == "_exec": # <<<<<<<<<<<<<< + * force_only_unhandled_tracer = True + * break + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1766, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1766, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_exec, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1766, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1767 + * + * if f_unhandled.f_code.co_name == "_exec": + * force_only_unhandled_tracer = True # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_force_only_unhandled_tracer = 1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1768 + * if f_unhandled.f_code.co_name == "_exec": + * force_only_unhandled_tracer = True + * break # <<<<<<<<<<<<<< + * + * elif name == "pydevd_tracing": + */ + goto __pyx_L4_break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1766 + * return None, False + * + * if f_unhandled.f_code.co_name == "_exec": # <<<<<<<<<<<<<< + * force_only_unhandled_tracer = True + * break + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1761 + * break + * + * elif name == "pydevd": # <<<<<<<<<<<<<< + * if f_unhandled.f_code.co_name in ("run", "main"): + * # We need to get to _exec + */ + goto __pyx_L8; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1770 + * break + * + * elif name == "pydevd_tracing": # <<<<<<<<<<<<<< + * return None, False + * + */ + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_pydevd_tracing, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1770, __pyx_L1_error) + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1771 + * + * elif name == "pydevd_tracing": + * return None, False # <<<<<<<<<<<<<< + * + * elif f_unhandled.f_back is None: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_tuple__11); + __pyx_r = __pyx_tuple__11; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1770 + * break + * + * elif name == "pydevd_tracing": # <<<<<<<<<<<<<< + * return None, False + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1773 + * return None, False + * + * elif f_unhandled.f_back is None: # <<<<<<<<<<<<<< + * break + * + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = (__pyx_t_3 == Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1774 + * + * elif f_unhandled.f_back is None: + * break # <<<<<<<<<<<<<< + * + * f_unhandled = f_unhandled.f_back + */ + goto __pyx_L4_break; + + /* "_pydevd_bundle/pydevd_cython.pyx":1773 + * return None, False + * + * elif f_unhandled.f_back is None: # <<<<<<<<<<<<<< + * break + * + */ + } + __pyx_L8:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1776 + * break + * + * f_unhandled = f_unhandled.f_back # <<<<<<<<<<<<<< + * + * if thread is None: + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_f_unhandled, __pyx_t_3); + __pyx_t_3 = 0; + } + __pyx_L4_break:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1778 + * f_unhandled = f_unhandled.f_back + * + * if thread is None: # <<<<<<<<<<<<<< + * # Important: don't call threadingCurrentThread if we're in the threading module + * # to avoid creating dummy threads. + */ + __pyx_t_6 = (__pyx_v_thread == Py_None); + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1781 + * # Important: don't call threadingCurrentThread if we're in the threading module + * # to avoid creating dummy threads. + * if py_db.threading_get_ident is not None: # <<<<<<<<<<<<<< + * thread = py_db.threading_active.get(py_db.threading_get_ident()) + * if thread is None: + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_threading_get_ident); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = (__pyx_t_3 != Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1782 + * # to avoid creating dummy threads. + * if py_db.threading_get_ident is not None: + * thread = py_db.threading_active.get(py_db.threading_get_ident()) # <<<<<<<<<<<<<< + * if thread is None: + * return None, False + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_threading_active); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1782, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1782, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_threading_get_ident); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1782, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1782, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __pyx_t_9 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1782, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF_SET(__pyx_v_thread, __pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1783 + * if py_db.threading_get_ident is not None: + * thread = py_db.threading_active.get(py_db.threading_get_ident()) + * if thread is None: # <<<<<<<<<<<<<< + * return None, False + * else: + */ + __pyx_t_6 = (__pyx_v_thread == Py_None); + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1784 + * thread = py_db.threading_active.get(py_db.threading_get_ident()) + * if thread is None: + * return None, False # <<<<<<<<<<<<<< + * else: + * # Jython does not have threading.get_ident(). + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_tuple__11); + __pyx_r = __pyx_tuple__11; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1783 + * if py_db.threading_get_ident is not None: + * thread = py_db.threading_active.get(py_db.threading_get_ident()) + * if thread is None: # <<<<<<<<<<<<<< + * return None, False + * else: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1781 + * # Important: don't call threadingCurrentThread if we're in the threading module + * # to avoid creating dummy threads. + * if py_db.threading_get_ident is not None: # <<<<<<<<<<<<<< + * thread = py_db.threading_active.get(py_db.threading_get_ident()) + * if thread is None: + */ + goto __pyx_L23; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1787 + * else: + * # Jython does not have threading.get_ident(). + * thread = py_db.threading_current_thread() # <<<<<<<<<<<<<< + * + * if getattr(thread, "pydev_do_not_trace", None): + */ + /*else*/ { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_threading_current_thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF_SET(__pyx_v_thread, __pyx_t_3); + __pyx_t_3 = 0; + } + __pyx_L23:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1778 + * f_unhandled = f_unhandled.f_back + * + * if thread is None: # <<<<<<<<<<<<<< + * # Important: don't call threadingCurrentThread if we're in the threading module + * # to avoid creating dummy threads. + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1789 + * thread = py_db.threading_current_thread() + * + * if getattr(thread, "pydev_do_not_trace", None): # <<<<<<<<<<<<<< + * py_db.disable_tracing() + * return None, False + */ + __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_thread, __pyx_n_s_pydev_do_not_trace, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1789, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1790 + * + * if getattr(thread, "pydev_do_not_trace", None): + * py_db.disable_tracing() # <<<<<<<<<<<<<< + * return None, False + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_disable_tracing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1791 + * if getattr(thread, "pydev_do_not_trace", None): + * py_db.disable_tracing() + * return None, False # <<<<<<<<<<<<<< + * + * try: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_tuple__11); + __pyx_r = __pyx_tuple__11; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1789 + * thread = py_db.threading_current_thread() + * + * if getattr(thread, "pydev_do_not_trace", None): # <<<<<<<<<<<<<< + * py_db.disable_tracing() + * return None, False + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1793 + * return None, False + * + * try: # <<<<<<<<<<<<<< + * additional_info = thread.additional_info + * if additional_info is None: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1794 + * + * try: + * additional_info = thread.additional_info # <<<<<<<<<<<<<< + * if additional_info is None: + * raise AttributeError() + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread, __pyx_n_s_additional_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1794, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_additional_info = __pyx_t_3; + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1795 + * try: + * additional_info = thread.additional_info + * if additional_info is None: # <<<<<<<<<<<<<< + * raise AttributeError() + * except: + */ + __pyx_t_6 = (__pyx_v_additional_info == Py_None); + if (unlikely(__pyx_t_6)) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1796 + * additional_info = thread.additional_info + * if additional_info is None: + * raise AttributeError() # <<<<<<<<<<<<<< + * except: + * additional_info = py_db.set_additional_thread_info(thread) + */ + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1796, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 1796, __pyx_L26_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1795 + * try: + * additional_info = thread.additional_info + * if additional_info is None: # <<<<<<<<<<<<<< + * raise AttributeError() + * except: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1793 + * return None, False + * + * try: # <<<<<<<<<<<<<< + * additional_info = thread.additional_info + * if additional_info is None: + */ + } + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + goto __pyx_L31_try_end; + __pyx_L26_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1797 + * if additional_info is None: + * raise AttributeError() + * except: # <<<<<<<<<<<<<< + * additional_info = py_db.set_additional_thread_info(thread) + * + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.fix_top_level_trace_and_get_trace_func", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 1797, __pyx_L28_except_error) + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_7); + + /* "_pydevd_bundle/pydevd_cython.pyx":1798 + * raise AttributeError() + * except: + * additional_info = py_db.set_additional_thread_info(thread) # <<<<<<<<<<<<<< + * + * # print('enter thread tracer', thread, get_current_thread_id(thread)) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_set_additional_thread_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1798, __pyx_L28_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_14 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_thread}; + __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1798, __pyx_L28_except_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_additional_info, __pyx_t_9); + __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L27_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1793 + * return None, False + * + * try: # <<<<<<<<<<<<<< + * additional_info = thread.additional_info + * if additional_info is None: + */ + __pyx_L28_except_error:; + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); + goto __pyx_L1_error; + __pyx_L27_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); + __pyx_L31_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1801 + * + * # print('enter thread tracer', thread, get_current_thread_id(thread)) + * args = (py_db, thread, additional_info, global_cache_skips, global_cache_frame_skips) # <<<<<<<<<<<<<< + * + * if f_unhandled is not None: + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_global_cache_skips); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1801, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_global_cache_frame_skips); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1801, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_py_db); + __Pyx_GIVEREF(__pyx_v_py_db); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_py_db)) __PYX_ERR(0, 1801, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_thread); + __Pyx_GIVEREF(__pyx_v_thread); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_thread)) __PYX_ERR(0, 1801, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_additional_info); + __Pyx_GIVEREF(__pyx_v_additional_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_additional_info)) __PYX_ERR(0, 1801, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_7); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_7)) __PYX_ERR(0, 1801, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L1_error); + __pyx_t_7 = 0; + __pyx_t_2 = 0; + __pyx_v_args = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1803 + * args = (py_db, thread, additional_info, global_cache_skips, global_cache_frame_skips) + * + * if f_unhandled is not None: # <<<<<<<<<<<<<< + * if f_unhandled.f_back is None and not force_only_unhandled_tracer: + * # Happens when we attach to a running program (cannot reuse instance because it's mutable). + */ + __pyx_t_6 = (__pyx_v_f_unhandled != Py_None); + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1804 + * + * if f_unhandled is not None: + * if f_unhandled.f_back is None and not force_only_unhandled_tracer: # <<<<<<<<<<<<<< + * # Happens when we attach to a running program (cannot reuse instance because it's mutable). + * top_level_thread_tracer = TopLevelThreadTracerNoBackFrame(ThreadTracer(args), args) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1804, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = (__pyx_t_3 == Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_1) { + } else { + __pyx_t_6 = __pyx_t_1; + goto __pyx_L37_bool_binop_done; + } + __pyx_t_1 = (!__pyx_v_force_only_unhandled_tracer); + __pyx_t_6 = __pyx_t_1; + __pyx_L37_bool_binop_done:; + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1806 + * if f_unhandled.f_back is None and not force_only_unhandled_tracer: + * # Happens when we attach to a running program (cannot reuse instance because it's mutable). + * top_level_thread_tracer = TopLevelThreadTracerNoBackFrame(ThreadTracer(args), args) # <<<<<<<<<<<<<< + * additional_info.top_level_thread_tracer_no_back_frames.append( + * top_level_thread_tracer + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1806, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_args); + __Pyx_GIVEREF(__pyx_v_args); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_args)) __PYX_ERR(0, 1806, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_top_level_thread_tracer = __pyx_t_3; + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1807 + * # Happens when we attach to a running program (cannot reuse instance because it's mutable). + * top_level_thread_tracer = TopLevelThreadTracerNoBackFrame(ThreadTracer(args), args) + * additional_info.top_level_thread_tracer_no_back_frames.append( # <<<<<<<<<<<<<< + * top_level_thread_tracer + * ) # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_top_level_thread_tracer_no_back); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "_pydevd_bundle/pydevd_cython.pyx":1808 + * top_level_thread_tracer = TopLevelThreadTracerNoBackFrame(ThreadTracer(args), args) + * additional_info.top_level_thread_tracer_no_back_frames.append( + * top_level_thread_tracer # <<<<<<<<<<<<<< + * ) # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). + * else: + */ + __pyx_t_15 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_top_level_thread_tracer); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1807, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1804 + * + * if f_unhandled is not None: + * if f_unhandled.f_back is None and not force_only_unhandled_tracer: # <<<<<<<<<<<<<< + * # Happens when we attach to a running program (cannot reuse instance because it's mutable). + * top_level_thread_tracer = TopLevelThreadTracerNoBackFrame(ThreadTracer(args), args) + */ + goto __pyx_L36; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1811 + * ) # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). + * else: + * top_level_thread_tracer = additional_info.top_level_thread_tracer_unhandled # <<<<<<<<<<<<<< + * if top_level_thread_tracer is None: + * # Stop in some internal place to report about unhandled exceptions + */ + /*else*/ { + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_top_level_thread_tracer_unhandle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_top_level_thread_tracer = __pyx_t_3; + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1812 + * else: + * top_level_thread_tracer = additional_info.top_level_thread_tracer_unhandled + * if top_level_thread_tracer is None: # <<<<<<<<<<<<<< + * # Stop in some internal place to report about unhandled exceptions + * top_level_thread_tracer = TopLevelThreadTracerOnlyUnhandledExceptions(args) + */ + __pyx_t_6 = (__pyx_v_top_level_thread_tracer == Py_None); + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1814 + * if top_level_thread_tracer is None: + * # Stop in some internal place to report about unhandled exceptions + * top_level_thread_tracer = TopLevelThreadTracerOnlyUnhandledExceptions(args) # <<<<<<<<<<<<<< + * additional_info.top_level_thread_tracer_unhandled = top_level_thread_tracer # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). + * + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions), __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_top_level_thread_tracer, __pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1815 + * # Stop in some internal place to report about unhandled exceptions + * top_level_thread_tracer = TopLevelThreadTracerOnlyUnhandledExceptions(args) + * additional_info.top_level_thread_tracer_unhandled = top_level_thread_tracer # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). # <<<<<<<<<<<<<< + * + * # print(' --> found to trace unhandled', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_additional_info, __pyx_n_s_top_level_thread_tracer_unhandle, __pyx_v_top_level_thread_tracer) < 0) __PYX_ERR(0, 1815, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1812 + * else: + * top_level_thread_tracer = additional_info.top_level_thread_tracer_unhandled + * if top_level_thread_tracer is None: # <<<<<<<<<<<<<< + * # Stop in some internal place to report about unhandled exceptions + * top_level_thread_tracer = TopLevelThreadTracerOnlyUnhandledExceptions(args) + */ + } + } + __pyx_L36:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1818 + * + * # print(' --> found to trace unhandled', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) + * f_trace = top_level_thread_tracer.get_trace_dispatch_func() # <<<<<<<<<<<<<< + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_top_level_thread_tracer, __pyx_n_s_get_trace_dispatch_func); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_v_f_trace = __pyx_t_3; + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1821 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * f_trace = SafeCallWrapper(f_trace) # <<<<<<<<<<<<<< + * # ENDIF + * # fmt: on + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_f_trace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1821, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_f_trace, __pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1824 + * # ENDIF + * # fmt: on + * f_unhandled.f_trace = f_trace # <<<<<<<<<<<<<< + * + * if frame is f_unhandled: + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_f_unhandled, __pyx_n_s_f_trace, __pyx_v_f_trace) < 0) __PYX_ERR(0, 1824, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1826 + * f_unhandled.f_trace = f_trace + * + * if frame is f_unhandled: # <<<<<<<<<<<<<< + * return f_trace, False + * + */ + __pyx_t_6 = (__pyx_v_frame == __pyx_v_f_unhandled); + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1827 + * + * if frame is f_unhandled: + * return f_trace, False # <<<<<<<<<<<<<< + * + * thread_tracer = additional_info.thread_tracer + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_f_trace); + __Pyx_GIVEREF(__pyx_v_f_trace); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f_trace)) __PYX_ERR(0, 1827, __pyx_L1_error); + __Pyx_INCREF(Py_False); + __Pyx_GIVEREF(Py_False); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_False)) __PYX_ERR(0, 1827, __pyx_L1_error); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1826 + * f_unhandled.f_trace = f_trace + * + * if frame is f_unhandled: # <<<<<<<<<<<<<< + * return f_trace, False + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1803 + * args = (py_db, thread, additional_info, global_cache_skips, global_cache_frame_skips) + * + * if f_unhandled is not None: # <<<<<<<<<<<<<< + * if f_unhandled.f_back is None and not force_only_unhandled_tracer: + * # Happens when we attach to a running program (cannot reuse instance because it's mutable). + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1829 + * return f_trace, False + * + * thread_tracer = additional_info.thread_tracer # <<<<<<<<<<<<<< + * if thread_tracer is None or thread_tracer._args[0] is not py_db: + * thread_tracer = ThreadTracer(args) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_thread_tracer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_thread_tracer = __pyx_t_3; + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1830 + * + * thread_tracer = additional_info.thread_tracer + * if thread_tracer is None or thread_tracer._args[0] is not py_db: # <<<<<<<<<<<<<< + * thread_tracer = ThreadTracer(args) + * additional_info.thread_tracer = thread_tracer + */ + __pyx_t_1 = (__pyx_v_thread_tracer == Py_None); + if (!__pyx_t_1) { + } else { + __pyx_t_6 = __pyx_t_1; + goto __pyx_L42_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_thread_tracer, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != __pyx_v_py_db); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = __pyx_t_1; + __pyx_L42_bool_binop_done:; + if (__pyx_t_6) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1831 + * thread_tracer = additional_info.thread_tracer + * if thread_tracer is None or thread_tracer._args[0] is not py_db: + * thread_tracer = ThreadTracer(args) # <<<<<<<<<<<<<< + * additional_info.thread_tracer = thread_tracer + * + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_thread_tracer, __pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1832 + * if thread_tracer is None or thread_tracer._args[0] is not py_db: + * thread_tracer = ThreadTracer(args) + * additional_info.thread_tracer = thread_tracer # <<<<<<<<<<<<<< + * + * # fmt: off + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_additional_info, __pyx_n_s_thread_tracer, __pyx_v_thread_tracer) < 0) __PYX_ERR(0, 1832, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1830 + * + * thread_tracer = additional_info.thread_tracer + * if thread_tracer is None or thread_tracer._args[0] is not py_db: # <<<<<<<<<<<<<< + * thread_tracer = ThreadTracer(args) + * additional_info.thread_tracer = thread_tracer + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1836 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * return SafeCallWrapper(thread_tracer), True # <<<<<<<<<<<<<< + * # ELSE + * # return thread_tracer, True + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_thread_tracer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1836, __pyx_L1_error); + __Pyx_INCREF(Py_True); + __Pyx_GIVEREF(Py_True); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_True)) __PYX_ERR(0, 1836, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1707 + * + * + * def fix_top_level_trace_and_get_trace_func(py_db, frame): # <<<<<<<<<<<<<< + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.fix_top_level_trace_and_get_trace_func", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_name); + __Pyx_XDECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_thread); + __Pyx_XDECREF(__pyx_v_f_unhandled); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_j); + __Pyx_XDECREF(__pyx_v_t); + __Pyx_XDECREF(__pyx_v_additional_info); + __Pyx_XDECREF(__pyx_v_top_level_thread_tracer); + __Pyx_XDECREF(__pyx_v_f_trace); + __Pyx_XDECREF(__pyx_v_thread_tracer); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1843 + * + * + * def trace_dispatch(py_db, frame, event, arg): # <<<<<<<<<<<<<< + * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) + * if thread_trace_func is None: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_21trace_dispatch(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_21trace_dispatch = {"trace_dispatch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_21trace_dispatch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_21trace_dispatch(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_py_db = 0; + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_event = 0; + PyObject *__pyx_v_arg = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("trace_dispatch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_py_db,&__pyx_n_s_frame,&__pyx_n_s_event,&__pyx_n_s_arg,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_py_db)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1843, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1843, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 1); __PYX_ERR(0, 1843, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_event)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1843, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 2); __PYX_ERR(0, 1843, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1843, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 3); __PYX_ERR(0, 1843, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_dispatch") < 0)) __PYX_ERR(0, 1843, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + } + __pyx_v_py_db = values[0]; + __pyx_v_frame = values[1]; + __pyx_v_event = values[2]; + __pyx_v_arg = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1843, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_20trace_dispatch(__pyx_self, __pyx_v_py_db, __pyx_v_frame, __pyx_v_event, __pyx_v_arg); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_20trace_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { + PyObject *__pyx_v_thread_trace_func = NULL; + PyObject *__pyx_v_apply_to_settrace = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("trace_dispatch", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1844 + * + * def trace_dispatch(py_db, frame, event, arg): + * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) # <<<<<<<<<<<<<< + * if thread_trace_func is None: + * return None if event == "call" else NO_FTRACE + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_fix_top_level_trace_and_get_trac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_py_db, __pyx_v_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1844, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_3 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 1844, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1844, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + __pyx_v_thread_trace_func = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_apply_to_settrace = __pyx_t_3; + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1845 + * def trace_dispatch(py_db, frame, event, arg): + * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) + * if thread_trace_func is None: # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE + * if apply_to_settrace: + */ + __pyx_t_7 = (__pyx_v_thread_trace_func == Py_None); + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1846 + * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) + * if thread_trace_func is None: + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * if apply_to_settrace: + * py_db.enable_tracing(thread_trace_func) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1846, __pyx_L1_error) + if (__pyx_t_7) { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1846, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1845 + * def trace_dispatch(py_db, frame, event, arg): + * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) + * if thread_trace_func is None: # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE + * if apply_to_settrace: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1847 + * if thread_trace_func is None: + * return None if event == "call" else NO_FTRACE + * if apply_to_settrace: # <<<<<<<<<<<<<< + * py_db.enable_tracing(thread_trace_func) + * return thread_trace_func(frame, event, arg) + */ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_apply_to_settrace); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1847, __pyx_L1_error) + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1848 + * return None if event == "call" else NO_FTRACE + * if apply_to_settrace: + * py_db.enable_tracing(thread_trace_func) # <<<<<<<<<<<<<< + * return thread_trace_func(frame, event, arg) + * + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_enable_tracing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_thread_trace_func}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1847 + * if thread_trace_func is None: + * return None if event == "call" else NO_FTRACE + * if apply_to_settrace: # <<<<<<<<<<<<<< + * py_db.enable_tracing(thread_trace_func) + * return thread_trace_func(frame, event, arg) + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1849 + * if apply_to_settrace: + * py_db.enable_tracing(thread_trace_func) + * return thread_trace_func(frame, event, arg) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_thread_trace_func); + __pyx_t_3 = __pyx_v_thread_trace_func; __pyx_t_2 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1843 + * + * + * def trace_dispatch(py_db, frame, event, arg): # <<<<<<<<<<<<<< + * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) + * if thread_trace_func is None: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_thread_trace_func); + __Pyx_XDECREF(__pyx_v_apply_to_settrace); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1856 + * cdef class TopLevelThreadTracerOnlyUnhandledExceptions: + * cdef public tuple _args; + * def __init__(self, tuple args): # <<<<<<<<<<<<<< + * self._args = args + * # ELSE + */ + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_args)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1856, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1856, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + } + __pyx_v_args = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1856, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerOnlyUnhandledExceptions.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 1856, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions___init__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)__pyx_v_self), __pyx_v_args); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions___init__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *__pyx_v_self, PyObject *__pyx_v_args) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1857 + * cdef public tuple _args; + * def __init__(self, tuple args): + * self._args = args # <<<<<<<<<<<<<< + * # ELSE + * # class TopLevelThreadTracerOnlyUnhandledExceptions(object): + */ + __Pyx_INCREF(__pyx_v_args); + __Pyx_GIVEREF(__pyx_v_args); + __Pyx_GOTREF(__pyx_v_self->_args); + __Pyx_DECREF(__pyx_v_self->_args); + __pyx_v_self->_args = __pyx_v_args; + + /* "_pydevd_bundle/pydevd_cython.pyx":1856 + * cdef class TopLevelThreadTracerOnlyUnhandledExceptions: + * cdef public tuple _args; + * def __init__(self, tuple args): # <<<<<<<<<<<<<< + * self._args = args + * # ELSE + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1866 + * # fmt: on + * + * def trace_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< + * # Note that we ignore the frame as this tracing method should only be put in topmost frames already. + * # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_3trace_unhandled_exceptions(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_3trace_unhandled_exceptions = {"trace_unhandled_exceptions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_3trace_unhandled_exceptions, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_3trace_unhandled_exceptions(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_event = 0; + PyObject *__pyx_v_arg = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("trace_unhandled_exceptions (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,&__pyx_n_s_event,&__pyx_n_s_arg,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1866, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_event)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1866, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_unhandled_exceptions", 1, 3, 3, 1); __PYX_ERR(0, 1866, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1866, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_unhandled_exceptions", 1, 3, 3, 2); __PYX_ERR(0, 1866, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_unhandled_exceptions") < 0)) __PYX_ERR(0, 1866, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v_frame = values[0]; + __pyx_v_event = values[1]; + __pyx_v_arg = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("trace_unhandled_exceptions", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1866, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerOnlyUnhandledExceptions.trace_unhandled_exceptions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_2trace_unhandled_exceptions(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)__pyx_v_self), __pyx_v_frame, __pyx_v_event, __pyx_v_arg); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_2trace_unhandled_exceptions(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { + PyObject *__pyx_v_py_db = NULL; + PyObject *__pyx_v_t = NULL; + PyObject *__pyx_v_additional_info = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + unsigned int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("trace_unhandled_exceptions", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1869 + * # Note that we ignore the frame as this tracing method should only be put in topmost frames already. + * # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) + * if event == "exception" and arg is not None: # <<<<<<<<<<<<<< + * py_db, t, additional_info = self._args[0:3] + * if arg is not None: + */ + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1869, __pyx_L1_error) + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_arg != Py_None); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1870 + * # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) + * if event == "exception" and arg is not None: + * py_db, t, additional_info = self._args[0:3] # <<<<<<<<<<<<<< + * if arg is not None: + * if not additional_info.suspended_at_unhandled: + */ + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1870, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyTuple_GetSlice(__pyx_v_self->_args, 0, 3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1870, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (1) { + PyObject* sequence = __pyx_t_3; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1870, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1870, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1870, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1870, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v_py_db = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_t = __pyx_t_5; + __pyx_t_5 = 0; + __pyx_v_additional_info = __pyx_t_6; + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1871 + * if event == "exception" and arg is not None: + * py_db, t, additional_info = self._args[0:3] + * if arg is not None: # <<<<<<<<<<<<<< + * if not additional_info.suspended_at_unhandled: + * additional_info.suspended_at_unhandled = True + */ + __pyx_t_1 = (__pyx_v_arg != Py_None); + if (__pyx_t_1) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1872 + * py_db, t, additional_info = self._args[0:3] + * if arg is not None: + * if not additional_info.suspended_at_unhandled: # <<<<<<<<<<<<<< + * additional_info.suspended_at_unhandled = True + * + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_suspended_at_unhandled); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1872, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1873 + * if arg is not None: + * if not additional_info.suspended_at_unhandled: + * additional_info.suspended_at_unhandled = True # <<<<<<<<<<<<<< + * + * py_db.stop_on_unhandled_exception(py_db, t, additional_info, arg) + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_additional_info, __pyx_n_s_suspended_at_unhandled, Py_True) < 0) __PYX_ERR(0, 1873, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1875 + * additional_info.suspended_at_unhandled = True + * + * py_db.stop_on_unhandled_exception(py_db, t, additional_info, arg) # <<<<<<<<<<<<<< + * + * # No need to reset frame.f_trace to keep the same trace function. + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_stop_on_unhandled_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_7 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_py_db, __pyx_v_t, __pyx_v_additional_info, __pyx_v_arg}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 4+__pyx_t_7); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1872 + * py_db, t, additional_info = self._args[0:3] + * if arg is not None: + * if not additional_info.suspended_at_unhandled: # <<<<<<<<<<<<<< + * additional_info.suspended_at_unhandled = True + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1871 + * if event == "exception" and arg is not None: + * py_db, t, additional_info = self._args[0:3] + * if arg is not None: # <<<<<<<<<<<<<< + * if not additional_info.suspended_at_unhandled: + * additional_info.suspended_at_unhandled = True + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1869 + * # Note that we ignore the frame as this tracing method should only be put in topmost frames already. + * # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) + * if event == "exception" and arg is not None: # <<<<<<<<<<<<<< + * py_db, t, additional_info = self._args[0:3] + * if arg is not None: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1878 + * + * # No need to reset frame.f_trace to keep the same trace function. + * return self.trace_unhandled_exceptions # <<<<<<<<<<<<<< + * + * def get_trace_dispatch_func(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_unhandled_exceptions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1866 + * # fmt: on + * + * def trace_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< + * # Note that we ignore the frame as this tracing method should only be put in topmost frames already. + * # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerOnlyUnhandledExceptions.trace_unhandled_exceptions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_py_db); + __Pyx_XDECREF(__pyx_v_t); + __Pyx_XDECREF(__pyx_v_additional_info); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1880 + * return self.trace_unhandled_exceptions + * + * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< + * return self.trace_unhandled_exceptions + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5get_trace_dispatch_func(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5get_trace_dispatch_func = {"get_trace_dispatch_func", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5get_trace_dispatch_func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5get_trace_dispatch_func(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_trace_dispatch_func (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("get_trace_dispatch_func", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_trace_dispatch_func", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_4get_trace_dispatch_func(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_4get_trace_dispatch_func(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_trace_dispatch_func", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1881 + * + * def get_trace_dispatch_func(self): + * return self.trace_unhandled_exceptions # <<<<<<<<<<<<<< + * + * # fmt: off + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_unhandled_exceptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1880 + * return self.trace_unhandled_exceptions + * + * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< + * return self.trace_unhandled_exceptions + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerOnlyUnhandledExceptions.get_trace_dispatch_func", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1855 + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef class TopLevelThreadTracerOnlyUnhandledExceptions: + * cdef public tuple _args; # <<<<<<<<<<<<<< + * def __init__(self, tuple args): + * self._args = args + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_args); + __pyx_r = __pyx_v_self->_args; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(0, 1855, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_args); + __Pyx_DECREF(__pyx_v_self->_args); + __pyx_v_self->_args = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerOnlyUnhandledExceptions._args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_args); + __Pyx_DECREF(__pyx_v_self->_args); + __pyx_v_self->_args = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_6__reduce_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_6__reduce_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 1); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._args,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_args); + __Pyx_GIVEREF(__pyx_v_self->_args); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_args)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._args,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._args,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_2 = (__pyx_v__dict != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._args is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._args,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._args is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, (type(self), 0x121e1fb, None), state + */ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->_args != ((PyObject*)Py_None)); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._args is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, (type(self), 0x121e1fb, None), state + * else: + */ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._args is not None + * if use_setstate: + * return __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, (type(self), 0x121e1fb, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, (type(self), 0x121e1fb, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_TopLevelThreadTra); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_18997755); + __Pyx_GIVEREF(__pyx_int_18997755); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_18997755)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._args is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, (type(self), 0x121e1fb, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, (type(self), 0x121e1fb, None), state + * else: + * return __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, (type(self), 0x121e1fb, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_TopLevelThreadTra); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_18997755); + __Pyx_GIVEREF(__pyx_int_18997755); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_18997755)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerOnlyUnhandledExceptions.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, (type(self), 0x121e1fb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 16, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerOnlyUnhandledExceptions.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_8__setstate_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_8__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 1); + + /* "(tree fragment)":17 + * return __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, (type(self), 0x121e1fb, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, (type(self), 0x121e1fb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerOnlyUnhandledExceptions.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1892 + * cdef public set _raise_lines; + * cdef public int _last_raise_line; + * def __init__(self, frame_trace_dispatch, tuple args): # <<<<<<<<<<<<<< + * self._frame_trace_dispatch = frame_trace_dispatch + * self._args = args + */ + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_frame_trace_dispatch = 0; + PyObject *__pyx_v_args = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame_trace_dispatch,&__pyx_n_s_args,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame_trace_dispatch)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1892, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_args)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1892, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1892, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1892, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); + } + __pyx_v_frame_trace_dispatch = values[0]; + __pyx_v_args = ((PyObject*)values[1]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1892, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 1892, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame___init__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self), __pyx_v_frame_trace_dispatch, __pyx_v_args); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame___init__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self, PyObject *__pyx_v_frame_trace_dispatch, PyObject *__pyx_v_args) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1893 + * cdef public int _last_raise_line; + * def __init__(self, frame_trace_dispatch, tuple args): + * self._frame_trace_dispatch = frame_trace_dispatch # <<<<<<<<<<<<<< + * self._args = args + * self.try_except_infos = None + */ + __Pyx_INCREF(__pyx_v_frame_trace_dispatch); + __Pyx_GIVEREF(__pyx_v_frame_trace_dispatch); + __Pyx_GOTREF(__pyx_v_self->_frame_trace_dispatch); + __Pyx_DECREF(__pyx_v_self->_frame_trace_dispatch); + __pyx_v_self->_frame_trace_dispatch = __pyx_v_frame_trace_dispatch; + + /* "_pydevd_bundle/pydevd_cython.pyx":1894 + * def __init__(self, frame_trace_dispatch, tuple args): + * self._frame_trace_dispatch = frame_trace_dispatch + * self._args = args # <<<<<<<<<<<<<< + * self.try_except_infos = None + * self._last_exc_arg = None + */ + __Pyx_INCREF(__pyx_v_args); + __Pyx_GIVEREF(__pyx_v_args); + __Pyx_GOTREF(__pyx_v_self->_args); + __Pyx_DECREF(__pyx_v_self->_args); + __pyx_v_self->_args = __pyx_v_args; + + /* "_pydevd_bundle/pydevd_cython.pyx":1895 + * self._frame_trace_dispatch = frame_trace_dispatch + * self._args = args + * self.try_except_infos = None # <<<<<<<<<<<<<< + * self._last_exc_arg = None + * self._raise_lines = set() + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->try_except_infos); + __Pyx_DECREF(__pyx_v_self->try_except_infos); + __pyx_v_self->try_except_infos = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":1896 + * self._args = args + * self.try_except_infos = None + * self._last_exc_arg = None # <<<<<<<<<<<<<< + * self._raise_lines = set() + * self._last_raise_line = -1 + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_last_exc_arg); + __Pyx_DECREF(__pyx_v_self->_last_exc_arg); + __pyx_v_self->_last_exc_arg = Py_None; + + /* "_pydevd_bundle/pydevd_cython.pyx":1897 + * self.try_except_infos = None + * self._last_exc_arg = None + * self._raise_lines = set() # <<<<<<<<<<<<<< + * self._last_raise_line = -1 + * # ELSE + */ + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_raise_lines); + __Pyx_DECREF(__pyx_v_self->_raise_lines); + __pyx_v_self->_raise_lines = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1898 + * self._last_exc_arg = None + * self._raise_lines = set() + * self._last_raise_line = -1 # <<<<<<<<<<<<<< + * # ELSE + * # class TopLevelThreadTracerNoBackFrame(object): + */ + __pyx_v_self->_last_raise_line = -1; + + /* "_pydevd_bundle/pydevd_cython.pyx":1892 + * cdef public set _raise_lines; + * cdef public int _last_raise_line; + * def __init__(self, frame_trace_dispatch, tuple args): # <<<<<<<<<<<<<< + * self._frame_trace_dispatch = frame_trace_dispatch + * self._args = args + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1924 + * # fmt: on + * + * def trace_dispatch_and_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< + * # DEBUG = 'code_to_debug' in frame.f_code.co_filename + * # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_3trace_dispatch_and_unhandled_exceptions(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_3trace_dispatch_and_unhandled_exceptions = {"trace_dispatch_and_unhandled_exceptions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_3trace_dispatch_and_unhandled_exceptions, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_3trace_dispatch_and_unhandled_exceptions(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_event = 0; + PyObject *__pyx_v_arg = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("trace_dispatch_and_unhandled_exceptions (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,&__pyx_n_s_event,&__pyx_n_s_arg,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1924, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_event)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1924, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_dispatch_and_unhandled_exceptions", 1, 3, 3, 1); __PYX_ERR(0, 1924, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1924, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("trace_dispatch_and_unhandled_exceptions", 1, 3, 3, 2); __PYX_ERR(0, 1924, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "trace_dispatch_and_unhandled_exceptions") < 0)) __PYX_ERR(0, 1924, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v_frame = values[0]; + __pyx_v_event = values[1]; + __pyx_v_arg = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("trace_dispatch_and_unhandled_exceptions", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1924, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame.trace_dispatch_and_unhandled_exceptions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_2trace_dispatch_and_unhandled_exceptions(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self), __pyx_v_frame, __pyx_v_event, __pyx_v_arg); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_2trace_dispatch_and_unhandled_exceptions(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { + PyObject *__pyx_v_frame_trace_dispatch = NULL; + PyObject *__pyx_v_py_db = NULL; + PyObject *__pyx_v_t = NULL; + PyObject *__pyx_v_additional_info = NULL; + PyObject *__pyx_v_ret = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + char const *__pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("trace_dispatch_and_unhandled_exceptions", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1927 + * # DEBUG = 'code_to_debug' in frame.f_code.co_filename + * # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) + * frame_trace_dispatch = self._frame_trace_dispatch # <<<<<<<<<<<<<< + * if frame_trace_dispatch is not None: + * self._frame_trace_dispatch = frame_trace_dispatch(frame, event, arg) + */ + __pyx_t_1 = __pyx_v_self->_frame_trace_dispatch; + __Pyx_INCREF(__pyx_t_1); + __pyx_v_frame_trace_dispatch = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1928 + * # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) + * frame_trace_dispatch = self._frame_trace_dispatch + * if frame_trace_dispatch is not None: # <<<<<<<<<<<<<< + * self._frame_trace_dispatch = frame_trace_dispatch(frame, event, arg) + * + */ + __pyx_t_2 = (__pyx_v_frame_trace_dispatch != Py_None); + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1929 + * frame_trace_dispatch = self._frame_trace_dispatch + * if frame_trace_dispatch is not None: + * self._frame_trace_dispatch = frame_trace_dispatch(frame, event, arg) # <<<<<<<<<<<<<< + * + * if event == "exception": + */ + __Pyx_INCREF(__pyx_v_frame_trace_dispatch); + __pyx_t_3 = __pyx_v_frame_trace_dispatch; __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_frame_trace_dispatch); + __Pyx_DECREF(__pyx_v_self->_frame_trace_dispatch); + __pyx_v_self->_frame_trace_dispatch = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1928 + * # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) + * frame_trace_dispatch = self._frame_trace_dispatch + * if frame_trace_dispatch is not None: # <<<<<<<<<<<<<< + * self._frame_trace_dispatch = frame_trace_dispatch(frame, event, arg) + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1931 + * self._frame_trace_dispatch = frame_trace_dispatch(frame, event, arg) + * + * if event == "exception": # <<<<<<<<<<<<<< + * self._last_exc_arg = arg + * self._raise_lines.add(frame.f_lineno) + */ + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1931, __pyx_L1_error) + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1932 + * + * if event == "exception": + * self._last_exc_arg = arg # <<<<<<<<<<<<<< + * self._raise_lines.add(frame.f_lineno) + * self._last_raise_line = frame.f_lineno + */ + __Pyx_INCREF(__pyx_v_arg); + __Pyx_GIVEREF(__pyx_v_arg); + __Pyx_GOTREF(__pyx_v_self->_last_exc_arg); + __Pyx_DECREF(__pyx_v_self->_last_exc_arg); + __pyx_v_self->_last_exc_arg = __pyx_v_arg; + + /* "_pydevd_bundle/pydevd_cython.pyx":1933 + * if event == "exception": + * self._last_exc_arg = arg + * self._raise_lines.add(frame.f_lineno) # <<<<<<<<<<<<<< + * self._last_raise_line = frame.f_lineno + * + */ + if (unlikely(__pyx_v_self->_raise_lines == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); + __PYX_ERR(0, 1933, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = PySet_Add(__pyx_v_self->_raise_lines, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1933, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1934 + * self._last_exc_arg = arg + * self._raise_lines.add(frame.f_lineno) + * self._last_raise_line = frame.f_lineno # <<<<<<<<<<<<<< + * + * elif event == "return" and self._last_exc_arg is not None: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1934, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_last_raise_line = __pyx_t_7; + + /* "_pydevd_bundle/pydevd_cython.pyx":1931 + * self._frame_trace_dispatch = frame_trace_dispatch(frame, event, arg) + * + * if event == "exception": # <<<<<<<<<<<<<< + * self._last_exc_arg = arg + * self._raise_lines.add(frame.f_lineno) + */ + goto __pyx_L4; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1936 + * self._last_raise_line = frame.f_lineno + * + * elif event == "return" and self._last_exc_arg is not None: # <<<<<<<<<<<<<< + * # For unhandled exceptions we actually track the return when at the topmost level. + * try: + */ + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1936, __pyx_L1_error) + if (__pyx_t_8) { + } else { + __pyx_t_2 = __pyx_t_8; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->_last_exc_arg != Py_None); + __pyx_t_2 = __pyx_t_8; + __pyx_L5_bool_binop_done:; + if (__pyx_t_2) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1938 + * elif event == "return" and self._last_exc_arg is not None: + * # For unhandled exceptions we actually track the return when at the topmost level. + * try: # <<<<<<<<<<<<<< + * py_db, t, additional_info = self._args[0:3] + * if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. + */ + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":1939 + * # For unhandled exceptions we actually track the return when at the topmost level. + * try: + * py_db, t, additional_info = self._args[0:3] # <<<<<<<<<<<<<< + * if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. + * if is_unhandled_exception(self, py_db, frame, self._last_raise_line, self._raise_lines): + */ + if (unlikely(__pyx_v_self->_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1939, __pyx_L8_error) + } + __pyx_t_1 = __Pyx_PyTuple_GetSlice(__pyx_v_self->_args, 0, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1939, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_1); + if (1) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1939, __pyx_L8_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_9); + #else + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1939, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1939, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1939, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_9); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_v_py_db = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_t = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_additional_info = __pyx_t_9; + __pyx_t_9 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1940 + * try: + * py_db, t, additional_info = self._args[0:3] + * if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. # <<<<<<<<<<<<<< + * if is_unhandled_exception(self, py_db, frame, self._last_raise_line, self._raise_lines): + * py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_additional_info, __pyx_n_s_suspended_at_unhandled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1940, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1940, __pyx_L8_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = (!__pyx_t_2); + if (__pyx_t_8) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1941 + * py_db, t, additional_info = self._args[0:3] + * if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. + * if is_unhandled_exception(self, py_db, frame, self._last_raise_line, self._raise_lines): # <<<<<<<<<<<<<< + * py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) + * finally: + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_is_unhandled_exception); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1941, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->_last_raise_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1941, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_py_db, __pyx_v_frame, __pyx_t_4, __pyx_v_self->_raise_lines}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1941, __pyx_L8_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_8) { + + /* "_pydevd_bundle/pydevd_cython.pyx":1942 + * if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. + * if is_unhandled_exception(self, py_db, frame, self._last_raise_line, self._raise_lines): + * py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) # <<<<<<<<<<<<<< + * finally: + * # Remove reference to exception after handling it. + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_stop_on_unhandled_exception); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1942, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_py_db, __pyx_v_t, __pyx_v_additional_info, __pyx_v_self->_last_exc_arg}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1941 + * py_db, t, additional_info = self._args[0:3] + * if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. + * if is_unhandled_exception(self, py_db, frame, self._last_raise_line, self._raise_lines): # <<<<<<<<<<<<<< + * py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) + * finally: + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1940 + * try: + * py_db, t, additional_info = self._args[0:3] + * if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. # <<<<<<<<<<<<<< + * if is_unhandled_exception(self, py_db, frame, self._last_raise_line, self._raise_lines): + * py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) + */ + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1945 + * finally: + * # Remove reference to exception after handling it. + * self._last_exc_arg = None # <<<<<<<<<<<<<< + * + * ret = self.trace_dispatch_and_unhandled_exceptions + */ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_last_exc_arg); + __Pyx_DECREF(__pyx_v_self->_last_exc_arg); + __pyx_v_self->_last_exc_arg = Py_None; + goto __pyx_L9; + } + __pyx_L8_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __pyx_t_7 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; + { + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_last_exc_arg); + __Pyx_DECREF(__pyx_v_self->_last_exc_arg); + __pyx_v_self->_last_exc_arg = Py_None; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + } + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; + __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; + goto __pyx_L1_error; + } + __pyx_L9:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1936 + * self._last_raise_line = frame.f_lineno + * + * elif event == "return" and self._last_exc_arg is not None: # <<<<<<<<<<<<<< + * # For unhandled exceptions we actually track the return when at the topmost level. + * try: + */ + } + __pyx_L4:; + + /* "_pydevd_bundle/pydevd_cython.pyx":1947 + * self._last_exc_arg = None + * + * ret = self.trace_dispatch_and_unhandled_exceptions # <<<<<<<<<<<<<< + * + * # Need to reset (the call to _frame_trace_dispatch may have changed it). + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch_and_unhandled_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ret = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1952 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * frame.f_trace = SafeCallWrapper(ret) # <<<<<<<<<<<<<< + * # ELSE + * # frame.f_trace = ret + */ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_1) < 0) __PYX_ERR(0, 1952, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1957 + * # ENDIF + * # fmt: on + * return ret # <<<<<<<<<<<<<< + * + * def get_trace_dispatch_func(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ret); + __pyx_r = __pyx_v_ret; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1924 + * # fmt: on + * + * def trace_dispatch_and_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< + * # DEBUG = 'code_to_debug' in frame.f_code.co_filename + * # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame.trace_dispatch_and_unhandled_exceptions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_frame_trace_dispatch); + __Pyx_XDECREF(__pyx_v_py_db); + __Pyx_XDECREF(__pyx_v_t); + __Pyx_XDECREF(__pyx_v_additional_info); + __Pyx_XDECREF(__pyx_v_ret); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1959 + * return ret + * + * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< + * return self.trace_dispatch_and_unhandled_exceptions + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5get_trace_dispatch_func(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5get_trace_dispatch_func = {"get_trace_dispatch_func", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5get_trace_dispatch_func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5get_trace_dispatch_func(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_trace_dispatch_func (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("get_trace_dispatch_func", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_trace_dispatch_func", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_4get_trace_dispatch_func(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_4get_trace_dispatch_func(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_trace_dispatch_func", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1960 + * + * def get_trace_dispatch_func(self): + * return self.trace_dispatch_and_unhandled_exceptions # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trace_dispatch_and_unhandled_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1959 + * return ret + * + * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< + * return self.trace_dispatch_and_unhandled_exceptions + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame.get_trace_dispatch_func", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1886 + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef class TopLevelThreadTracerNoBackFrame: + * cdef public object _frame_trace_dispatch; # <<<<<<<<<<<<<< + * cdef public tuple _args; + * cdef public object try_except_infos; + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_frame_trace_dispatch); + __pyx_r = __pyx_v_self->_frame_trace_dispatch; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->_frame_trace_dispatch); + __Pyx_DECREF(__pyx_v_self->_frame_trace_dispatch); + __pyx_v_self->_frame_trace_dispatch = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_frame_trace_dispatch); + __Pyx_DECREF(__pyx_v_self->_frame_trace_dispatch); + __pyx_v_self->_frame_trace_dispatch = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1887 + * cdef class TopLevelThreadTracerNoBackFrame: + * cdef public object _frame_trace_dispatch; + * cdef public tuple _args; # <<<<<<<<<<<<<< + * cdef public object try_except_infos; + * cdef public object _last_exc_arg; + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_args); + __pyx_r = __pyx_v_self->_args; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(0, 1887, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_args); + __Pyx_DECREF(__pyx_v_self->_args); + __pyx_v_self->_args = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame._args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_args); + __Pyx_DECREF(__pyx_v_self->_args); + __pyx_v_self->_args = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1888 + * cdef public object _frame_trace_dispatch; + * cdef public tuple _args; + * cdef public object try_except_infos; # <<<<<<<<<<<<<< + * cdef public object _last_exc_arg; + * cdef public set _raise_lines; + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->try_except_infos); + __pyx_r = __pyx_v_self->try_except_infos; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->try_except_infos); + __Pyx_DECREF(__pyx_v_self->try_except_infos); + __pyx_v_self->try_except_infos = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->try_except_infos); + __Pyx_DECREF(__pyx_v_self->try_except_infos); + __pyx_v_self->try_except_infos = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1889 + * cdef public tuple _args; + * cdef public object try_except_infos; + * cdef public object _last_exc_arg; # <<<<<<<<<<<<<< + * cdef public set _raise_lines; + * cdef public int _last_raise_line; + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_last_exc_arg); + __pyx_r = __pyx_v_self->_last_exc_arg; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->_last_exc_arg); + __Pyx_DECREF(__pyx_v_self->_last_exc_arg); + __pyx_v_self->_last_exc_arg = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_last_exc_arg); + __Pyx_DECREF(__pyx_v_self->_last_exc_arg); + __pyx_v_self->_last_exc_arg = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1890 + * cdef public object try_except_infos; + * cdef public object _last_exc_arg; + * cdef public set _raise_lines; # <<<<<<<<<<<<<< + * cdef public int _last_raise_line; + * def __init__(self, frame_trace_dispatch, tuple args): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_raise_lines); + __pyx_r = __pyx_v_self->_raise_lines; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PySet_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_v_value))) __PYX_ERR(0, 1890, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_raise_lines); + __Pyx_DECREF(__pyx_v_self->_raise_lines); + __pyx_v_self->_raise_lines = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame._raise_lines.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_raise_lines); + __Pyx_DECREF(__pyx_v_self->_raise_lines); + __pyx_v_self->_raise_lines = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1891 + * cdef public object _last_exc_arg; + * cdef public set _raise_lines; + * cdef public int _last_raise_line; # <<<<<<<<<<<<<< + * def __init__(self, frame_trace_dispatch, tuple args): + * self._frame_trace_dispatch = frame_trace_dispatch + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16_last_raise_line_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16_last_raise_line_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16_last_raise_line___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16_last_raise_line___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_last_raise_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame._last_raise_line.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16_last_raise_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16_last_raise_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16_last_raise_line_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16_last_raise_line_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1891, __pyx_L1_error) + __pyx_v_self->_last_raise_line = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame._last_raise_line.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_6__reduce_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_6__reduce_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 1); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._args, self._frame_trace_dispatch, self._last_exc_arg, self._last_raise_line, self._raise_lines, self.try_except_infos) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_last_raise_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_self->_args); + __Pyx_GIVEREF(__pyx_v_self->_args); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_args)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_frame_trace_dispatch); + __Pyx_GIVEREF(__pyx_v_self->_frame_trace_dispatch); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->_frame_trace_dispatch)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_last_exc_arg); + __Pyx_GIVEREF(__pyx_v_self->_last_exc_arg); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->_last_exc_arg)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_raise_lines); + __Pyx_GIVEREF(__pyx_v_self->_raise_lines); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->_raise_lines)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->try_except_infos); + __Pyx_GIVEREF(__pyx_v_self->try_except_infos); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_self->try_except_infos)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._args, self._frame_trace_dispatch, self._last_exc_arg, self._last_raise_line, self._raise_lines, self.try_except_infos) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self._args, self._frame_trace_dispatch, self._last_exc_arg, self._last_raise_line, self._raise_lines, self.try_except_infos) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._args is not None or self._frame_trace_dispatch is not None or self._last_exc_arg is not None or self._raise_lines is not None or self.try_except_infos is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._args, self._frame_trace_dispatch, self._last_exc_arg, self._last_raise_line, self._raise_lines, self.try_except_infos) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._args is not None or self._frame_trace_dispatch is not None or self._last_exc_arg is not None or self._raise_lines is not None or self.try_except_infos is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_TopLevelThreadTracerNoBackFrame, (type(self), 0x3f5f7e9, None), state + */ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->_args != ((PyObject*)Py_None)); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->_frame_trace_dispatch != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->_last_exc_arg != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->_raise_lines != ((PyObject*)Py_None)); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->try_except_infos != Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._args is not None or self._frame_trace_dispatch is not None or self._last_exc_arg is not None or self._raise_lines is not None or self.try_except_infos is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_TopLevelThreadTracerNoBackFrame, (type(self), 0x3f5f7e9, None), state + * else: + */ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._args is not None or self._frame_trace_dispatch is not None or self._last_exc_arg is not None or self._raise_lines is not None or self.try_except_infos is not None + * if use_setstate: + * return __pyx_unpickle_TopLevelThreadTracerNoBackFrame, (type(self), 0x3f5f7e9, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_TopLevelThreadTracerNoBackFrame, (type(self), 0x3f5f7e9, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TopLevelThreadTra_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_66451433); + __Pyx_GIVEREF(__pyx_int_66451433); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_66451433)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._args is not None or self._frame_trace_dispatch is not None or self._last_exc_arg is not None or self._raise_lines is not None or self.try_except_infos is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_TopLevelThreadTracerNoBackFrame, (type(self), 0x3f5f7e9, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_TopLevelThreadTracerNoBackFrame, (type(self), 0x3f5f7e9, None), state + * else: + * return __pyx_unpickle_TopLevelThreadTracerNoBackFrame, (type(self), 0x3f5f7e9, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_TopLevelThreadTra_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_66451433); + __Pyx_GIVEREF(__pyx_int_66451433); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_66451433)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TopLevelThreadTracerNoBackFrame, (type(self), 0x3f5f7e9, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 16, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_8__setstate_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_8__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 1); + + /* "(tree fragment)":17 + * return __pyx_unpickle_TopLevelThreadTracerNoBackFrame, (type(self), 0x3f5f7e9, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TopLevelThreadTracerNoBackFrame, (type(self), 0x3f5f7e9, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1967 + * cdef class ThreadTracer: + * cdef public tuple _args; + * def __init__(self, tuple args): # <<<<<<<<<<<<<< + * self._args = args + * # ELSE + */ + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_args)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1967, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1967, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + } + __pyx_v_args = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1967, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 1967, __pyx_L1_error) + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer___init__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)__pyx_v_self), __pyx_v_args); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer___init__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *__pyx_v_self, PyObject *__pyx_v_args) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":1968 + * cdef public tuple _args; + * def __init__(self, tuple args): + * self._args = args # <<<<<<<<<<<<<< + * # ELSE + * # class ThreadTracer(object): + */ + __Pyx_INCREF(__pyx_v_args); + __Pyx_GIVEREF(__pyx_v_args); + __Pyx_GOTREF(__pyx_v_self->_args); + __Pyx_DECREF(__pyx_v_self->_args); + __pyx_v_self->_args = __pyx_v_args; + + /* "_pydevd_bundle/pydevd_cython.pyx":1967 + * cdef class ThreadTracer: + * cdef public tuple _args; + * def __init__(self, tuple args): # <<<<<<<<<<<<<< + * self._args = args + * # ELSE + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1977 + * # fmt: on + * + * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< + * """This is the callback used when we enter some context in the debugger. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +PyDoc_STRVAR(__pyx_doc_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__, "This is the callback used when we enter some context in the debugger.\n\n We also decorate the thread we are in with info about the debugging.\n The attributes added are:\n pydev_state\n pydev_step_stop\n pydev_step_cmd\n pydev_notify_kill\n\n :param PyDB py_db:\n This is the global debugger (this method should actually be added as a method to it).\n "); +#if CYTHON_UPDATE_DESCRIPTOR_DOC +struct wrapperbase __pyx_wrapperbase_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__; +#endif +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_event = 0; + PyObject *__pyx_v_arg = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,&__pyx_n_s_event,&__pyx_n_s_arg,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1977, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_event)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1977, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); __PYX_ERR(0, 1977, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1977, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); __PYX_ERR(0, 1977, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 1977, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); + values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); + } + __pyx_v_frame = values[0]; + __pyx_v_event = values[1]; + __pyx_v_arg = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1977, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)__pyx_v_self), __pyx_v_frame, __pyx_v_event, __pyx_v_arg); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { + int __pyx_v_pydev_step_cmd; + PyObject *__pyx_v_frame_cache_key = 0; + PyObject *__pyx_v_cache_skips = 0; + int __pyx_v_is_stepping; + PyObject *__pyx_v_abs_path_canonical_path_and_base = 0; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_additional_info = 0; + PyObject *__pyx_v_py_db = NULL; + PyObject *__pyx_v_t = NULL; + PyObject *__pyx_v_frame_skips_cache = NULL; + PyObject *__pyx_v_back_frame = NULL; + PyObject *__pyx_v_back_frame_cache_key = NULL; + PyObject *__pyx_v_file_type = NULL; + PyObject *__pyx_v_ret = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + unsigned int __pyx_t_12; + int __pyx_t_13; + int __pyx_t_14; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + int __pyx_t_18; + char const *__pyx_t_19; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__call__", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":2005 + * # DEBUG = 'code_to_debug' in frame.f_code.co_filename + * # if DEBUG: print('ENTER: trace_dispatch: %s %s %s %s' % (frame.f_code.co_filename, frame.f_lineno, event, frame.f_code.co_name)) + * py_db, t, additional_info, cache_skips, frame_skips_cache = self._args # <<<<<<<<<<<<<< + * if additional_info.is_tracing: + * return None if event == "call" else NO_FTRACE # we don't wan't to trace code invoked from pydevd_frame.trace_dispatch + */ + __pyx_t_1 = __pyx_v_self->_args; + __Pyx_INCREF(__pyx_t_1); + if (likely(__pyx_t_1 != Py_None)) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 5)) { + if (size > 5) __Pyx_RaiseTooManyValuesError(5); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 2005, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + #else + { + Py_ssize_t i; + PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; + for (i=0; i < 5; i++) { + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2005, __pyx_L1_error) + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2005, __pyx_L1_error) + } + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 2005, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_5))) __PYX_ERR(0, 2005, __pyx_L1_error) + __pyx_v_py_db = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_t = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_additional_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_4); + __pyx_t_4 = 0; + __pyx_v_cache_skips = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + __pyx_v_frame_skips_cache = __pyx_t_6; + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2006 + * # if DEBUG: print('ENTER: trace_dispatch: %s %s %s %s' % (frame.f_code.co_filename, frame.f_lineno, event, frame.f_code.co_name)) + * py_db, t, additional_info, cache_skips, frame_skips_cache = self._args + * if additional_info.is_tracing: # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE # we don't wan't to trace code invoked from pydevd_frame.trace_dispatch + * + */ + __pyx_t_7 = (__pyx_v_additional_info->is_tracing != 0); + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2007 + * py_db, t, additional_info, cache_skips, frame_skips_cache = self._args + * if additional_info.is_tracing: + * return None if event == "call" else NO_FTRACE # we don't wan't to trace code invoked from pydevd_frame.trace_dispatch # <<<<<<<<<<<<<< + * + * additional_info.is_tracing += 1 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2007, __pyx_L1_error) + if (__pyx_t_7) { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2007, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __pyx_t_6; + __pyx_t_6 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2006 + * # if DEBUG: print('ENTER: trace_dispatch: %s %s %s %s' % (frame.f_code.co_filename, frame.f_lineno, event, frame.f_code.co_name)) + * py_db, t, additional_info, cache_skips, frame_skips_cache = self._args + * if additional_info.is_tracing: # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE # we don't wan't to trace code invoked from pydevd_frame.trace_dispatch + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2009 + * return None if event == "call" else NO_FTRACE # we don't wan't to trace code invoked from pydevd_frame.trace_dispatch + * + * additional_info.is_tracing += 1 # <<<<<<<<<<<<<< + * try: + * pydev_step_cmd = additional_info.pydev_step_cmd + */ + __pyx_v_additional_info->is_tracing = (__pyx_v_additional_info->is_tracing + 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":2010 + * + * additional_info.is_tracing += 1 + * try: # <<<<<<<<<<<<<< + * pydev_step_cmd = additional_info.pydev_step_cmd + * is_stepping = pydev_step_cmd != -1 + */ + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":2011 + * additional_info.is_tracing += 1 + * try: + * pydev_step_cmd = additional_info.pydev_step_cmd # <<<<<<<<<<<<<< + * is_stepping = pydev_step_cmd != -1 + * if py_db.pydb_disposed: + */ + __pyx_t_11 = __pyx_v_additional_info->pydev_step_cmd; + __pyx_v_pydev_step_cmd = __pyx_t_11; + + /* "_pydevd_bundle/pydevd_cython.pyx":2012 + * try: + * pydev_step_cmd = additional_info.pydev_step_cmd + * is_stepping = pydev_step_cmd != -1 # <<<<<<<<<<<<<< + * if py_db.pydb_disposed: + * return None if event == "call" else NO_FTRACE + */ + __pyx_v_is_stepping = (__pyx_v_pydev_step_cmd != -1L); + + /* "_pydevd_bundle/pydevd_cython.pyx":2013 + * pydev_step_cmd = additional_info.pydev_step_cmd + * is_stepping = pydev_step_cmd != -1 + * if py_db.pydb_disposed: # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_pydb_disposed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2013, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2013, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_7) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2014 + * is_stepping = pydev_step_cmd != -1 + * if py_db.pydb_disposed: + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * + * # if thread is not alive, cancel trace_dispatch processing + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2014, __pyx_L7_error) + if (__pyx_t_7) { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2014, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __pyx_t_6; + __pyx_t_6 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L11_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":2013 + * pydev_step_cmd = additional_info.pydev_step_cmd + * is_stepping = pydev_step_cmd != -1 + * if py_db.pydb_disposed: # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2017 + * + * # if thread is not alive, cancel trace_dispatch processing + * if not is_thread_alive(t): # <<<<<<<<<<<<<< + * py_db.notify_thread_not_alive(get_current_thread_id(t)) + * return None if event == "call" else NO_FTRACE + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2017, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_t}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2017, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2017, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_13 = (!__pyx_t_7); + if (__pyx_t_13) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2018 + * # if thread is not alive, cancel trace_dispatch processing + * if not is_thread_alive(t): + * py_db.notify_thread_not_alive(get_current_thread_id(t)) # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_notify_thread_not_alive); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2018, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_current_thread_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2018, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_t}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2018, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_4 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2018, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2019 + * if not is_thread_alive(t): + * py_db.notify_thread_not_alive(get_current_thread_id(t)) + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * + * # Note: it's important that the context name is also given because we may hit something once + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 2019, __pyx_L7_error) + if (__pyx_t_13) { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2019, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __pyx_t_6; + __pyx_t_6 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L11_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":2017 + * + * # if thread is not alive, cancel trace_dispatch processing + * if not is_thread_alive(t): # <<<<<<<<<<<<<< + * py_db.notify_thread_not_alive(get_current_thread_id(t)) + * return None if event == "call" else NO_FTRACE + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2023 + * # Note: it's important that the context name is also given because we may hit something once + * # in the global context and another in the local context. + * frame_cache_key = frame.f_code # <<<<<<<<<<<<<< + * if frame_cache_key in cache_skips: + * if not is_stepping: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2023, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_frame_cache_key = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2024 + * # in the global context and another in the local context. + * frame_cache_key = frame.f_code + * if frame_cache_key in cache_skips: # <<<<<<<<<<<<<< + * if not is_stepping: + * # if DEBUG: print('skipped: trace_dispatch (cache hit)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + */ + if (unlikely(__pyx_v_cache_skips == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 2024, __pyx_L7_error) + } + __pyx_t_13 = (__Pyx_PyDict_ContainsTF(__pyx_v_frame_cache_key, __pyx_v_cache_skips, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 2024, __pyx_L7_error) + if (__pyx_t_13) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2025 + * frame_cache_key = frame.f_code + * if frame_cache_key in cache_skips: + * if not is_stepping: # <<<<<<<<<<<<<< + * # if DEBUG: print('skipped: trace_dispatch (cache hit)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + * return None if event == "call" else NO_FTRACE + */ + __pyx_t_13 = (!__pyx_v_is_stepping); + if (__pyx_t_13) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2027 + * if not is_stepping: + * # if DEBUG: print('skipped: trace_dispatch (cache hit)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * else: + * # When stepping we can't take into account caching based on the breakpoints (only global filtering). + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 2027, __pyx_L7_error) + if (__pyx_t_13) { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2027, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __pyx_t_6; + __pyx_t_6 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L11_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":2025 + * frame_cache_key = frame.f_code + * if frame_cache_key in cache_skips: + * if not is_stepping: # <<<<<<<<<<<<<< + * # if DEBUG: print('skipped: trace_dispatch (cache hit)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + * return None if event == "call" else NO_FTRACE + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2030 + * else: + * # When stepping we can't take into account caching based on the breakpoints (only global filtering). + * if cache_skips.get(frame_cache_key) == 1: # <<<<<<<<<<<<<< + * if ( + * additional_info.pydev_original_step_cmd in (107, 144) + */ + /*else*/ { + if (unlikely(__pyx_v_cache_skips == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 2030, __pyx_L7_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_cache_skips, __pyx_v_frame_cache_key, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2030, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 2030, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_13) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2032 + * if cache_skips.get(frame_cache_key) == 1: + * if ( + * additional_info.pydev_original_step_cmd in (107, 144) # <<<<<<<<<<<<<< + * and not _global_notify_skipped_step_in + * ): + */ + switch (__pyx_v_additional_info->pydev_original_step_cmd) { + case 0x6B: + case 0x90: + __pyx_t_7 = 1; + break; + default: + __pyx_t_7 = 0; + break; + } + __pyx_t_14 = __pyx_t_7; + if (__pyx_t_14) { + } else { + __pyx_t_13 = __pyx_t_14; + goto __pyx_L19_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2033 + * if ( + * additional_info.pydev_original_step_cmd in (107, 144) + * and not _global_notify_skipped_step_in # <<<<<<<<<<<<<< + * ): + * notify_skipped_step_in_because_of_filters(py_db, frame) + */ + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2033, __pyx_L7_error) + __pyx_t_7 = (!__pyx_t_14); + __pyx_t_13 = __pyx_t_7; + __pyx_L19_bool_binop_done:; + + /* "_pydevd_bundle/pydevd_cython.pyx":2031 + * # When stepping we can't take into account caching based on the breakpoints (only global filtering). + * if cache_skips.get(frame_cache_key) == 1: + * if ( # <<<<<<<<<<<<<< + * additional_info.pydev_original_step_cmd in (107, 144) + * and not _global_notify_skipped_step_in + */ + if (__pyx_t_13) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2035 + * and not _global_notify_skipped_step_in + * ): + * notify_skipped_step_in_because_of_filters(py_db, frame) # <<<<<<<<<<<<<< + * + * back_frame = frame.f_back + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_notify_skipped_step_in_because_o); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2035, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_py_db, __pyx_v_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2035, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2031 + * # When stepping we can't take into account caching based on the breakpoints (only global filtering). + * if cache_skips.get(frame_cache_key) == 1: + * if ( # <<<<<<<<<<<<<< + * additional_info.pydev_original_step_cmd in (107, 144) + * and not _global_notify_skipped_step_in + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2037 + * notify_skipped_step_in_because_of_filters(py_db, frame) + * + * back_frame = frame.f_back # <<<<<<<<<<<<<< + * if back_frame is not None and pydev_step_cmd in ( + * 107, + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2037, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_back_frame = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2038 + * + * back_frame = frame.f_back + * if back_frame is not None and pydev_step_cmd in ( # <<<<<<<<<<<<<< + * 107, + * 144, + */ + __pyx_t_7 = (__pyx_v_back_frame != Py_None); + if (__pyx_t_7) { + } else { + __pyx_t_13 = __pyx_t_7; + goto __pyx_L22_bool_binop_done; + } + switch (__pyx_v_pydev_step_cmd) { + case 0x6B: + + /* "_pydevd_bundle/pydevd_cython.pyx":2039 + * back_frame = frame.f_back + * if back_frame is not None and pydev_step_cmd in ( + * 107, # <<<<<<<<<<<<<< + * 144, + * 109, + */ + case 0x90: + + /* "_pydevd_bundle/pydevd_cython.pyx":2040 + * if back_frame is not None and pydev_step_cmd in ( + * 107, + * 144, # <<<<<<<<<<<<<< + * 109, + * 160, + */ + case 0x6D: + + /* "_pydevd_bundle/pydevd_cython.pyx":2041 + * 107, + * 144, + * 109, # <<<<<<<<<<<<<< + * 160, + * ): + */ + case 0xA0: + + /* "_pydevd_bundle/pydevd_cython.pyx":2038 + * + * back_frame = frame.f_back + * if back_frame is not None and pydev_step_cmd in ( # <<<<<<<<<<<<<< + * 107, + * 144, + */ + __pyx_t_7 = 1; + break; + default: + __pyx_t_7 = 0; + break; + } + __pyx_t_14 = __pyx_t_7; + __pyx_t_13 = __pyx_t_14; + __pyx_L22_bool_binop_done:; + if (__pyx_t_13) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2044 + * 160, + * ): + * back_frame_cache_key = back_frame.f_code # <<<<<<<<<<<<<< + * if cache_skips.get(back_frame_cache_key) == 1: + * # if DEBUG: print('skipped: trace_dispatch (cache hit: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2044, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_back_frame_cache_key = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2045 + * ): + * back_frame_cache_key = back_frame.f_code + * if cache_skips.get(back_frame_cache_key) == 1: # <<<<<<<<<<<<<< + * # if DEBUG: print('skipped: trace_dispatch (cache hit: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + * return None if event == "call" else NO_FTRACE + */ + if (unlikely(__pyx_v_cache_skips == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 2045, __pyx_L7_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_cache_skips, __pyx_v_back_frame_cache_key, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2045, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 2045, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_13) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2047 + * if cache_skips.get(back_frame_cache_key) == 1: + * # if DEBUG: print('skipped: trace_dispatch (cache hit: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * else: + * # if DEBUG: print('skipped: trace_dispatch (cache hit: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 2047, __pyx_L7_error) + if (__pyx_t_13) { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2047, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __pyx_t_6; + __pyx_t_6 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L11_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":2045 + * ): + * back_frame_cache_key = back_frame.f_code + * if cache_skips.get(back_frame_cache_key) == 1: # <<<<<<<<<<<<<< + * # if DEBUG: print('skipped: trace_dispatch (cache hit: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + * return None if event == "call" else NO_FTRACE + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2038 + * + * back_frame = frame.f_back + * if back_frame is not None and pydev_step_cmd in ( # <<<<<<<<<<<<<< + * 107, + * 144, + */ + goto __pyx_L21; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2050 + * else: + * # if DEBUG: print('skipped: trace_dispatch (cache hit: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * + * try: + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 2050, __pyx_L7_error) + if (__pyx_t_13) { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2050, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __pyx_t_6; + __pyx_t_6 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L11_try_return; + } + __pyx_L21:; + + /* "_pydevd_bundle/pydevd_cython.pyx":2030 + * else: + * # When stepping we can't take into account caching based on the breakpoints (only global filtering). + * if cache_skips.get(frame_cache_key) == 1: # <<<<<<<<<<<<<< + * if ( + * additional_info.pydev_original_step_cmd in (107, 144) + */ + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2024 + * # in the global context and another in the local context. + * frame_cache_key = frame.f_code + * if frame_cache_key in cache_skips: # <<<<<<<<<<<<<< + * if not is_stepping: + * # if DEBUG: print('skipped: trace_dispatch (cache hit)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2052 + * return None if event == "call" else NO_FTRACE + * + * try: # <<<<<<<<<<<<<< + * # Make fast path faster! + * abs_path_canonical_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":2054 + * try: + * # Make fast path faster! + * abs_path_canonical_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] # <<<<<<<<<<<<<< + * except: + * abs_path_canonical_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2054, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2054, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2054, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2054, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (!(likely(PyTuple_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_6))) __PYX_ERR(0, 2054, __pyx_L25_error) + __pyx_v_abs_path_canonical_path_and_base = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2052 + * return None if event == "call" else NO_FTRACE + * + * try: # <<<<<<<<<<<<<< + * # Make fast path faster! + * abs_path_canonical_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] + */ + } + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + goto __pyx_L30_try_end; + __pyx_L25_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2055 + * # Make fast path faster! + * abs_path_canonical_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] + * except: # <<<<<<<<<<<<<< + * abs_path_canonical_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) + * + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 2055, __pyx_L27_except_error) + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_1); + + /* "_pydevd_bundle/pydevd_cython.pyx":2056 + * abs_path_canonical_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] + * except: + * abs_path_canonical_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) # <<<<<<<<<<<<<< + * + * file_type = py_db.get_file_type( + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2056, __pyx_L27_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_frame}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2056, __pyx_L27_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + if (!(likely(PyTuple_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_4))) __PYX_ERR(0, 2056, __pyx_L27_except_error) + __Pyx_XDECREF_SET(__pyx_v_abs_path_canonical_path_and_base, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L26_exception_handled; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2052 + * return None if event == "call" else NO_FTRACE + * + * try: # <<<<<<<<<<<<<< + * # Make fast path faster! + * abs_path_canonical_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] + */ + __pyx_L27_except_error:; + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + goto __pyx_L7_error; + __pyx_L26_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + __pyx_L30_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2058 + * abs_path_canonical_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) + * + * file_type = py_db.get_file_type( # <<<<<<<<<<<<<< + * frame, abs_path_canonical_path_and_base + * ) # we don't want to debug threading or anything related to pydevd + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_get_file_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2058, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "_pydevd_bundle/pydevd_cython.pyx":2059 + * + * file_type = py_db.get_file_type( + * frame, abs_path_canonical_path_and_base # <<<<<<<<<<<<<< + * ) # we don't want to debug threading or anything related to pydevd + * + */ + __pyx_t_6 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_frame, __pyx_v_abs_path_canonical_path_and_base}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2058, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_v_file_type = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2062 + * ) # we don't want to debug threading or anything related to pydevd + * + * if file_type is not None: # <<<<<<<<<<<<<< + * if file_type == 1: # inlining LIB_FILE = 1 + * if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): + */ + __pyx_t_13 = (__pyx_v_file_type != Py_None); + if (__pyx_t_13) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2063 + * + * if file_type is not None: + * if file_type == 1: # inlining LIB_FILE = 1 # <<<<<<<<<<<<<< + * if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): + * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + */ + __pyx_t_13 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_file_type, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 2063, __pyx_L7_error) + if (__pyx_t_13) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2064 + * if file_type is not None: + * if file_type == 1: # inlining LIB_FILE = 1 + * if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): # <<<<<<<<<<<<<< + * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + * cache_skips[frame_cache_key] = 1 + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_in_project_scope); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2064, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_v_abs_path_canonical_path_and_base == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 2064, __pyx_L7_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_canonical_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2064, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_frame, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2064, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 2064, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_14 = (!__pyx_t_13); + if (__pyx_t_14) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2066 + * if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): + * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + * cache_skips[frame_cache_key] = 1 # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE + * else: + */ + if (unlikely(__pyx_v_cache_skips == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 2066, __pyx_L7_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 2066, __pyx_L7_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":2067 + * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + * cache_skips[frame_cache_key] = 1 + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * else: + * # if DEBUG: print('skipped: trace_dispatch', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2067, __pyx_L7_error) + if (__pyx_t_14) { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2067, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L11_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":2064 + * if file_type is not None: + * if file_type == 1: # inlining LIB_FILE = 1 + * if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): # <<<<<<<<<<<<<< + * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + * cache_skips[frame_cache_key] = 1 + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2063 + * + * if file_type is not None: + * if file_type == 1: # inlining LIB_FILE = 1 # <<<<<<<<<<<<<< + * if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): + * # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + */ + goto __pyx_L34; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2070 + * else: + * # if DEBUG: print('skipped: trace_dispatch', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + * cache_skips[frame_cache_key] = 1 # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE + * + */ + /*else*/ { + if (unlikely(__pyx_v_cache_skips == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 2070, __pyx_L7_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 2070, __pyx_L7_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":2071 + * # if DEBUG: print('skipped: trace_dispatch', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + * cache_skips[frame_cache_key] = 1 + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * + * if py_db.is_files_filter_enabled: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2071, __pyx_L7_error) + if (__pyx_t_14) { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2071, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L11_try_return; + } + __pyx_L34:; + + /* "_pydevd_bundle/pydevd_cython.pyx":2062 + * ) # we don't want to debug threading or anything related to pydevd + * + * if file_type is not None: # <<<<<<<<<<<<<< + * if file_type == 1: # inlining LIB_FILE = 1 + * if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2073 + * return None if event == "call" else NO_FTRACE + * + * if py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * if py_db.apply_files_filter(frame, abs_path_canonical_path_and_base[0], False): + * cache_skips[frame_cache_key] = 1 + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_files_filter_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2073, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2073, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_14) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2074 + * + * if py_db.is_files_filter_enabled: + * if py_db.apply_files_filter(frame, abs_path_canonical_path_and_base[0], False): # <<<<<<<<<<<<<< + * cache_skips[frame_cache_key] = 1 + * + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2074, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_v_abs_path_canonical_path_and_base == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 2074, __pyx_L7_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_canonical_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2074, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_frame, __pyx_t_6, Py_False}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2074, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2074, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_14) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2075 + * if py_db.is_files_filter_enabled: + * if py_db.apply_files_filter(frame, abs_path_canonical_path_and_base[0], False): + * cache_skips[frame_cache_key] = 1 # <<<<<<<<<<<<<< + * + * if ( + */ + if (unlikely(__pyx_v_cache_skips == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 2075, __pyx_L7_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 2075, __pyx_L7_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":2078 + * + * if ( + * is_stepping # <<<<<<<<<<<<<< + * and additional_info.pydev_original_step_cmd in (107, 144) + * and not _global_notify_skipped_step_in + */ + if (__pyx_v_is_stepping) { + } else { + __pyx_t_14 = __pyx_v_is_stepping; + goto __pyx_L39_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2079 + * if ( + * is_stepping + * and additional_info.pydev_original_step_cmd in (107, 144) # <<<<<<<<<<<<<< + * and not _global_notify_skipped_step_in + * ): + */ + switch (__pyx_v_additional_info->pydev_original_step_cmd) { + case 0x6B: + case 0x90: + __pyx_t_13 = 1; + break; + default: + __pyx_t_13 = 0; + break; + } + __pyx_t_7 = __pyx_t_13; + if (__pyx_t_7) { + } else { + __pyx_t_14 = __pyx_t_7; + goto __pyx_L39_bool_binop_done; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2080 + * is_stepping + * and additional_info.pydev_original_step_cmd in (107, 144) + * and not _global_notify_skipped_step_in # <<<<<<<<<<<<<< + * ): + * notify_skipped_step_in_because_of_filters(py_db, frame) + */ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2080, __pyx_L7_error) + __pyx_t_13 = (!__pyx_t_7); + __pyx_t_14 = __pyx_t_13; + __pyx_L39_bool_binop_done:; + + /* "_pydevd_bundle/pydevd_cython.pyx":2077 + * cache_skips[frame_cache_key] = 1 + * + * if ( # <<<<<<<<<<<<<< + * is_stepping + * and additional_info.pydev_original_step_cmd in (107, 144) + */ + if (__pyx_t_14) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2082 + * and not _global_notify_skipped_step_in + * ): + * notify_skipped_step_in_because_of_filters(py_db, frame) # <<<<<<<<<<<<<< + * + * # A little gotcha, sometimes when we're stepping in we have to stop in a + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_notify_skipped_step_in_because_o); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2082, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_py_db, __pyx_v_frame}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2082, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2077 + * cache_skips[frame_cache_key] = 1 + * + * if ( # <<<<<<<<<<<<<< + * is_stepping + * and additional_info.pydev_original_step_cmd in (107, 144) + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2087 + * # return event showing the back frame as the current frame, so, we need + * # to check not only the current frame but the back frame too. + * back_frame = frame.f_back # <<<<<<<<<<<<<< + * if back_frame is not None and pydev_step_cmd in ( + * 107, + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2087, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_back_frame, __pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2088 + * # to check not only the current frame but the back frame too. + * back_frame = frame.f_back + * if back_frame is not None and pydev_step_cmd in ( # <<<<<<<<<<<<<< + * 107, + * 144, + */ + __pyx_t_13 = (__pyx_v_back_frame != Py_None); + if (__pyx_t_13) { + } else { + __pyx_t_14 = __pyx_t_13; + goto __pyx_L43_bool_binop_done; + } + switch (__pyx_v_pydev_step_cmd) { + case 0x6B: + + /* "_pydevd_bundle/pydevd_cython.pyx":2089 + * back_frame = frame.f_back + * if back_frame is not None and pydev_step_cmd in ( + * 107, # <<<<<<<<<<<<<< + * 144, + * 109, + */ + case 0x90: + + /* "_pydevd_bundle/pydevd_cython.pyx":2090 + * if back_frame is not None and pydev_step_cmd in ( + * 107, + * 144, # <<<<<<<<<<<<<< + * 109, + * 160, + */ + case 0x6D: + + /* "_pydevd_bundle/pydevd_cython.pyx":2091 + * 107, + * 144, + * 109, # <<<<<<<<<<<<<< + * 160, + * ): + */ + case 0xA0: + + /* "_pydevd_bundle/pydevd_cython.pyx":2088 + * # to check not only the current frame but the back frame too. + * back_frame = frame.f_back + * if back_frame is not None and pydev_step_cmd in ( # <<<<<<<<<<<<<< + * 107, + * 144, + */ + __pyx_t_13 = 1; + break; + default: + __pyx_t_13 = 0; + break; + } + __pyx_t_7 = __pyx_t_13; + __pyx_t_14 = __pyx_t_7; + __pyx_L43_bool_binop_done:; + if (__pyx_t_14) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2094 + * 160, + * ): + * if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False): # <<<<<<<<<<<<<< + * back_frame_cache_key = back_frame.f_code + * cache_skips[back_frame_cache_key] = 1 + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_apply_files_filter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2094, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2094, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2094, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_back_frame, __pyx_t_4, Py_False}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2094, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2094, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_14) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2095 + * ): + * if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False): + * back_frame_cache_key = back_frame.f_code # <<<<<<<<<<<<<< + * cache_skips[back_frame_cache_key] = 1 + * # if DEBUG: print('skipped: trace_dispatch (filtered out: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_back_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2095, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_back_frame_cache_key, __pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2096 + * if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False): + * back_frame_cache_key = back_frame.f_code + * cache_skips[back_frame_cache_key] = 1 # <<<<<<<<<<<<<< + * # if DEBUG: print('skipped: trace_dispatch (filtered out: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + * return None if event == "call" else NO_FTRACE + */ + if (unlikely(__pyx_v_cache_skips == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 2096, __pyx_L7_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_back_frame_cache_key, __pyx_int_1) < 0))) __PYX_ERR(0, 2096, __pyx_L7_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":2098 + * cache_skips[back_frame_cache_key] = 1 + * # if DEBUG: print('skipped: trace_dispatch (filtered out: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * else: + * # if DEBUG: print('skipped: trace_dispatch (filtered out: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2098, __pyx_L7_error) + if (__pyx_t_14) { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2098, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L11_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":2094 + * 160, + * ): + * if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False): # <<<<<<<<<<<<<< + * back_frame_cache_key = back_frame.f_code + * cache_skips[back_frame_cache_key] = 1 + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2088 + * # to check not only the current frame but the back frame too. + * back_frame = frame.f_back + * if back_frame is not None and pydev_step_cmd in ( # <<<<<<<<<<<<<< + * 107, + * 144, + */ + goto __pyx_L42; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2101 + * else: + * # if DEBUG: print('skipped: trace_dispatch (filtered out: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * + * # if DEBUG: print('trace_dispatch', filename, frame.f_lineno, event, frame.f_code.co_name, file_type) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2101, __pyx_L7_error) + if (__pyx_t_14) { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2101, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L11_try_return; + } + __pyx_L42:; + + /* "_pydevd_bundle/pydevd_cython.pyx":2074 + * + * if py_db.is_files_filter_enabled: + * if py_db.apply_files_filter(frame, abs_path_canonical_path_and_base[0], False): # <<<<<<<<<<<<<< + * cache_skips[frame_cache_key] = 1 + * + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2073 + * return None if event == "call" else NO_FTRACE + * + * if py_db.is_files_filter_enabled: # <<<<<<<<<<<<<< + * if py_db.apply_files_filter(frame, abs_path_canonical_path_and_base[0], False): + * cache_skips[frame_cache_key] = 1 + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2109 + * ret = PyDBFrame( + * ( + * py_db, # <<<<<<<<<<<<<< + * abs_path_canonical_path_and_base, + * additional_info, + */ + __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2109, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_py_db); + __Pyx_GIVEREF(__pyx_v_py_db); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_py_db)) __PYX_ERR(0, 2109, __pyx_L7_error); + __Pyx_INCREF(__pyx_v_abs_path_canonical_path_and_base); + __Pyx_GIVEREF(__pyx_v_abs_path_canonical_path_and_base); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_abs_path_canonical_path_and_base)) __PYX_ERR(0, 2109, __pyx_L7_error); + __Pyx_INCREF((PyObject *)__pyx_v_additional_info); + __Pyx_GIVEREF((PyObject *)__pyx_v_additional_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_additional_info))) __PYX_ERR(0, 2109, __pyx_L7_error); + __Pyx_INCREF(__pyx_v_t); + __Pyx_GIVEREF(__pyx_v_t); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_t)) __PYX_ERR(0, 2109, __pyx_L7_error); + __Pyx_INCREF(__pyx_v_frame_skips_cache); + __Pyx_GIVEREF(__pyx_v_frame_skips_cache); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_frame_skips_cache)) __PYX_ERR(0, 2109, __pyx_L7_error); + __Pyx_INCREF(__pyx_v_frame_cache_key); + __Pyx_GIVEREF(__pyx_v_frame_cache_key); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_frame_cache_key)) __PYX_ERR(0, 2109, __pyx_L7_error); + + /* "_pydevd_bundle/pydevd_cython.pyx":2107 + * # Just create PyDBFrame directly (removed support for Python versions < 2.5, which required keeping a weak + * # reference to the frame). + * ret = PyDBFrame( # <<<<<<<<<<<<<< + * ( + * py_db, + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2107, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2116 + * frame_cache_key, + * ) + * ).trace_dispatch(frame, event, arg) # <<<<<<<<<<<<<< + * if ret is None: + * # 1 means skipped because of filters. + */ + if (!(likely(PyString_CheckExact(__pyx_v_event))||((__pyx_v_event) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_event))) __PYX_ERR(0, 2116, __pyx_L7_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_t_5)->__pyx_vtab)->trace_dispatch(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_t_5), __pyx_v_frame, ((PyObject*)__pyx_v_event), __pyx_v_arg, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2116, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ret = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2117 + * ) + * ).trace_dispatch(frame, event, arg) + * if ret is None: # <<<<<<<<<<<<<< + * # 1 means skipped because of filters. + * # 2 means skipped because no breakpoints were hit. + */ + __pyx_t_14 = (__pyx_v_ret == Py_None); + if (__pyx_t_14) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2120 + * # 1 means skipped because of filters. + * # 2 means skipped because no breakpoints were hit. + * cache_skips[frame_cache_key] = 2 # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE + * + */ + if (unlikely(__pyx_v_cache_skips == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 2120, __pyx_L7_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_cache_skips, __pyx_v_frame_cache_key, __pyx_int_2) < 0))) __PYX_ERR(0, 2120, __pyx_L7_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":2121 + * # 2 means skipped because no breakpoints were hit. + * cache_skips[frame_cache_key] = 2 + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * + * # fmt: off + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2121, __pyx_L7_error) + if (__pyx_t_14) { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2121, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L11_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":2117 + * ) + * ).trace_dispatch(frame, event, arg) + * if ret is None: # <<<<<<<<<<<<<< + * # 1 means skipped because of filters. + * # 2 means skipped because no breakpoints were hit. + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2125 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * frame.f_trace = SafeCallWrapper(ret) # Make sure we keep the returned tracer. # <<<<<<<<<<<<<< + * # ELSE + * # frame.f_trace = ret # Make sure we keep the returned tracer. + */ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2125, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_1) < 0) __PYX_ERR(0, 2125, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2130 + * # ENDIF + * # fmt: on + * return ret # <<<<<<<<<<<<<< + * + * except SystemExit: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ret); + __pyx_r = __pyx_v_ret; + goto __pyx_L11_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":2010 + * + * additional_info.is_tracing += 1 + * try: # <<<<<<<<<<<<<< + * pydev_step_cmd = additional_info.pydev_step_cmd + * is_stepping = pydev_step_cmd != -1 + */ + } + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2132 + * return ret + * + * except SystemExit: # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE + * + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_SystemExit); + if (__pyx_t_11) { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 2132, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + + /* "_pydevd_bundle/pydevd_cython.pyx":2133 + * + * except SystemExit: + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * + * except Exception: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2133, __pyx_L9_except_error) + if (__pyx_t_14) { + __Pyx_INCREF(Py_None); + __pyx_t_6 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2133, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __pyx_t_3; + __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L10_except_return; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2135 + * return None if event == "call" else NO_FTRACE + * + * except Exception: # <<<<<<<<<<<<<< + * if py_db.pydb_disposed: + * return None if event == "call" else NO_FTRACE # Don't log errors when we're shutting down. + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_11) { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 2135, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_1); + + /* "_pydevd_bundle/pydevd_cython.pyx":2136 + * + * except Exception: + * if py_db.pydb_disposed: # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE # Don't log errors when we're shutting down. + * # Log it + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_pydb_disposed); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2136, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2136, __pyx_L9_except_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_14) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2137 + * except Exception: + * if py_db.pydb_disposed: + * return None if event == "call" else NO_FTRACE # Don't log errors when we're shutting down. # <<<<<<<<<<<<<< + * # Log it + * try: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2137, __pyx_L9_except_error) + if (__pyx_t_14) { + __Pyx_INCREF(Py_None); + __pyx_t_6 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2137, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __pyx_t_3; + __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L10_except_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":2136 + * + * except Exception: + * if py_db.pydb_disposed: # <<<<<<<<<<<<<< + * return None if event == "call" else NO_FTRACE # Don't log errors when we're shutting down. + * # Log it + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2139 + * return None if event == "call" else NO_FTRACE # Don't log errors when we're shutting down. + * # Log it + * try: # <<<<<<<<<<<<<< + * if pydev_log_exception is not None: + * # This can actually happen during the interpreter shutdown in Python 2.7 + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_15); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":2140 + * # Log it + * try: + * if pydev_log_exception is not None: # <<<<<<<<<<<<<< + * # This can actually happen during the interpreter shutdown in Python 2.7 + * pydev_log_exception() + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pydev_log_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2140, __pyx_L52_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = (__pyx_t_6 != Py_None); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_14) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2142 + * if pydev_log_exception is not None: + * # This can actually happen during the interpreter shutdown in Python 2.7 + * pydev_log_exception() # <<<<<<<<<<<<<< + * except: + * # Error logging? We're really in the interpreter shutdown... + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pydev_log_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2142, __pyx_L52_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2142, __pyx_L52_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2140 + * # Log it + * try: + * if pydev_log_exception is not None: # <<<<<<<<<<<<<< + * # This can actually happen during the interpreter shutdown in Python 2.7 + * pydev_log_exception() + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2139 + * return None if event == "call" else NO_FTRACE # Don't log errors when we're shutting down. + * # Log it + * try: # <<<<<<<<<<<<<< + * if pydev_log_exception is not None: + * # This can actually happen during the interpreter shutdown in Python 2.7 + */ + } + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L59_try_end; + __pyx_L52_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2143 + * # This can actually happen during the interpreter shutdown in Python 2.7 + * pydev_log_exception() + * except: # <<<<<<<<<<<<<< + * # Error logging? We're really in the interpreter shutdown... + * # (https://github.com/fabioz/PyDev.Debugger/issues/8) + */ + /*except:*/ { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L53_exception_handled; + } + __pyx_L53_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + __pyx_L59_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2147 + * # (https://github.com/fabioz/PyDev.Debugger/issues/8) + * pass + * return None if event == "call" else NO_FTRACE # <<<<<<<<<<<<<< + * finally: + * additional_info.is_tracing -= 1 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 2147, __pyx_L9_except_error) + if (__pyx_t_14) { + __Pyx_INCREF(Py_None); + __pyx_t_6 = Py_None; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2147, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __pyx_t_3; + __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L10_except_return; + } + goto __pyx_L9_except_error; + + /* "_pydevd_bundle/pydevd_cython.pyx":2010 + * + * additional_info.is_tracing += 1 + * try: # <<<<<<<<<<<<<< + * pydev_step_cmd = additional_info.pydev_step_cmd + * is_stepping = pydev_step_cmd != -1 + */ + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L5_error; + __pyx_L11_try_return:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L4_return; + __pyx_L10_except_return:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L4_return; + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2149 + * return None if event == "call" else NO_FTRACE + * finally: + * additional_info.is_tracing -= 1 # <<<<<<<<<<<<<< + * + * + */ + /*finally:*/ { + __pyx_L5_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __pyx_t_11 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename; + { + __pyx_v_additional_info->is_tracing = (__pyx_v_additional_info->is_tracing - 1); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + } + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ErrRestore(__pyx_t_10, __pyx_t_9, __pyx_t_8); + __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; + __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19; + goto __pyx_L1_error; + } + __pyx_L4_return: { + __pyx_t_17 = __pyx_r; + __pyx_r = 0; + __pyx_v_additional_info->is_tracing = (__pyx_v_additional_info->is_tracing - 1); + __pyx_r = __pyx_t_17; + __pyx_t_17 = 0; + goto __pyx_L0; + } + } + + /* "_pydevd_bundle/pydevd_cython.pyx":1977 + * # fmt: on + * + * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< + * """This is the callback used when we enter some context in the debugger. + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_frame_cache_key); + __Pyx_XDECREF(__pyx_v_cache_skips); + __Pyx_XDECREF(__pyx_v_abs_path_canonical_path_and_base); + __Pyx_XDECREF((PyObject *)__pyx_v_additional_info); + __Pyx_XDECREF(__pyx_v_py_db); + __Pyx_XDECREF(__pyx_v_t); + __Pyx_XDECREF(__pyx_v_frame_skips_cache); + __Pyx_XDECREF(__pyx_v_back_frame); + __Pyx_XDECREF(__pyx_v_back_frame_cache_key); + __Pyx_XDECREF(__pyx_v_file_type); + __Pyx_XDECREF(__pyx_v_ret); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":1966 + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cdef class ThreadTracer: + * cdef public tuple _args; # <<<<<<<<<<<<<< + * def __init__(self, tuple args): + * self._args = args + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args___get__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args___get__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_args); + __pyx_r = __pyx_v_self->_args; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_2__set__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_2__set__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(0, 1966, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_args); + __Pyx_DECREF(__pyx_v_self->_args); + __pyx_v_self->_args = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer._args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_4__del__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_args); + __Pyx_DECREF(__pyx_v_self->_args); + __pyx_v_self->_args = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_4__reduce_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_4__reduce_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 1); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._args,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_args); + __Pyx_GIVEREF(__pyx_v_self->_args); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_args)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._args,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._args,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_2 = (__pyx_v__dict != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._args is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._args,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._args is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_ThreadTracer, (type(self), 0x121e1fb, None), state + */ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->_args != ((PyObject*)Py_None)); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._args is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ThreadTracer, (type(self), 0x121e1fb, None), state + * else: + */ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._args is not None + * if use_setstate: + * return __pyx_unpickle_ThreadTracer, (type(self), 0x121e1fb, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_ThreadTracer, (type(self), 0x121e1fb, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_ThreadTracer); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_18997755); + __Pyx_GIVEREF(__pyx_int_18997755); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_18997755)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._args is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ThreadTracer, (type(self), 0x121e1fb, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_ThreadTracer, (type(self), 0x121e1fb, None), state + * else: + * return __pyx_unpickle_ThreadTracer, (type(self), 0x121e1fb, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ThreadTracer__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_ThreadTracer); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_18997755); + __Pyx_GIVEREF(__pyx_int_18997755); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_18997755)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ThreadTracer, (type(self), 0x121e1fb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ThreadTracer__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 16, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_6__setstate_cython__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_6__setstate_cython__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 1); + + /* "(tree fragment)":17 + * return __pyx_unpickle_ThreadTracer, (type(self), 0x121e1fb, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ThreadTracer__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_ThreadTracer__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ThreadTracer, (type(self), 0x121e1fb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ThreadTracer__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":2164 + * _original_call = ThreadTracer.__call__ + * + * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< + * constructed_tid_to_last_frame[self._args[1].ident] = frame + * return _original_call(self, frame, event, arg) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_23__call__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_23__call__ = {"__call__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_23__call__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_23__call__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_event = 0; + PyObject *__pyx_v_arg = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_frame,&__pyx_n_s_event,&__pyx_n_s_arg,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2164, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2164, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 1); __PYX_ERR(0, 2164, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_event)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2164, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 2); __PYX_ERR(0, 2164, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2164, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, 3); __PYX_ERR(0, 2164, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 2164, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); + } + __pyx_v_self = values[0]; + __pyx_v_frame = values[1]; + __pyx_v_event = values[2]; + __pyx_v_arg = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__call__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 2164, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_22__call__(__pyx_self, __pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_22__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__call__", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":2165 + * + * def __call__(self, frame, event, arg): + * constructed_tid_to_last_frame[self._args[1].ident] = frame # <<<<<<<<<<<<<< + * return _original_call(self, frame, event, arg) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_constructed_tid_to_last_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ident_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_v_frame) < 0))) __PYX_ERR(0, 2165, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2166 + * def __call__(self, frame, event, arg): + * constructed_tid_to_last_frame[self._args[1].ident] = frame + * return _original_call(self, frame, event, arg) # <<<<<<<<<<<<<< + * + * ThreadTracer.__call__ = __call__ + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_original_call); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2164 + * _original_call = ThreadTracer.__call__ + * + * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< + * constructed_tid_to_last_frame[self._args[1].ident] = frame + * return _original_call(self, frame, event, arg) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_bundle/pydevd_cython.pyx":2172 + * if PYDEVD_USE_SYS_MONITORING: + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): # <<<<<<<<<<<<<< + * raise RuntimeError("Not used in sys.monitoring mode.") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_25fix_top_level_trace_and_get_trace_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_25fix_top_level_trace_and_get_trace_func = {"fix_top_level_trace_and_get_trace_func", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_25fix_top_level_trace_and_get_trace_func, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_25fix_top_level_trace_and_get_trace_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_args = 0; + CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("fix_top_level_trace_and_get_trace_func (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "fix_top_level_trace_and_get_trace_func", 1))) return NULL; + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_24fix_top_level_trace_and_get_trace_func(__pyx_self, __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + __Pyx_DECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_24fix_top_level_trace_and_get_trace_func(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("fix_top_level_trace_and_get_trace_func", 1); + + /* "_pydevd_bundle/pydevd_cython.pyx":2173 + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): + * raise RuntimeError("Not used in sys.monitoring mode.") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2173, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":2172 + * if PYDEVD_USE_SYS_MONITORING: + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): # <<<<<<<<<<<<<< + * raise RuntimeError("Not used in sys.monitoring mode.") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.fix_top_level_trace_and_get_trace_func", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_PyDBAdditionalThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_27__pyx_unpickle_PyDBAdditionalThreadInfo(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_27__pyx_unpickle_PyDBAdditionalThreadInfo = {"__pyx_unpickle_PyDBAdditionalThreadInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_27__pyx_unpickle_PyDBAdditionalThreadInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_27__pyx_unpickle_PyDBAdditionalThreadInfo(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_PyDBAdditionalThreadInfo (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PyDBAdditionalThreadInfo", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PyDBAdditionalThreadInfo", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_PyDBAdditionalThreadInfo") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PyDBAdditionalThreadInfo", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_PyDBAdditionalThreadInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_26__pyx_unpickle_PyDBAdditionalThreadInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_26__pyx_unpickle_PyDBAdditionalThreadInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_PyDBAdditionalThreadInfo", 1); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xd33aa14, 0x024feed, 0x4342dfb): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xd33aa14, 0x024feed, 0x4342dfb) = (conditional_breakpoint_exception, is_in_wait_loop, is_tracing, pydev_call_from_jinja2, pydev_call_inside_jinja2, pydev_django_resolve_frame, pydev_func_name, pydev_message, pydev_next_line, pydev_notify_kill, pydev_original_step_cmd, pydev_smart_child_offset, pydev_smart_parent_offset, pydev_smart_step_into_variants, pydev_smart_step_stop, pydev_state, pydev_step_cmd, pydev_step_stop, pydev_use_scoped_step_frame, step_in_initial_location, suspend_type, suspended_at_unhandled, target_id_to_smart_step_into_variant, thread_tracer, top_level_thread_tracer_no_back_frames, top_level_thread_tracer_unhandled, trace_suspend_type, weak_thread))" % __pyx_checksum + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__13, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0xd33aa14, 0x024feed, 0x4342dfb): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xd33aa14, 0x024feed, 0x4342dfb) = (conditional_breakpoint_exception, is_in_wait_loop, is_tracing, pydev_call_from_jinja2, pydev_call_inside_jinja2, pydev_django_resolve_frame, pydev_func_name, pydev_message, pydev_next_line, pydev_notify_kill, pydev_original_step_cmd, pydev_smart_child_offset, pydev_smart_parent_offset, pydev_smart_step_into_variants, pydev_smart_step_stop, pydev_state, pydev_step_cmd, pydev_step_stop, pydev_use_scoped_step_frame, step_in_initial_location, suspend_type, suspended_at_unhandled, target_id_to_smart_step_into_variant, thread_tracer, top_level_thread_tracer_no_back_frames, top_level_thread_tracer_unhandled, trace_suspend_type, weak_thread))" % __pyx_checksum + * __pyx_result = PyDBAdditionalThreadInfo.__new__(__pyx_type) + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0xd33aa14, 0x024feed, 0x4342dfb): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xd33aa14, 0x024feed, 0x4342dfb) = (conditional_breakpoint_exception, is_in_wait_loop, is_tracing, pydev_call_from_jinja2, pydev_call_inside_jinja2, pydev_django_resolve_frame, pydev_func_name, pydev_message, pydev_next_line, pydev_notify_kill, pydev_original_step_cmd, pydev_smart_child_offset, pydev_smart_parent_offset, pydev_smart_step_into_variants, pydev_smart_step_stop, pydev_state, pydev_step_cmd, pydev_step_stop, pydev_use_scoped_step_frame, step_in_initial_location, suspend_type, suspended_at_unhandled, target_id_to_smart_step_into_variant, thread_tracer, top_level_thread_tracer_no_back_frames, top_level_thread_tracer_unhandled, trace_suspend_type, weak_thread))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = PyDBAdditionalThreadInfo.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xd33aa14, 0x024feed, 0x4342dfb): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xd33aa14, 0x024feed, 0x4342dfb) = (conditional_breakpoint_exception, is_in_wait_loop, is_tracing, pydev_call_from_jinja2, pydev_call_inside_jinja2, pydev_django_resolve_frame, pydev_func_name, pydev_message, pydev_next_line, pydev_notify_kill, pydev_original_step_cmd, pydev_smart_child_offset, pydev_smart_parent_offset, pydev_smart_step_into_variants, pydev_smart_step_stop, pydev_state, pydev_step_cmd, pydev_step_stop, pydev_use_scoped_step_frame, step_in_initial_location, suspend_type, suspended_at_unhandled, target_id_to_smart_step_into_variant, thread_tracer, top_level_thread_tracer_no_back_frames, top_level_thread_tracer_unhandled, trace_suspend_type, weak_thread))" % __pyx_checksum + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xd33aa14, 0x024feed, 0x4342dfb) = (conditional_breakpoint_exception, is_in_wait_loop, is_tracing, pydev_call_from_jinja2, pydev_call_inside_jinja2, pydev_django_resolve_frame, pydev_func_name, pydev_message, pydev_next_line, pydev_notify_kill, pydev_original_step_cmd, pydev_smart_child_offset, pydev_smart_parent_offset, pydev_smart_step_into_variants, pydev_smart_step_stop, pydev_state, pydev_step_cmd, pydev_step_stop, pydev_use_scoped_step_frame, step_in_initial_location, suspend_type, suspended_at_unhandled, target_id_to_smart_step_into_variant, thread_tracer, top_level_thread_tracer_no_back_frames, top_level_thread_tracer_unhandled, trace_suspend_type, weak_thread))" % __pyx_checksum + * __pyx_result = PyDBAdditionalThreadInfo.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state( __pyx_result, __pyx_state) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xd33aa14, 0x024feed, 0x4342dfb) = (conditional_breakpoint_exception, is_in_wait_loop, is_tracing, pydev_call_from_jinja2, pydev_call_inside_jinja2, pydev_django_resolve_frame, pydev_func_name, pydev_message, pydev_next_line, pydev_notify_kill, pydev_original_step_cmd, pydev_smart_child_offset, pydev_smart_parent_offset, pydev_smart_step_into_variants, pydev_smart_step_stop, pydev_state, pydev_step_cmd, pydev_step_stop, pydev_use_scoped_step_frame, step_in_initial_location, suspend_type, suspended_at_unhandled, target_id_to_smart_step_into_variant, thread_tracer, top_level_thread_tracer_no_back_frames, top_level_thread_tracer_unhandled, trace_suspend_type, weak_thread))" % __pyx_checksum + * __pyx_result = PyDBAdditionalThreadInfo.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = PyDBAdditionalThreadInfo.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(PyDBAdditionalThreadInfo __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBAdditionalThreadInfo__set_state(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xd33aa14, 0x024feed, 0x4342dfb) = (conditional_breakpoint_exception, is_in_wait_loop, is_tracing, pydev_call_from_jinja2, pydev_call_inside_jinja2, pydev_django_resolve_frame, pydev_func_name, pydev_message, pydev_next_line, pydev_notify_kill, pydev_original_step_cmd, pydev_smart_child_offset, pydev_smart_parent_offset, pydev_smart_step_into_variants, pydev_smart_step_stop, pydev_state, pydev_step_cmd, pydev_step_stop, pydev_use_scoped_step_frame, step_in_initial_location, suspend_type, suspended_at_unhandled, target_id_to_smart_step_into_variant, thread_tracer, top_level_thread_tracer_no_back_frames, top_level_thread_tracer_unhandled, trace_suspend_type, weak_thread))" % __pyx_checksum + * __pyx_result = PyDBAdditionalThreadInfo.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(PyDBAdditionalThreadInfo __pyx_result, tuple __pyx_state): + * __pyx_result.conditional_breakpoint_exception = __pyx_state[0]; __pyx_result.is_in_wait_loop = __pyx_state[1]; __pyx_result.is_tracing = __pyx_state[2]; __pyx_result.pydev_call_from_jinja2 = __pyx_state[3]; __pyx_result.pydev_call_inside_jinja2 = __pyx_state[4]; __pyx_result.pydev_django_resolve_frame = __pyx_state[5]; __pyx_result.pydev_func_name = __pyx_state[6]; __pyx_result.pydev_message = __pyx_state[7]; __pyx_result.pydev_next_line = __pyx_state[8]; __pyx_result.pydev_notify_kill = __pyx_state[9]; __pyx_result.pydev_original_step_cmd = __pyx_state[10]; __pyx_result.pydev_smart_child_offset = __pyx_state[11]; __pyx_result.pydev_smart_parent_offset = __pyx_state[12]; __pyx_result.pydev_smart_step_into_variants = __pyx_state[13]; __pyx_result.pydev_smart_step_stop = __pyx_state[14]; __pyx_result.pydev_state = __pyx_state[15]; __pyx_result.pydev_step_cmd = __pyx_state[16]; __pyx_result.pydev_step_stop = __pyx_state[17]; __pyx_result.pydev_use_scoped_step_frame = __pyx_state[18]; __pyx_result.step_in_initial_location = __pyx_state[19]; __pyx_result.suspend_type = __pyx_state[20]; __pyx_result.suspended_at_unhandled = __pyx_state[21]; __pyx_result.target_id_to_smart_step_into_variant = __pyx_state[22]; __pyx_result.thread_tracer = __pyx_state[23]; __pyx_result.top_level_thread_tracer_no_back_frames = __pyx_state[24]; __pyx_result.top_level_thread_tracer_unhandled = __pyx_state[25]; __pyx_result.trace_suspend_type = __pyx_state[26]; __pyx_result.weak_thread = __pyx_state[27] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_PyDBAdditionalThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_PyDBAdditionalThreadInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(PyDBAdditionalThreadInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.conditional_breakpoint_exception = __pyx_state[0]; __pyx_result.is_in_wait_loop = __pyx_state[1]; __pyx_result.is_tracing = __pyx_state[2]; __pyx_result.pydev_call_from_jinja2 = __pyx_state[3]; __pyx_result.pydev_call_inside_jinja2 = __pyx_state[4]; __pyx_result.pydev_django_resolve_frame = __pyx_state[5]; __pyx_result.pydev_func_name = __pyx_state[6]; __pyx_result.pydev_message = __pyx_state[7]; __pyx_result.pydev_next_line = __pyx_state[8]; __pyx_result.pydev_notify_kill = __pyx_state[9]; __pyx_result.pydev_original_step_cmd = __pyx_state[10]; __pyx_result.pydev_smart_child_offset = __pyx_state[11]; __pyx_result.pydev_smart_parent_offset = __pyx_state[12]; __pyx_result.pydev_smart_step_into_variants = __pyx_state[13]; __pyx_result.pydev_smart_step_stop = __pyx_state[14]; __pyx_result.pydev_state = __pyx_state[15]; __pyx_result.pydev_step_cmd = __pyx_state[16]; __pyx_result.pydev_step_stop = __pyx_state[17]; __pyx_result.pydev_use_scoped_step_frame = __pyx_state[18]; __pyx_result.step_in_initial_location = __pyx_state[19]; __pyx_result.suspend_type = __pyx_state[20]; __pyx_result.suspended_at_unhandled = __pyx_state[21]; __pyx_result.target_id_to_smart_step_into_variant = __pyx_state[22]; __pyx_result.thread_tracer = __pyx_state[23]; __pyx_result.top_level_thread_tracer_no_back_frames = __pyx_state[24]; __pyx_result.top_level_thread_tracer_unhandled = __pyx_state[25]; __pyx_result.trace_suspend_type = __pyx_state[26]; __pyx_result.weak_thread = __pyx_state[27] + * if len(__pyx_state) > 28 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBAdditionalThreadInfo__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_PyDBAdditionalThreadInfo__set_state", 1); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(PyDBAdditionalThreadInfo __pyx_result, tuple __pyx_state): + * __pyx_result.conditional_breakpoint_exception = __pyx_state[0]; __pyx_result.is_in_wait_loop = __pyx_state[1]; __pyx_result.is_tracing = __pyx_state[2]; __pyx_result.pydev_call_from_jinja2 = __pyx_state[3]; __pyx_result.pydev_call_inside_jinja2 = __pyx_state[4]; __pyx_result.pydev_django_resolve_frame = __pyx_state[5]; __pyx_result.pydev_func_name = __pyx_state[6]; __pyx_result.pydev_message = __pyx_state[7]; __pyx_result.pydev_next_line = __pyx_state[8]; __pyx_result.pydev_notify_kill = __pyx_state[9]; __pyx_result.pydev_original_step_cmd = __pyx_state[10]; __pyx_result.pydev_smart_child_offset = __pyx_state[11]; __pyx_result.pydev_smart_parent_offset = __pyx_state[12]; __pyx_result.pydev_smart_step_into_variants = __pyx_state[13]; __pyx_result.pydev_smart_step_stop = __pyx_state[14]; __pyx_result.pydev_state = __pyx_state[15]; __pyx_result.pydev_step_cmd = __pyx_state[16]; __pyx_result.pydev_step_stop = __pyx_state[17]; __pyx_result.pydev_use_scoped_step_frame = __pyx_state[18]; __pyx_result.step_in_initial_location = __pyx_state[19]; __pyx_result.suspend_type = __pyx_state[20]; __pyx_result.suspended_at_unhandled = __pyx_state[21]; __pyx_result.target_id_to_smart_step_into_variant = __pyx_state[22]; __pyx_result.thread_tracer = __pyx_state[23]; __pyx_result.top_level_thread_tracer_no_back_frames = __pyx_state[24]; __pyx_result.top_level_thread_tracer_unhandled = __pyx_state[25]; __pyx_result.trace_suspend_type = __pyx_state[26]; __pyx_result.weak_thread = __pyx_state[27] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 28 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[28]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->conditional_breakpoint_exception); + __Pyx_DECREF(__pyx_v___pyx_result->conditional_breakpoint_exception); + __pyx_v___pyx_result->conditional_breakpoint_exception = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->is_in_wait_loop = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->is_tracing = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->pydev_call_from_jinja2); + __Pyx_DECREF(__pyx_v___pyx_result->pydev_call_from_jinja2); + __pyx_v___pyx_result->pydev_call_from_jinja2 = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->pydev_call_inside_jinja2); + __Pyx_DECREF(__pyx_v___pyx_result->pydev_call_inside_jinja2); + __pyx_v___pyx_result->pydev_call_inside_jinja2 = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->pydev_django_resolve_frame = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->pydev_func_name); + __Pyx_DECREF(__pyx_v___pyx_result->pydev_func_name); + __pyx_v___pyx_result->pydev_func_name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->pydev_message); + __Pyx_DECREF(__pyx_v___pyx_result->pydev_message); + __pyx_v___pyx_result->pydev_message = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->pydev_next_line = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->pydev_notify_kill = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->pydev_original_step_cmd = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->pydev_smart_child_offset = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->pydev_smart_parent_offset = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->pydev_smart_step_into_variants); + __Pyx_DECREF(__pyx_v___pyx_result->pydev_smart_step_into_variants); + __pyx_v___pyx_result->pydev_smart_step_into_variants = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->pydev_smart_step_stop); + __Pyx_DECREF(__pyx_v___pyx_result->pydev_smart_step_stop); + __pyx_v___pyx_result->pydev_smart_step_stop = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->pydev_state = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->pydev_step_cmd = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->pydev_step_stop); + __Pyx_DECREF(__pyx_v___pyx_result->pydev_step_stop); + __pyx_v___pyx_result->pydev_step_stop = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 18, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->pydev_use_scoped_step_frame = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 19, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->step_in_initial_location); + __Pyx_DECREF(__pyx_v___pyx_result->step_in_initial_location); + __pyx_v___pyx_result->step_in_initial_location = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 20, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->suspend_type = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 21, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->suspended_at_unhandled = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 22, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->target_id_to_smart_step_into_variant); + __Pyx_DECREF(__pyx_v___pyx_result->target_id_to_smart_step_into_variant); + __pyx_v___pyx_result->target_id_to_smart_step_into_variant = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 23, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->thread_tracer); + __Pyx_DECREF(__pyx_v___pyx_result->thread_tracer); + __pyx_v___pyx_result->thread_tracer = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 24, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->top_level_thread_tracer_no_back_frames); + __Pyx_DECREF(__pyx_v___pyx_result->top_level_thread_tracer_no_back_frames); + __pyx_v___pyx_result->top_level_thread_tracer_no_back_frames = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 25, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->top_level_thread_tracer_unhandled); + __Pyx_DECREF(__pyx_v___pyx_result->top_level_thread_tracer_unhandled); + __pyx_v___pyx_result->top_level_thread_tracer_unhandled = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 26, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->trace_suspend_type); + __Pyx_DECREF(__pyx_v___pyx_result->trace_suspend_type); + __pyx_v___pyx_result->trace_suspend_type = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 27, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->weak_thread); + __Pyx_DECREF(__pyx_v___pyx_result->weak_thread); + __pyx_v___pyx_result->weak_thread = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(PyDBAdditionalThreadInfo __pyx_result, tuple __pyx_state): + * __pyx_result.conditional_breakpoint_exception = __pyx_state[0]; __pyx_result.is_in_wait_loop = __pyx_state[1]; __pyx_result.is_tracing = __pyx_state[2]; __pyx_result.pydev_call_from_jinja2 = __pyx_state[3]; __pyx_result.pydev_call_inside_jinja2 = __pyx_state[4]; __pyx_result.pydev_django_resolve_frame = __pyx_state[5]; __pyx_result.pydev_func_name = __pyx_state[6]; __pyx_result.pydev_message = __pyx_state[7]; __pyx_result.pydev_next_line = __pyx_state[8]; __pyx_result.pydev_notify_kill = __pyx_state[9]; __pyx_result.pydev_original_step_cmd = __pyx_state[10]; __pyx_result.pydev_smart_child_offset = __pyx_state[11]; __pyx_result.pydev_smart_parent_offset = __pyx_state[12]; __pyx_result.pydev_smart_step_into_variants = __pyx_state[13]; __pyx_result.pydev_smart_step_stop = __pyx_state[14]; __pyx_result.pydev_state = __pyx_state[15]; __pyx_result.pydev_step_cmd = __pyx_state[16]; __pyx_result.pydev_step_stop = __pyx_state[17]; __pyx_result.pydev_use_scoped_step_frame = __pyx_state[18]; __pyx_result.step_in_initial_location = __pyx_state[19]; __pyx_result.suspend_type = __pyx_state[20]; __pyx_result.suspended_at_unhandled = __pyx_state[21]; __pyx_result.target_id_to_smart_step_into_variant = __pyx_state[22]; __pyx_result.thread_tracer = __pyx_state[23]; __pyx_result.top_level_thread_tracer_no_back_frames = __pyx_state[24]; __pyx_result.top_level_thread_tracer_unhandled = __pyx_state[25]; __pyx_result.trace_suspend_type = __pyx_state[26]; __pyx_result.weak_thread = __pyx_state[27] + * if len(__pyx_state) > 28 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[28]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_4 > 28); + if (__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result.conditional_breakpoint_exception = __pyx_state[0]; __pyx_result.is_in_wait_loop = __pyx_state[1]; __pyx_result.is_tracing = __pyx_state[2]; __pyx_result.pydev_call_from_jinja2 = __pyx_state[3]; __pyx_result.pydev_call_inside_jinja2 = __pyx_state[4]; __pyx_result.pydev_django_resolve_frame = __pyx_state[5]; __pyx_result.pydev_func_name = __pyx_state[6]; __pyx_result.pydev_message = __pyx_state[7]; __pyx_result.pydev_next_line = __pyx_state[8]; __pyx_result.pydev_notify_kill = __pyx_state[9]; __pyx_result.pydev_original_step_cmd = __pyx_state[10]; __pyx_result.pydev_smart_child_offset = __pyx_state[11]; __pyx_result.pydev_smart_parent_offset = __pyx_state[12]; __pyx_result.pydev_smart_step_into_variants = __pyx_state[13]; __pyx_result.pydev_smart_step_stop = __pyx_state[14]; __pyx_result.pydev_state = __pyx_state[15]; __pyx_result.pydev_step_cmd = __pyx_state[16]; __pyx_result.pydev_step_stop = __pyx_state[17]; __pyx_result.pydev_use_scoped_step_frame = __pyx_state[18]; __pyx_result.step_in_initial_location = __pyx_state[19]; __pyx_result.suspend_type = __pyx_state[20]; __pyx_result.suspended_at_unhandled = __pyx_state[21]; __pyx_result.target_id_to_smart_step_into_variant = __pyx_state[22]; __pyx_result.thread_tracer = __pyx_state[23]; __pyx_result.top_level_thread_tracer_no_back_frames = __pyx_state[24]; __pyx_result.top_level_thread_tracer_unhandled = __pyx_state[25]; __pyx_result.trace_suspend_type = __pyx_state[26]; __pyx_result.weak_thread = __pyx_state[27] + * if len(__pyx_state) > 28 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[28]) # <<<<<<<<<<<<<< + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 28, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(PyDBAdditionalThreadInfo __pyx_result, tuple __pyx_state): + * __pyx_result.conditional_breakpoint_exception = __pyx_state[0]; __pyx_result.is_in_wait_loop = __pyx_state[1]; __pyx_result.is_tracing = __pyx_state[2]; __pyx_result.pydev_call_from_jinja2 = __pyx_state[3]; __pyx_result.pydev_call_inside_jinja2 = __pyx_state[4]; __pyx_result.pydev_django_resolve_frame = __pyx_state[5]; __pyx_result.pydev_func_name = __pyx_state[6]; __pyx_result.pydev_message = __pyx_state[7]; __pyx_result.pydev_next_line = __pyx_state[8]; __pyx_result.pydev_notify_kill = __pyx_state[9]; __pyx_result.pydev_original_step_cmd = __pyx_state[10]; __pyx_result.pydev_smart_child_offset = __pyx_state[11]; __pyx_result.pydev_smart_parent_offset = __pyx_state[12]; __pyx_result.pydev_smart_step_into_variants = __pyx_state[13]; __pyx_result.pydev_smart_step_stop = __pyx_state[14]; __pyx_result.pydev_state = __pyx_state[15]; __pyx_result.pydev_step_cmd = __pyx_state[16]; __pyx_result.pydev_step_stop = __pyx_state[17]; __pyx_result.pydev_use_scoped_step_frame = __pyx_state[18]; __pyx_result.step_in_initial_location = __pyx_state[19]; __pyx_result.suspend_type = __pyx_state[20]; __pyx_result.suspended_at_unhandled = __pyx_state[21]; __pyx_result.target_id_to_smart_step_into_variant = __pyx_state[22]; __pyx_result.thread_tracer = __pyx_state[23]; __pyx_result.top_level_thread_tracer_no_back_frames = __pyx_state[24]; __pyx_result.top_level_thread_tracer_unhandled = __pyx_state[25]; __pyx_result.trace_suspend_type = __pyx_state[26]; __pyx_result.weak_thread = __pyx_state[27] + * if len(__pyx_state) > 28 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[28]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(PyDBAdditionalThreadInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.conditional_breakpoint_exception = __pyx_state[0]; __pyx_result.is_in_wait_loop = __pyx_state[1]; __pyx_result.is_tracing = __pyx_state[2]; __pyx_result.pydev_call_from_jinja2 = __pyx_state[3]; __pyx_result.pydev_call_inside_jinja2 = __pyx_state[4]; __pyx_result.pydev_django_resolve_frame = __pyx_state[5]; __pyx_result.pydev_func_name = __pyx_state[6]; __pyx_result.pydev_message = __pyx_state[7]; __pyx_result.pydev_next_line = __pyx_state[8]; __pyx_result.pydev_notify_kill = __pyx_state[9]; __pyx_result.pydev_original_step_cmd = __pyx_state[10]; __pyx_result.pydev_smart_child_offset = __pyx_state[11]; __pyx_result.pydev_smart_parent_offset = __pyx_state[12]; __pyx_result.pydev_smart_step_into_variants = __pyx_state[13]; __pyx_result.pydev_smart_step_stop = __pyx_state[14]; __pyx_result.pydev_state = __pyx_state[15]; __pyx_result.pydev_step_cmd = __pyx_state[16]; __pyx_result.pydev_step_stop = __pyx_state[17]; __pyx_result.pydev_use_scoped_step_frame = __pyx_state[18]; __pyx_result.step_in_initial_location = __pyx_state[19]; __pyx_result.suspend_type = __pyx_state[20]; __pyx_result.suspended_at_unhandled = __pyx_state[21]; __pyx_result.target_id_to_smart_step_into_variant = __pyx_state[22]; __pyx_result.thread_tracer = __pyx_state[23]; __pyx_result.top_level_thread_tracer_no_back_frames = __pyx_state[24]; __pyx_result.top_level_thread_tracer_unhandled = __pyx_state[25]; __pyx_result.trace_suspend_type = __pyx_state[26]; __pyx_result.weak_thread = __pyx_state[27] + * if len(__pyx_state) > 28 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_PyDBAdditionalThreadInfo__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle__TryExceptContainerObj(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_29__pyx_unpickle__TryExceptContainerObj(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_29__pyx_unpickle__TryExceptContainerObj = {"__pyx_unpickle__TryExceptContainerObj", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_29__pyx_unpickle__TryExceptContainerObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_29__pyx_unpickle__TryExceptContainerObj(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle__TryExceptContainerObj (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__TryExceptContainerObj", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__TryExceptContainerObj", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle__TryExceptContainerObj") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__TryExceptContainerObj", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle__TryExceptContainerObj", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_28__pyx_unpickle__TryExceptContainerObj(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_28__pyx_unpickle__TryExceptContainerObj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__TryExceptContainerObj", 1); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xdbf5e44, 0xde17cd3, 0xc8b6eb1): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdbf5e44, 0xde17cd3, 0xc8b6eb1) = (try_except_infos))" % __pyx_checksum + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__14, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0xdbf5e44, 0xde17cd3, 0xc8b6eb1): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdbf5e44, 0xde17cd3, 0xc8b6eb1) = (try_except_infos))" % __pyx_checksum + * __pyx_result = _TryExceptContainerObj.__new__(__pyx_type) + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0xdbf5e44, 0xde17cd3, 0xc8b6eb1): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdbf5e44, 0xde17cd3, 0xc8b6eb1) = (try_except_infos))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = _TryExceptContainerObj.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xdbf5e44, 0xde17cd3, 0xc8b6eb1): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdbf5e44, 0xde17cd3, 0xc8b6eb1) = (try_except_infos))" % __pyx_checksum + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdbf5e44, 0xde17cd3, 0xc8b6eb1) = (try_except_infos))" % __pyx_checksum + * __pyx_result = _TryExceptContainerObj.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle__TryExceptContainerObj__set_state(<_TryExceptContainerObj> __pyx_result, __pyx_state) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdbf5e44, 0xde17cd3, 0xc8b6eb1) = (try_except_infos))" % __pyx_checksum + * __pyx_result = _TryExceptContainerObj.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__TryExceptContainerObj__set_state(<_TryExceptContainerObj> __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = _TryExceptContainerObj.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle__TryExceptContainerObj__set_state(<_TryExceptContainerObj> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle__TryExceptContainerObj__set_state(_TryExceptContainerObj __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle__TryExceptContainerObj__set_state(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xdbf5e44, 0xde17cd3, 0xc8b6eb1) = (try_except_infos))" % __pyx_checksum + * __pyx_result = _TryExceptContainerObj.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__TryExceptContainerObj__set_state(<_TryExceptContainerObj> __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle__TryExceptContainerObj__set_state(<_TryExceptContainerObj> __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle__TryExceptContainerObj__set_state(_TryExceptContainerObj __pyx_result, tuple __pyx_state): + * __pyx_result.try_except_infos = __pyx_state[0] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle__TryExceptContainerObj(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle__TryExceptContainerObj", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle__TryExceptContainerObj__set_state(<_TryExceptContainerObj> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__TryExceptContainerObj__set_state(_TryExceptContainerObj __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.try_except_infos = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle__TryExceptContainerObj__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + unsigned int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__TryExceptContainerObj__set_state", 1); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle__TryExceptContainerObj__set_state(_TryExceptContainerObj __pyx_result, tuple __pyx_state): + * __pyx_result.try_except_infos = __pyx_state[0] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->try_except_infos); + __Pyx_DECREF(__pyx_v___pyx_result->try_except_infos); + __pyx_v___pyx_result->try_except_infos = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__TryExceptContainerObj__set_state(_TryExceptContainerObj __pyx_result, tuple __pyx_state): + * __pyx_result.try_except_infos = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_3 > 1); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result.try_except_infos = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__TryExceptContainerObj__set_state(_TryExceptContainerObj __pyx_result, tuple __pyx_state): + * __pyx_result.try_except_infos = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle__TryExceptContainerObj__set_state(<_TryExceptContainerObj> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__TryExceptContainerObj__set_state(_TryExceptContainerObj __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.try_except_infos = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle__TryExceptContainerObj__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_PyDBFrame(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31__pyx_unpickle_PyDBFrame(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_31__pyx_unpickle_PyDBFrame = {"__pyx_unpickle_PyDBFrame", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_31__pyx_unpickle_PyDBFrame, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_31__pyx_unpickle_PyDBFrame(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_PyDBFrame (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PyDBFrame", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PyDBFrame", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_PyDBFrame") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PyDBFrame", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_PyDBFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_30__pyx_unpickle_PyDBFrame(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_30__pyx_unpickle_PyDBFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_PyDBFrame", 1); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0x3a8c26e, 0xb793695, 0x506e682): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3a8c26e, 0xb793695, 0x506e682) = (_args, exc_info, should_skip))" % __pyx_checksum + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0x3a8c26e, 0xb793695, 0x506e682): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3a8c26e, 0xb793695, 0x506e682) = (_args, exc_info, should_skip))" % __pyx_checksum + * __pyx_result = PyDBFrame.__new__(__pyx_type) + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0x3a8c26e, 0xb793695, 0x506e682): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3a8c26e, 0xb793695, 0x506e682) = (_args, exc_info, should_skip))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = PyDBFrame.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0x3a8c26e, 0xb793695, 0x506e682): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3a8c26e, 0xb793695, 0x506e682) = (_args, exc_info, should_skip))" % __pyx_checksum + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3a8c26e, 0xb793695, 0x506e682) = (_args, exc_info, should_skip))" % __pyx_checksum + * __pyx_result = PyDBFrame.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_PyDBFrame__set_state( __pyx_result, __pyx_state) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3a8c26e, 0xb793695, 0x506e682) = (_args, exc_info, should_skip))" % __pyx_checksum + * __pyx_result = PyDBFrame.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBFrame__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = PyDBFrame.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_PyDBFrame__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_PyDBFrame__set_state(PyDBFrame __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBFrame__set_state(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3a8c26e, 0xb793695, 0x506e682) = (_args, exc_info, should_skip))" % __pyx_checksum + * __pyx_result = PyDBFrame.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBFrame__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_PyDBFrame__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_PyDBFrame__set_state(PyDBFrame __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0]; __pyx_result.exc_info = __pyx_state[1]; __pyx_result.should_skip = __pyx_state[2] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_PyDBFrame(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_PyDBFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_PyDBFrame__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_PyDBFrame__set_state(PyDBFrame __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._args = __pyx_state[0]; __pyx_result.exc_info = __pyx_state[1]; __pyx_result.should_skip = __pyx_state[2] + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_PyDBFrame__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_PyDBFrame__set_state", 1); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_PyDBFrame__set_state(PyDBFrame __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0]; __pyx_result.exc_info = __pyx_state[1]; __pyx_result.should_skip = __pyx_state[2] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[3]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_args); + __Pyx_DECREF(__pyx_v___pyx_result->_args); + __pyx_v___pyx_result->_args = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->exc_info); + __Pyx_DECREF(__pyx_v___pyx_result->exc_info); + __pyx_v___pyx_result->exc_info = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->should_skip = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_PyDBFrame__set_state(PyDBFrame __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0]; __pyx_result.exc_info = __pyx_state[1]; __pyx_result.should_skip = __pyx_state[2] + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[3]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_4 > 3); + if (__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_3 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":14 + * __pyx_result._args = __pyx_state[0]; __pyx_result.exc_info = __pyx_state[1]; __pyx_result.should_skip = __pyx_state[2] + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_PyDBFrame__set_state(PyDBFrame __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0]; __pyx_result.exc_info = __pyx_state[1]; __pyx_result.should_skip = __pyx_state[2] + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[3]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_PyDBFrame__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_PyDBFrame__set_state(PyDBFrame __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._args = __pyx_state[0]; __pyx_result.exc_info = __pyx_state[1]; __pyx_result.should_skip = __pyx_state[2] + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_PyDBFrame__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_SafeCallWrapper(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_33__pyx_unpickle_SafeCallWrapper(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_33__pyx_unpickle_SafeCallWrapper = {"__pyx_unpickle_SafeCallWrapper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_33__pyx_unpickle_SafeCallWrapper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_33__pyx_unpickle_SafeCallWrapper(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SafeCallWrapper (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SafeCallWrapper", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SafeCallWrapper", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_SafeCallWrapper") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SafeCallWrapper", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_SafeCallWrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_32__pyx_unpickle_SafeCallWrapper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_32__pyx_unpickle_SafeCallWrapper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SafeCallWrapper", 1); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa14289b, 0x3cc10aa, 0x77c077b): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa14289b, 0x3cc10aa, 0x77c077b) = (method_object))" % __pyx_checksum + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__16, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0xa14289b, 0x3cc10aa, 0x77c077b): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa14289b, 0x3cc10aa, 0x77c077b) = (method_object))" % __pyx_checksum + * __pyx_result = SafeCallWrapper.__new__(__pyx_type) + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0xa14289b, 0x3cc10aa, 0x77c077b): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa14289b, 0x3cc10aa, 0x77c077b) = (method_object))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = SafeCallWrapper.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa14289b, 0x3cc10aa, 0x77c077b): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa14289b, 0x3cc10aa, 0x77c077b) = (method_object))" % __pyx_checksum + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa14289b, 0x3cc10aa, 0x77c077b) = (method_object))" % __pyx_checksum + * __pyx_result = SafeCallWrapper.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SafeCallWrapper__set_state( __pyx_result, __pyx_state) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa14289b, 0x3cc10aa, 0x77c077b) = (method_object))" % __pyx_checksum + * __pyx_result = SafeCallWrapper.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SafeCallWrapper__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = SafeCallWrapper.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SafeCallWrapper__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SafeCallWrapper__set_state(SafeCallWrapper __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_SafeCallWrapper__set_state(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa14289b, 0x3cc10aa, 0x77c077b) = (method_object))" % __pyx_checksum + * __pyx_result = SafeCallWrapper.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SafeCallWrapper__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SafeCallWrapper__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SafeCallWrapper__set_state(SafeCallWrapper __pyx_result, tuple __pyx_state): + * __pyx_result.method_object = __pyx_state[0] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_SafeCallWrapper(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_SafeCallWrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SafeCallWrapper__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SafeCallWrapper__set_state(SafeCallWrapper __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.method_object = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_SafeCallWrapper__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + unsigned int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SafeCallWrapper__set_state", 1); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SafeCallWrapper__set_state(SafeCallWrapper __pyx_result, tuple __pyx_state): + * __pyx_result.method_object = __pyx_state[0] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->method_object); + __Pyx_DECREF(__pyx_v___pyx_result->method_object); + __pyx_v___pyx_result->method_object = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_SafeCallWrapper__set_state(SafeCallWrapper __pyx_result, tuple __pyx_state): + * __pyx_result.method_object = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_3 > 1); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result.method_object = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_SafeCallWrapper__set_state(SafeCallWrapper __pyx_result, tuple __pyx_state): + * __pyx_result.method_object = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_SafeCallWrapper__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SafeCallWrapper__set_state(SafeCallWrapper __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.method_object = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_SafeCallWrapper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_35__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_35__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions = {"__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_35__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_35__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_34__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_34__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions", 1); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0x121e1fb, 0xf3a61b1, 0x3d7902a): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__17, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0x121e1fb, 0xf3a61b1, 0x3d7902a): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum + * __pyx_result = TopLevelThreadTracerOnlyUnhandledExceptions.__new__(__pyx_type) + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0x121e1fb, 0xf3a61b1, 0x3d7902a): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = TopLevelThreadTracerOnlyUnhandledExceptions.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0x121e1fb, 0xf3a61b1, 0x3d7902a): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum + * __pyx_result = TopLevelThreadTracerOnlyUnhandledExceptions.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state( __pyx_result, __pyx_state) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum + * __pyx_result = TopLevelThreadTracerOnlyUnhandledExceptions.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = TopLevelThreadTracerOnlyUnhandledExceptions.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(TopLevelThreadTracerOnlyUnhandledExceptions __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum + * __pyx_result = TopLevelThreadTracerOnlyUnhandledExceptions.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(TopLevelThreadTracerOnlyUnhandledExceptions __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(TopLevelThreadTracerOnlyUnhandledExceptions __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._args = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + unsigned int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state", 1); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(TopLevelThreadTracerOnlyUnhandledExceptions __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_args); + __Pyx_DECREF(__pyx_v___pyx_result->_args); + __pyx_v___pyx_result->_args = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(TopLevelThreadTracerOnlyUnhandledExceptions __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_3 > 1); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result._args = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(TopLevelThreadTracerOnlyUnhandledExceptions __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(TopLevelThreadTracerOnlyUnhandledExceptions __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._args = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_TopLevelThreadTracerNoBackFrame(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_37__pyx_unpickle_TopLevelThreadTracerNoBackFrame(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_37__pyx_unpickle_TopLevelThreadTracerNoBackFrame = {"__pyx_unpickle_TopLevelThreadTracerNoBackFrame", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_37__pyx_unpickle_TopLevelThreadTracerNoBackFrame, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_37__pyx_unpickle_TopLevelThreadTracerNoBackFrame(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_TopLevelThreadTracerNoBackFrame (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TopLevelThreadTracerNoBackFrame", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TopLevelThreadTracerNoBackFrame", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_TopLevelThreadTracerNoBackFrame") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TopLevelThreadTracerNoBackFrame", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_TopLevelThreadTracerNoBackFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_36__pyx_unpickle_TopLevelThreadTracerNoBackFrame(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_36__pyx_unpickle_TopLevelThreadTracerNoBackFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_TopLevelThreadTracerNoBackFrame", 1); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0x3f5f7e9, 0x0ff9c96, 0xa3a9ec1): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3f5f7e9, 0x0ff9c96, 0xa3a9ec1) = (_args, _frame_trace_dispatch, _last_exc_arg, _last_raise_line, _raise_lines, try_except_infos))" % __pyx_checksum + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__18, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0x3f5f7e9, 0x0ff9c96, 0xa3a9ec1): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3f5f7e9, 0x0ff9c96, 0xa3a9ec1) = (_args, _frame_trace_dispatch, _last_exc_arg, _last_raise_line, _raise_lines, try_except_infos))" % __pyx_checksum + * __pyx_result = TopLevelThreadTracerNoBackFrame.__new__(__pyx_type) + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0x3f5f7e9, 0x0ff9c96, 0xa3a9ec1): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3f5f7e9, 0x0ff9c96, 0xa3a9ec1) = (_args, _frame_trace_dispatch, _last_exc_arg, _last_raise_line, _raise_lines, try_except_infos))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = TopLevelThreadTracerNoBackFrame.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0x3f5f7e9, 0x0ff9c96, 0xa3a9ec1): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3f5f7e9, 0x0ff9c96, 0xa3a9ec1) = (_args, _frame_trace_dispatch, _last_exc_arg, _last_raise_line, _raise_lines, try_except_infos))" % __pyx_checksum + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3f5f7e9, 0x0ff9c96, 0xa3a9ec1) = (_args, _frame_trace_dispatch, _last_exc_arg, _last_raise_line, _raise_lines, try_except_infos))" % __pyx_checksum + * __pyx_result = TopLevelThreadTracerNoBackFrame.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state( __pyx_result, __pyx_state) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3f5f7e9, 0x0ff9c96, 0xa3a9ec1) = (_args, _frame_trace_dispatch, _last_exc_arg, _last_raise_line, _raise_lines, try_except_infos))" % __pyx_checksum + * __pyx_result = TopLevelThreadTracerNoBackFrame.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = TopLevelThreadTracerNoBackFrame.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(TopLevelThreadTracerNoBackFrame __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x3f5f7e9, 0x0ff9c96, 0xa3a9ec1) = (_args, _frame_trace_dispatch, _last_exc_arg, _last_raise_line, _raise_lines, try_except_infos))" % __pyx_checksum + * __pyx_result = TopLevelThreadTracerNoBackFrame.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(TopLevelThreadTracerNoBackFrame __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0]; __pyx_result._frame_trace_dispatch = __pyx_state[1]; __pyx_result._last_exc_arg = __pyx_state[2]; __pyx_result._last_raise_line = __pyx_state[3]; __pyx_result._raise_lines = __pyx_state[4]; __pyx_result.try_except_infos = __pyx_state[5] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_TopLevelThreadTracerNoBackFrame(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_TopLevelThreadTracerNoBackFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(TopLevelThreadTracerNoBackFrame __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._args = __pyx_state[0]; __pyx_result._frame_trace_dispatch = __pyx_state[1]; __pyx_result._last_exc_arg = __pyx_state[2]; __pyx_result._last_raise_line = __pyx_state[3]; __pyx_result._raise_lines = __pyx_state[4]; __pyx_result.try_except_infos = __pyx_state[5] + * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state", 1); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(TopLevelThreadTracerNoBackFrame __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0]; __pyx_result._frame_trace_dispatch = __pyx_state[1]; __pyx_result._last_exc_arg = __pyx_state[2]; __pyx_result._last_raise_line = __pyx_state[3]; __pyx_result._raise_lines = __pyx_state[4]; __pyx_result.try_except_infos = __pyx_state[5] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[6]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_args); + __Pyx_DECREF(__pyx_v___pyx_result->_args); + __pyx_v___pyx_result->_args = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_frame_trace_dispatch); + __Pyx_DECREF(__pyx_v___pyx_result->_frame_trace_dispatch); + __pyx_v___pyx_result->_frame_trace_dispatch = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_last_exc_arg); + __Pyx_DECREF(__pyx_v___pyx_result->_last_exc_arg); + __pyx_v___pyx_result->_last_exc_arg = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_last_raise_line = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_raise_lines); + __Pyx_DECREF(__pyx_v___pyx_result->_raise_lines); + __pyx_v___pyx_result->_raise_lines = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->try_except_infos); + __Pyx_DECREF(__pyx_v___pyx_result->try_except_infos); + __pyx_v___pyx_result->try_except_infos = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(TopLevelThreadTracerNoBackFrame __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0]; __pyx_result._frame_trace_dispatch = __pyx_state[1]; __pyx_result._last_exc_arg = __pyx_state[2]; __pyx_result._last_raise_line = __pyx_state[3]; __pyx_result._raise_lines = __pyx_state[4]; __pyx_result.try_except_infos = __pyx_state[5] + * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[6]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_4 > 6); + if (__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_3 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":14 + * __pyx_result._args = __pyx_state[0]; __pyx_result._frame_trace_dispatch = __pyx_state[1]; __pyx_result._last_exc_arg = __pyx_state[2]; __pyx_result._last_raise_line = __pyx_state[3]; __pyx_result._raise_lines = __pyx_state[4]; __pyx_result.try_except_infos = __pyx_state[5] + * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[6]) # <<<<<<<<<<<<<< + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(TopLevelThreadTracerNoBackFrame __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0]; __pyx_result._frame_trace_dispatch = __pyx_state[1]; __pyx_result._last_exc_arg = __pyx_state[2]; __pyx_result._last_raise_line = __pyx_state[3]; __pyx_result._raise_lines = __pyx_state[4]; __pyx_result.try_except_infos = __pyx_state[5] + * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[6]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(TopLevelThreadTracerNoBackFrame __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._args = __pyx_state[0]; __pyx_result._frame_trace_dispatch = __pyx_state[1]; __pyx_result._last_exc_arg = __pyx_state[2]; __pyx_result._last_raise_line = __pyx_state[3]; __pyx_result._raise_lines = __pyx_state[4]; __pyx_result.try_except_infos = __pyx_state[5] + * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_ThreadTracer(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_39__pyx_unpickle_ThreadTracer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_39__pyx_unpickle_ThreadTracer = {"__pyx_unpickle_ThreadTracer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_39__pyx_unpickle_ThreadTracer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_39__pyx_unpickle_ThreadTracer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_ThreadTracer (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ThreadTracer", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ThreadTracer", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_ThreadTracer") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ThreadTracer", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_ThreadTracer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_38__pyx_unpickle_ThreadTracer(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_38__pyx_unpickle_ThreadTracer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ThreadTracer", 1); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0x121e1fb, 0xf3a61b1, 0x3d7902a): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__17, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0x121e1fb, 0xf3a61b1, 0x3d7902a): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum + * __pyx_result = ThreadTracer.__new__(__pyx_type) + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0x121e1fb, 0xf3a61b1, 0x3d7902a): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = ThreadTracer.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0x121e1fb, 0xf3a61b1, 0x3d7902a): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum + * __pyx_result = ThreadTracer.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_ThreadTracer__set_state( __pyx_result, __pyx_state) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum + * __pyx_result = ThreadTracer.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ThreadTracer__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = ThreadTracer.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_ThreadTracer__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_ThreadTracer__set_state(ThreadTracer __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_ThreadTracer__set_state(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x121e1fb, 0xf3a61b1, 0x3d7902a) = (_args))" % __pyx_checksum + * __pyx_result = ThreadTracer.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ThreadTracer__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_ThreadTracer__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_ThreadTracer__set_state(ThreadTracer __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_ThreadTracer(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_ThreadTracer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_ThreadTracer__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ThreadTracer__set_state(ThreadTracer __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._args = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_14_pydevd_bundle_13pydevd_cython___pyx_unpickle_ThreadTracer__set_state(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + unsigned int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ThreadTracer__set_state", 1); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_ThreadTracer__set_state(ThreadTracer __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_args); + __Pyx_DECREF(__pyx_v___pyx_result->_args); + __pyx_v___pyx_result->_args = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_ThreadTracer__set_state(ThreadTracer __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_3 > 1); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result._args = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_ThreadTracer__set_state(ThreadTracer __pyx_result, tuple __pyx_state): + * __pyx_result._args = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_ThreadTracer__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ThreadTracer__set_state(ThreadTracer __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._args = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.__pyx_unpickle_ThreadTracer__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo; + +static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)o); + p->__pyx_vtab = __pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo; + p->pydev_step_stop = Py_None; Py_INCREF(Py_None); + p->pydev_smart_step_stop = Py_None; Py_INCREF(Py_None); + p->pydev_call_from_jinja2 = Py_None; Py_INCREF(Py_None); + p->pydev_call_inside_jinja2 = Py_None; Py_INCREF(Py_None); + p->conditional_breakpoint_exception = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->pydev_message = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->pydev_func_name = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->trace_suspend_type = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->top_level_thread_tracer_no_back_frames = Py_None; Py_INCREF(Py_None); + p->top_level_thread_tracer_unhandled = Py_None; Py_INCREF(Py_None); + p->thread_tracer = Py_None; Py_INCREF(Py_None); + p->step_in_initial_location = Py_None; Py_INCREF(Py_None); + p->pydev_smart_step_into_variants = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->target_id_to_smart_step_into_variant = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->weak_thread = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo(PyObject *o) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->pydev_step_stop); + Py_CLEAR(p->pydev_smart_step_stop); + Py_CLEAR(p->pydev_call_from_jinja2); + Py_CLEAR(p->pydev_call_inside_jinja2); + Py_CLEAR(p->conditional_breakpoint_exception); + Py_CLEAR(p->pydev_message); + Py_CLEAR(p->pydev_func_name); + Py_CLEAR(p->trace_suspend_type); + Py_CLEAR(p->top_level_thread_tracer_no_back_frames); + Py_CLEAR(p->top_level_thread_tracer_unhandled); + Py_CLEAR(p->thread_tracer); + Py_CLEAR(p->step_in_initial_location); + Py_CLEAR(p->pydev_smart_step_into_variants); + Py_CLEAR(p->target_id_to_smart_step_into_variant); + Py_CLEAR(p->weak_thread); + #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)o; + if (p->pydev_step_stop) { + e = (*v)(p->pydev_step_stop, a); if (e) return e; + } + if (p->pydev_smart_step_stop) { + e = (*v)(p->pydev_smart_step_stop, a); if (e) return e; + } + if (p->pydev_call_from_jinja2) { + e = (*v)(p->pydev_call_from_jinja2, a); if (e) return e; + } + if (p->pydev_call_inside_jinja2) { + e = (*v)(p->pydev_call_inside_jinja2, a); if (e) return e; + } + if (p->conditional_breakpoint_exception) { + e = (*v)(p->conditional_breakpoint_exception, a); if (e) return e; + } + if (p->top_level_thread_tracer_no_back_frames) { + e = (*v)(p->top_level_thread_tracer_no_back_frames, a); if (e) return e; + } + if (p->top_level_thread_tracer_unhandled) { + e = (*v)(p->top_level_thread_tracer_unhandled, a); if (e) return e; + } + if (p->thread_tracer) { + e = (*v)(p->thread_tracer, a); if (e) return e; + } + if (p->step_in_initial_location) { + e = (*v)(p->step_in_initial_location, a); if (e) return e; + } + if (p->pydev_smart_step_into_variants) { + e = (*v)(p->pydev_smart_step_into_variants, a); if (e) return e; + } + if (p->target_id_to_smart_step_into_variant) { + e = (*v)(p->target_id_to_smart_step_into_variant, a); if (e) return e; + } + if (p->weak_thread) { + e = (*v)(p->weak_thread, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)o; + tmp = ((PyObject*)p->pydev_step_stop); + p->pydev_step_stop = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->pydev_smart_step_stop); + p->pydev_smart_step_stop = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->pydev_call_from_jinja2); + p->pydev_call_from_jinja2 = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->pydev_call_inside_jinja2); + p->pydev_call_inside_jinja2 = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->conditional_breakpoint_exception); + p->conditional_breakpoint_exception = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->top_level_thread_tracer_no_back_frames); + p->top_level_thread_tracer_no_back_frames = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->top_level_thread_tracer_unhandled); + p->top_level_thread_tracer_unhandled = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->thread_tracer); + p->thread_tracer = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->step_in_initial_location); + p->step_in_initial_location = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->pydev_smart_step_into_variants); + p->pydev_smart_step_into_variants = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->target_id_to_smart_step_into_variant); + p->target_id_to_smart_step_into_variant = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->weak_thread); + p->weak_thread = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_state(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11pydev_state_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_state(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11pydev_state_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_step_stop(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_step_stop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_step_stop_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_original_step_cmd(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_23pydev_original_step_cmd_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_original_step_cmd(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_23pydev_original_step_cmd_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_step_cmd(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_14pydev_step_cmd_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_step_cmd(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_14pydev_step_cmd_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_notify_kill(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_17pydev_notify_kill_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_notify_kill(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_17pydev_notify_kill_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_step_stop(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_step_stop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_21pydev_smart_step_stop_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_django_resolve_frame(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_26pydev_django_resolve_frame_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_django_resolve_frame(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_26pydev_django_resolve_frame_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_call_from_jinja2(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_call_from_jinja2(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22pydev_call_from_jinja2_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_call_inside_jinja2(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_call_inside_jinja2(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_call_inside_jinja2_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_is_tracing(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_10is_tracing_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_is_tracing(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_10is_tracing_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_conditional_breakpoint_exception(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_conditional_breakpoint_exception(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_32conditional_breakpoint_exception_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_message(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_message(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13pydev_message_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_suspend_type(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_12suspend_type_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_suspend_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_12suspend_type_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_next_line(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_next_line_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_next_line(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_next_line_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_func_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_func_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15pydev_func_name_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_suspended_at_unhandled(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22suspended_at_unhandled_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_suspended_at_unhandled(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_22suspended_at_unhandled_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_trace_suspend_type(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_trace_suspend_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_18trace_suspend_type_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_top_level_thread_tracer_no_back_frames(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_top_level_thread_tracer_no_back_frames(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_38top_level_thread_tracer_no_back_frames_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_top_level_thread_tracer_unhandled(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_top_level_thread_tracer_unhandled(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_33top_level_thread_tracer_unhandled_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_thread_tracer(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_thread_tracer(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13thread_tracer_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_step_in_initial_location(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_step_in_initial_location(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24step_in_initial_location_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_parent_offset(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_25pydev_smart_parent_offset_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_parent_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_25pydev_smart_parent_offset_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_child_offset(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_smart_child_offset_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_child_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_24pydev_smart_child_offset_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_step_into_variants(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_step_into_variants(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_30pydev_smart_step_into_variants_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_target_id_to_smart_step_into_variant(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_target_id_to_smart_step_into_variant(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_36target_id_to_smart_step_into_variant_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_use_scoped_step_frame(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_27pydev_use_scoped_step_frame_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_use_scoped_step_frame(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_27pydev_use_scoped_step_frame_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_weak_thread(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_weak_thread(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11weak_thread_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_is_in_wait_loop(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15is_in_wait_loop_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_is_in_wait_loop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15is_in_wait_loop_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo[] = { + {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo[] = { + {(char *)"pydev_state", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_state, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_state, (char *)0, 0}, + {(char *)"pydev_step_stop", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_step_stop, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_step_stop, (char *)0, 0}, + {(char *)"pydev_original_step_cmd", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_original_step_cmd, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_original_step_cmd, (char *)0, 0}, + {(char *)"pydev_step_cmd", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_step_cmd, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_step_cmd, (char *)0, 0}, + {(char *)"pydev_notify_kill", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_notify_kill, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_notify_kill, (char *)0, 0}, + {(char *)"pydev_smart_step_stop", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_step_stop, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_step_stop, (char *)0, 0}, + {(char *)"pydev_django_resolve_frame", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_django_resolve_frame, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_django_resolve_frame, (char *)0, 0}, + {(char *)"pydev_call_from_jinja2", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_call_from_jinja2, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_call_from_jinja2, (char *)0, 0}, + {(char *)"pydev_call_inside_jinja2", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_call_inside_jinja2, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_call_inside_jinja2, (char *)0, 0}, + {(char *)"is_tracing", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_is_tracing, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_is_tracing, (char *)0, 0}, + {(char *)"conditional_breakpoint_exception", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_conditional_breakpoint_exception, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_conditional_breakpoint_exception, (char *)0, 0}, + {(char *)"pydev_message", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_message, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_message, (char *)0, 0}, + {(char *)"suspend_type", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_suspend_type, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_suspend_type, (char *)0, 0}, + {(char *)"pydev_next_line", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_next_line, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_next_line, (char *)0, 0}, + {(char *)"pydev_func_name", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_func_name, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_func_name, (char *)0, 0}, + {(char *)"suspended_at_unhandled", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_suspended_at_unhandled, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_suspended_at_unhandled, (char *)0, 0}, + {(char *)"trace_suspend_type", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_trace_suspend_type, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_trace_suspend_type, (char *)0, 0}, + {(char *)"top_level_thread_tracer_no_back_frames", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_top_level_thread_tracer_no_back_frames, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_top_level_thread_tracer_no_back_frames, (char *)0, 0}, + {(char *)"top_level_thread_tracer_unhandled", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_top_level_thread_tracer_unhandled, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_top_level_thread_tracer_unhandled, (char *)0, 0}, + {(char *)"thread_tracer", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_thread_tracer, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_thread_tracer, (char *)0, 0}, + {(char *)"step_in_initial_location", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_step_in_initial_location, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_step_in_initial_location, (char *)0, 0}, + {(char *)"pydev_smart_parent_offset", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_parent_offset, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_parent_offset, (char *)0, 0}, + {(char *)"pydev_smart_child_offset", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_child_offset, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_child_offset, (char *)0, 0}, + {(char *)"pydev_smart_step_into_variants", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_step_into_variants, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_smart_step_into_variants, (char *)0, 0}, + {(char *)"target_id_to_smart_step_into_variant", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_target_id_to_smart_step_into_variant, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_target_id_to_smart_step_into_variant, (char *)0, 0}, + {(char *)"pydev_use_scoped_step_frame", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_use_scoped_step_frame, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_pydev_use_scoped_step_frame, (char *)0, 0}, + {(char *)"weak_thread", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_weak_thread, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_weak_thread, (char *)0, 0}, + {(char *)"is_in_wait_loop", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_is_in_wait_loop, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_is_in_wait_loop, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo}, + {Py_tp_str, (void *)__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11__str__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo}, + {Py_tp_clear, (void *)__pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo}, + {Py_tp_methods, (void *)__pyx_methods_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo}, + {Py_tp_getset, (void *)__pyx_getsets_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo}, + {Py_tp_init, (void *)__pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo}, + {0, 0}, +}; +static PyType_Spec __pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo_spec = { + "_pydevd_bundle.pydevd_cython.PyDBAdditionalThreadInfo", + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo_slots, +}; +#else + +static PyTypeObject __pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo = { + PyVarObject_HEAD_INIT(0, 0) + "_pydevd_bundle.pydevd_cython.""PyDBAdditionalThreadInfo", /*tp_name*/ + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_11__str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, /*tp_traverse*/ + __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *)o); + p->try_except_infos = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj(PyObject *o) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->try_except_infos); + #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *)o; + if (p->try_except_infos) { + e = (*v)(p->try_except_infos, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj *)o; + tmp = ((PyObject*)p->try_except_infos); + p->try_except_infos = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_try_except_infos(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_try_except_infos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_16try_except_infos_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj[] = { + {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj[] = { + {(char *)"try_except_infos", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_try_except_infos, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_try_except_infos, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj}, + {Py_tp_clear, (void *)__pyx_tp_clear_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj}, + {Py_tp_methods, (void *)__pyx_methods_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj}, + {Py_tp_getset, (void *)__pyx_getsets_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj}, + {Py_tp_init, (void *)__pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj}, + {0, 0}, +}; +static PyType_Spec __pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj_spec = { + "_pydevd_bundle.pydevd_cython._TryExceptContainerObj", + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj_slots, +}; +#else + +static PyTypeObject __pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj = { + PyVarObject_HEAD_INIT(0, 0) + "_pydevd_bundle.pydevd_cython.""_TryExceptContainerObj", /*tp_name*/ + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj, /*tp_traverse*/ + __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBFrame __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame; + +static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_PyDBFrame(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)o); + p->__pyx_vtab = __pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBFrame; + p->_args = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->exc_info = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_PyDBFrame(PyObject *o) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_PyDBFrame) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_args); + Py_CLEAR(p->exc_info); + #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_PyDBFrame(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)o; + if (p->_args) { + e = (*v)(p->_args, a); if (e) return e; + } + if (p->exc_info) { + e = (*v)(p->exc_info, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_PyDBFrame(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *)o; + tmp = ((PyObject*)p->_args); + p->_args = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->exc_info); + p->exc_info = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_14_pydevd_bundle_13pydevd_cython_PyDBFrame[] = { + {"set_suspend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_3set_suspend, METH_VARARGS|METH_KEYWORDS, 0}, + {"do_wait_suspend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_5do_wait_suspend, METH_VARARGS|METH_KEYWORDS, 0}, + {"trace_exception", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_7trace_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"handle_user_exception", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_PyDBFrame}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_PyDBFrame}, + {Py_tp_clear, (void *)__pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_PyDBFrame}, + {Py_tp_methods, (void *)__pyx_methods_14_pydevd_bundle_13pydevd_cython_PyDBFrame}, + {Py_tp_init, (void *)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_PyDBFrame}, + {0, 0}, +}; +static PyType_Spec __pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame_spec = { + "_pydevd_bundle.pydevd_cython.PyDBFrame", + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame_slots, +}; +#else + +static PyTypeObject __pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame = { + PyVarObject_HEAD_INIT(0, 0) + "_pydevd_bundle.pydevd_cython.""PyDBFrame", /*tp_name*/ + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_PyDBFrame, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_PyDBFrame, /*tp_traverse*/ + __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_PyDBFrame, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_14_pydevd_bundle_13pydevd_cython_PyDBFrame, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_14_pydevd_bundle_13pydevd_cython_PyDBFrame, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *)o); + p->method_object = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper(PyObject *o) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->method_object); + #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *)o; + if (p->method_object) { + e = (*v)(p->method_object, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper *)o; + tmp = ((PyObject*)p->method_object); + p->method_object = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper[] = { + {"get_method_object", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_5get_method_object, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper}, + {Py_tp_call, (void *)__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_3__call__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper}, + {Py_tp_clear, (void *)__pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper}, + {Py_tp_methods, (void *)__pyx_methods_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper}, + {Py_tp_init, (void *)__pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper}, + {0, 0}, +}; +static PyType_Spec __pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper_spec = { + "_pydevd_bundle.pydevd_cython.SafeCallWrapper", + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper_slots, +}; +#else + +static PyTypeObject __pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper = { + PyVarObject_HEAD_INIT(0, 0) + "_pydevd_bundle.pydevd_cython.""SafeCallWrapper", /*tp_name*/ + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + __pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_3__call__, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper, /*tp_traverse*/ + __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)o); + p->_args = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions(PyObject *o) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_args); + #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)o; + if (p->_args) { + e = (*v)(p->_args, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions *)o; + tmp = ((PyObject*)p->_args); + p->_args = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions__args(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions__args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5_args_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions[] = { + {"trace_unhandled_exceptions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_3trace_unhandled_exceptions, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_trace_dispatch_func", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5get_trace_dispatch_func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions[] = { + {(char *)"_args", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions__args, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions__args, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions}, + {Py_tp_clear, (void *)__pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions}, + {Py_tp_methods, (void *)__pyx_methods_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions}, + {Py_tp_getset, (void *)__pyx_getsets_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions}, + {Py_tp_init, (void *)__pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions}, + {0, 0}, +}; +static PyType_Spec __pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions_spec = { + "_pydevd_bundle.pydevd_cython.TopLevelThreadTracerOnlyUnhandledExceptions", + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions_slots, +}; +#else + +static PyTypeObject __pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions = { + PyVarObject_HEAD_INIT(0, 0) + "_pydevd_bundle.pydevd_cython.""TopLevelThreadTracerOnlyUnhandledExceptions", /*tp_name*/ + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, /*tp_traverse*/ + __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)o); + p->_frame_trace_dispatch = Py_None; Py_INCREF(Py_None); + p->_args = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->try_except_infos = Py_None; Py_INCREF(Py_None); + p->_last_exc_arg = Py_None; Py_INCREF(Py_None); + p->_raise_lines = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame(PyObject *o) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_frame_trace_dispatch); + Py_CLEAR(p->_args); + Py_CLEAR(p->try_except_infos); + Py_CLEAR(p->_last_exc_arg); + Py_CLEAR(p->_raise_lines); + #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)o; + if (p->_frame_trace_dispatch) { + e = (*v)(p->_frame_trace_dispatch, a); if (e) return e; + } + if (p->_args) { + e = (*v)(p->_args, a); if (e) return e; + } + if (p->try_except_infos) { + e = (*v)(p->try_except_infos, a); if (e) return e; + } + if (p->_last_exc_arg) { + e = (*v)(p->_last_exc_arg, a); if (e) return e; + } + if (p->_raise_lines) { + e = (*v)(p->_raise_lines, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame *)o; + tmp = ((PyObject*)p->_frame_trace_dispatch); + p->_frame_trace_dispatch = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_args); + p->_args = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->try_except_infos); + p->try_except_infos = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_last_exc_arg); + p->_last_exc_arg = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_raise_lines); + p->_raise_lines = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__frame_trace_dispatch(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__frame_trace_dispatch(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_21_frame_trace_dispatch_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__args(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5_args_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_try_except_infos(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_try_except_infos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16try_except_infos_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__last_exc_arg(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__last_exc_arg(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_13_last_exc_arg_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__raise_lines(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__raise_lines(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_12_raise_lines_5__del__(o); + } +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__last_raise_line(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16_last_raise_line_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__last_raise_line(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_16_last_raise_line_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame[] = { + {"trace_dispatch_and_unhandled_exceptions", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_3trace_dispatch_and_unhandled_exceptions, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_trace_dispatch_func", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5get_trace_dispatch_func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame[] = { + {(char *)"_frame_trace_dispatch", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__frame_trace_dispatch, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__frame_trace_dispatch, (char *)0, 0}, + {(char *)"_args", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__args, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__args, (char *)0, 0}, + {(char *)"try_except_infos", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_try_except_infos, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_try_except_infos, (char *)0, 0}, + {(char *)"_last_exc_arg", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__last_exc_arg, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__last_exc_arg, (char *)0, 0}, + {(char *)"_raise_lines", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__raise_lines, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__raise_lines, (char *)0, 0}, + {(char *)"_last_raise_line", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__last_raise_line, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame__last_raise_line, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame}, + {Py_tp_clear, (void *)__pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame}, + {Py_tp_methods, (void *)__pyx_methods_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame}, + {Py_tp_getset, (void *)__pyx_getsets_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame}, + {Py_tp_init, (void *)__pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame}, + {0, 0}, +}; +static PyType_Spec __pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame_spec = { + "_pydevd_bundle.pydevd_cython.TopLevelThreadTracerNoBackFrame", + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame_slots, +}; +#else + +static PyTypeObject __pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame = { + PyVarObject_HEAD_INIT(0, 0) + "_pydevd_bundle.pydevd_cython.""TopLevelThreadTracerNoBackFrame", /*tp_name*/ + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, /*tp_traverse*/ + __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_ThreadTracer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)o); + p->_args = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_ThreadTracer(PyObject *o) { + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_ThreadTracer) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_args); + #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_ThreadTracer(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)o; + if (p->_args) { + e = (*v)(p->_args, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_ThreadTracer(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)o; + tmp = ((PyObject*)p->_args); + p->_args = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_14_pydevd_bundle_13pydevd_cython_12ThreadTracer__args(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_1__get__(o); +} + +static int __pyx_setprop_14_pydevd_bundle_13pydevd_cython_12ThreadTracer__args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_3__set__(o, v); + } + else { + return __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_14_pydevd_bundle_13pydevd_cython_ThreadTracer[] = { + {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_14_pydevd_bundle_13pydevd_cython_ThreadTracer[] = { + {(char *)"_args", __pyx_getprop_14_pydevd_bundle_13pydevd_cython_12ThreadTracer__args, __pyx_setprop_14_pydevd_bundle_13pydevd_cython_12ThreadTracer__args, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_ThreadTracer}, + {Py_tp_call, (void *)__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_3__call__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_ThreadTracer}, + {Py_tp_clear, (void *)__pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_ThreadTracer}, + {Py_tp_methods, (void *)__pyx_methods_14_pydevd_bundle_13pydevd_cython_ThreadTracer}, + {Py_tp_getset, (void *)__pyx_getsets_14_pydevd_bundle_13pydevd_cython_ThreadTracer}, + {Py_tp_init, (void *)__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_ThreadTracer}, + {0, 0}, +}; +static PyType_Spec __pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer_spec = { + "_pydevd_bundle.pydevd_cython.ThreadTracer", + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer_slots, +}; +#else + +static PyTypeObject __pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer = { + PyVarObject_HEAD_INIT(0, 0) + "_pydevd_bundle.pydevd_cython.""ThreadTracer", /*tp_name*/ + sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython_ThreadTracer, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_3__call__, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython_ThreadTracer, /*tp_traverse*/ + __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython_ThreadTracer, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_14_pydevd_bundle_13pydevd_cython_ThreadTracer, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_14_pydevd_bundle_13pydevd_cython_ThreadTracer, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_14_pydevd_bundle_13pydevd_cython_ThreadTracer, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif +/* #### Code section: pystring_table ### */ + +static int __Pyx_CreateStringTabAndInitStrings(void) { + __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0}, + {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, + {&__pyx_n_s_ALL, __pyx_k_ALL, sizeof(__pyx_k_ALL), 0, 0, 1, 1}, + {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, + {&__pyx_n_s_CMD_SET_FUNCTION_BREAK, __pyx_k_CMD_SET_FUNCTION_BREAK, sizeof(__pyx_k_CMD_SET_FUNCTION_BREAK), 0, 0, 1, 1}, + {&__pyx_n_s_DEBUG_START, __pyx_k_DEBUG_START, sizeof(__pyx_k_DEBUG_START), 0, 0, 1, 1}, + {&__pyx_n_s_DEBUG_START_PY3K, __pyx_k_DEBUG_START_PY3K, sizeof(__pyx_k_DEBUG_START_PY3K), 0, 0, 1, 1}, + {&__pyx_n_s_EXCEPTION_TYPE_HANDLED, __pyx_k_EXCEPTION_TYPE_HANDLED, sizeof(__pyx_k_EXCEPTION_TYPE_HANDLED), 0, 0, 1, 1}, + {&__pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED, __pyx_k_EXCEPTION_TYPE_USER_UNHANDLED, sizeof(__pyx_k_EXCEPTION_TYPE_USER_UNHANDLED), 0, 0, 1, 1}, + {&__pyx_kp_s_Error_in_linecache_checkcache_r, __pyx_k_Error_in_linecache_checkcache_r, sizeof(__pyx_k_Error_in_linecache_checkcache_r), 0, 0, 1, 0}, + {&__pyx_kp_s_Error_in_linecache_getline_r_s_f, __pyx_k_Error_in_linecache_getline_r_s_f, sizeof(__pyx_k_Error_in_linecache_getline_r_s_f), 0, 0, 1, 0}, + {&__pyx_n_s_ForkSafeLock, __pyx_k_ForkSafeLock, sizeof(__pyx_k_ForkSafeLock), 0, 0, 1, 1}, + {&__pyx_n_s_GeneratorExit, __pyx_k_GeneratorExit, sizeof(__pyx_k_GeneratorExit), 0, 0, 1, 1}, + {&__pyx_n_s_IGNORE_EXCEPTION_TAG, __pyx_k_IGNORE_EXCEPTION_TAG, sizeof(__pyx_k_IGNORE_EXCEPTION_TAG), 0, 0, 1, 1}, + {&__pyx_kp_s_IgnoreException, __pyx_k_IgnoreException, sizeof(__pyx_k_IgnoreException), 0, 0, 1, 0}, + {&__pyx_kp_s_Ignore_exception_s_in_library_s, __pyx_k_Ignore_exception_s_in_library_s, sizeof(__pyx_k_Ignore_exception_s_in_library_s), 0, 0, 1, 0}, + {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, + {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_k_Incompatible_checksums_0x_x_vs_0_2, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_2), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_k_Incompatible_checksums_0x_x_vs_0_3, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_3), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_k_Incompatible_checksums_0x_x_vs_0_4, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_4), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5, __pyx_k_Incompatible_checksums_0x_x_vs_0_5, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_5), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6, __pyx_k_Incompatible_checksums_0x_x_vs_0_6, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_6), 0, 0, 1, 0}, + {&__pyx_n_s_KeyboardInterrupt, __pyx_k_KeyboardInterrupt, sizeof(__pyx_k_KeyboardInterrupt), 0, 0, 1, 1}, + {&__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER, __pyx_k_NORM_PATHS_AND_BASE_CONTAINER, sizeof(__pyx_k_NORM_PATHS_AND_BASE_CONTAINER), 0, 0, 1, 1}, + {&__pyx_n_s_NO_FTRACE, __pyx_k_NO_FTRACE, sizeof(__pyx_k_NO_FTRACE), 0, 0, 1, 1}, + {&__pyx_n_s_NameError, __pyx_k_NameError, sizeof(__pyx_k_NameError), 0, 0, 1, 1}, + {&__pyx_n_s_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 0, 1, 1}, + {&__pyx_kp_s_Not_used_in_sys_monitoring_mode, __pyx_k_Not_used_in_sys_monitoring_mode, sizeof(__pyx_k_Not_used_in_sys_monitoring_mode), 0, 0, 1, 0}, + {&__pyx_n_s_PYDEVD_IPYTHON_CONTEXT, __pyx_k_PYDEVD_IPYTHON_CONTEXT, sizeof(__pyx_k_PYDEVD_IPYTHON_CONTEXT), 0, 0, 1, 1}, + {&__pyx_n_s_PYDEVD_USE_SYS_MONITORING, __pyx_k_PYDEVD_USE_SYS_MONITORING, sizeof(__pyx_k_PYDEVD_USE_SYS_MONITORING), 0, 0, 1, 1}, + {&__pyx_n_s_PYDEV_FILE, __pyx_k_PYDEV_FILE, sizeof(__pyx_k_PYDEV_FILE), 0, 0, 1, 1}, + {&__pyx_n_s_PYTHON_SUSPEND, __pyx_k_PYTHON_SUSPEND, sizeof(__pyx_k_PYTHON_SUSPEND), 0, 0, 1, 1}, + {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBAdditionalThreadInfo, __pyx_k_PyDBAdditionalThreadInfo, sizeof(__pyx_k_PyDBAdditionalThreadInfo), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBAdditionalThreadInfo___reduc, __pyx_k_PyDBAdditionalThreadInfo___reduc, sizeof(__pyx_k_PyDBAdditionalThreadInfo___reduc), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBAdditionalThreadInfo___setst, __pyx_k_PyDBAdditionalThreadInfo___setst, sizeof(__pyx_k_PyDBAdditionalThreadInfo___setst), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBAdditionalThreadInfo__get_re, __pyx_k_PyDBAdditionalThreadInfo__get_re, sizeof(__pyx_k_PyDBAdditionalThreadInfo__get_re), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBAdditionalThreadInfo__is_ste, __pyx_k_PyDBAdditionalThreadInfo__is_ste, sizeof(__pyx_k_PyDBAdditionalThreadInfo__is_ste), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBAdditionalThreadInfo_get_top, __pyx_k_PyDBAdditionalThreadInfo_get_top, sizeof(__pyx_k_PyDBAdditionalThreadInfo_get_top), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBAdditionalThreadInfo_update, __pyx_k_PyDBAdditionalThreadInfo_update, sizeof(__pyx_k_PyDBAdditionalThreadInfo_update), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBFrame, __pyx_k_PyDBFrame, sizeof(__pyx_k_PyDBFrame), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBFrame___reduce_cython, __pyx_k_PyDBFrame___reduce_cython, sizeof(__pyx_k_PyDBFrame___reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBFrame___setstate_cython, __pyx_k_PyDBFrame___setstate_cython, sizeof(__pyx_k_PyDBFrame___setstate_cython), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBFrame_do_wait_suspend, __pyx_k_PyDBFrame_do_wait_suspend, sizeof(__pyx_k_PyDBFrame_do_wait_suspend), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBFrame_handle_user_exception, __pyx_k_PyDBFrame_handle_user_exception, sizeof(__pyx_k_PyDBFrame_handle_user_exception), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBFrame_set_suspend, __pyx_k_PyDBFrame_set_suspend, sizeof(__pyx_k_PyDBFrame_set_suspend), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBFrame_trace_dispatch, __pyx_k_PyDBFrame_trace_dispatch, sizeof(__pyx_k_PyDBFrame_trace_dispatch), 0, 0, 1, 1}, + {&__pyx_n_s_PyDBFrame_trace_exception, __pyx_k_PyDBFrame_trace_exception, sizeof(__pyx_k_PyDBFrame_trace_exception), 0, 0, 1, 1}, + {&__pyx_n_s_RETURN_VALUES_DICT, __pyx_k_RETURN_VALUES_DICT, sizeof(__pyx_k_RETURN_VALUES_DICT), 0, 0, 1, 1}, + {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, + {&__pyx_n_s_STATE_RUN, __pyx_k_STATE_RUN, sizeof(__pyx_k_STATE_RUN), 0, 0, 1, 1}, + {&__pyx_n_s_STATE_SUSPEND, __pyx_k_STATE_SUSPEND, sizeof(__pyx_k_STATE_SUSPEND), 0, 0, 1, 1}, + {&__pyx_n_s_SUPPORT_GEVENT, __pyx_k_SUPPORT_GEVENT, sizeof(__pyx_k_SUPPORT_GEVENT), 0, 0, 1, 1}, + {&__pyx_n_s_SafeCallWrapper, __pyx_k_SafeCallWrapper, sizeof(__pyx_k_SafeCallWrapper), 0, 0, 1, 1}, + {&__pyx_n_s_SafeCallWrapper___reduce_cython, __pyx_k_SafeCallWrapper___reduce_cython, sizeof(__pyx_k_SafeCallWrapper___reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_SafeCallWrapper___setstate_cytho, __pyx_k_SafeCallWrapper___setstate_cytho, sizeof(__pyx_k_SafeCallWrapper___setstate_cytho), 0, 0, 1, 1}, + {&__pyx_n_s_SafeCallWrapper_get_method_objec, __pyx_k_SafeCallWrapper_get_method_objec, sizeof(__pyx_k_SafeCallWrapper_get_method_objec), 0, 0, 1, 1}, + {&__pyx_kp_s_State_s_Stop_s_Cmd_s_Kill_s, __pyx_k_State_s_Stop_s_Cmd_s_Kill_s, sizeof(__pyx_k_State_s_Stop_s_Cmd_s_Kill_s), 0, 0, 1, 0}, + {&__pyx_n_s_StopAsyncIteration, __pyx_k_StopAsyncIteration, sizeof(__pyx_k_StopAsyncIteration), 0, 0, 1, 1}, + {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1}, + {&__pyx_kp_s_Stop_inside_ipython_call, __pyx_k_Stop_inside_ipython_call, sizeof(__pyx_k_Stop_inside_ipython_call), 0, 0, 1, 0}, + {&__pyx_n_s_SystemExit, __pyx_k_SystemExit, sizeof(__pyx_k_SystemExit), 0, 0, 1, 1}, + {&__pyx_n_s_TRACE_PROPERTY, __pyx_k_TRACE_PROPERTY, sizeof(__pyx_k_TRACE_PROPERTY), 0, 0, 1, 1}, + {&__pyx_n_s_Thread, __pyx_k_Thread, sizeof(__pyx_k_Thread), 0, 0, 1, 1}, + {&__pyx_n_s_ThreadTracer, __pyx_k_ThreadTracer, sizeof(__pyx_k_ThreadTracer), 0, 0, 1, 1}, + {&__pyx_n_s_ThreadTracer___reduce_cython, __pyx_k_ThreadTracer___reduce_cython, sizeof(__pyx_k_ThreadTracer___reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_ThreadTracer___setstate_cython, __pyx_k_ThreadTracer___setstate_cython, sizeof(__pyx_k_ThreadTracer___setstate_cython), 0, 0, 1, 1}, + {&__pyx_n_s_TopLevelThreadTracerNoBackFrame, __pyx_k_TopLevelThreadTracerNoBackFrame, sizeof(__pyx_k_TopLevelThreadTracerNoBackFrame), 0, 0, 1, 1}, + {&__pyx_n_s_TopLevelThreadTracerNoBackFrame_2, __pyx_k_TopLevelThreadTracerNoBackFrame_2, sizeof(__pyx_k_TopLevelThreadTracerNoBackFrame_2), 0, 0, 1, 1}, + {&__pyx_n_s_TopLevelThreadTracerNoBackFrame_3, __pyx_k_TopLevelThreadTracerNoBackFrame_3, sizeof(__pyx_k_TopLevelThreadTracerNoBackFrame_3), 0, 0, 1, 1}, + {&__pyx_n_s_TopLevelThreadTracerNoBackFrame_4, __pyx_k_TopLevelThreadTracerNoBackFrame_4, sizeof(__pyx_k_TopLevelThreadTracerNoBackFrame_4), 0, 0, 1, 1}, + {&__pyx_n_s_TopLevelThreadTracerNoBackFrame_5, __pyx_k_TopLevelThreadTracerNoBackFrame_5, sizeof(__pyx_k_TopLevelThreadTracerNoBackFrame_5), 0, 0, 1, 1}, + {&__pyx_n_s_TopLevelThreadTracerOnlyUnhandle, __pyx_k_TopLevelThreadTracerOnlyUnhandle, sizeof(__pyx_k_TopLevelThreadTracerOnlyUnhandle), 0, 0, 1, 1}, + {&__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_2, __pyx_k_TopLevelThreadTracerOnlyUnhandle_2, sizeof(__pyx_k_TopLevelThreadTracerOnlyUnhandle_2), 0, 0, 1, 1}, + {&__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_3, __pyx_k_TopLevelThreadTracerOnlyUnhandle_3, sizeof(__pyx_k_TopLevelThreadTracerOnlyUnhandle_3), 0, 0, 1, 1}, + {&__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_4, __pyx_k_TopLevelThreadTracerOnlyUnhandle_4, sizeof(__pyx_k_TopLevelThreadTracerOnlyUnhandle_4), 0, 0, 1, 1}, + {&__pyx_n_s_TopLevelThreadTracerOnlyUnhandle_5, __pyx_k_TopLevelThreadTracerOnlyUnhandle_5, sizeof(__pyx_k_TopLevelThreadTracerOnlyUnhandle_5), 0, 0, 1, 1}, + {&__pyx_n_s_TryExceptContainerObj, __pyx_k_TryExceptContainerObj, sizeof(__pyx_k_TryExceptContainerObj), 0, 0, 1, 1}, + {&__pyx_n_s_TryExceptContainerObj___reduce, __pyx_k_TryExceptContainerObj___reduce, sizeof(__pyx_k_TryExceptContainerObj___reduce), 0, 0, 1, 1}, + {&__pyx_n_s_TryExceptContainerObj___setstat, __pyx_k_TryExceptContainerObj___setstat, sizeof(__pyx_k_TryExceptContainerObj___setstat), 0, 0, 1, 1}, + {&__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA, __pyx_k_USE_CUSTOM_SYS_CURRENT_FRAMES_MA, sizeof(__pyx_k_USE_CUSTOM_SYS_CURRENT_FRAMES_MA), 0, 0, 1, 1}, + {&__pyx_kp_s_Unable_to_get_topmost_frame_for, __pyx_k_Unable_to_get_topmost_frame_for, sizeof(__pyx_k_Unable_to_get_topmost_frame_for), 0, 0, 1, 0}, + {&__pyx_kp_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 0}, + {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0}, + {&__pyx_n_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 1}, + {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0}, + {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0}, + {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0}, + {&__pyx_n_s_abs_real_path_and_base, __pyx_k_abs_real_path_and_base, sizeof(__pyx_k_abs_real_path_and_base), 0, 0, 1, 1}, + {&__pyx_n_s_absolute_filename, __pyx_k_absolute_filename, sizeof(__pyx_k_absolute_filename), 0, 0, 1, 1}, + {&__pyx_n_s_active, __pyx_k_active, sizeof(__pyx_k_active), 0, 0, 1, 1}, + {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1}, + {&__pyx_n_s_add_additional_info, __pyx_k_add_additional_info, sizeof(__pyx_k_add_additional_info), 0, 0, 1, 1}, + {&__pyx_n_s_add_command, __pyx_k_add_command, sizeof(__pyx_k_add_command), 0, 0, 1, 1}, + {&__pyx_n_s_add_exception_to_frame, __pyx_k_add_exception_to_frame, sizeof(__pyx_k_add_exception_to_frame), 0, 0, 1, 1}, + {&__pyx_n_s_additional_info, __pyx_k_additional_info, sizeof(__pyx_k_additional_info), 0, 0, 1, 1}, + {&__pyx_n_s_any_thread_stepping, __pyx_k_any_thread_stepping, sizeof(__pyx_k_any_thread_stepping), 0, 0, 1, 1}, + {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, + {&__pyx_n_s_apply_files_filter, __pyx_k_apply_files_filter, sizeof(__pyx_k_apply_files_filter), 0, 0, 1, 1}, + {&__pyx_n_s_apply_to_settrace, __pyx_k_apply_to_settrace, sizeof(__pyx_k_apply_to_settrace), 0, 0, 1, 1}, + {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1}, + {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, + {&__pyx_n_s_args_2, __pyx_k_args_2, sizeof(__pyx_k_args_2), 0, 0, 1, 1}, + {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, + {&__pyx_n_s_basename, __pyx_k_basename, sizeof(__pyx_k_basename), 0, 0, 1, 1}, + {&__pyx_n_s_bootstrap, __pyx_k_bootstrap, sizeof(__pyx_k_bootstrap), 0, 0, 1, 1}, + {&__pyx_n_s_bootstrap_2, __pyx_k_bootstrap_2, sizeof(__pyx_k_bootstrap_2), 0, 0, 1, 1}, + {&__pyx_n_s_bootstrap_inner, __pyx_k_bootstrap_inner, sizeof(__pyx_k_bootstrap_inner), 0, 0, 1, 1}, + {&__pyx_n_s_bootstrap_inner_2, __pyx_k_bootstrap_inner_2, sizeof(__pyx_k_bootstrap_inner_2), 0, 0, 1, 1}, + {&__pyx_n_s_break_on_caught_exceptions, __pyx_k_break_on_caught_exceptions, sizeof(__pyx_k_break_on_caught_exceptions), 0, 0, 1, 1}, + {&__pyx_n_s_break_on_user_uncaught_exception, __pyx_k_break_on_user_uncaught_exception, sizeof(__pyx_k_break_on_user_uncaught_exception), 0, 0, 1, 1}, + {&__pyx_n_s_breakpoints, __pyx_k_breakpoints, sizeof(__pyx_k_breakpoints), 0, 0, 1, 1}, + {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1}, + {&__pyx_n_s_call_2, __pyx_k_call_2, sizeof(__pyx_k_call_2), 0, 0, 1, 1}, + {&__pyx_n_s_can_skip, __pyx_k_can_skip, sizeof(__pyx_k_can_skip), 0, 0, 1, 1}, + {&__pyx_n_s_canonical_normalized_filename, __pyx_k_canonical_normalized_filename, sizeof(__pyx_k_canonical_normalized_filename), 0, 0, 1, 1}, + {&__pyx_kp_s_cell, __pyx_k_cell, sizeof(__pyx_k_cell), 0, 0, 1, 0}, + {&__pyx_n_s_check_excs, __pyx_k_check_excs, sizeof(__pyx_k_check_excs), 0, 0, 1, 1}, + {&__pyx_n_s_check_trace_obj, __pyx_k_check_trace_obj, sizeof(__pyx_k_check_trace_obj), 0, 0, 1, 1}, + {&__pyx_n_s_checkcache, __pyx_k_checkcache, sizeof(__pyx_k_checkcache), 0, 0, 1, 1}, + {&__pyx_n_s_children_variants, __pyx_k_children_variants, sizeof(__pyx_k_children_variants), 0, 0, 1, 1}, + {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, + {&__pyx_n_s_cmd_factory, __pyx_k_cmd_factory, sizeof(__pyx_k_cmd_factory), 0, 0, 1, 1}, + {&__pyx_n_s_cmd_step_into, __pyx_k_cmd_step_into, sizeof(__pyx_k_cmd_step_into), 0, 0, 1, 1}, + {&__pyx_n_s_cmd_step_over, __pyx_k_cmd_step_over, sizeof(__pyx_k_cmd_step_over), 0, 0, 1, 1}, + {&__pyx_n_s_co_filename, __pyx_k_co_filename, sizeof(__pyx_k_co_filename), 0, 0, 1, 1}, + {&__pyx_n_s_co_firstlineno, __pyx_k_co_firstlineno, sizeof(__pyx_k_co_firstlineno), 0, 0, 1, 1}, + {&__pyx_n_s_co_flags, __pyx_k_co_flags, sizeof(__pyx_k_co_flags), 0, 0, 1, 1}, + {&__pyx_n_s_co_name, __pyx_k_co_name, sizeof(__pyx_k_co_name), 0, 0, 1, 1}, + {&__pyx_n_s_collect_return_info, __pyx_k_collect_return_info, sizeof(__pyx_k_collect_return_info), 0, 0, 1, 1}, + {&__pyx_n_s_collect_try_except_info, __pyx_k_collect_try_except_info, sizeof(__pyx_k_collect_try_except_info), 0, 0, 1, 1}, + {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1}, + {&__pyx_n_s_condition, __pyx_k_condition, sizeof(__pyx_k_condition), 0, 0, 1, 1}, + {&__pyx_n_s_constant_to_str, __pyx_k_constant_to_str, sizeof(__pyx_k_constant_to_str), 0, 0, 1, 1}, + {&__pyx_n_s_constructed_tid_to_last_frame, __pyx_k_constructed_tid_to_last_frame, sizeof(__pyx_k_constructed_tid_to_last_frame), 0, 0, 1, 1}, + {&__pyx_n_s_container_obj, __pyx_k_container_obj, sizeof(__pyx_k_container_obj), 0, 0, 1, 1}, + {&__pyx_n_s_critical, __pyx_k_critical, sizeof(__pyx_k_critical), 0, 0, 1, 1}, + {&__pyx_n_s_curr_stat, __pyx_k_curr_stat, sizeof(__pyx_k_curr_stat), 0, 0, 1, 1}, + {&__pyx_n_s_current_frames, __pyx_k_current_frames, sizeof(__pyx_k_current_frames), 0, 0, 1, 1}, + {&__pyx_n_s_custom_key, __pyx_k_custom_key, sizeof(__pyx_k_custom_key), 0, 0, 1, 1}, + {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1}, + {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, + {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1}, + {&__pyx_n_s_dis, __pyx_k_dis, sizeof(__pyx_k_dis), 0, 0, 1, 1}, + {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0}, + {&__pyx_n_s_disable_tracing, __pyx_k_disable_tracing, sizeof(__pyx_k_disable_tracing), 0, 0, 1, 1}, + {&__pyx_n_s_do_wait_suspend, __pyx_k_do_wait_suspend, sizeof(__pyx_k_do_wait_suspend), 0, 0, 1, 1}, + {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0}, + {&__pyx_n_s_enable_tracing, __pyx_k_enable_tracing, sizeof(__pyx_k_enable_tracing), 0, 0, 1, 1}, + {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, + {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1}, + {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, + {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1}, + {&__pyx_n_s_exc_break, __pyx_k_exc_break, sizeof(__pyx_k_exc_break), 0, 0, 1, 1}, + {&__pyx_n_s_exc_break_caught, __pyx_k_exc_break_caught, sizeof(__pyx_k_exc_break_caught), 0, 0, 1, 1}, + {&__pyx_n_s_exc_break_user, __pyx_k_exc_break_user, sizeof(__pyx_k_exc_break_user), 0, 0, 1, 1}, + {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1}, + {&__pyx_n_s_exc_lineno, __pyx_k_exc_lineno, sizeof(__pyx_k_exc_lineno), 0, 0, 1, 1}, + {&__pyx_n_s_except_line, __pyx_k_except_line, sizeof(__pyx_k_except_line), 0, 0, 1, 1}, + {&__pyx_n_s_exception, __pyx_k_exception, sizeof(__pyx_k_exception), 0, 0, 1, 1}, + {&__pyx_n_s_exception_break, __pyx_k_exception_break, sizeof(__pyx_k_exception_break), 0, 0, 1, 1}, + {&__pyx_n_s_exception_breakpoint, __pyx_k_exception_breakpoint, sizeof(__pyx_k_exception_breakpoint), 0, 0, 1, 1}, + {&__pyx_n_s_exception_type, __pyx_k_exception_type, sizeof(__pyx_k_exception_type), 0, 0, 1, 1}, + {&__pyx_n_s_exclude_exception_by_filter, __pyx_k_exclude_exception_by_filter, sizeof(__pyx_k_exclude_exception_by_filter), 0, 0, 1, 1}, + {&__pyx_n_s_exec, __pyx_k_exec, sizeof(__pyx_k_exec), 0, 0, 1, 1}, + {&__pyx_n_s_execfile, __pyx_k_execfile, sizeof(__pyx_k_execfile), 0, 0, 1, 1}, + {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, + {&__pyx_n_s_expression, __pyx_k_expression, sizeof(__pyx_k_expression), 0, 0, 1, 1}, + {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, + {&__pyx_n_s_f_back, __pyx_k_f_back, sizeof(__pyx_k_f_back), 0, 0, 1, 1}, + {&__pyx_n_s_f_code, __pyx_k_f_code, sizeof(__pyx_k_f_code), 0, 0, 1, 1}, + {&__pyx_n_s_f_globals, __pyx_k_f_globals, sizeof(__pyx_k_f_globals), 0, 0, 1, 1}, + {&__pyx_n_s_f_lasti, __pyx_k_f_lasti, sizeof(__pyx_k_f_lasti), 0, 0, 1, 1}, + {&__pyx_n_s_f_lineno, __pyx_k_f_lineno, sizeof(__pyx_k_f_lineno), 0, 0, 1, 1}, + {&__pyx_n_s_f_locals, __pyx_k_f_locals, sizeof(__pyx_k_f_locals), 0, 0, 1, 1}, + {&__pyx_n_s_f_trace, __pyx_k_f_trace, sizeof(__pyx_k_f_trace), 0, 0, 1, 1}, + {&__pyx_n_s_f_unhandled, __pyx_k_f_unhandled, sizeof(__pyx_k_f_unhandled), 0, 0, 1, 1}, + {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1}, + {&__pyx_n_s_filename_to_lines_where_exceptio, __pyx_k_filename_to_lines_where_exceptio, sizeof(__pyx_k_filename_to_lines_where_exceptio), 0, 0, 1, 1}, + {&__pyx_n_s_filename_to_stat_info, __pyx_k_filename_to_stat_info, sizeof(__pyx_k_filename_to_stat_info), 0, 0, 1, 1}, + {&__pyx_n_s_findlinestarts, __pyx_k_findlinestarts, sizeof(__pyx_k_findlinestarts), 0, 0, 1, 1}, + {&__pyx_n_s_fix_top_level_trace_and_get_trac, __pyx_k_fix_top_level_trace_and_get_trac, sizeof(__pyx_k_fix_top_level_trace_and_get_trac), 0, 0, 1, 1}, + {&__pyx_n_s_force_only_unhandled_tracer, __pyx_k_force_only_unhandled_tracer, sizeof(__pyx_k_force_only_unhandled_tracer), 0, 0, 1, 1}, + {&__pyx_n_s_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 0, 1, 1}, + {&__pyx_n_s_frame_cache_key, __pyx_k_frame_cache_key, sizeof(__pyx_k_frame_cache_key), 0, 0, 1, 1}, + {&__pyx_n_s_frame_id_to_frame, __pyx_k_frame_id_to_frame, sizeof(__pyx_k_frame_id_to_frame), 0, 0, 1, 1}, + {&__pyx_n_s_frame_skips_cache, __pyx_k_frame_skips_cache, sizeof(__pyx_k_frame_skips_cache), 0, 0, 1, 1}, + {&__pyx_n_s_frame_trace_dispatch, __pyx_k_frame_trace_dispatch, sizeof(__pyx_k_frame_trace_dispatch), 0, 0, 1, 1}, + {&__pyx_n_s_from_user_input, __pyx_k_from_user_input, sizeof(__pyx_k_from_user_input), 0, 0, 1, 1}, + {&__pyx_n_s_func_name, __pyx_k_func_name, sizeof(__pyx_k_func_name), 0, 0, 1, 1}, + {&__pyx_n_s_function_breakpoint_name_to_brea, __pyx_k_function_breakpoint_name_to_brea, sizeof(__pyx_k_function_breakpoint_name_to_brea), 0, 0, 1, 1}, + {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0}, + {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, + {&__pyx_n_s_get_abs_path_real_path_and_base, __pyx_k_get_abs_path_real_path_and_base, sizeof(__pyx_k_get_abs_path_real_path_and_base), 0, 0, 1, 1}, + {&__pyx_n_s_get_breakpoint, __pyx_k_get_breakpoint, sizeof(__pyx_k_get_breakpoint), 0, 0, 1, 1}, + {&__pyx_n_s_get_clsname_for_code, __pyx_k_get_clsname_for_code, sizeof(__pyx_k_get_clsname_for_code), 0, 0, 1, 1}, + {&__pyx_n_s_get_current_thread_id, __pyx_k_get_current_thread_id, sizeof(__pyx_k_get_current_thread_id), 0, 0, 1, 1}, + {&__pyx_n_s_get_exception_breakpoint, __pyx_k_get_exception_breakpoint, sizeof(__pyx_k_get_exception_breakpoint), 0, 0, 1, 1}, + {&__pyx_n_s_get_file_type, __pyx_k_get_file_type, sizeof(__pyx_k_get_file_type), 0, 0, 1, 1}, + {&__pyx_n_s_get_global_debugger, __pyx_k_get_global_debugger, sizeof(__pyx_k_get_global_debugger), 0, 0, 1, 1}, + {&__pyx_n_s_get_internal_queue_and_event, __pyx_k_get_internal_queue_and_event, sizeof(__pyx_k_get_internal_queue_and_event), 0, 0, 1, 1}, + {&__pyx_n_s_get_method_object, __pyx_k_get_method_object, sizeof(__pyx_k_get_method_object), 0, 0, 1, 1}, + {&__pyx_n_s_get_related_thread, __pyx_k_get_related_thread, sizeof(__pyx_k_get_related_thread), 0, 0, 1, 1}, + {&__pyx_n_s_get_smart_step_into_variant_from, __pyx_k_get_smart_step_into_variant_from, sizeof(__pyx_k_get_smart_step_into_variant_from), 0, 0, 1, 1}, + {&__pyx_n_s_get_thread_id, __pyx_k_get_thread_id, sizeof(__pyx_k_get_thread_id), 0, 0, 1, 1}, + {&__pyx_n_s_get_topmost_frame, __pyx_k_get_topmost_frame, sizeof(__pyx_k_get_topmost_frame), 0, 0, 1, 1}, + {&__pyx_n_s_get_trace_dispatch_func, __pyx_k_get_trace_dispatch_func, sizeof(__pyx_k_get_trace_dispatch_func), 0, 0, 1, 1}, + {&__pyx_n_s_getline, __pyx_k_getline, sizeof(__pyx_k_getline), 0, 0, 1, 1}, + {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, + {&__pyx_n_s_global_cache_frame_skips, __pyx_k_global_cache_frame_skips, sizeof(__pyx_k_global_cache_frame_skips), 0, 0, 1, 1}, + {&__pyx_n_s_global_cache_skips, __pyx_k_global_cache_skips, sizeof(__pyx_k_global_cache_skips), 0, 0, 1, 1}, + {&__pyx_n_s_global_notify_skipped_step_in_l, __pyx_k_global_notify_skipped_step_in_l, sizeof(__pyx_k_global_notify_skipped_step_in_l), 0, 0, 1, 1}, + {&__pyx_n_s_handle_breakpoint_condition, __pyx_k_handle_breakpoint_condition, sizeof(__pyx_k_handle_breakpoint_condition), 0, 0, 1, 1}, + {&__pyx_n_s_handle_breakpoint_expression, __pyx_k_handle_breakpoint_expression, sizeof(__pyx_k_handle_breakpoint_expression), 0, 0, 1, 1}, + {&__pyx_n_s_handle_exception, __pyx_k_handle_exception, sizeof(__pyx_k_handle_exception), 0, 0, 1, 1}, + {&__pyx_n_s_handle_user_exception, __pyx_k_handle_user_exception, sizeof(__pyx_k_handle_user_exception), 0, 0, 1, 1}, + {&__pyx_n_s_has_condition, __pyx_k_has_condition, sizeof(__pyx_k_has_condition), 0, 0, 1, 1}, + {&__pyx_n_s_has_plugin_exception_breaks, __pyx_k_has_plugin_exception_breaks, sizeof(__pyx_k_has_plugin_exception_breaks), 0, 0, 1, 1}, + {&__pyx_n_s_has_plugin_line_breaks, __pyx_k_has_plugin_line_breaks, sizeof(__pyx_k_has_plugin_line_breaks), 0, 0, 1, 1}, + {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, + {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1}, + {&__pyx_n_s_ident, __pyx_k_ident, sizeof(__pyx_k_ident), 0, 0, 1, 1}, + {&__pyx_n_s_ident_2, __pyx_k_ident_2, sizeof(__pyx_k_ident_2), 0, 0, 1, 1}, + {&__pyx_n_s_ignore_exception_trace, __pyx_k_ignore_exception_trace, sizeof(__pyx_k_ignore_exception_trace), 0, 0, 1, 1}, + {&__pyx_n_s_ignore_exceptions_thrown_in_line, __pyx_k_ignore_exceptions_thrown_in_line, sizeof(__pyx_k_ignore_exceptions_thrown_in_line), 0, 0, 1, 1}, + {&__pyx_n_s_ignore_system_exit_code, __pyx_k_ignore_system_exit_code, sizeof(__pyx_k_ignore_system_exit_code), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_in_project_scope, __pyx_k_in_project_scope, sizeof(__pyx_k_in_project_scope), 0, 0, 1, 1}, + {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1}, + {&__pyx_n_s_initial_trace_obj, __pyx_k_initial_trace_obj, sizeof(__pyx_k_initial_trace_obj), 0, 0, 1, 1}, + {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1}, + {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0}, + {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, + {&__pyx_n_s_is_files_filter_enabled, __pyx_k_is_files_filter_enabled, sizeof(__pyx_k_is_files_filter_enabled), 0, 0, 1, 1}, + {&__pyx_n_s_is_line_in_except_block, __pyx_k_is_line_in_except_block, sizeof(__pyx_k_is_line_in_except_block), 0, 0, 1, 1}, + {&__pyx_n_s_is_line_in_try_block, __pyx_k_is_line_in_try_block, sizeof(__pyx_k_is_line_in_try_block), 0, 0, 1, 1}, + {&__pyx_n_s_is_logpoint, __pyx_k_is_logpoint, sizeof(__pyx_k_is_logpoint), 0, 0, 1, 1}, + {&__pyx_n_s_is_stepping, __pyx_k_is_stepping, sizeof(__pyx_k_is_stepping), 0, 0, 1, 1}, + {&__pyx_n_s_is_thread_alive, __pyx_k_is_thread_alive, sizeof(__pyx_k_is_thread_alive), 0, 0, 1, 1}, + {&__pyx_n_s_is_unhandled_exception, __pyx_k_is_unhandled_exception, sizeof(__pyx_k_is_unhandled_exception), 0, 0, 1, 1}, + {&__pyx_n_s_is_unwind, __pyx_k_is_unwind, sizeof(__pyx_k_is_unwind), 0, 0, 1, 1}, + {&__pyx_n_s_is_user_uncaught, __pyx_k_is_user_uncaught, sizeof(__pyx_k_is_user_uncaught), 0, 0, 1, 1}, + {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, + {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1}, + {&__pyx_n_s_just_raised, __pyx_k_just_raised, sizeof(__pyx_k_just_raised), 0, 0, 1, 1}, + {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, + {&__pyx_kp_s_lambda, __pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 0, 1, 0}, + {&__pyx_n_s_last_raise_line, __pyx_k_last_raise_line, sizeof(__pyx_k_last_raise_line), 0, 0, 1, 1}, + {&__pyx_n_s_last_stat, __pyx_k_last_stat, sizeof(__pyx_k_last_stat), 0, 0, 1, 1}, + {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1}, + {&__pyx_n_s_linecache, __pyx_k_linecache, sizeof(__pyx_k_linecache), 0, 0, 1, 1}, + {&__pyx_n_s_lines, __pyx_k_lines, sizeof(__pyx_k_lines), 0, 0, 1, 1}, + {&__pyx_n_s_lines_ignored, __pyx_k_lines_ignored, sizeof(__pyx_k_lines_ignored), 0, 0, 1, 1}, + {&__pyx_n_s_linesep, __pyx_k_linesep, sizeof(__pyx_k_linesep), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_main_2, __pyx_k_main_2, sizeof(__pyx_k_main_2), 0, 0, 1, 1}, + {&__pyx_n_s_make_console_message, __pyx_k_make_console_message, sizeof(__pyx_k_make_console_message), 0, 0, 1, 1}, + {&__pyx_n_s_make_io_message, __pyx_k_make_io_message, sizeof(__pyx_k_make_io_message), 0, 0, 1, 1}, + {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1}, + {&__pyx_n_s_maybe_user_uncaught_exc_info, __pyx_k_maybe_user_uncaught_exc_info, sizeof(__pyx_k_maybe_user_uncaught_exc_info), 0, 0, 1, 1}, + {&__pyx_n_s_merged, __pyx_k_merged, sizeof(__pyx_k_merged), 0, 0, 1, 1}, + {&__pyx_n_s_method_object, __pyx_k_method_object, sizeof(__pyx_k_method_object), 0, 0, 1, 1}, + {&__pyx_kp_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 0}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, + {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, + {&__pyx_n_s_next_additional_info, __pyx_k_next_additional_info, sizeof(__pyx_k_next_additional_info), 0, 0, 1, 1}, + {&__pyx_n_s_notify_on_first_raise_only, __pyx_k_notify_on_first_raise_only, sizeof(__pyx_k_notify_on_first_raise_only), 0, 0, 1, 1}, + {&__pyx_n_s_notify_skipped_step_in_because_o, __pyx_k_notify_skipped_step_in_because_o, sizeof(__pyx_k_notify_skipped_step_in_because_o), 0, 0, 1, 1}, + {&__pyx_n_s_notify_thread_not_alive, __pyx_k_notify_thread_not_alive, sizeof(__pyx_k_notify_thread_not_alive), 0, 0, 1, 1}, + {&__pyx_n_s_original_call, __pyx_k_original_call, sizeof(__pyx_k_original_call), 0, 0, 1, 1}, + {&__pyx_n_s_original_step_cmd, __pyx_k_original_step_cmd, sizeof(__pyx_k_original_step_cmd), 0, 0, 1, 1}, + {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, + {&__pyx_n_s_os_path, __pyx_k_os_path, sizeof(__pyx_k_os_path), 0, 0, 1, 1}, + {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1}, + {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, + {&__pyx_n_s_plugin, __pyx_k_plugin, sizeof(__pyx_k_plugin), 0, 0, 1, 1}, + {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1}, + {&__pyx_n_s_prev_user_uncaught_exc_info, __pyx_k_prev_user_uncaught_exc_info, sizeof(__pyx_k_prev_user_uncaught_exc_info), 0, 0, 1, 1}, + {&__pyx_n_s_py_db, __pyx_k_py_db, sizeof(__pyx_k_py_db), 0, 0, 1, 1}, + {&__pyx_kp_s_pyc, __pyx_k_pyc, sizeof(__pyx_k_pyc), 0, 0, 1, 0}, + {&__pyx_n_s_pydb_disposed, __pyx_k_pydb_disposed, sizeof(__pyx_k_pydb_disposed), 0, 0, 1, 1}, + {&__pyx_n_s_pydev_bundle, __pyx_k_pydev_bundle, sizeof(__pyx_k_pydev_bundle), 0, 0, 1, 1}, + {&__pyx_n_s_pydev_bundle__pydev_saved_modul, __pyx_k_pydev_bundle__pydev_saved_modul, sizeof(__pyx_k_pydev_bundle__pydev_saved_modul), 0, 0, 1, 1}, + {&__pyx_n_s_pydev_bundle_pydev_is_thread_al, __pyx_k_pydev_bundle_pydev_is_thread_al, sizeof(__pyx_k_pydev_bundle_pydev_is_thread_al), 0, 0, 1, 1}, + {&__pyx_n_s_pydev_bundle_pydev_log, __pyx_k_pydev_bundle_pydev_log, sizeof(__pyx_k_pydev_bundle_pydev_log), 0, 0, 1, 1}, + {&__pyx_n_s_pydev_do_not_trace, __pyx_k_pydev_do_not_trace, sizeof(__pyx_k_pydev_do_not_trace), 0, 0, 1, 1}, + {&__pyx_kp_s_pydev_execfile_py, __pyx_k_pydev_execfile_py, sizeof(__pyx_k_pydev_execfile_py), 0, 0, 1, 0}, + {&__pyx_n_s_pydev_log, __pyx_k_pydev_log, sizeof(__pyx_k_pydev_log), 0, 0, 1, 1}, + {&__pyx_n_s_pydev_log_exception, __pyx_k_pydev_log_exception, sizeof(__pyx_k_pydev_log_exception), 0, 0, 1, 1}, + {&__pyx_n_s_pydev_monkey, __pyx_k_pydev_monkey, sizeof(__pyx_k_pydev_monkey), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd, __pyx_k_pydevd, sizeof(__pyx_k_pydevd), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_bundle, __pyx_k_pydevd_bundle, sizeof(__pyx_k_pydevd_bundle), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_bundle_pydevd_bytecode_u, __pyx_k_pydevd_bundle_pydevd_bytecode_u, sizeof(__pyx_k_pydevd_bundle_pydevd_bytecode_u), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_bundle_pydevd_comm_const, __pyx_k_pydevd_bundle_pydevd_comm_const, sizeof(__pyx_k_pydevd_bundle_pydevd_comm_const), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_k_pydevd_bundle_pydevd_constants, sizeof(__pyx_k_pydevd_bundle_pydevd_constants), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_k_pydevd_bundle_pydevd_cython, sizeof(__pyx_k_pydevd_bundle_pydevd_cython), 0, 0, 1, 1}, + {&__pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_k_pydevd_bundle_pydevd_cython_pyx, sizeof(__pyx_k_pydevd_bundle_pydevd_cython_pyx), 0, 0, 1, 0}, + {&__pyx_n_s_pydevd_bundle_pydevd_frame_util, __pyx_k_pydevd_bundle_pydevd_frame_util, sizeof(__pyx_k_pydevd_bundle_pydevd_frame_util), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_bundle_pydevd_utils, __pyx_k_pydevd_bundle_pydevd_utils, sizeof(__pyx_k_pydevd_bundle_pydevd_utils), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_dont_trace, __pyx_k_pydevd_dont_trace, sizeof(__pyx_k_pydevd_dont_trace), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_file_utils, __pyx_k_pydevd_file_utils, sizeof(__pyx_k_pydevd_file_utils), 0, 0, 1, 1}, + {&__pyx_kp_s_pydevd_py, __pyx_k_pydevd_py, sizeof(__pyx_k_pydevd_py), 0, 0, 1, 0}, + {&__pyx_kp_s_pydevd_traceproperty_py, __pyx_k_pydevd_traceproperty_py, sizeof(__pyx_k_pydevd_traceproperty_py), 0, 0, 1, 0}, + {&__pyx_n_s_pydevd_tracing, __pyx_k_pydevd_tracing, sizeof(__pyx_k_pydevd_tracing), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_PyDBAdditionalThr, __pyx_k_pyx_unpickle_PyDBAdditionalThr, sizeof(__pyx_k_pyx_unpickle_PyDBAdditionalThr), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_PyDBFrame, __pyx_k_pyx_unpickle_PyDBFrame, sizeof(__pyx_k_pyx_unpickle_PyDBFrame), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_SafeCallWrapper, __pyx_k_pyx_unpickle_SafeCallWrapper, sizeof(__pyx_k_pyx_unpickle_SafeCallWrapper), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_ThreadTracer, __pyx_k_pyx_unpickle_ThreadTracer, sizeof(__pyx_k_pyx_unpickle_ThreadTracer), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_TopLevelThreadTra, __pyx_k_pyx_unpickle_TopLevelThreadTra, sizeof(__pyx_k_pyx_unpickle_TopLevelThreadTra), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_TopLevelThreadTra_2, __pyx_k_pyx_unpickle_TopLevelThreadTra_2, sizeof(__pyx_k_pyx_unpickle_TopLevelThreadTra_2), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle__TryExceptContain, __pyx_k_pyx_unpickle__TryExceptContain, sizeof(__pyx_k_pyx_unpickle__TryExceptContain), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, + {&__pyx_n_s_qname, __pyx_k_qname, sizeof(__pyx_k_qname), 0, 0, 1, 1}, + {&__pyx_n_s_quitting, __pyx_k_quitting, sizeof(__pyx_k_quitting), 0, 0, 1, 1}, + {&__pyx_n_s_raise_lines, __pyx_k_raise_lines, sizeof(__pyx_k_raise_lines), 0, 0, 1, 1}, + {&__pyx_n_s_raise_lines_in_except, __pyx_k_raise_lines_in_except, sizeof(__pyx_k_raise_lines_in_except), 0, 0, 1, 1}, + {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1}, + {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, + {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1}, + {&__pyx_n_s_remove_additional_info, __pyx_k_remove_additional_info, sizeof(__pyx_k_remove_additional_info), 0, 0, 1, 1}, + {&__pyx_n_s_remove_exception_from_frame, __pyx_k_remove_exception_from_frame, sizeof(__pyx_k_remove_exception_from_frame), 0, 0, 1, 1}, + {&__pyx_n_s_remove_return_values_flag, __pyx_k_remove_return_values_flag, sizeof(__pyx_k_remove_return_values_flag), 0, 0, 1, 1}, + {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, + {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1}, + {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1}, + {&__pyx_n_s_return_line, __pyx_k_return_line, sizeof(__pyx_k_return_line), 0, 0, 1, 1}, + {&__pyx_n_s_returns, __pyx_k_returns, sizeof(__pyx_k_returns), 0, 0, 1, 1}, + {&__pyx_n_s_rfind, __pyx_k_rfind, sizeof(__pyx_k_rfind), 0, 0, 1, 1}, + {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1}, + {&__pyx_kp_s_s_raised_from_within_the_callba, __pyx_k_s_raised_from_within_the_callba, sizeof(__pyx_k_s_raised_from_within_the_callba), 0, 0, 1, 0}, + {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0}, + {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, + {&__pyx_n_s_send_caught_exception_stack, __pyx_k_send_caught_exception_stack, sizeof(__pyx_k_send_caught_exception_stack), 0, 0, 1, 1}, + {&__pyx_n_s_send_caught_exception_stack_proc, __pyx_k_send_caught_exception_stack_proc, sizeof(__pyx_k_send_caught_exception_stack_proc), 0, 0, 1, 1}, + {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1}, + {&__pyx_n_s_set_additional_thread_info, __pyx_k_set_additional_thread_info, sizeof(__pyx_k_set_additional_thread_info), 0, 0, 1, 1}, + {&__pyx_n_s_set_additional_thread_info_lock, __pyx_k_set_additional_thread_info_lock, sizeof(__pyx_k_set_additional_thread_info_lock), 0, 0, 1, 1}, + {&__pyx_n_s_set_suspend, __pyx_k_set_suspend, sizeof(__pyx_k_set_suspend), 0, 0, 1, 1}, + {&__pyx_n_s_set_trace_for_frame_and_parents, __pyx_k_set_trace_for_frame_and_parents, sizeof(__pyx_k_set_trace_for_frame_and_parents), 0, 0, 1, 1}, + {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, + {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, + {&__pyx_n_s_should_stop, __pyx_k_should_stop, sizeof(__pyx_k_should_stop), 0, 0, 1, 1}, + {&__pyx_n_s_should_stop_on_exception, __pyx_k_should_stop_on_exception, sizeof(__pyx_k_should_stop_on_exception), 0, 0, 1, 1}, + {&__pyx_n_s_should_trace_hook, __pyx_k_should_trace_hook, sizeof(__pyx_k_should_trace_hook), 0, 0, 1, 1}, + {&__pyx_n_s_show_return_values, __pyx_k_show_return_values, sizeof(__pyx_k_show_return_values), 0, 0, 1, 1}, + {&__pyx_n_s_skip_on_exceptions_thrown_in_sam, __pyx_k_skip_on_exceptions_thrown_in_sam, sizeof(__pyx_k_skip_on_exceptions_thrown_in_sam), 0, 0, 1, 1}, + {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, + {&__pyx_n_s_st_mtime, __pyx_k_st_mtime, sizeof(__pyx_k_st_mtime), 0, 0, 1, 1}, + {&__pyx_n_s_st_size, __pyx_k_st_size, sizeof(__pyx_k_st_size), 0, 0, 1, 1}, + {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1}, + {&__pyx_n_s_stat, __pyx_k_stat, sizeof(__pyx_k_stat), 0, 0, 1, 1}, + {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, + {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1}, + {&__pyx_n_s_stop_on_unhandled_exception, __pyx_k_stop_on_unhandled_exception, sizeof(__pyx_k_stop_on_unhandled_exception), 0, 0, 1, 1}, + {&__pyx_n_s_stopped, __pyx_k_stopped, sizeof(__pyx_k_stopped), 0, 0, 1, 1}, + {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, + {&__pyx_n_s_suspend, __pyx_k_suspend, sizeof(__pyx_k_suspend), 0, 0, 1, 1}, + {&__pyx_n_s_suspend_other_threads, __pyx_k_suspend_other_threads, sizeof(__pyx_k_suspend_other_threads), 0, 0, 1, 1}, + {&__pyx_n_s_suspend_policy, __pyx_k_suspend_policy, sizeof(__pyx_k_suspend_policy), 0, 0, 1, 1}, + {&__pyx_n_s_suspended_at_unhandled, __pyx_k_suspended_at_unhandled, sizeof(__pyx_k_suspended_at_unhandled), 0, 0, 1, 1}, + {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, + {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1}, + {&__pyx_n_s_tb_frame, __pyx_k_tb_frame, sizeof(__pyx_k_tb_frame), 0, 0, 1, 1}, + {&__pyx_n_s_tb_lineno, __pyx_k_tb_lineno, sizeof(__pyx_k_tb_lineno), 0, 0, 1, 1}, + {&__pyx_n_s_tb_next, __pyx_k_tb_next, sizeof(__pyx_k_tb_next), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_thread, __pyx_k_thread, sizeof(__pyx_k_thread), 0, 0, 1, 1}, + {&__pyx_kp_s_thread__ident_is_None_in__get_re, __pyx_k_thread__ident_is_None_in__get_re, sizeof(__pyx_k_thread__ident_is_None_in__get_re), 0, 0, 1, 0}, + {&__pyx_n_s_thread_trace_func, __pyx_k_thread_trace_func, sizeof(__pyx_k_thread_trace_func), 0, 0, 1, 1}, + {&__pyx_n_s_thread_tracer, __pyx_k_thread_tracer, sizeof(__pyx_k_thread_tracer), 0, 0, 1, 1}, + {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1}, + {&__pyx_n_s_threading_active, __pyx_k_threading_active, sizeof(__pyx_k_threading_active), 0, 0, 1, 1}, + {&__pyx_n_s_threading_current_thread, __pyx_k_threading_current_thread, sizeof(__pyx_k_threading_current_thread), 0, 0, 1, 1}, + {&__pyx_n_s_threading_get_ident, __pyx_k_threading_get_ident, sizeof(__pyx_k_threading_get_ident), 0, 0, 1, 1}, + {&__pyx_n_s_top_level_thread_tracer, __pyx_k_top_level_thread_tracer, sizeof(__pyx_k_top_level_thread_tracer), 0, 0, 1, 1}, + {&__pyx_n_s_top_level_thread_tracer_no_back, __pyx_k_top_level_thread_tracer_no_back, sizeof(__pyx_k_top_level_thread_tracer_no_back), 0, 0, 1, 1}, + {&__pyx_n_s_top_level_thread_tracer_unhandle, __pyx_k_top_level_thread_tracer_unhandle, sizeof(__pyx_k_top_level_thread_tracer_unhandle), 0, 0, 1, 1}, + {&__pyx_n_s_trace, __pyx_k_trace, sizeof(__pyx_k_trace), 0, 0, 1, 1}, + {&__pyx_n_s_trace_dispatch, __pyx_k_trace_dispatch, sizeof(__pyx_k_trace_dispatch), 0, 0, 1, 1}, + {&__pyx_n_s_trace_dispatch_and_unhandled_exc, __pyx_k_trace_dispatch_and_unhandled_exc, sizeof(__pyx_k_trace_dispatch_and_unhandled_exc), 0, 0, 1, 1}, + {&__pyx_n_s_trace_exception, __pyx_k_trace_exception, sizeof(__pyx_k_trace_exception), 0, 0, 1, 1}, + {&__pyx_n_s_trace_obj, __pyx_k_trace_obj, sizeof(__pyx_k_trace_obj), 0, 0, 1, 1}, + {&__pyx_n_s_trace_unhandled_exceptions, __pyx_k_trace_unhandled_exceptions, sizeof(__pyx_k_trace_unhandled_exceptions), 0, 0, 1, 1}, + {&__pyx_n_s_try_exc_info, __pyx_k_try_exc_info, sizeof(__pyx_k_try_exc_info), 0, 0, 1, 1}, + {&__pyx_n_s_try_except_info, __pyx_k_try_except_info, sizeof(__pyx_k_try_except_info), 0, 0, 1, 1}, + {&__pyx_n_s_try_except_infos, __pyx_k_try_except_infos, sizeof(__pyx_k_try_except_infos), 0, 0, 1, 1}, + {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, + {&__pyx_n_s_update_stepping_info, __pyx_k_update_stepping_info, sizeof(__pyx_k_update_stepping_info), 0, 0, 1, 1}, + {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1}, + {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, + {&__pyx_n_s_valid_try_except_infos, __pyx_k_valid_try_except_infos, sizeof(__pyx_k_valid_try_except_infos), 0, 0, 1, 1}, + {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, + {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, + {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1}, + {&__pyx_n_s_was_just_raised, __pyx_k_was_just_raised, sizeof(__pyx_k_was_just_raised), 0, 0, 1, 1}, + {&__pyx_n_s_weak_thread, __pyx_k_weak_thread, sizeof(__pyx_k_weak_thread), 0, 0, 1, 1}, + {&__pyx_n_s_weakref, __pyx_k_weakref, sizeof(__pyx_k_weakref), 0, 0, 1, 1}, + {&__pyx_n_s_writer, __pyx_k_writer, sizeof(__pyx_k_writer), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} + }; + return __Pyx_InitStrings(__pyx_string_tab); +} +/* #### Code section: cached_builtins ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s_NameError); if (!__pyx_builtin_NameError) __PYX_ERR(0, 390, __pyx_L1_error) + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_builtin_KeyboardInterrupt = __Pyx_GetBuiltinName(__pyx_n_s_KeyboardInterrupt); if (!__pyx_builtin_KeyboardInterrupt) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_builtin_SystemExit = __Pyx_GetBuiltinName(__pyx_n_s_SystemExit); if (!__pyx_builtin_SystemExit) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_builtin_GeneratorExit = __Pyx_GetBuiltinName(__pyx_n_s_GeneratorExit); if (!__pyx_builtin_GeneratorExit) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 2173, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "_pydevd_bundle/pydevd_cython.pyx":250 + * additional_info.weak_thread = weakref.ref(thread) + * add_additional_info(additional_info) + * del _next_additional_info[:] # <<<<<<<<<<<<<< + * _next_additional_info.append(PyDBAdditionalThreadInfo()) + * + */ + __pyx_slice__2 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__2)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__2); + __Pyx_GIVEREF(__pyx_slice__2); + + /* "_pydevd_bundle/pydevd_cython.pyx":233 + * raise AttributeError() + * except: + * with _set_additional_thread_info_lock: # <<<<<<<<<<<<<< + * # If it's not there, set it within a lock to avoid any racing + * # conditions. + */ + __pyx_tuple__3 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + + /* "_pydevd_bundle/pydevd_cython.pyx":1109 + * ) + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< + * pydev_log.exception() + * + */ + __pyx_tuple__5 = PyTuple_Pack(2, __pyx_builtin_KeyboardInterrupt, __pyx_builtin_SystemExit); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__5); + __Pyx_GIVEREF(__pyx_tuple__5); + + /* "_pydevd_bundle/pydevd_cython.pyx":1151 + * filename = frame.f_code.co_filename + * if filename.endswith(".pyc"): + * filename = filename[:-1] # <<<<<<<<<<<<<< + * + * if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): + */ + __pyx_slice__6 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__6)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__6); + __Pyx_GIVEREF(__pyx_slice__6); + + /* "_pydevd_bundle/pydevd_cython.pyx":1366 + * ) + * py_db.writer.add_command(cmd) + * if not issubclass(exc, (KeyboardInterrupt, SystemExit)): # <<<<<<<<<<<<<< + * pydev_log.exception() + * raise + */ + __pyx_tuple__7 = PyTuple_Pack(2, __pyx_builtin_KeyboardInterrupt, __pyx_builtin_SystemExit); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); + + /* "_pydevd_bundle/pydevd_cython.pyx":1746 + * if f_unhandled.f_code.co_name in ("__bootstrap", "_bootstrap"): + * # We need __bootstrap_inner, not __bootstrap. + * return None, False # <<<<<<<<<<<<<< + * + * elif f_unhandled.f_code.co_name in ("__bootstrap_inner", "_bootstrap_inner"): + */ + __pyx_tuple__11 = PyTuple_Pack(2, Py_None, Py_False); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 1746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); + + /* "_pydevd_bundle/pydevd_cython.pyx":2173 + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): + * raise RuntimeError("Not used in sys.monitoring mode.") # <<<<<<<<<<<<<< + */ + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_Not_used_in_sys_monitoring_mode); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 2173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xd33aa14, 0x024feed, 0x4342dfb): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xd33aa14, 0x024feed, 0x4342dfb) = (conditional_breakpoint_exception, is_in_wait_loop, is_tracing, pydev_call_from_jinja2, pydev_call_inside_jinja2, pydev_django_resolve_frame, pydev_func_name, pydev_message, pydev_next_line, pydev_notify_kill, pydev_original_step_cmd, pydev_smart_child_offset, pydev_smart_parent_offset, pydev_smart_step_into_variants, pydev_smart_step_stop, pydev_state, pydev_step_cmd, pydev_step_stop, pydev_use_scoped_step_frame, step_in_initial_location, suspend_type, suspended_at_unhandled, target_id_to_smart_step_into_variant, thread_tracer, top_level_thread_tracer_no_back_frames, top_level_thread_tracer_unhandled, trace_suspend_type, weak_thread))" % __pyx_checksum + */ + __pyx_tuple__13 = PyTuple_Pack(3, __pyx_int_221489684, __pyx_int_2424557, __pyx_int_70528507); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); + __pyx_tuple__14 = PyTuple_Pack(3, __pyx_int_230645316, __pyx_int_232881363, __pyx_int_210464433); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + __pyx_tuple__15 = PyTuple_Pack(3, __pyx_int_61391470, __pyx_int_192493205, __pyx_int_84338306); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + __pyx_tuple__16 = PyTuple_Pack(3, __pyx_int_169093275, __pyx_int_63705258, __pyx_int_125568891); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); + __pyx_tuple__17 = PyTuple_Pack(3, __pyx_int_18997755, __pyx_int_255484337, __pyx_int_64458794); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); + __pyx_tuple__18 = PyTuple_Pack(3, __pyx_int_66451433, __pyx_int_16751766, __pyx_int_171613889); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); + + /* "_pydevd_bundle/pydevd_cython.pyx":130 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef object _get_related_thread(self): # <<<<<<<<<<<<<< + * # ELSE + * # def _get_related_thread(self): + */ + __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__20); + __Pyx_GIVEREF(__pyx_tuple__20); + __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_related_thread, 130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 130, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":159 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef bint _is_stepping(self): # <<<<<<<<<<<<<< + * # ELSE + * # def _is_stepping(self): + */ + __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_is_stepping, 159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 159, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":177 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef get_topmost_frame(self, thread): # <<<<<<<<<<<<<< + * # ELSE + * # def get_topmost_frame(self, thread): + */ + __pyx_tuple__23 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_thread); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__23); + __Pyx_GIVEREF(__pyx_tuple__23); + __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_topmost_frame, 177, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 177, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":206 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef update_stepping_info(self): # <<<<<<<<<<<<<< + * # ELSE + * # def update_stepping_info(self): + */ + __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_update_stepping_info, 206, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 206, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_tuple__26 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__26); + __Pyx_GIVEREF(__pyx_tuple__26); + __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(2, 1, __pyx_L1_error) + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PyDBAdditionalThreadInfo, (type(self), 0xd33aa14, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(self, __pyx_state) + */ + __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__28); + __Pyx_GIVEREF(__pyx_tuple__28); + __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(2, 16, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":223 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef set_additional_thread_info(thread): # <<<<<<<<<<<<<< + * # ELSE + * # def set_additional_thread_info(thread): + */ + __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_thread); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__30); + __Pyx_GIVEREF(__pyx_tuple__30); + __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_set_additional_thread_info, 223, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 223, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":305 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef add_additional_info(PyDBAdditionalThreadInfo info): # <<<<<<<<<<<<<< + * # ELSE + * # def add_additional_info(info): + */ + __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_info); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__32); + __Pyx_GIVEREF(__pyx_tuple__32); + __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_add_additional_info, 305, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 305, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":317 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef remove_additional_info(PyDBAdditionalThreadInfo info): # <<<<<<<<<<<<<< + * # ELSE + * # def remove_additional_info(info): + */ + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_remove_additional_info, 317, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 317, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":329 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef bint any_thread_stepping(): # <<<<<<<<<<<<<< + * # ELSE + * # def any_thread_stepping(): + */ + __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_any_thread_stepping, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 329, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":336 + * return bool(_infos_stepping) + * import linecache + * import os.path # <<<<<<<<<<<<<< + * import re + * + */ + __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_s_os, __pyx_n_s_path); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__36); + __Pyx_GIVEREF(__pyx_tuple__36); + + /* "_pydevd_bundle/pydevd_cython.pyx":359 + * except ImportError: + * + * def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_tuple__37 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__37); + __Pyx_GIVEREF(__pyx_tuple__37); + __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_smart_step_into_variant_from, 359, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 359, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":381 + * basename = os.path.basename + * + * IGNORE_EXCEPTION_TAG = re.compile("[^#]*#.*@IgnoreException") # <<<<<<<<<<<<<< + * DEBUG_START = ("pydevd.py", "run") + * DEBUG_START_PY3K = ("_pydev_execfile.py", "execfile") + */ + __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_IgnoreException); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__39); + __Pyx_GIVEREF(__pyx_tuple__39); + + /* "_pydevd_bundle/pydevd_cython.pyx":382 + * + * IGNORE_EXCEPTION_TAG = re.compile("[^#]*#.*@IgnoreException") + * DEBUG_START = ("pydevd.py", "run") # <<<<<<<<<<<<<< + * DEBUG_START_PY3K = ("_pydev_execfile.py", "execfile") + * TRACE_PROPERTY = "pydevd_traceproperty.py" + */ + __pyx_tuple__40 = PyTuple_Pack(2, __pyx_kp_s_pydevd_py, __pyx_n_s_run); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__40); + __Pyx_GIVEREF(__pyx_tuple__40); + + /* "_pydevd_bundle/pydevd_cython.pyx":383 + * IGNORE_EXCEPTION_TAG = re.compile("[^#]*#.*@IgnoreException") + * DEBUG_START = ("pydevd.py", "run") + * DEBUG_START_PY3K = ("_pydev_execfile.py", "execfile") # <<<<<<<<<<<<<< + * TRACE_PROPERTY = "pydevd_traceproperty.py" + * + */ + __pyx_tuple__41 = PyTuple_Pack(2, __pyx_kp_s_pydev_execfile_py, __pyx_n_s_execfile); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__41); + __Pyx_GIVEREF(__pyx_tuple__41); + + /* "_pydevd_bundle/pydevd_cython.pyx":395 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): # <<<<<<<<<<<<<< + * # ELSE + * # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): + */ + __pyx_tuple__42 = PyTuple_Pack(8, __pyx_n_s_container_obj, __pyx_n_s_py_db, __pyx_n_s_frame, __pyx_n_s_last_raise_line, __pyx_n_s_raise_lines, __pyx_n_s_try_except_infos, __pyx_n_s_valid_try_except_infos, __pyx_n_s_try_except_info); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__42); + __Pyx_GIVEREF(__pyx_tuple__42); + __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_is_unhandled_exception, 395, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 395, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(2, 1, __pyx_L1_error) + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__TryExceptContainerObj, (type(self), 0xdbf5e44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__TryExceptContainerObj__set_state(self, __pyx_state) + */ + __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(2, 16, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":490 + * # ENDIF + * + * def set_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< + * self._args[0].set_suspend(*args, **kwargs) + * + */ + __pyx_tuple__46 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__46); + __Pyx_GIVEREF(__pyx_tuple__46); + __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_set_suspend, 490, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 490, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":493 + * self._args[0].set_suspend(*args, **kwargs) + * + * def do_wait_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< + * self._args[0].do_wait_suspend(*args, **kwargs) + * + */ + __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_do_wait_suspend, 493, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 493, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":497 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def trace_exception(self, frame, str event, arg): # <<<<<<<<<<<<<< + * cdef bint should_stop; + * cdef tuple exc_info; + */ + __pyx_tuple__49 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_should_stop, __pyx_n_s_exc_info, __pyx_n_s_frame_skips_cache, __pyx_n_s_frame_cache_key, __pyx_n_s_custom_key, __pyx_n_s_container_obj); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__49); + __Pyx_GIVEREF(__pyx_tuple__49); + __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_exception, 497, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 497, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":526 + * return self.trace_exception + * + * def handle_user_exception(self, frame): # <<<<<<<<<<<<<< + * exc_info = self.exc_info + * if exc_info: + */ + __pyx_tuple__51 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_exc_info); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__51); + __Pyx_GIVEREF(__pyx_tuple__51); + __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_handle_user_exception, 526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 526, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":634 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< + * cdef tuple abs_path_canonical_path_and_base; + * cdef bint is_exception_event; + */ + __pyx_tuple__53 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__53); + __Pyx_GIVEREF(__pyx_tuple__53); + __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_dispatch, 634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 634, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(2, 1, __pyx_L1_error) + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) + */ + __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(2, 16, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1377 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info, is_unwind=False): # <<<<<<<<<<<<<< + * cdef bint should_stop; + * cdef bint was_just_raised; + */ + __pyx_tuple__57 = PyTuple_Pack(22, __pyx_n_s_py_db, __pyx_n_s_info, __pyx_n_s_frame, __pyx_n_s_thread, __pyx_n_s_arg, __pyx_n_s_prev_user_uncaught_exc_info, __pyx_n_s_is_unwind, __pyx_n_s_should_stop, __pyx_n_s_was_just_raised, __pyx_n_s_check_excs, __pyx_n_s_maybe_user_uncaught_exc_info, __pyx_n_s_exception, __pyx_n_s_value, __pyx_n_s_trace, __pyx_n_s_exception_breakpoint, __pyx_n_s_result, __pyx_n_s_exc_break_user, __pyx_n_s_exc_break_caught, __pyx_n_s_exc_break, __pyx_n_s_is_user_uncaught, __pyx_n_s_exc_info, __pyx_n_s_lines); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__57); + __Pyx_GIVEREF(__pyx_tuple__57); + __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 22, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_should_stop_on_exception, 1377, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 1377, __pyx_L1_error) + __pyx_tuple__59 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__59); + __Pyx_GIVEREF(__pyx_tuple__59); + + /* "_pydevd_bundle/pydevd_cython.pyx":1510 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def handle_exception(py_db, thread, frame, arg, str exception_type): # <<<<<<<<<<<<<< + * cdef bint stopped; + * cdef tuple abs_real_path_and_base; + */ + __pyx_tuple__60 = PyTuple_Pack(21, __pyx_n_s_py_db, __pyx_n_s_thread, __pyx_n_s_frame, __pyx_n_s_arg, __pyx_n_s_exception_type, __pyx_n_s_stopped, __pyx_n_s_abs_real_path_and_base, __pyx_n_s_absolute_filename, __pyx_n_s_canonical_normalized_filename, __pyx_n_s_lines_ignored, __pyx_n_s_frame_id_to_frame, __pyx_n_s_merged, __pyx_n_s_trace_obj, __pyx_n_s_initial_trace_obj, __pyx_n_s_check_trace_obj, __pyx_n_s_curr_stat, __pyx_n_s_last_stat, __pyx_n_s_from_user_input, __pyx_n_s_exc_lineno, __pyx_n_s_line, __pyx_n_s_f); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 1510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__60); + __Pyx_GIVEREF(__pyx_tuple__60); + __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_handle_exception, 1510, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 1510, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1674 + * + * + * def notify_skipped_step_in_because_of_filters(py_db, frame): # <<<<<<<<<<<<<< + * global _global_notify_skipped_step_in + * + */ + __pyx_tuple__62 = PyTuple_Pack(2, __pyx_n_s_py_db, __pyx_n_s_frame); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 1674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__62); + __Pyx_GIVEREF(__pyx_tuple__62); + __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_notify_skipped_step_in_because_o, 1674, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 1674, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1700 + * Py_XDECREF (method_obj) + * return SafeCallWrapper(ret) if ret is not None else None + * def get_method_object(self): # <<<<<<<<<<<<<< + * return self.method_object + * # ELSE + */ + __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_method_object, 1700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 1700, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(2, 1, __pyx_L1_error) + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SafeCallWrapper, (type(self), 0xa14289b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SafeCallWrapper__set_state(self, __pyx_state) + */ + __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(2, 16, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1707 + * + * + * def fix_top_level_trace_and_get_trace_func(py_db, frame): # <<<<<<<<<<<<<< + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + __pyx_tuple__67 = PyTuple_Pack(15, __pyx_n_s_py_db, __pyx_n_s_frame, __pyx_n_s_filename, __pyx_n_s_name_2, __pyx_n_s_args, __pyx_n_s_thread, __pyx_n_s_f_unhandled, __pyx_n_s_force_only_unhandled_tracer, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_t, __pyx_n_s_additional_info, __pyx_n_s_top_level_thread_tracer, __pyx_n_s_f_trace, __pyx_n_s_thread_tracer); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 1707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__67); + __Pyx_GIVEREF(__pyx_tuple__67); + __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_fix_top_level_trace_and_get_trac, 1707, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 1707, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1843 + * + * + * def trace_dispatch(py_db, frame, event, arg): # <<<<<<<<<<<<<< + * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) + * if thread_trace_func is None: + */ + __pyx_tuple__69 = PyTuple_Pack(6, __pyx_n_s_py_db, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_thread_trace_func, __pyx_n_s_apply_to_settrace); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 1843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__69); + __Pyx_GIVEREF(__pyx_tuple__69); + __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_dispatch, 1843, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 1843, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1866 + * # fmt: on + * + * def trace_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< + * # Note that we ignore the frame as this tracing method should only be put in topmost frames already. + * # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) + */ + __pyx_tuple__71 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_py_db, __pyx_n_s_t, __pyx_n_s_additional_info); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 1866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__71); + __Pyx_GIVEREF(__pyx_tuple__71); + __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_unhandled_exceptions, 1866, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 1866, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1880 + * return self.trace_unhandled_exceptions + * + * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< + * return self.trace_unhandled_exceptions + * + */ + __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_trace_dispatch_func, 1880, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 1880, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(2, 1, __pyx_L1_error) + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, (type(self), 0x121e1fb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(self, __pyx_state) + */ + __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(2, 16, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1924 + * # fmt: on + * + * def trace_dispatch_and_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< + * # DEBUG = 'code_to_debug' in frame.f_code.co_filename + * # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) + */ + __pyx_tuple__76 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_frame_trace_dispatch, __pyx_n_s_py_db, __pyx_n_s_t, __pyx_n_s_additional_info, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__76); + __Pyx_GIVEREF(__pyx_tuple__76); + __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_trace_dispatch_and_unhandled_exc, 1924, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 1924, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":1959 + * return ret + * + * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< + * return self.trace_dispatch_and_unhandled_exceptions + * + */ + __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_get_trace_dispatch_func, 1959, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 1959, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(2, 1, __pyx_L1_error) + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TopLevelThreadTracerNoBackFrame, (type(self), 0x3f5f7e9, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(self, __pyx_state) + */ + __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(2, 16, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(2, 1, __pyx_L1_error) + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ThreadTracer, (type(self), 0x121e1fb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ThreadTracer__set_state(self, __pyx_state) + */ + __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(2, 16, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":2164 + * _original_call = ThreadTracer.__call__ + * + * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< + * constructed_tid_to_last_frame[self._args[1].ident] = frame + * return _original_call(self, frame, event, arg) + */ + __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_call_2, 2164, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 2164, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":2172 + * if PYDEVD_USE_SYS_MONITORING: + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): # <<<<<<<<<<<<<< + * raise RuntimeError("Not used in sys.monitoring mode.") + */ + __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_bundle_pydevd_cython_pyx, __pyx_n_s_fix_top_level_trace_and_get_trac, 2172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 2172, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __pyx_unpickle_PyDBAdditionalThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_tuple__85 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__85); + __Pyx_GIVEREF(__pyx_tuple__85); + __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PyDBAdditionalThr, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__TryExceptContain, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PyDBFrame, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SafeCallWrapper, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TopLevelThreadTra, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TopLevelThreadTra_2, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ThreadTracer, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) { + __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; + __pyx_umethod_PyDict_Type_get.method_name = &__pyx_n_s_get; + __pyx_umethod_PyDict_Type_update.type = (PyObject*)&PyDict_Type; + __pyx_umethod_PyDict_Type_update.method_name = &__pyx_n_s_update; + __pyx_umethod_PyString_Type_rfind.type = (PyObject*)&PyString_Type; + __pyx_umethod_PyString_Type_rfind.method_name = &__pyx_n_s_rfind; + if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_111 = PyInt_FromLong(111); if (unlikely(!__pyx_int_111)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_137 = PyInt_FromLong(137); if (unlikely(!__pyx_int_137)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_160 = PyInt_FromLong(160); if (unlikely(!__pyx_int_160)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_2424557 = PyInt_FromLong(2424557L); if (unlikely(!__pyx_int_2424557)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_16751766 = PyInt_FromLong(16751766L); if (unlikely(!__pyx_int_16751766)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_18997755 = PyInt_FromLong(18997755L); if (unlikely(!__pyx_int_18997755)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_61391470 = PyInt_FromLong(61391470L); if (unlikely(!__pyx_int_61391470)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_63705258 = PyInt_FromLong(63705258L); if (unlikely(!__pyx_int_63705258)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_64458794 = PyInt_FromLong(64458794L); if (unlikely(!__pyx_int_64458794)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_66451433 = PyInt_FromLong(66451433L); if (unlikely(!__pyx_int_66451433)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_70528507 = PyInt_FromLong(70528507L); if (unlikely(!__pyx_int_70528507)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_84338306 = PyInt_FromLong(84338306L); if (unlikely(!__pyx_int_84338306)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_125568891 = PyInt_FromLong(125568891L); if (unlikely(!__pyx_int_125568891)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_169093275 = PyInt_FromLong(169093275L); if (unlikely(!__pyx_int_169093275)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_171613889 = PyInt_FromLong(171613889L); if (unlikely(!__pyx_int_171613889)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_192493205 = PyInt_FromLong(192493205L); if (unlikely(!__pyx_int_192493205)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_210464433 = PyInt_FromLong(210464433L); if (unlikely(!__pyx_int_210464433)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_221489684 = PyInt_FromLong(221489684L); if (unlikely(!__pyx_int_221489684)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_230645316 = PyInt_FromLong(230645316L); if (unlikely(!__pyx_int_230645316)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_232881363 = PyInt_FromLong(232881363L); if (unlikely(!__pyx_int_232881363)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_255484337 = PyInt_FromLong(255484337L); if (unlikely(!__pyx_int_255484337)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_globals ### */ + +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + return 0; +} +/* #### Code section: init_module ### */ + +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ + +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_14_pydevd_bundle_13pydevd_cython__all_infos = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_14_pydevd_bundle_13pydevd_cython__infos_stepping = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_14_pydevd_bundle_13pydevd_cython__update_infos_lock = Py_None; Py_INCREF(Py_None); + __pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in = ((PyObject*)Py_None); Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("set_additional_thread_info", (void (*)(void))__pyx_f_14_pydevd_bundle_13pydevd_cython_set_additional_thread_info, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("add_additional_info", (void (*)(void))__pyx_f_14_pydevd_bundle_13pydevd_cython_add_additional_info, "PyObject *(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("remove_additional_info", (void (*)(void))__pyx_f_14_pydevd_bundle_13pydevd_cython_remove_additional_info, "PyObject *(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("any_thread_stepping", (void (*)(void))__pyx_f_14_pydevd_bundle_13pydevd_cython_any_thread_stepping, "int (int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo = &__pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo; + __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo.get_topmost_frame = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, PyObject *, int __pyx_skip_dispatch))__pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_get_topmost_frame; + __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo.update_stepping_info = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch))__pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_update_stepping_info; + __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo._get_related_thread = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch))__pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo__get_related_thread; + __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo._is_stepping = (int (*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch))__pyx_f_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo__is_stepping; + #if CYTHON_USE_TYPE_SPECS + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo)) __PYX_ERR(0, 30, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + #else + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo = &__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + #endif + #if PY_MAJOR_VERSION < 3 + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo->tp_print = 0; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo->tp_dictoffset && __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo->tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, __pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_MergeVtables(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyDBAdditionalThreadInfo, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj)) __PYX_ERR(0, 435, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) < 0) __PYX_ERR(0, 435, __pyx_L1_error) + #else + __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj = &__pyx_type_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) < 0) __PYX_ERR(0, 435, __pyx_L1_error) + #endif + #if PY_MAJOR_VERSION < 3 + __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj->tp_print = 0; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj->tp_dictoffset && __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj->tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TryExceptContainerObj, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) < 0) __PYX_ERR(0, 435, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj) < 0) __PYX_ERR(0, 435, __pyx_L1_error) + #endif + __pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBFrame = &__pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame; + __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame.get_func_name = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_get_func_name; + __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame._show_return_values = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__show_return_values; + __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame._remove_return_values = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__remove_return_values; + __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame._get_unfiltered_back_frame = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__get_unfiltered_back_frame; + __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame._is_same_frame = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame__is_same_frame; + __pyx_vtable_14_pydevd_bundle_13pydevd_cython_PyDBFrame.trace_dispatch = (PyObject *(*)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBFrame *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_trace_dispatch; + #if CYTHON_USE_TYPE_SPECS + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame)) __PYX_ERR(0, 455, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + #else + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame = &__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBFrame; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + #endif + #if PY_MAJOR_VERSION < 3 + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame->tp_print = 0; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame->tp_dictoffset && __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame->tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_MergeVtables(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyDBFrame, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper)) __PYX_ERR(0, 1688, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) < 0) __PYX_ERR(0, 1688, __pyx_L1_error) + #else + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper = &__pyx_type_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) < 0) __PYX_ERR(0, 1688, __pyx_L1_error) + #endif + #if PY_MAJOR_VERSION < 3 + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper->tp_print = 0; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper->tp_dictoffset && __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper->tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SafeCallWrapper, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) < 0) __PYX_ERR(0, 1688, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper) < 0) __PYX_ERR(0, 1688, __pyx_L1_error) + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions)) __PYX_ERR(0, 1854, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) < 0) __PYX_ERR(0, 1854, __pyx_L1_error) + #else + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions = &__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) < 0) __PYX_ERR(0, 1854, __pyx_L1_error) + #endif + #if PY_MAJOR_VERSION < 3 + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions->tp_print = 0; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions->tp_dictoffset && __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions->tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) < 0) __PYX_ERR(0, 1854, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions) < 0) __PYX_ERR(0, 1854, __pyx_L1_error) + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame)) __PYX_ERR(0, 1885, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1885, __pyx_L1_error) + #else + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame = &__pyx_type_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1885, __pyx_L1_error) + #endif + #if PY_MAJOR_VERSION < 3 + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame->tp_print = 0; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame->tp_dictoffset && __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame->tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TopLevelThreadTracerNoBackFrame, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1885, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame) < 0) __PYX_ERR(0, 1885, __pyx_L1_error) + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer_spec, NULL); if (unlikely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer)) __PYX_ERR(0, 1965, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer_spec, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1965, __pyx_L1_error) + #else + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer = &__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1965, __pyx_L1_error) + #endif + #if PY_MAJOR_VERSION < 3 + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer->tp_print = 0; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer->tp_dictoffset && __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer->tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + #endif + #if CYTHON_UPDATE_DESCRIPTOR_DOC + { + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1965, __pyx_L1_error) + if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { + __pyx_wrapperbase_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__.doc = __pyx_doc_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__; + } + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ThreadTracer, (PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1965, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) __PYX_ERR(0, 1965, __pyx_L1_error) + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(void) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject), + #else + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + + +#if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_pydevd_cython(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_pydevd_cython}, + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "pydevd_cython", + 0, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #elif CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstate), /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif +#endif + +#ifndef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void +#endif +#else +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyObject * +#endif +#endif + + +#if PY_MAJOR_VERSION < 3 +__Pyx_PyMODINIT_FUNC initpydevd_cython(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initpydevd_cython(void) +#else +__Pyx_PyMODINIT_FUNC PyInit_pydevd_cython(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_pydevd_cython(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) +#else +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +#endif +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { +#if CYTHON_COMPILING_IN_LIMITED_API + result = PyModule_AddObject(module, to_name, value); +#else + result = PyDict_SetItemString(moddict, to_name, value); +#endif + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + moddict = module; +#else + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; +#endif + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_pydevd_cython(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'pydevd_cython' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("pydevd_cython", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #elif CYTHON_USE_MODULE_STATE + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + { + int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "pydevd_cython" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #endif + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_pydevd_cython(void)", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + PyEval_InitThreads(); + #endif + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main__pydevd_bundle__pydevd_cython) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "_pydevd_bundle.pydevd_cython")) { + if (unlikely((PyDict_SetItemString(modules, "_pydevd_bundle.pydevd_cython", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + if (unlikely((__Pyx_modinit_function_export_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + + /* "_pydevd_bundle/pydevd_cython.pyx":8 + * # DO NOT edit manually! + * from _pydevd_bundle.pydevd_constants import ( + * STATE_RUN, # <<<<<<<<<<<<<< + * PYTHON_SUSPEND, + * SUPPORT_GEVENT, + */ + __pyx_t_2 = PyList_New(8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_STATE_RUN); + __Pyx_GIVEREF(__pyx_n_s_STATE_RUN); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_STATE_RUN)) __PYX_ERR(0, 8, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_PYTHON_SUSPEND); + __Pyx_GIVEREF(__pyx_n_s_PYTHON_SUSPEND); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_PYTHON_SUSPEND)) __PYX_ERR(0, 8, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_SUPPORT_GEVENT); + __Pyx_GIVEREF(__pyx_n_s_SUPPORT_GEVENT); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_SUPPORT_GEVENT)) __PYX_ERR(0, 8, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_ForkSafeLock); + __Pyx_GIVEREF(__pyx_n_s_ForkSafeLock); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_ForkSafeLock)) __PYX_ERR(0, 8, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_current_frames); + __Pyx_GIVEREF(__pyx_n_s_current_frames); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_current_frames)) __PYX_ERR(0, 8, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_STATE_SUSPEND); + __Pyx_GIVEREF(__pyx_n_s_STATE_SUSPEND); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_STATE_SUSPEND)) __PYX_ERR(0, 8, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_get_global_debugger); + __Pyx_GIVEREF(__pyx_n_s_get_global_debugger); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_get_global_debugger)) __PYX_ERR(0, 8, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_get_thread_id); + __Pyx_GIVEREF(__pyx_n_s_get_thread_id); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_s_get_thread_id)) __PYX_ERR(0, 8, __pyx_L1_error); + + /* "_pydevd_bundle/pydevd_cython.pyx":7 + * # DO NOT edit manually! + * # DO NOT edit manually! + * from _pydevd_bundle.pydevd_constants import ( # <<<<<<<<<<<<<< + * STATE_RUN, + * PYTHON_SUSPEND, + */ + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_STATE_RUN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATE_RUN, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PYTHON_SUSPEND); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYTHON_SUSPEND, __pyx_t_2) < 0) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_SUPPORT_GEVENT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SUPPORT_GEVENT, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ForkSafeLock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ForkSafeLock, __pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_current_frames); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_current_frames, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_STATE_SUSPEND); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATE_SUSPEND, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_get_global_debugger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_global_debugger, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_get_thread_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_thread_id, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":17 + * get_thread_id, + * ) + * from _pydev_bundle import pydev_log # <<<<<<<<<<<<<< + * from _pydev_bundle._pydev_saved_modules import threading + * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive + */ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_pydev_log); + __Pyx_GIVEREF(__pyx_n_s_pydev_log); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_pydev_log)) __PYX_ERR(0, 17, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydev_bundle, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydev_log, __pyx_t_3) < 0) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":18 + * ) + * from _pydev_bundle import pydev_log + * from _pydev_bundle._pydev_saved_modules import threading # <<<<<<<<<<<<<< + * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive + * import weakref + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_threading); + __Pyx_GIVEREF(__pyx_n_s_threading); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_threading)) __PYX_ERR(0, 18, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydev_bundle__pydev_saved_modul, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":19 + * from _pydev_bundle import pydev_log + * from _pydev_bundle._pydev_saved_modules import threading + * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive # <<<<<<<<<<<<<< + * import weakref + * + */ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_is_thread_alive); + __Pyx_GIVEREF(__pyx_n_s_is_thread_alive); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_is_thread_alive)) __PYX_ERR(0, 19, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydev_bundle_pydev_is_thread_al, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_thread_alive, __pyx_t_3) < 0) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":20 + * from _pydev_bundle._pydev_saved_modules import threading + * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive + * import weakref # <<<<<<<<<<<<<< + * + * version = 11 + */ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_weakref, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_weakref, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":22 + * import weakref + * + * version = 11 # <<<<<<<<<<<<<< + * + * + */ + if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_int_11) < 0) __PYX_ERR(0, 22, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":130 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef object _get_related_thread(self): # <<<<<<<<<<<<<< + * # ELSE + * # def _get_related_thread(self): + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_3_get_related_thread, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBAdditionalThreadInfo__get_re, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, __pyx_n_s_get_related_thread, __pyx_t_2) < 0) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); + + /* "_pydevd_bundle/pydevd_cython.pyx":159 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef bint _is_stepping(self): # <<<<<<<<<<<<<< + * # ELSE + * # def _is_stepping(self): + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_5_is_stepping, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBAdditionalThreadInfo__is_ste, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, __pyx_n_s_is_stepping, __pyx_t_2) < 0) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); + + /* "_pydevd_bundle/pydevd_cython.pyx":177 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef get_topmost_frame(self, thread): # <<<<<<<<<<<<<< + * # ELSE + * # def get_topmost_frame(self, thread): + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_7get_topmost_frame, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBAdditionalThreadInfo_get_top, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, __pyx_n_s_get_topmost_frame, __pyx_t_2) < 0) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); + + /* "_pydevd_bundle/pydevd_cython.pyx":206 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef update_stepping_info(self): # <<<<<<<<<<<<<< + * # ELSE + * # def update_stepping_info(self): + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_9update_stepping_info, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBAdditionalThreadInfo_update, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, __pyx_n_s_update_stepping_info, __pyx_t_2) < 0) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBAdditionalThreadInfo___reduc, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PyDBAdditionalThreadInfo, (type(self), 0xd33aa14, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(self, __pyx_state) + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_24PyDBAdditionalThreadInfo_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBAdditionalThreadInfo___setst, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); + + /* "_pydevd_bundle/pydevd_cython.pyx":217 + * + * + * _set_additional_thread_info_lock = ForkSafeLock() # <<<<<<<<<<<<<< + * _next_additional_info = [PyDBAdditionalThreadInfo()] + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ForkSafeLock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_additional_thread_info_lock, __pyx_t_3) < 0) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":218 + * + * _set_additional_thread_info_lock = ForkSafeLock() + * _next_additional_info = [PyDBAdditionalThreadInfo()] # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error); + __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_next_additional_info, __pyx_t_2) < 0) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":223 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef set_additional_thread_info(thread): # <<<<<<<<<<<<<< + * # ELSE + * # def set_additional_thread_info(thread): + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_1set_additional_thread_info, 0, __pyx_n_s_set_additional_thread_info, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_additional_thread_info, __pyx_t_2) < 0) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":265 + * # fmt: on + * + * _all_infos = set() # <<<<<<<<<<<<<< + * _infos_stepping = set() + * _update_infos_lock = ForkSafeLock() + */ + __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_v_14_pydevd_bundle_13pydevd_cython__all_infos); + __Pyx_DECREF_SET(__pyx_v_14_pydevd_bundle_13pydevd_cython__all_infos, ((PyObject*)__pyx_t_2)); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":266 + * + * _all_infos = set() + * _infos_stepping = set() # <<<<<<<<<<<<<< + * _update_infos_lock = ForkSafeLock() + * + */ + __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_v_14_pydevd_bundle_13pydevd_cython__infos_stepping); + __Pyx_DECREF_SET(__pyx_v_14_pydevd_bundle_13pydevd_cython__infos_stepping, ((PyObject*)__pyx_t_2)); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":267 + * _all_infos = set() + * _infos_stepping = set() + * _update_infos_lock = ForkSafeLock() # <<<<<<<<<<<<<< + * + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ForkSafeLock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XGOTREF(__pyx_v_14_pydevd_bundle_13pydevd_cython__update_infos_lock); + __Pyx_DECREF_SET(__pyx_v_14_pydevd_bundle_13pydevd_cython__update_infos_lock, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":305 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef add_additional_info(PyDBAdditionalThreadInfo info): # <<<<<<<<<<<<<< + * # ELSE + * # def add_additional_info(info): + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_3add_additional_info, 0, __pyx_n_s_add_additional_info, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_additional_info, __pyx_t_3) < 0) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":317 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef remove_additional_info(PyDBAdditionalThreadInfo info): # <<<<<<<<<<<<<< + * # ELSE + * # def remove_additional_info(info): + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_5remove_additional_info, 0, __pyx_n_s_remove_additional_info, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_additional_info, __pyx_t_3) < 0) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":329 + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef bint any_thread_stepping(): # <<<<<<<<<<<<<< + * # ELSE + * # def any_thread_stepping(): + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_7any_thread_stepping, 0, __pyx_n_s_any_thread_stepping, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_any_thread_stepping, __pyx_t_3) < 0) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":335 + * # fmt: on + * return bool(_infos_stepping) + * import linecache # <<<<<<<<<<<<<< + * import os.path + * import re + */ + __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_linecache, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_linecache, __pyx_t_3) < 0) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":336 + * return bool(_infos_stepping) + * import linecache + * import os.path # <<<<<<<<<<<<<< + * import re + * + */ + __pyx_t_3 = __Pyx_Import(__pyx_n_s_os_path, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_3) < 0) __PYX_ERR(0, 336, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":337 + * import linecache + * import os.path + * import re # <<<<<<<<<<<<<< + * + * from _pydev_bundle import pydev_log + */ + __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_re, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_3) < 0) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":339 + * import re + * + * from _pydev_bundle import pydev_log # <<<<<<<<<<<<<< + * from _pydevd_bundle import pydevd_dont_trace + * from _pydevd_bundle.pydevd_constants import ( + */ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_pydev_log); + __Pyx_GIVEREF(__pyx_n_s_pydev_log); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_pydev_log)) __PYX_ERR(0, 339, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydev_bundle, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydev_log, __pyx_t_3) < 0) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":340 + * + * from _pydev_bundle import pydev_log + * from _pydevd_bundle import pydevd_dont_trace # <<<<<<<<<<<<<< + * from _pydevd_bundle.pydevd_constants import ( + * RETURN_VALUES_DICT, + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_pydevd_dont_trace); + __Pyx_GIVEREF(__pyx_n_s_pydevd_dont_trace); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_pydevd_dont_trace)) __PYX_ERR(0, 340, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_bundle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydevd_dont_trace, __pyx_t_2) < 0) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":342 + * from _pydevd_bundle import pydevd_dont_trace + * from _pydevd_bundle.pydevd_constants import ( + * RETURN_VALUES_DICT, # <<<<<<<<<<<<<< + * NO_FTRACE, + * EXCEPTION_TYPE_HANDLED, + */ + __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_RETURN_VALUES_DICT); + __Pyx_GIVEREF(__pyx_n_s_RETURN_VALUES_DICT); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_RETURN_VALUES_DICT)) __PYX_ERR(0, 342, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_NO_FTRACE); + __Pyx_GIVEREF(__pyx_n_s_NO_FTRACE); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_NO_FTRACE)) __PYX_ERR(0, 342, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_EXCEPTION_TYPE_HANDLED); + __Pyx_GIVEREF(__pyx_n_s_EXCEPTION_TYPE_HANDLED); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_EXCEPTION_TYPE_HANDLED)) __PYX_ERR(0, 342, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED); + __Pyx_GIVEREF(__pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED)) __PYX_ERR(0, 342, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_PYDEVD_IPYTHON_CONTEXT); + __Pyx_GIVEREF(__pyx_n_s_PYDEVD_IPYTHON_CONTEXT); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT)) __PYX_ERR(0, 342, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_PYDEVD_USE_SYS_MONITORING); + __Pyx_GIVEREF(__pyx_n_s_PYDEVD_USE_SYS_MONITORING); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_PYDEVD_USE_SYS_MONITORING)) __PYX_ERR(0, 342, __pyx_L1_error); + + /* "_pydevd_bundle/pydevd_cython.pyx":341 + * from _pydev_bundle import pydev_log + * from _pydevd_bundle import pydevd_dont_trace + * from _pydevd_bundle.pydevd_constants import ( # <<<<<<<<<<<<<< + * RETURN_VALUES_DICT, + * NO_FTRACE, + */ + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RETURN_VALUES_DICT, __pyx_t_3) < 0) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_FTRACE, __pyx_t_3) < 0) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_EXCEPTION_TYPE_HANDLED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXCEPTION_TYPE_HANDLED, __pyx_t_3) < 0) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXCEPTION_TYPE_USER_UNHANDLED, __pyx_t_3) < 0) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYDEVD_IPYTHON_CONTEXT, __pyx_t_3) < 0) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_PYDEVD_USE_SYS_MONITORING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYDEVD_USE_SYS_MONITORING, __pyx_t_3) < 0) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":349 + * PYDEVD_USE_SYS_MONITORING, + * ) + * from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace # <<<<<<<<<<<<<< + * from _pydevd_bundle.pydevd_utils import get_clsname_for_code + * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame + */ + __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_add_exception_to_frame); + __Pyx_GIVEREF(__pyx_n_s_add_exception_to_frame); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_add_exception_to_frame)) __PYX_ERR(0, 349, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_just_raised); + __Pyx_GIVEREF(__pyx_n_s_just_raised); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_just_raised)) __PYX_ERR(0, 349, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_remove_exception_from_frame); + __Pyx_GIVEREF(__pyx_n_s_remove_exception_from_frame); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_remove_exception_from_frame)) __PYX_ERR(0, 349, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_ignore_exception_trace); + __Pyx_GIVEREF(__pyx_n_s_ignore_exception_trace); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_ignore_exception_trace)) __PYX_ERR(0, 349, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_frame_util, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_add_exception_to_frame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_exception_to_frame, __pyx_t_2) < 0) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_just_raised); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_just_raised, __pyx_t_2) < 0) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_remove_exception_from_frame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_exception_from_frame, __pyx_t_2) < 0) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ignore_exception_trace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ignore_exception_trace, __pyx_t_2) < 0) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":350 + * ) + * from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace + * from _pydevd_bundle.pydevd_utils import get_clsname_for_code # <<<<<<<<<<<<<< + * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame + * from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK + */ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_get_clsname_for_code); + __Pyx_GIVEREF(__pyx_n_s_get_clsname_for_code); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_get_clsname_for_code)) __PYX_ERR(0, 350, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_utils, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_clsname_for_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_clsname_for_code, __pyx_t_3) < 0) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":351 + * from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace + * from _pydevd_bundle.pydevd_utils import get_clsname_for_code + * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame # <<<<<<<<<<<<<< + * from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK + * import sys + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_get_abs_path_real_path_and_base); + __Pyx_GIVEREF(__pyx_n_s_get_abs_path_real_path_and_base); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_abs_path_real_path_and_base)) __PYX_ERR(0, 351, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_file_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_abs_path_real_path_and_base, __pyx_t_2) < 0) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":352 + * from _pydevd_bundle.pydevd_utils import get_clsname_for_code + * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame + * from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK # <<<<<<<<<<<<<< + * import sys + * + */ + __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_constant_to_str); + __Pyx_GIVEREF(__pyx_n_s_constant_to_str); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_constant_to_str)) __PYX_ERR(0, 352, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_CMD_SET_FUNCTION_BREAK); + __Pyx_GIVEREF(__pyx_n_s_CMD_SET_FUNCTION_BREAK); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_CMD_SET_FUNCTION_BREAK)) __PYX_ERR(0, 352, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_comm_const, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_constant_to_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_constant_to_str, __pyx_t_3) < 0) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_CMD_SET_FUNCTION_BREAK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_SET_FUNCTION_BREAK, __pyx_t_3) < 0) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":353 + * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame + * from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK + * import sys # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":355 + * import sys + * + * try: # <<<<<<<<<<<<<< + * from _pydevd_bundle.pydevd_bytecode_utils import get_smart_step_into_variant_from_frame_offset + * except ImportError: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":356 + * + * try: + * from _pydevd_bundle.pydevd_bytecode_utils import get_smart_step_into_variant_from_frame_offset # <<<<<<<<<<<<<< + * except ImportError: + * + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L2_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_get_smart_step_into_variant_from); + __Pyx_GIVEREF(__pyx_n_s_get_smart_step_into_variant_from); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_smart_step_into_variant_from)) __PYX_ERR(0, 356, __pyx_L2_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_bytecode_u, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L2_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_get_smart_step_into_variant_from); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L2_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_smart_step_into_variant_from, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L2_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":355 + * import sys + * + * try: # <<<<<<<<<<<<<< + * from _pydevd_bundle.pydevd_bytecode_utils import get_smart_step_into_variant_from_frame_offset + * except ImportError: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L7_try_end; + __pyx_L2_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":357 + * try: + * from _pydevd_bundle.pydevd_bytecode_utils import get_smart_step_into_variant_from_frame_offset + * except ImportError: # <<<<<<<<<<<<<< + * + * def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): + */ + __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); + if (__pyx_t_6) { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 357, __pyx_L4_except_error) + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_7); + + /* "_pydevd_bundle/pydevd_cython.pyx":359 + * except ImportError: + * + * def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9get_smart_step_into_variant_from_frame_offset, 0, __pyx_n_s_get_smart_step_into_variant_from, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 359, __pyx_L4_except_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_smart_step_into_variant_from, __pyx_t_8) < 0) __PYX_ERR(0, 359, __pyx_L4_except_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L3_exception_handled; + } + goto __pyx_L4_except_error; + + /* "_pydevd_bundle/pydevd_cython.pyx":355 + * import sys + * + * try: # <<<<<<<<<<<<<< + * from _pydevd_bundle.pydevd_bytecode_utils import get_smart_step_into_variant_from_frame_offset + * except ImportError: + */ + __pyx_L4_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_4, __pyx_t_5); + goto __pyx_L1_error; + __pyx_L3_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_4, __pyx_t_5); + __pyx_L7_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":379 + * # ENDIF + * + * basename = os.path.basename # <<<<<<<<<<<<<< + * + * IGNORE_EXCEPTION_TAG = re.compile("[^#]*#.*@IgnoreException") + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_os); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_basename); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_basename, __pyx_t_7) < 0) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":381 + * basename = os.path.basename + * + * IGNORE_EXCEPTION_TAG = re.compile("[^#]*#.*@IgnoreException") # <<<<<<<<<<<<<< + * DEBUG_START = ("pydevd.py", "run") + * DEBUG_START_PY3K = ("_pydev_execfile.py", "execfile") + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_re); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_IGNORE_EXCEPTION_TAG, __pyx_t_7) < 0) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":382 + * + * IGNORE_EXCEPTION_TAG = re.compile("[^#]*#.*@IgnoreException") + * DEBUG_START = ("pydevd.py", "run") # <<<<<<<<<<<<<< + * DEBUG_START_PY3K = ("_pydev_execfile.py", "execfile") + * TRACE_PROPERTY = "pydevd_traceproperty.py" + */ + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_START, __pyx_tuple__40) < 0) __PYX_ERR(0, 382, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":383 + * IGNORE_EXCEPTION_TAG = re.compile("[^#]*#.*@IgnoreException") + * DEBUG_START = ("pydevd.py", "run") + * DEBUG_START_PY3K = ("_pydev_execfile.py", "execfile") # <<<<<<<<<<<<<< + * TRACE_PROPERTY = "pydevd_traceproperty.py" + * + */ + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_START_PY3K, __pyx_tuple__41) < 0) __PYX_ERR(0, 383, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":384 + * DEBUG_START = ("pydevd.py", "run") + * DEBUG_START_PY3K = ("_pydev_execfile.py", "execfile") + * TRACE_PROPERTY = "pydevd_traceproperty.py" # <<<<<<<<<<<<<< + * + * import dis + */ + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACE_PROPERTY, __pyx_kp_s_pydevd_traceproperty_py) < 0) __PYX_ERR(0, 384, __pyx_L1_error) + + /* "_pydevd_bundle/pydevd_cython.pyx":386 + * TRACE_PROPERTY = "pydevd_traceproperty.py" + * + * import dis # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_dis, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dis, __pyx_t_7) < 0) __PYX_ERR(0, 386, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":388 + * import dis + * + * try: # <<<<<<<<<<<<<< + * StopAsyncIteration + * except NameError: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_1); + /*try:*/ { + + /* "_pydevd_bundle/pydevd_cython.pyx":389 + * + * try: + * StopAsyncIteration # <<<<<<<<<<<<<< + * except NameError: + * StopAsyncIteration = StopIteration + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_StopAsyncIteration); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 389, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":388 + * import dis + * + * try: # <<<<<<<<<<<<<< + * StopAsyncIteration + * except NameError: + */ + } + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L15_try_end; + __pyx_L10_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":390 + * try: + * StopAsyncIteration + * except NameError: # <<<<<<<<<<<<<< + * StopAsyncIteration = StopIteration + * + */ + __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError); + if (__pyx_t_6) { + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 390, __pyx_L12_except_error) + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + + /* "_pydevd_bundle/pydevd_cython.pyx":391 + * StopAsyncIteration + * except NameError: + * StopAsyncIteration = StopIteration # <<<<<<<<<<<<<< + * + * + */ + if (PyDict_SetItem(__pyx_d, __pyx_n_s_StopAsyncIteration, __pyx_builtin_StopIteration) < 0) __PYX_ERR(0, 391, __pyx_L12_except_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L11_exception_handled; + } + goto __pyx_L12_except_error; + + /* "_pydevd_bundle/pydevd_cython.pyx":388 + * import dis + * + * try: # <<<<<<<<<<<<<< + * StopAsyncIteration + * except NameError: + */ + __pyx_L12_except_error:; + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_1); + goto __pyx_L1_error; + __pyx_L11_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_1); + __pyx_L15_try_end:; + } + + /* "_pydevd_bundle/pydevd_cython.pyx":395 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): # <<<<<<<<<<<<<< + * # ELSE + * # def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_11is_unhandled_exception, 0, __pyx_n_s_is_unhandled_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_unhandled_exception, __pyx_t_3) < 0) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TryExceptContainerObj___reduce, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj); + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__TryExceptContainerObj, (type(self), 0xdbf5e44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__TryExceptContainerObj__set_state(self, __pyx_state) + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_22_TryExceptContainerObj_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TryExceptContainerObj___setstat, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython__TryExceptContainerObj); + + /* "_pydevd_bundle/pydevd_cython.pyx":490 + * # ENDIF + * + * def set_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< + * self._args[0].set_suspend(*args, **kwargs) + * + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_3set_suspend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_set_suspend, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_set_suspend, __pyx_t_3) < 0) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); + + /* "_pydevd_bundle/pydevd_cython.pyx":493 + * self._args[0].set_suspend(*args, **kwargs) + * + * def do_wait_suspend(self, *args, **kwargs): # <<<<<<<<<<<<<< + * self._args[0].do_wait_suspend(*args, **kwargs) + * + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_5do_wait_suspend, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_do_wait_suspend, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_do_wait_suspend, __pyx_t_3) < 0) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); + + /* "_pydevd_bundle/pydevd_cython.pyx":497 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def trace_exception(self, frame, str event, arg): # <<<<<<<<<<<<<< + * cdef bint should_stop; + * cdef tuple exc_info; + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_7trace_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_trace_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_trace_exception, __pyx_t_3) < 0) __PYX_ERR(0, 497, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); + + /* "_pydevd_bundle/pydevd_cython.pyx":526 + * return self.trace_exception + * + * def handle_user_exception(self, frame): # <<<<<<<<<<<<<< + * exc_info = self.exc_info + * if exc_info: + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9handle_user_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_handle_user_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_handle_user_exception, __pyx_t_3) < 0) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); + + /* "_pydevd_bundle/pydevd_cython.pyx":634 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * cpdef trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< + * cdef tuple abs_path_canonical_path_and_base; + * cdef bint is_exception_event; + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11trace_dispatch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame_trace_dispatch, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_trace_dispatch, __pyx_t_3) < 0) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame___reduce_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PyDBFrame, (type(self), 0x3a8c26e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PyDBFrame__set_state(self, __pyx_state) + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyDBFrame___setstate_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBFrame); + + /* "_pydevd_bundle/pydevd_cython.pyx":1377 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info, is_unwind=False): # <<<<<<<<<<<<<< + * cdef bint should_stop; + * cdef bint was_just_raised; + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_13should_stop_on_exception, 0, __pyx_n_s_should_stop_on_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__59); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_should_stop_on_exception, __pyx_t_3) < 0) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1505 + * # Same thing in the main debugger but only considering the file contents, while the one in the main debugger + * # considers the user input (so, the actual result must be a join of both). + * filename_to_lines_where_exceptions_are_ignored: dict = {} # <<<<<<<<<<<<<< + * filename_to_stat_info: dict = {} + * + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_filename_to_lines_where_exceptio, __pyx_t_3) < 0) __PYX_ERR(0, 1505, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1506 + * # considers the user input (so, the actual result must be a join of both). + * filename_to_lines_where_exceptions_are_ignored: dict = {} + * filename_to_stat_info: dict = {} # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_filename_to_stat_info, __pyx_t_3) < 0) __PYX_ERR(0, 1506, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1510 + * + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + * def handle_exception(py_db, thread, frame, arg, str exception_type): # <<<<<<<<<<<<<< + * cdef bint stopped; + * cdef tuple abs_real_path_and_base; + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15handle_exception, 0, __pyx_n_s_handle_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_handle_exception, __pyx_t_3) < 0) __PYX_ERR(0, 1510, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1630 + * + * return stopped + * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive # <<<<<<<<<<<<<< + * from _pydev_bundle.pydev_log import exception as pydev_log_exception + * from _pydev_bundle._pydev_saved_modules import threading + */ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_is_thread_alive); + __Pyx_GIVEREF(__pyx_n_s_is_thread_alive); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_is_thread_alive)) __PYX_ERR(0, 1630, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydev_bundle_pydev_is_thread_al, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_thread_alive, __pyx_t_3) < 0) __PYX_ERR(0, 1630, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1631 + * return stopped + * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive + * from _pydev_bundle.pydev_log import exception as pydev_log_exception # <<<<<<<<<<<<<< + * from _pydev_bundle._pydev_saved_modules import threading + * from _pydevd_bundle.pydevd_constants import ( + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_exception); + __Pyx_GIVEREF(__pyx_n_s_exception); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_exception)) __PYX_ERR(0, 1631, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydev_bundle_pydev_log, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydev_log_exception, __pyx_t_2) < 0) __PYX_ERR(0, 1631, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1632 + * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive + * from _pydev_bundle.pydev_log import exception as pydev_log_exception + * from _pydev_bundle._pydev_saved_modules import threading # <<<<<<<<<<<<<< + * from _pydevd_bundle.pydevd_constants import ( + * get_current_thread_id, + */ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_threading); + __Pyx_GIVEREF(__pyx_n_s_threading); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_threading)) __PYX_ERR(0, 1632, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydev_bundle__pydev_saved_modul, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_3) < 0) __PYX_ERR(0, 1632, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1634 + * from _pydev_bundle._pydev_saved_modules import threading + * from _pydevd_bundle.pydevd_constants import ( + * get_current_thread_id, # <<<<<<<<<<<<<< + * NO_FTRACE, + * USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, + */ + __pyx_t_2 = PyList_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_get_current_thread_id); + __Pyx_GIVEREF(__pyx_n_s_get_current_thread_id); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_current_thread_id)) __PYX_ERR(0, 1634, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_NO_FTRACE); + __Pyx_GIVEREF(__pyx_n_s_NO_FTRACE); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_NO_FTRACE)) __PYX_ERR(0, 1634, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); + __Pyx_GIVEREF(__pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA)) __PYX_ERR(0, 1634, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_ForkSafeLock); + __Pyx_GIVEREF(__pyx_n_s_ForkSafeLock); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_ForkSafeLock)) __PYX_ERR(0, 1634, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_PYDEVD_USE_SYS_MONITORING); + __Pyx_GIVEREF(__pyx_n_s_PYDEVD_USE_SYS_MONITORING); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_PYDEVD_USE_SYS_MONITORING)) __PYX_ERR(0, 1634, __pyx_L1_error); + + /* "_pydevd_bundle/pydevd_cython.pyx":1633 + * from _pydev_bundle.pydev_log import exception as pydev_log_exception + * from _pydev_bundle._pydev_saved_modules import threading + * from _pydevd_bundle.pydevd_constants import ( # <<<<<<<<<<<<<< + * get_current_thread_id, + * NO_FTRACE, + */ + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_get_current_thread_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_current_thread_id, __pyx_t_2) < 0) __PYX_ERR(0, 1634, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_NO_FTRACE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_FTRACE, __pyx_t_2) < 0) __PYX_ERR(0, 1635, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA, __pyx_t_2) < 0) __PYX_ERR(0, 1636, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ForkSafeLock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ForkSafeLock, __pyx_t_2) < 0) __PYX_ERR(0, 1637, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PYDEVD_USE_SYS_MONITORING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYDEVD_USE_SYS_MONITORING, __pyx_t_2) < 0) __PYX_ERR(0, 1638, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1640 + * PYDEVD_USE_SYS_MONITORING, + * ) + * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER # <<<<<<<<<<<<<< + * + * # fmt: off + */ + __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_get_abs_path_real_path_and_base); + __Pyx_GIVEREF(__pyx_n_s_get_abs_path_real_path_and_base); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_get_abs_path_real_path_and_base)) __PYX_ERR(0, 1640, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); + __Pyx_GIVEREF(__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER)) __PYX_ERR(0, 1640, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_file_utils, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_abs_path_real_path_and_base, __pyx_t_3) < 0) __PYX_ERR(0, 1640, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER, __pyx_t_3) < 0) __PYX_ERR(0, 1640, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1667 + * # - Breakpoints are changed + * # It can be used when running regularly (without step over/step in/step return) + * global_cache_skips = {} # <<<<<<<<<<<<<< + * global_cache_frame_skips = {} + * + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_cache_skips, __pyx_t_2) < 0) __PYX_ERR(0, 1667, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1668 + * # It can be used when running regularly (without step over/step in/step return) + * global_cache_skips = {} + * global_cache_frame_skips = {} # <<<<<<<<<<<<<< + * + * _global_notify_skipped_step_in = False + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_cache_frame_skips, __pyx_t_2) < 0) __PYX_ERR(0, 1668, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1670 + * global_cache_frame_skips = {} + * + * _global_notify_skipped_step_in = False # <<<<<<<<<<<<<< + * _global_notify_skipped_step_in_lock = ForkSafeLock() + * + */ + __Pyx_INCREF(Py_False); + __Pyx_XGOTREF(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in); + __Pyx_DECREF_SET(__pyx_v_14_pydevd_bundle_13pydevd_cython__global_notify_skipped_step_in, ((PyObject*)Py_False)); + __Pyx_GIVEREF(Py_False); + + /* "_pydevd_bundle/pydevd_cython.pyx":1671 + * + * _global_notify_skipped_step_in = False + * _global_notify_skipped_step_in_lock = ForkSafeLock() # <<<<<<<<<<<<<< + * + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ForkSafeLock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_notify_skipped_step_in_l, __pyx_t_3) < 0) __PYX_ERR(0, 1671, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1674 + * + * + * def notify_skipped_step_in_because_of_filters(py_db, frame): # <<<<<<<<<<<<<< + * global _global_notify_skipped_step_in + * + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_17notify_skipped_step_in_because_of_filters, 0, __pyx_n_s_notify_skipped_step_in_because_o, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_notify_skipped_step_in_because_o, __pyx_t_3) < 0) __PYX_ERR(0, 1674, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1700 + * Py_XDECREF (method_obj) + * return SafeCallWrapper(ret) if ret is not None else None + * def get_method_object(self): # <<<<<<<<<<<<<< + * return self.method_object + * # ELSE + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_5get_method_object, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SafeCallWrapper_get_method_objec, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper, __pyx_n_s_get_method_object, __pyx_t_3) < 0) __PYX_ERR(0, 1700, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper); + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SafeCallWrapper___reduce_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper); + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SafeCallWrapper, (type(self), 0xa14289b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SafeCallWrapper__set_state(self, __pyx_state) + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_15SafeCallWrapper_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SafeCallWrapper___setstate_cytho, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_SafeCallWrapper); + + /* "_pydevd_bundle/pydevd_cython.pyx":1707 + * + * + * def fix_top_level_trace_and_get_trace_func(py_db, frame): # <<<<<<<<<<<<<< + * # fmt: off + * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_19fix_top_level_trace_and_get_trace_func, 0, __pyx_n_s_fix_top_level_trace_and_get_trac, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fix_top_level_trace_and_get_trac, __pyx_t_3) < 0) __PYX_ERR(0, 1707, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1843 + * + * + * def trace_dispatch(py_db, frame, event, arg): # <<<<<<<<<<<<<< + * thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) + * if thread_trace_func is None: + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_21trace_dispatch, 0, __pyx_n_s_trace_dispatch, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_trace_dispatch, __pyx_t_3) < 0) __PYX_ERR(0, 1843, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1866 + * # fmt: on + * + * def trace_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< + * # Note that we ignore the frame as this tracing method should only be put in topmost frames already. + * # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_3trace_unhandled_exceptions, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_2, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, __pyx_n_s_trace_unhandled_exceptions, __pyx_t_3) < 0) __PYX_ERR(0, 1866, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions); + + /* "_pydevd_bundle/pydevd_cython.pyx":1880 + * return self.trace_unhandled_exceptions + * + * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< + * return self.trace_unhandled_exceptions + * + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_5get_trace_dispatch_func, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_3, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, __pyx_n_s_get_trace_dispatch_func, __pyx_t_3) < 0) __PYX_ERR(0, 1880, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions); + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_4, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions); + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, (type(self), 0x121e1fb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(self, __pyx_state) + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_43TopLevelThreadTracerOnlyUnhandledExceptions_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerOnlyUnhandle_5, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerOnlyUnhandledExceptions); + + /* "_pydevd_bundle/pydevd_cython.pyx":1924 + * # fmt: on + * + * def trace_dispatch_and_unhandled_exceptions(self, frame, event, arg): # <<<<<<<<<<<<<< + * # DEBUG = 'code_to_debug' in frame.f_code.co_filename + * # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_3trace_dispatch_and_unhandled_exceptions, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerNoBackFrame_2, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, __pyx_n_s_trace_dispatch_and_unhandled_exc, __pyx_t_3) < 0) __PYX_ERR(0, 1924, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame); + + /* "_pydevd_bundle/pydevd_cython.pyx":1959 + * return ret + * + * def get_trace_dispatch_func(self): # <<<<<<<<<<<<<< + * return self.trace_dispatch_and_unhandled_exceptions + * + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_5get_trace_dispatch_func, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerNoBackFrame_3, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, __pyx_n_s_get_trace_dispatch_func, __pyx_t_3) < 0) __PYX_ERR(0, 1959, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame); + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerNoBackFrame_4, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame); + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TopLevelThreadTracerNoBackFrame, (type(self), 0x3f5f7e9, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TopLevelThreadTracerNoBackFrame__set_state(self, __pyx_state) + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31TopLevelThreadTracerNoBackFrame_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TopLevelThreadTracerNoBackFrame_5, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_TopLevelThreadTracerNoBackFrame); + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ThreadTracer___reduce_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer); + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ThreadTracer, (type(self), 0x121e1fb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ThreadTracer__set_state(self, __pyx_state) + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ThreadTracer___setstate_cython, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyType_Modified(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer); + + /* "_pydevd_bundle/pydevd_cython.pyx":2152 + * + * + * if USE_CUSTOM_SYS_CURRENT_FRAMES_MAP: # <<<<<<<<<<<<<< + * # This is far from ideal, as we'll leak frames (we'll always have the last created frame, not really + * # the last topmost frame saved -- this should be Ok for our usage, but it may leak frames and things + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_USE_CUSTOM_SYS_CURRENT_FRAMES_MA); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2152, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_9) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2160 + * # + * # See: https://github.com/IronLanguages/main/issues/1630 + * from _pydevd_bundle.pydevd_constants import constructed_tid_to_last_frame # <<<<<<<<<<<<<< + * + * _original_call = ThreadTracer.__call__ + */ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_constructed_tid_to_last_frame); + __Pyx_GIVEREF(__pyx_n_s_constructed_tid_to_last_frame); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_constructed_tid_to_last_frame)) __PYX_ERR(0, 2160, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_constructed_tid_to_last_frame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_constructed_tid_to_last_frame, __pyx_t_3) < 0) __PYX_ERR(0, 2160, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2162 + * from _pydevd_bundle.pydevd_constants import constructed_tid_to_last_frame + * + * _original_call = ThreadTracer.__call__ # <<<<<<<<<<<<<< + * + * def __call__(self, frame, event, arg): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_n_s_call_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_original_call, __pyx_t_2) < 0) __PYX_ERR(0, 2162, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2164 + * _original_call = ThreadTracer.__call__ + * + * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< + * constructed_tid_to_last_frame[self._args[1].ident] = frame + * return _original_call(self, frame, event, arg) + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_23__call__, 0, __pyx_n_s_call_2, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_call_2, __pyx_t_2) < 0) __PYX_ERR(0, 2164, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2168 + * return _original_call(self, frame, event, arg) + * + * ThreadTracer.__call__ = __call__ # <<<<<<<<<<<<<< + * + * if PYDEVD_USE_SYS_MONITORING: + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_call_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_n_s_call_2, __pyx_t_2) < 0) __PYX_ERR(0, 2168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2152 + * + * + * if USE_CUSTOM_SYS_CURRENT_FRAMES_MAP: # <<<<<<<<<<<<<< + * # This is far from ideal, as we'll leak frames (we'll always have the last created frame, not really + * # the last topmost frame saved -- this should be Ok for our usage, but it may leak frames and things + */ + } + + /* "_pydevd_bundle/pydevd_cython.pyx":2170 + * ThreadTracer.__call__ = __call__ + * + * if PYDEVD_USE_SYS_MONITORING: # <<<<<<<<<<<<<< + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PYDEVD_USE_SYS_MONITORING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2170, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_9) { + + /* "_pydevd_bundle/pydevd_cython.pyx":2172 + * if PYDEVD_USE_SYS_MONITORING: + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): # <<<<<<<<<<<<<< + * raise RuntimeError("Not used in sys.monitoring mode.") + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_25fix_top_level_trace_and_get_trace_func, 0, __pyx_n_s_fix_top_level_trace_and_get_trac, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fix_top_level_trace_and_get_trac, __pyx_t_2) < 0) __PYX_ERR(0, 2172, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":2170 + * ThreadTracer.__call__ = __call__ + * + * if PYDEVD_USE_SYS_MONITORING: # <<<<<<<<<<<<<< + * + * def fix_top_level_trace_and_get_trace_func(*args, **kwargs): + */ + } + + /* "(tree fragment)":1 + * def __pyx_unpickle_PyDBAdditionalThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_27__pyx_unpickle_PyDBAdditionalThreadInfo, 0, __pyx_n_s_pyx_unpickle_PyDBAdditionalThr, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PyDBAdditionalThr, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":11 + * __pyx_unpickle_PyDBAdditionalThreadInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_PyDBAdditionalThreadInfo__set_state(PyDBAdditionalThreadInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.conditional_breakpoint_exception = __pyx_state[0]; __pyx_result.is_in_wait_loop = __pyx_state[1]; __pyx_result.is_tracing = __pyx_state[2]; __pyx_result.pydev_call_from_jinja2 = __pyx_state[3]; __pyx_result.pydev_call_inside_jinja2 = __pyx_state[4]; __pyx_result.pydev_django_resolve_frame = __pyx_state[5]; __pyx_result.pydev_func_name = __pyx_state[6]; __pyx_result.pydev_message = __pyx_state[7]; __pyx_result.pydev_next_line = __pyx_state[8]; __pyx_result.pydev_notify_kill = __pyx_state[9]; __pyx_result.pydev_original_step_cmd = __pyx_state[10]; __pyx_result.pydev_smart_child_offset = __pyx_state[11]; __pyx_result.pydev_smart_parent_offset = __pyx_state[12]; __pyx_result.pydev_smart_step_into_variants = __pyx_state[13]; __pyx_result.pydev_smart_step_stop = __pyx_state[14]; __pyx_result.pydev_state = __pyx_state[15]; __pyx_result.pydev_step_cmd = __pyx_state[16]; __pyx_result.pydev_step_stop = __pyx_state[17]; __pyx_result.pydev_use_scoped_step_frame = __pyx_state[18]; __pyx_result.step_in_initial_location = __pyx_state[19]; __pyx_result.suspend_type = __pyx_state[20]; __pyx_result.suspended_at_unhandled = __pyx_state[21]; __pyx_result.target_id_to_smart_step_into_variant = __pyx_state[22]; __pyx_result.thread_tracer = __pyx_state[23]; __pyx_result.top_level_thread_tracer_no_back_frames = __pyx_state[24]; __pyx_result.top_level_thread_tracer_unhandled = __pyx_state[25]; __pyx_result.trace_suspend_type = __pyx_state[26]; __pyx_result.weak_thread = __pyx_state[27] + * if len(__pyx_state) > 28 and hasattr(__pyx_result, '__dict__'): + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_29__pyx_unpickle__TryExceptContainerObj, 0, __pyx_n_s_pyx_unpickle__TryExceptContain, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__TryExceptContain, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_PyDBFrame(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_31__pyx_unpickle_PyDBFrame, 0, __pyx_n_s_pyx_unpickle_PyDBFrame, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PyDBFrame, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":11 + * __pyx_unpickle_PyDBFrame__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_PyDBFrame__set_state(PyDBFrame __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._args = __pyx_state[0]; __pyx_result.exc_info = __pyx_state[1]; __pyx_result.should_skip = __pyx_state[2] + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_33__pyx_unpickle_SafeCallWrapper, 0, __pyx_n_s_pyx_unpickle_SafeCallWrapper, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SafeCallWrapper, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_35__pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions, 0, __pyx_n_s_pyx_unpickle_TopLevelThreadTra, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TopLevelThreadTra, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":11 + * __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TopLevelThreadTracerOnlyUnhandledExceptions__set_state(TopLevelThreadTracerOnlyUnhandledExceptions __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._args = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_37__pyx_unpickle_TopLevelThreadTracerNoBackFrame, 0, __pyx_n_s_pyx_unpickle_TopLevelThreadTra_2, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TopLevelThreadTra_2, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_ThreadTracer(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_39__pyx_unpickle_ThreadTracer, 0, __pyx_n_s_pyx_unpickle_ThreadTracer, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ThreadTracer, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":1 + * from __future__ import print_function # <<<<<<<<<<<<<< + * + * # Important: Autogenerated file. + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + if (__pyx_m) { + if (__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init _pydevd_bundle.pydevd_cython", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init _pydevd_bundle.pydevd_cython"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* TupleAndListFromArray */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + Py_INCREF(__pyx_empty_tuple); + return __pyx_empty_tuple; + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API + return PyObject_RichCompareBool(s1, s2, equals); +#else +#if PY_MAJOR_VERSION < 3 + PyObject* owned_ref = NULL; +#endif + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); +#if PY_MAJOR_VERSION < 3 + if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { + owned_ref = PyUnicode_FromObject(s2); + if (unlikely(!owned_ref)) + return -1; + s2 = owned_ref; + s2_is_unicode = 1; + } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { + owned_ref = PyUnicode_FromObject(s1); + if (unlikely(!owned_ref)) + return -1; + s1 = owned_ref; + s1_is_unicode = 1; + } else if (((!s2_is_unicode) & (!s1_is_unicode))) { + return __Pyx_PyBytes_Equals(s1, s2, equals); + } +#endif + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length; + int kind; + void *data1, *data2; + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + length = __Pyx_PyUnicode_GET_LENGTH(s1); + if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + #if CYTHON_PEP393_ENABLED + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + #else + hash1 = ((PyUnicodeObject*)s1)->hash; + hash2 = ((PyUnicodeObject*)s2)->hash; + #endif + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ); +return_ne: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames); + for (i = 0; i < n; i++) + { + if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); + PyObject *dict; + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#elif CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + #if PY_MAJOR_VERSION < 3 + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { + return NULL; + } + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + #endif + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + #if PY_MAJOR_VERSION < 3 + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + #endif + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + #if PY_MAJOR_VERSION < 3 + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + #endif + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + #if PY_VERSION_HEX >= 0x030700A1 + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if PY_VERSION_HEX < 0x03090000 + vectorcallfunc f = _PyVectorcall_Function(func); + #else + vectorcallfunc f = PyVectorcall_Function(func); + #endif + if (f) { + return f(func, args, (size_t)nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, (size_t)nargs, NULL); + } + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* RaiseDoubleKeywords */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject *const *kwvalues, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); + while (1) { + Py_XDECREF(key); key = NULL; + Py_XDECREF(value); value = NULL; + if (kwds_is_tuple) { + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS + size = PyTuple_GET_SIZE(kwds); +#else + size = PyTuple_Size(kwds); + if (size < 0) goto bad; +#endif + if (pos >= size) break; +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); + if (!key) goto bad; +#elif CYTHON_ASSUME_SAFE_MACROS + key = PyTuple_GET_ITEM(kwds, pos); +#else + key = PyTuple_GetItem(kwds, pos); + if (!key) goto bad; +#endif + value = kwvalues[pos]; + pos++; + } + else + { + if (!PyDict_Next(kwds, &pos, &key, &value)) break; +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); +#endif + } + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(value); + Py_DECREF(key); +#endif + key = NULL; + value = NULL; + continue; + } +#if !CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); +#endif + Py_INCREF(value); + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; +#if CYTHON_AVOID_BORROWED_REFS + value = NULL; +#endif + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = ( + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key) + ); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; +#if CYTHON_AVOID_BORROWED_REFS + value = NULL; +#endif + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + Py_XDECREF(key); + Py_XDECREF(value); + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + #if PY_MAJOR_VERSION < 3 + PyErr_Format(PyExc_TypeError, + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + Py_XDECREF(key); + Py_XDECREF(value); + return -1; +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyString_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* PyObjectCallNoArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* RaiseException */ +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + __Pyx_PyThreadState_declare + CYTHON_UNUSED_VAR(cause); + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { + #if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); + #elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C00A6 + local_value = tstate->current_exception; + tstate->current_exception = 0; + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6 + if (unlikely(tstate->current_exception)) +#elif CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); +#if PY_MAJOR_VERSION < 3 + if (unlikely(PyInstance_Check(obj))) + return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name); +#endif + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (mm && mm->mp_subscript) { + PyObject *r, *key = PyInt_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_setattr)) + return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); +#endif + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* SliceObject */ +static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, int wraparound) { + __Pyx_TypeName obj_type_name; +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp; +#if PY_MAJOR_VERSION < 3 + PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; + if (likely(ms && ms->sq_ass_slice)) { + if (!has_cstart) { + if (_py_start && (*_py_start != Py_None)) { + cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); + if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstart = 0; + } + if (!has_cstop) { + if (_py_stop && (*_py_stop != Py_None)) { + cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); + if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstop = PY_SSIZE_T_MAX; + } + if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { + Py_ssize_t l = ms->sq_length(obj); + if (likely(l >= 0)) { + if (cstop < 0) { + cstop += l; + if (cstop < 0) cstop = 0; + } + if (cstart < 0) { + cstart += l; + if (cstart < 0) cstart = 0; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + goto bad; + PyErr_Clear(); + } + } + return ms->sq_ass_slice(obj, cstart, cstop, value); + } +#else + CYTHON_UNUSED_VAR(wraparound); +#endif + mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_ass_subscript)) +#else + CYTHON_UNUSED_VAR(wraparound); +#endif + { + int result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyInt_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyInt_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS + result = mp->mp_ass_subscript(obj, py_slice, value); +#else + result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object does not support slice %.10s", + obj_type_name, value ? "assignment" : "deletion"); + __Pyx_DECREF_TypeName(obj_type_name); +bad: + return -1; +} + +/* PyObjectCall2Args */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#elif PY_MAJOR_VERSION >= 3 + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetName(tp); + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); +#else + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", + type_name, PyString_AS_STRING(name)); +#endif + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod1 */ +#if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2 + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_GetMethod; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* append */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + } else { + PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + +/* RaiseUnboundLocalError */ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* set_iter */ +static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set, + Py_ssize_t* p_orig_length, int* p_source_is_set) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 + is_set = is_set || likely(PySet_CheckExact(iterable) || PyFrozenSet_CheckExact(iterable)); + *p_source_is_set = is_set; + if (likely(is_set)) { + *p_orig_length = PySet_Size(iterable); + Py_INCREF(iterable); + return iterable; + } +#else + CYTHON_UNUSED_VAR(is_set); + *p_source_is_set = 0; +#endif + *p_orig_length = 0; + return PyObject_GetIter(iterable); +} +static CYTHON_INLINE int __Pyx_set_iter_next( + PyObject* iter_obj, Py_ssize_t orig_length, + Py_ssize_t* ppos, PyObject **value, + int source_is_set) { + if (!CYTHON_COMPILING_IN_CPYTHON || PY_VERSION_HEX >= 0x030d0000 || unlikely(!source_is_set)) { + *value = PyIter_Next(iter_obj); + if (unlikely(!*value)) { + return __Pyx_IterFinish(); + } + CYTHON_UNUSED_VAR(orig_length); + CYTHON_UNUSED_VAR(ppos); + return 1; + } +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 + if (unlikely(PySet_GET_SIZE(iter_obj) != orig_length)) { + PyErr_SetString( + PyExc_RuntimeError, + "set changed size during iteration"); + return -1; + } + { + Py_hash_t hash; + int ret = _PySet_NextEntry(iter_obj, ppos, value, &hash); + assert (ret != -1); + if (likely(ret)) { + Py_INCREF(*value); + return 1; + } + } +#endif + return 0; +} + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + type_name = __Pyx_PyType_GetName(type); + obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name); + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* pyfrozenset_new */ +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { + if (it) { + PyObject* result; +#if CYTHON_COMPILING_IN_PYPY + PyObject* args; + args = PyTuple_Pack(1, it); + if (unlikely(!args)) + return NULL; + result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL); + Py_DECREF(args); + return result; +#else + if (PyFrozenSet_CheckExact(it)) { + Py_INCREF(it); + return it; + } + result = PyFrozenSet_New(it); + if (unlikely(!result)) + return NULL; + if ((PY_VERSION_HEX >= 0x031000A1) || likely(PySet_GET_SIZE(result))) + return result; + Py_DECREF(result); +#endif + } +#if CYTHON_USE_TYPE_SLOTS + return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL); +#else + return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL); +#endif +} + +/* py_set_discard_unhashable */ +static int __Pyx_PySet_DiscardUnhashable(PyObject *set, PyObject *key) { + PyObject *tmpkey; + int rv; + if (likely(!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))) + return -1; + PyErr_Clear(); + tmpkey = __Pyx_PyFrozenSet_New(key); + if (tmpkey == NULL) + return -1; + rv = PySet_Discard(set, tmpkey); + Py_DECREF(tmpkey); + return rv; +} + +/* py_set_discard */ +static CYTHON_INLINE int __Pyx_PySet_Discard(PyObject *set, PyObject *key) { + int found = PySet_Discard(set, key); + if (unlikely(found < 0)) { + found = __Pyx_PySet_DiscardUnhashable(set, key); + } + return found; +} + +/* PySetContains */ +static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) { + int result = -1; + if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) { + PyObject *tmpkey; + PyErr_Clear(); + tmpkey = __Pyx_PyFrozenSet_New(key); + if (tmpkey != NULL) { + result = PySet_Contains(set, tmpkey); + Py_DECREF(tmpkey); + } + } + return result; +} +static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) { + int result = PySet_Contains(set, key); + if (unlikely(result < 0)) { + result = __Pyx_PySet_ContainsUnhashable(set, key); + } + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* RaiseNoneIterError */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* PyIntBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long a = PyInt_AS_LONG(op1); + + return PyInt_FromLong(a & b); + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; +#endif + if ((intval & PyLong_MASK) == intval) { + long last_digit = (long) __Pyx_PyLong_Digits(op1)[0]; + long result = intval & (likely(__Pyx_PyLong_IsPos(op1)) ? last_digit : (PyLong_MASK - last_digit + 1)); + return PyLong_FromLong(result); + } + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op1); + } + if (likely(__Pyx_PyLong_IsCompact(op1))) { + a = __Pyx_PyLong_CompactValue(op1); + } else { + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_and(op1, op2); + } + } + x = a & b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla & llb; + return PyLong_FromLongLong(llx); +#endif + + + } + #endif + return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2); +} +#endif + +/* UnpackUnboundCMethod */ +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), + METH_VARARGS | METH_KEYWORDS, + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + target->method = method; +#if CYTHON_COMPILING_IN_CPYTHON + #if PY_MAJOR_VERSION >= 3 + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + #else + if (likely(!__Pyx_CyOrPyCFunction_Check(method))) + #endif + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + target->method = unbound_method; + } + } + return 0; +} + +/* CallUnboundCMethod1 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { + if (likely(cfunc->func)) { + int flag = cfunc->flag; + if (flag == METH_O) { + return (*(cfunc->func))(self, arg); + } else if ((PY_VERSION_HEX >= 0x030600B1) && flag == METH_FASTCALL) { + #if PY_VERSION_HEX >= 0x030700A0 + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); + #else + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); + #endif + } else if ((PY_VERSION_HEX >= 0x030700A0) && flag == (METH_FASTCALL | METH_KEYWORDS)) { + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); + } + } + return __Pyx__CallUnboundCMethod1(cfunc, self, arg); +} +#endif +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ + PyObject *args, *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + if (cfunc->flag & METH_KEYWORDS) + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); + else + result = (*cfunc->func)(self, args); + } else { + args = PyTuple_New(2); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 1, arg); + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + } +#else + args = PyTuple_Pack(2, self, arg); + if (unlikely(!args)) goto bad; + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); +#endif +bad: + Py_XDECREF(args); + return result; +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + if (likely(cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + #if PY_VERSION_HEX >= 0x030700A0 + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2); + #else + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); + #endif + } + #if PY_VERSION_HEX >= 0x030700A0 + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); + #endif + } + return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + PyObject *args, *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + args = PyTuple_New(2); + if (unlikely(!args)) goto bad; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); + else + result = (*cfunc->func)(self, args); + } else { + args = PyTuple_New(3); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 1, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 2, arg2); + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + } +#else + args = PyTuple_Pack(3, self, arg1, arg2); + if (unlikely(!args)) goto bad; + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); +#endif +bad: + Py_XDECREF(args); + return result; +} + +/* dict_getitem_default */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { + PyObject* value; +#if PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (unlikely(PyErr_Occurred())) + return NULL; + value = default_value; + } + Py_INCREF(value); + if ((1)); +#else + if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { + value = PyDict_GetItem(d, key); + if (unlikely(!value)) { + value = default_value; + } + Py_INCREF(value); + } +#endif + else { + if (default_value == Py_None) + value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key); + else + value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value); + } + return value; +} + +/* PyObjectCallMethod0 */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +} + +/* UnpackTupleError */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else if (PyTuple_GET_SIZE(t) < index) { + __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); + } else { + __Pyx_RaiseTooManyValuesError(index); + } +} + +/* UnpackTuple2 */ +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_COMPILING_IN_PYPY + value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_COMPILING_IN_PYPY +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = __Pyx_PyObject_GetIterNextFunc(iter); + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +#if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 +#include +#endif +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#elif PY_MAJOR_VERSION >= 3 + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_COMPILING_IN_PYPY + if (source_is_dict) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyTuple_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyList_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* DictGetItem */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (!PyErr_Occurred()) { + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return NULL; + } + Py_INCREF(value); + return value; +} +#endif + +/* SliceObject */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, int wraparound) { + __Pyx_TypeName obj_type_name; +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp; +#if PY_MAJOR_VERSION < 3 + PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; + if (likely(ms && ms->sq_slice)) { + if (!has_cstart) { + if (_py_start && (*_py_start != Py_None)) { + cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); + if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstart = 0; + } + if (!has_cstop) { + if (_py_stop && (*_py_stop != Py_None)) { + cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); + if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstop = PY_SSIZE_T_MAX; + } + if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { + Py_ssize_t l = ms->sq_length(obj); + if (likely(l >= 0)) { + if (cstop < 0) { + cstop += l; + if (cstop < 0) cstop = 0; + } + if (cstart < 0) { + cstart += l; + if (cstart < 0) cstart = 0; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + goto bad; + PyErr_Clear(); + } + } + return ms->sq_slice(obj, cstart, cstop); + } +#else + CYTHON_UNUSED_VAR(wraparound); +#endif + mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#else + CYTHON_UNUSED_VAR(wraparound); +#endif + { + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyInt_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyInt_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); +bad: + return NULL; +} + +/* GetAttr */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS +#if PY_MAJOR_VERSION >= 3 + if (likely(PyUnicode_Check(n))) +#else + if (likely(PyString_Check(n))) +#endif + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/* HasAttr */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!__Pyx_PyBaseString_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_GetAttr(o, n); + if (!r) { + PyErr_Clear(); + return 0; + } else { + Py_DECREF(r); + return 1; + } +} + +/* PyIntBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long x; + long a = PyInt_AS_LONG(op1); + + x = (long)((unsigned long)a + (unsigned long)b); + if (likely((x^a) >= 0 || (x^b) >= 0)) + return PyInt_FromLong(x); + return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; +#endif + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op2); + } + if (likely(__Pyx_PyLong_IsCompact(op1))) { + a = __Pyx_PyLong_CompactValue(op1); + } else { + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + } + x = a + b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla + llb; + return PyLong_FromLongLong(llx); +#endif + + + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; +#if CYTHON_COMPILING_IN_LIMITED_API + double a = __pyx_PyFloat_AsDouble(op1); +#else + double a = PyFloat_AS_DOUBLE(op1); +#endif + double result; + + PyFPE_START_PROTECT("add", return NULL) + result = ((double)a) + (double)b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); + } + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#endif + +/* SliceTupleAndList */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { + Py_ssize_t start = *_start, stop = *_stop, length = *_length; + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + else if (stop > length) + stop = length; + *_length = stop - start; + *_start = start; + *_stop = stop; +} +static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice( + PyObject* src, Py_ssize_t start, Py_ssize_t stop) { + Py_ssize_t length = PyList_GET_SIZE(src); + __Pyx_crop_slice(&start, &stop, &length); + if (length <= 0) { + return PyList_New(0); + } + return __Pyx_PyList_FromArray(((PyListObject*)src)->ob_item + start, length); +} +static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice( + PyObject* src, Py_ssize_t start, Py_ssize_t stop) { + Py_ssize_t length = PyTuple_GET_SIZE(src); + __Pyx_crop_slice(&start, &stop, &length); + return __Pyx_PyTuple_FromArray(((PyTupleObject*)src)->ob_item + start, length); +} +#endif + +/* PyIntCompare */ +static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(inplace); + if (op1 == op2) { + return 1; + } + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long a = PyInt_AS_LONG(op1); + return (a == b); + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + if (intval == 0) { + return (__Pyx_PyLong_IsZero(op1) == 1); + } else if (intval < 0) { + if (__Pyx_PyLong_IsNonNeg(op1)) + return 0; + intval = -intval; + } else { + if (__Pyx_PyLong_IsNeg(op1)) + return 0; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + return (unequal == 0); + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; +#if CYTHON_COMPILING_IN_LIMITED_API + double a = __pyx_PyFloat_AsDouble(op1); +#else + double a = PyFloat_AS_DOUBLE(op1); +#endif + return ((double)a == (double)b); + } + return __Pyx_PyObject_IsTrueAndDecref( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + +/* ObjectGetItem */ +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { + PyObject *runerr = NULL; + Py_ssize_t key_value; + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index)); + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, + "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); + __Pyx_DECREF_TypeName(index_type_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { + __Pyx_TypeName obj_type_name; + if (likely(PyType_Check(obj))) { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem); + if (!meth) { + PyErr_Clear(); + } else { + PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); + Py_DECREF(meth); + return result; + } + } + obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { + PyTypeObject *tp = Py_TYPE(obj); + PyMappingMethods *mm = tp->tp_as_mapping; + PySequenceMethods *sm = tp->tp_as_sequence; + if (likely(mm && mm->mp_subscript)) { + return mm->mp_subscript(obj, key); + } + if (likely(sm && sm->sq_item)) { + return __Pyx_PyObject_GetIndex(obj, key); + } + return __Pyx_PyObject_GetItem_Slow(obj, key); +} +#endif + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *empty_list = 0; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (unlikely(!py_import)) + goto bad; + if (!from_list) { + empty_list = PyList_New(0); + if (unlikely(!empty_list)) + goto bad; + from_list = empty_list; + } + #endif + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if (strchr(__Pyx_MODULE_NAME, '.') != NULL) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (unlikely(!py_level)) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, __pyx_d, empty_dict, from_list, level); + #endif + } + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__10); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + +/* FixUpExtensionType */ +#if CYTHON_USE_TYPE_SPECS +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); +#else + const PyType_Slot *slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { + int changed = 0; +#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) + const +#endif + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { +#if PY_VERSION_HEX < 0x030900b1 + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); +#if PY_VERSION_HEX >= 0x030800b4 + type->tp_vectorcall_offset = memb->offset; +#else + type->tp_print = (printfunc) memb->offset; +#endif + changed = 1; + } +#endif +#else + if ((0)); +#endif +#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { + Py_DECREF(descr); + return -1; + } + Py_DECREF(descr); + changed = 1; + } +#endif + } + memb++; + } + if (changed) + PyType_Modified(type); + } +#endif + return 0; +} +#endif + +/* ValidateBasesTuple */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_MACROS + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (n < 0) return -1; +#endif + for (i = 1; i < n; i++) + { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + PyTypeObject *b; +#if PY_MAJOR_VERSION < 3 + if (PyClass_Check(b0)) + { + PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", + PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) + gc = PyImport_GetModule(__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* PyObject_GenericGetAttrNoDict */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { + __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp); + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, attr_name); +#else + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", + type_name, PyString_AS_STRING(attr_name)); +#endif + __Pyx_DECREF_TypeName(type_name); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { + PyObject *descr; + PyTypeObject *tp = Py_TYPE(obj); + if (unlikely(!PyString_Check(attr_name))) { + return PyObject_GenericGetAttr(obj, attr_name); + } + assert(!tp->tp_dictoffset); + descr = _PyType_Lookup(tp, attr_name); + if (unlikely(!descr)) { + return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); + } + Py_INCREF(descr); + #if PY_MAJOR_VERSION < 3 + if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) + #endif + { + descrgetfunc f = Py_TYPE(descr)->tp_descr_get; + if (unlikely(f)) { + PyObject *res = f(descr, obj, (PyObject *)tp); + Py_DECREF(descr); + return res; + } + } + return descr; +} +#endif + +/* PyObject_GenericGetAttr */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { + if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { + return PyObject_GenericGetAttr(obj, attr_name); + } + return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); +} +#endif + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +#if !CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i; + void** base_vtables; + __Pyx_TypeName tp_base_name; + __Pyx_TypeName base_name; + void* unknown = (void*)-1; + PyObject* bases = type->tp_bases; + int base_depth = 0; + { + PyTypeObject* base = type->tp_base; + while (base) { + base_depth += 1; + base = base->tp_base; + } + } + base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; + for (i = 1; i < PyTuple_GET_SIZE(bases); i++) { + void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i))); + if (base_vtable != NULL) { + int j; + PyTypeObject* base = type->tp_base; + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = base->tp_base; + } + } + } + PyErr_Clear(); + free(base_vtables); + return 0; +bad: + tp_base_name = __Pyx_PyType_GetName(type->tp_base); + base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i)); + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); + free(base_vtables); + return -1; +} +#endif + +/* SetupReduce */ +#if !CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); + if (likely(reduce_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); + if (likely(setstate_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} +#endif + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_0_11 +#define __PYX_HAVE_RT_ImportType_3_0_11 +static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !CYTHON_COMPILING_IN_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* ImportDottedModule */ +#if PY_MAJOR_VERSION >= 3 +static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { + PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; + if (unlikely(PyErr_Occurred())) { + PyErr_Clear(); + } + if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) { + partial_name = name; + } else { + slice = PySequence_GetSlice(parts_tuple, 0, count); + if (unlikely(!slice)) + goto bad; + sep = PyUnicode_FromStringAndSize(".", 1); + if (unlikely(!sep)) + goto bad; + partial_name = PyUnicode_Join(sep, slice); + } + PyErr_Format( +#if PY_MAJOR_VERSION < 3 + PyExc_ImportError, + "No module named '%s'", PyString_AS_STRING(partial_name)); +#else +#if PY_VERSION_HEX >= 0x030600B1 + PyExc_ModuleNotFoundError, +#else + PyExc_ImportError, +#endif + "No module named '%U'", partial_name); +#endif +bad: + Py_XDECREF(sep); + Py_XDECREF(slice); + Py_XDECREF(partial_name); + return NULL; +} +#endif +#if PY_MAJOR_VERSION >= 3 +static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { + PyObject *imported_module; +#if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + return NULL; + imported_module = __Pyx_PyDict_GetItemStr(modules, name); + Py_XINCREF(imported_module); +#else + imported_module = PyImport_GetModule(name); +#endif + return imported_module; +} +#endif +#if PY_MAJOR_VERSION >= 3 +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { + Py_ssize_t i, nparts; + nparts = PyTuple_GET_SIZE(parts_tuple); + for (i=1; i < nparts && module; i++) { + PyObject *part, *submodule; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + part = PyTuple_GET_ITEM(parts_tuple, i); +#else + part = PySequence_ITEM(parts_tuple, i); +#endif + submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(part); +#endif + Py_DECREF(module); + module = submodule; + } + if (unlikely(!module)) { + return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); + } + return module; +} +#endif +static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { +#if PY_MAJOR_VERSION < 3 + PyObject *module, *from_list, *star = __pyx_n_s__19; + CYTHON_UNUSED_VAR(parts_tuple); + from_list = PyList_New(1); + if (unlikely(!from_list)) + return NULL; + Py_INCREF(star); + PyList_SET_ITEM(from_list, 0, star); + module = __Pyx_Import(name, from_list, 0); + Py_DECREF(from_list); + return module; +#else + PyObject *imported_module; + PyObject *module = __Pyx_Import(name, NULL, 0); + if (!parts_tuple || unlikely(!module)) + return module; + imported_module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(imported_module)) { + Py_DECREF(module); + return imported_module; + } + PyErr_Clear(); + return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); +#endif +} +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1 + PyObject *module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(module)) { + PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec); + if (likely(spec)) { + PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing); + if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { + Py_DECREF(spec); + spec = NULL; + } + Py_XDECREF(unsafe); + } + if (likely(!spec)) { + PyErr_Clear(); + return module; + } + Py_DECREF(spec); + Py_DECREF(module); + } else if (PyErr_Occurred()) { + PyErr_Clear(); + } +#endif + return __Pyx__ImportDottedModule(name, parts_tuple); +} + +/* FetchSharedCythonModule */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType */ +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t basicsize, + Py_ssize_t expected_basicsize) { + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +#if !CYTHON_USE_TYPE_SPECS +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { + PyObject* abi_module; + const char* object_name; + PyTypeObject *cached_type = NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) return NULL; + object_name = strrchr(type->tp_name, '.'); + object_name = object_name ? object_name+1 : type->tp_name; + cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); + if (cached_type) { + if (__Pyx_VerifyCachedType( + (PyObject *)cached_type, + object_name, + cached_type->tp_basicsize, + type->tp_basicsize) < 0) { + goto bad; + } + goto done; + } + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + if (PyType_Ready(type) < 0) goto bad; + if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) + goto bad; + Py_INCREF(type); + cached_type = type; +done: + Py_DECREF(abi_module); + return cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} +#else +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module, *cached_type = NULL; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) return NULL; + cached_type = PyObject_GetAttrString(abi_module, object_name); + if (cached_type) { + Py_ssize_t basicsize; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; +#else + basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; +#endif + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + basicsize, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + CYTHON_UNUSED_VAR(module); + cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; +done: + Py_DECREF(abi_module); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} +#endif + +/* PyVectorcallFastCallDict */ +#if CYTHON_METH_FASTCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i, pos; + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (PyDict_Next(kw, &pos, &key, &value)) { + keys_are_strings &= Py_TYPE(key)->tp_flags; + Py_INCREF(key); + Py_INCREF(value); + PyTuple_SET_ITEM(kwnames, i, key); + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) { + return vc(func, args, nargs, NULL); + } + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) +{ + CYTHON_UNUSED_VAR(closure); + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { +#if PY_MAJOR_VERSION >= 3 + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); +#else + op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); +#endif + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#elif PY_MAJOR_VERSION >= 3 + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#else + op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(op->func_name, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_qualname); + return op->func_qualname; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(op->func_dict, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = op->defaults_tuple; + CYTHON_UNUSED_VAR(context); + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = op->defaults_kwdict; + CYTHON_UNUSED_VAR(context); + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = op->func_annotations; + CYTHON_UNUSED_VAR(context); + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + int is_coroutine; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; +#if PY_VERSION_HEX >= 0x03050000 + if (is_coroutine) { + PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(op->func_is_coroutine)) { + return __Pyx_NewRef(op->func_is_coroutine); + } +ignore: + PyErr_Clear(); + } +#endif + op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); + return __Pyx_NewRef(op->func_is_coroutine); +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if CYTHON_USE_TYPE_SPECS + {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#if CYTHON_METH_FASTCALL +#if CYTHON_BACKPORT_VECTORCALL + {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else +#if !CYTHON_COMPILING_IN_LIMITED_API + {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#endif +#endif +#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API + {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + CYTHON_UNUSED_VAR(args); +#if PY_MAJOR_VERSION >= 3 + Py_INCREF(m->func_qualname); + return m->func_qualname; +#else + return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name); +#endif +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults_pyobjects = 0; + op->defaults_size = 0; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_XDECREF(pydefaults[i]); + PyObject_Free(m->defaults); + m->defaults = NULL; + } + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif + Py_VISIT(m->func_dict); + Py_VISIT(m->func_name); + Py_VISIT(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + Py_VISIT(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_VISIT(pydefaults[i]); + } + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromFormat("", + op->func_qualname, (void *)op); +#else + return PyString_FromFormat("", + PyString_AsString(op->func_qualname), (void *)op); +#endif +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyObject *py_name = NULL; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_MACROS + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); +#if CYTHON_COMPILING_IN_LIMITED_API + py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); + if (!py_name) return NULL; + PyErr_Format(PyExc_TypeError, + "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, size); + Py_DECREF(py_name); +#else + PyErr_Format(PyExc_TypeError, + "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); +#endif + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_MACROS + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } +#if CYTHON_COMPILING_IN_LIMITED_API + py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); + if (!py_name) return NULL; + PyErr_Format(PyExc_TypeError, + "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, size); + Py_DECREF(py_name); +#else + PyErr_Format(PyExc_TypeError, + "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); +#endif + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } +#if CYTHON_COMPILING_IN_LIMITED_API + py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); + if (!py_name) return NULL; + PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments", + py_name); + Py_DECREF(py_name); +#else + PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", + f->m_ml->ml_name); +#endif + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_MACROS + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(!argc) < 0) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); +#if PY_MAJOR_VERSION > 2 + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); +#else + PyErr_SetString(PyExc_TypeError, + "unbound method needs an argument"); +#endif + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + PyErr_Format(PyExc_TypeError, "%.200s() needs an argument", + ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) { + PyErr_Format(PyExc_TypeError, + "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: + self = ((PyCFunctionObject*)cyfunc)->m_self; + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + PyErr_Format(PyExc_TypeError, + "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + def->ml_name, nargs); + return NULL; + } + return def->ml_meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: + self = ((PyCFunctionObject*)cyfunc)->m_self; + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + PyErr_Format(PyExc_TypeError, + "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + def->ml_name, nargs); + return NULL; + } + return def->ml_meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: + self = ((PyCFunctionObject*)cyfunc)->m_self; + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: + self = ((PyCFunctionObject*)cyfunc)->m_self; + break; + default: + return NULL; + } + return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames); +} +#endif +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +#else +static PyTypeObject __pyx_CyFunctionType_type = { + PyVarObject_HEAD_INIT(0, 0) + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, + (destructor) __Pyx_CyFunction_dealloc, +#if !CYTHON_METH_FASTCALL + 0, +#elif CYTHON_BACKPORT_VECTORCALL + (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), +#else + offsetof(PyCFunctionObject, vectorcall), +#endif + 0, + 0, +#if PY_MAJOR_VERSION < 3 + 0, +#else + 0, +#endif + (reprfunc) __Pyx_CyFunction_repr, + 0, + 0, + 0, + 0, + __Pyx_CyFunction_CallAsMethod, + 0, + 0, + 0, + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + 0, + (traverseproc) __Pyx_CyFunction_traverse, + (inquiry) __Pyx_CyFunction_clear, + 0, +#if PY_VERSION_HEX < 0x030500A0 + offsetof(__pyx_CyFunctionObject, func_weakreflist), +#else + offsetof(PyCFunctionObject, m_weakreflist), +#endif + 0, + 0, + __pyx_CyFunction_methods, + __pyx_CyFunction_members, + __pyx_CyFunction_getsets, + 0, + 0, + __Pyx_PyMethod_New, + 0, + offsetof(__pyx_CyFunctionObject, func_dict), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +#if PY_VERSION_HEX >= 0x030400a1 + 0, +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, +#endif +#if __PYX_NEED_TP_PRINT_SLOT + 0, +#endif +#if PY_VERSION_HEX >= 0x030C0000 + 0, +#endif +#if PY_VERSION_HEX >= 0x030d00A4 + 0, +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, +#endif +}; +#endif +static int __pyx_CyFunction_init(PyObject *module) { +#if CYTHON_USE_TYPE_SPECS + __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); +#else + CYTHON_UNUSED_VAR(module); + __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); +#endif + if (unlikely(__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_Malloc(size); + if (unlikely(!m->defaults)) + return PyErr_NoMemory(); + memset(m->defaults, 0, size); + m->defaults_pyobjects = pyobjects; + m->defaults_size = size; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback */ +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +#if !CYTHON_COMPILING_IN_LIMITED_API +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} +#endif + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result; + result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + #if __PYX_LIMITED_VERSION_HEX < 0x030780000 + { + PyObject *compiled = NULL, *result = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL; + compiled = Py_CompileString( + "out = type(code)(\n" + " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" + " code.co_flags, code.co_code, code.co_consts, code.co_names,\n" + " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" + " code.co_lnotab)\n", "", Py_file_input); + if (!compiled) return NULL; + result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict); + Py_DECREF(compiled); + if (!result) PyErr_Print(); + Py_DECREF(result); + result = PyDict_GetItemString(scratch_dict, "out"); + if (result) Py_INCREF(result); + return result; + } + #else + return NULL; + #endif +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + #if PY_MAJOR_VERSION < 3 + PyObject *py_srcfile = NULL; + py_srcfile = PyString_FromString(filename); + if (!py_srcfile) goto bad; + #endif + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + if (!py_funcname) goto bad; + #endif + } + #if PY_MAJOR_VERSION < 3 + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + #else + py_code = PyCode_NewEmpty(filename, funcname, py_line); + #endif + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_srcfile); + #endif + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL; + PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + arg_tuple = PyTuple_Pack(2, py_bytes, order_str); + if (!arg_tuple) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } + result = PyObject_Call(from_bytes, arg_tuple, kwds); + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if ((sizeof(int) < sizeof(long))) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } +#endif + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if ((sizeof(long) < sizeof(long))) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } +#endif + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL; + PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + arg_tuple = PyTuple_Pack(2, py_bytes, order_str); + if (!arg_tuple) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } + result = PyObject_Call(from_bytes, arg_tuple, kwds); + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API +static __Pyx_TypeName +__Pyx_PyType_GetName(PyTypeObject* tp) +{ + PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_n_s_name); + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { + PyErr_Clear(); + Py_XDECREF(name); + name = __Pyx_NewRef(__pyx_kp_s__4); + } + return name; +} +#endif + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; i= 0x030B00A4 + return Py_Version & ~0xFFUL; +#else + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + return version; +#endif +} +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* InitStrings */ +#if PY_MAJOR_VERSION >= 3 +static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) { + if (t.is_unicode | t.is_str) { + if (t.intern) { + *str = PyUnicode_InternFromString(t.s); + } else if (t.encoding) { + *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL); + } else { + *str = PyUnicode_FromStringAndSize(t.s, t.n - 1); + } + } else { + *str = PyBytes_FromStringAndSize(t.s, t.n - 1); + } + if (!*str) + return -1; + if (PyObject_Hash(*str) == -1) + return -1; + return 0; +} +#endif +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { + while (t->p) { + #if PY_MAJOR_VERSION >= 3 + __Pyx_InitString(*t, t->p); + #else + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + #endif + ++t; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")", + type_name, type_name, result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); +#if PY_MAJOR_VERSION < 3 + } else if (likely(PyInt_CheckExact(o))) { + return PyInt_AS_LONG(o); +#endif + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyInt_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cpython-312-x86_64-linux-gnu.so b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000..0bcb946 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cpython-312-x86_64-linux-gnu.so differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pxd b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pxd new file mode 100644 index 0000000..5b0e116 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pxd @@ -0,0 +1,42 @@ +cdef class PyDBAdditionalThreadInfo: + cdef public int pydev_state + cdef public object pydev_step_stop # Actually, it's a frame or None + cdef public int pydev_original_step_cmd + cdef public int pydev_step_cmd + cdef public bint pydev_notify_kill + cdef public object pydev_smart_step_stop # Actually, it's a frame or None + cdef public bint pydev_django_resolve_frame + cdef public object pydev_call_from_jinja2 + cdef public object pydev_call_inside_jinja2 + cdef public int is_tracing + cdef public tuple conditional_breakpoint_exception + cdef public str pydev_message + cdef public int suspend_type + cdef public int pydev_next_line + cdef public str pydev_func_name + cdef public bint suspended_at_unhandled + cdef public str trace_suspend_type + cdef public object top_level_thread_tracer_no_back_frames + cdef public object top_level_thread_tracer_unhandled + cdef public object thread_tracer + cdef public object step_in_initial_location + cdef public int pydev_smart_parent_offset + cdef public int pydev_smart_child_offset + cdef public tuple pydev_smart_step_into_variants + cdef public dict target_id_to_smart_step_into_variant + cdef public bint pydev_use_scoped_step_frame + cdef public object weak_thread + cdef public bint is_in_wait_loop + + cpdef get_topmost_frame(self, thread) + cpdef update_stepping_info(self) + + # Private APIs + cpdef object _get_related_thread(self) + cpdef bint _is_stepping(self) + +cpdef set_additional_thread_info(thread) + +cpdef add_additional_info(PyDBAdditionalThreadInfo info) +cpdef remove_additional_info(PyDBAdditionalThreadInfo info) +cpdef bint any_thread_stepping() \ No newline at end of file diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx new file mode 100644 index 0000000..ad4ac25 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx @@ -0,0 +1,2173 @@ +from __future__ import print_function + +# Important: Autogenerated file. + +# DO NOT edit manually! +# DO NOT edit manually! +from _pydevd_bundle.pydevd_constants import ( + STATE_RUN, + PYTHON_SUSPEND, + SUPPORT_GEVENT, + ForkSafeLock, + _current_frames, + STATE_SUSPEND, + get_global_debugger, + get_thread_id, +) +from _pydev_bundle import pydev_log +from _pydev_bundle._pydev_saved_modules import threading +from _pydev_bundle.pydev_is_thread_alive import is_thread_alive +import weakref + +version = 11 + + +# ======================================================================================================================= +# PyDBAdditionalThreadInfo +# ======================================================================================================================= +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cdef class PyDBAdditionalThreadInfo: +# ELSE +# class PyDBAdditionalThreadInfo(object): +# ENDIF +# fmt: on + + # Note: the params in cython are declared in pydevd_cython.pxd. + # fmt: off + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + # ELSE +# __slots__ = [ +# "pydev_state", +# "pydev_step_stop", +# "pydev_original_step_cmd", +# "pydev_step_cmd", +# "pydev_notify_kill", +# "pydev_django_resolve_frame", +# "pydev_call_from_jinja2", +# "pydev_call_inside_jinja2", +# "is_tracing", +# "conditional_breakpoint_exception", +# "pydev_message", +# "suspend_type", +# "pydev_next_line", +# "pydev_func_name", +# "suspended_at_unhandled", +# "trace_suspend_type", +# "top_level_thread_tracer_no_back_frames", +# "top_level_thread_tracer_unhandled", +# "thread_tracer", +# "step_in_initial_location", +# # Used for CMD_SMART_STEP_INTO (to know which smart step into variant to use) +# "pydev_smart_parent_offset", +# "pydev_smart_child_offset", +# # Used for CMD_SMART_STEP_INTO (list[_pydevd_bundle.pydevd_bytecode_utils.Variant]) +# # Filled when the cmd_get_smart_step_into_variants is requested (so, this is a copy +# # of the last request for a given thread and pydev_smart_parent_offset/pydev_smart_child_offset relies on it). +# "pydev_smart_step_into_variants", +# "target_id_to_smart_step_into_variant", +# "pydev_use_scoped_step_frame", +# "weak_thread", +# "is_in_wait_loop", +# ] + # ENDIF + # fmt: on + + def __init__(self): + self.pydev_state = STATE_RUN # STATE_RUN or STATE_SUSPEND + self.pydev_step_stop = None + + # Note: we have `pydev_original_step_cmd` and `pydev_step_cmd` because the original is to + # say the action that started it and the other is to say what's the current tracing behavior + # (because it's possible that we start with a step over but may have to switch to a + # different step strategy -- for instance, if a step over is done and we return the current + # method the strategy is changed to a step in). + + self.pydev_original_step_cmd = -1 # Something as CMD_STEP_INTO, CMD_STEP_OVER, etc. + self.pydev_step_cmd = -1 # Something as CMD_STEP_INTO, CMD_STEP_OVER, etc. + + self.pydev_notify_kill = False + self.pydev_django_resolve_frame = False + self.pydev_call_from_jinja2 = None + self.pydev_call_inside_jinja2 = None + self.is_tracing = 0 + self.conditional_breakpoint_exception = None + self.pydev_message = "" + self.suspend_type = PYTHON_SUSPEND + self.pydev_next_line = -1 + self.pydev_func_name = ".invalid." # Must match the type in cython + self.suspended_at_unhandled = False + self.trace_suspend_type = "trace" # 'trace' or 'frame_eval' + self.top_level_thread_tracer_no_back_frames = [] + self.top_level_thread_tracer_unhandled = None + self.thread_tracer = None + self.step_in_initial_location = None + self.pydev_smart_parent_offset = -1 + self.pydev_smart_child_offset = -1 + self.pydev_smart_step_into_variants = () + self.target_id_to_smart_step_into_variant = {} + + # Flag to indicate ipython use-case where each line will be executed as a call/line/return + # in a new new frame but in practice we want to consider each new frame as if it was all + # part of the same frame. + # + # In practice this means that a step over shouldn't revert to a step in and we need some + # special logic to know when we should stop in a step over as we need to consider 2 + # different frames as being equal if they're logically the continuation of a frame + # being executed by ipython line by line. + # + # See: https://github.com/microsoft/debugpy/issues/869#issuecomment-1132141003 + self.pydev_use_scoped_step_frame = False + self.weak_thread = None + + # Purpose: detect if this thread is suspended and actually in the wait loop + # at this time (otherwise it may be suspended but still didn't reach a point. + # to pause). + self.is_in_wait_loop = False + + # fmt: off + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cpdef object _get_related_thread(self): + # ELSE +# def _get_related_thread(self): + # ENDIF + # fmt: on + if self.pydev_notify_kill: # Already killed + return None + + if self.weak_thread is None: + return None + + thread = self.weak_thread() + if thread is None: + return False + + if not is_thread_alive(thread): + return None + + if thread._ident is None: # Can this happen? + pydev_log.critical("thread._ident is None in _get_related_thread!") + return None + + if threading._active.get(thread._ident) is not thread: + return None + + return thread + + # fmt: off + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cpdef bint _is_stepping(self): + # ELSE +# def _is_stepping(self): + # ENDIF + # fmt: on + if self.pydev_state == STATE_RUN and self.pydev_step_cmd != -1: + # This means actually stepping in a step operation. + return True + + if self.pydev_state == STATE_SUSPEND and self.is_in_wait_loop: + # This means stepping because it was suspended but still didn't + # reach a suspension point. + return True + + return False + + # fmt: off + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cpdef get_topmost_frame(self, thread): + # ELSE +# def get_topmost_frame(self, thread): + # ENDIF + # fmt: on + """ + Gets the topmost frame for the given thread. Note that it may be None + and callers should remove the reference to the frame as soon as possible + to avoid disturbing user code. + """ + # sys._current_frames(): dictionary with thread id -> topmost frame + current_frames = _current_frames() + topmost_frame = current_frames.get(thread._ident) + if topmost_frame is None: + # Note: this is expected for dummy threads (so, getting the topmost frame should be + # treated as optional). + pydev_log.info( + "Unable to get topmost frame for thread: %s, thread.ident: %s, id(thread): %s\nCurrent frames: %s.\n" "GEVENT_SUPPORT: %s", + thread, + thread.ident, + id(thread), + current_frames, + SUPPORT_GEVENT, + ) + + return topmost_frame + + # fmt: off + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cpdef update_stepping_info(self): + # ELSE +# def update_stepping_info(self): + # ENDIF + # fmt: on + _update_stepping_info(self) + + def __str__(self): + return "State:%s Stop:%s Cmd: %s Kill:%s" % (self.pydev_state, self.pydev_step_stop, self.pydev_step_cmd, self.pydev_notify_kill) + + +_set_additional_thread_info_lock = ForkSafeLock() +_next_additional_info = [PyDBAdditionalThreadInfo()] + + +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cpdef set_additional_thread_info(thread): +# ELSE +# def set_additional_thread_info(thread): +# ENDIF +# fmt: on + try: + additional_info = thread.additional_info + if additional_info is None: + raise AttributeError() + except: + with _set_additional_thread_info_lock: + # If it's not there, set it within a lock to avoid any racing + # conditions. + try: + additional_info = thread.additional_info + except: + additional_info = None + + if additional_info is None: + # Note: don't call PyDBAdditionalThreadInfo constructor at this + # point as it can piggy-back into the debugger which could + # get here again, rather get the global ref which was pre-created + # and add a new entry only after we set thread.additional_info. + additional_info = _next_additional_info[0] + thread.additional_info = additional_info + additional_info.weak_thread = weakref.ref(thread) + add_additional_info(additional_info) + del _next_additional_info[:] + _next_additional_info.append(PyDBAdditionalThreadInfo()) + + return additional_info + + +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cdef set _all_infos +cdef set _infos_stepping +cdef object _update_infos_lock +# ELSE +# ENDIF +# fmt: on + +_all_infos = set() +_infos_stepping = set() +_update_infos_lock = ForkSafeLock() + + +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cdef _update_stepping_info(PyDBAdditionalThreadInfo info): +# ELSE +# def _update_stepping_info(info): +# ENDIF +# fmt: on + + global _infos_stepping + global _all_infos + + with _update_infos_lock: + # Removes entries that are no longer valid. + new_all_infos = set() + for info in _all_infos: + if info._get_related_thread() is not None: + new_all_infos.add(info) + _all_infos = new_all_infos + + new_stepping = set() + for info in _all_infos: + if info._is_stepping(): + new_stepping.add(info) + _infos_stepping = new_stepping + + py_db = get_global_debugger() + if py_db is not None and not py_db.pydb_disposed: + thread = info.weak_thread() + if thread is not None: + thread_id = get_thread_id(thread) + _queue, event = py_db.get_internal_queue_and_event(thread_id) + event.set() + +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cpdef add_additional_info(PyDBAdditionalThreadInfo info): +# ELSE +# def add_additional_info(info): +# ENDIF +# fmt: on + with _update_infos_lock: + _all_infos.add(info) + if info._is_stepping(): + _infos_stepping.add(info) + +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cpdef remove_additional_info(PyDBAdditionalThreadInfo info): +# ELSE +# def remove_additional_info(info): +# ENDIF +# fmt: on + with _update_infos_lock: + _all_infos.discard(info) + _infos_stepping.discard(info) + + +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cpdef bint any_thread_stepping(): +# ELSE +# def any_thread_stepping(): +# ENDIF +# fmt: on + return bool(_infos_stepping) +import linecache +import os.path +import re + +from _pydev_bundle import pydev_log +from _pydevd_bundle import pydevd_dont_trace +from _pydevd_bundle.pydevd_constants import ( + RETURN_VALUES_DICT, + NO_FTRACE, + EXCEPTION_TYPE_HANDLED, + EXCEPTION_TYPE_USER_UNHANDLED, + PYDEVD_IPYTHON_CONTEXT, + PYDEVD_USE_SYS_MONITORING, +) +from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace +from _pydevd_bundle.pydevd_utils import get_clsname_for_code +from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame +from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK +import sys + +try: + from _pydevd_bundle.pydevd_bytecode_utils import get_smart_step_into_variant_from_frame_offset +except ImportError: + + def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): + return None + +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +# ELSE +# # Note: those are now inlined on cython. +# 107 = 107 +# 144 = 144 +# 109 = 109 +# 160 = 160 +# 108 = 108 +# 159 = 159 +# 137 = 137 +# 111 = 111 +# 128 = 128 +# 206 = 206 +# 1 = 1 +# 2 = 2 +# ENDIF + +basename = os.path.basename + +IGNORE_EXCEPTION_TAG = re.compile("[^#]*#.*@IgnoreException") +DEBUG_START = ("pydevd.py", "run") +DEBUG_START_PY3K = ("_pydev_execfile.py", "execfile") +TRACE_PROPERTY = "pydevd_traceproperty.py" + +import dis + +try: + StopAsyncIteration +except NameError: + StopAsyncIteration = StopIteration + + +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): +# ELSE +# def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): + # ENDIF + if frame.f_lineno in raise_lines: + return True + + else: + try_except_infos = container_obj.try_except_infos + if try_except_infos is None: + container_obj.try_except_infos = try_except_infos = py_db.collect_try_except_info(frame.f_code) + + if not try_except_infos: + # Consider the last exception as unhandled because there's no try..except in it. + return True + else: + # Now, consider only the try..except for the raise + valid_try_except_infos = [] + for try_except_info in try_except_infos: + if try_except_info.is_line_in_try_block(last_raise_line): + valid_try_except_infos.append(try_except_info) + + if not valid_try_except_infos: + return True + + else: + # Note: check all, not only the "valid" ones to cover the case + # in "tests_python.test_tracing_on_top_level.raise_unhandled10" + # where one try..except is inside the other with only a raise + # and it's gotten in the except line. + for try_except_info in try_except_infos: + if try_except_info.is_line_in_except_block(frame.f_lineno): + if frame.f_lineno == try_except_info.except_line or frame.f_lineno in try_except_info.raise_lines_in_except: + # In a raise inside a try..except block or some except which doesn't + # match the raised exception. + return True + return False + + +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cdef class _TryExceptContainerObj: + cdef public list try_except_infos; + def __init__(self): + self.try_except_infos = None +# ELSE +# class _TryExceptContainerObj(object): +# """ +# A dumb container object just to contain the try..except info when needed. Meant to be +# persistent among multiple PyDBFrames to the same code object. +# """ +# +# try_except_infos = None +# +# ENDIF + + +# ======================================================================================================================= +# PyDBFrame +# ======================================================================================================================= +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cdef class PyDBFrame: +# ELSE +# class PyDBFrame: +# """This makes the tracing for a given frame, so, the trace_dispatch +# is used initially when we enter into a new context ('call') and then +# is reused for the entire context. +# """ +# + # ENDIF + + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cdef tuple _args + cdef int should_skip + cdef object exc_info + def __init__(self, tuple args): + self._args = args # In the cython version we don't need to pass the frame + self.should_skip = -1 # On cythonized version, put in instance. + self.exc_info = () + # ELSE +# should_skip = -1 # Default value in class (put in instance on set). +# exc_info = () # Default value in class (put in instance on set). +# +# if PYDEVD_USE_SYS_MONITORING: +# +# def __init__(self, *args, **kwargs): +# raise RuntimeError("Not expected to be used in sys.monitoring.") +# +# else: +# +# def __init__(self, args): +# # args = py_db, abs_path_canonical_path_and_base, base, info, t, frame +# # yeap, much faster than putting in self and then getting it from self later on +# self._args = args + # ENDIF + + def set_suspend(self, *args, **kwargs): + self._args[0].set_suspend(*args, **kwargs) + + def do_wait_suspend(self, *args, **kwargs): + self._args[0].do_wait_suspend(*args, **kwargs) + + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + def trace_exception(self, frame, str event, arg): + cdef bint should_stop; + cdef tuple exc_info; + # ELSE +# def trace_exception(self, frame, event, arg): + # ENDIF + if event == "exception": + should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + self.exc_info = exc_info + + if should_stop: + if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + return self.trace_dispatch + + elif event == "return": + exc_info = self.exc_info + if exc_info and arg is None: + frame_skips_cache, frame_cache_key = self._args[4], self._args[5] + custom_key = (frame_cache_key, "try_exc_info") + container_obj = frame_skips_cache.get(custom_key) + if container_obj is None: + container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() + if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and self.handle_user_exception( + frame + ): + return self.trace_dispatch + + return self.trace_exception + + def handle_user_exception(self, frame): + exc_info = self.exc_info + if exc_info: + return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) + return False + + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cdef get_func_name(self, frame): + cdef str func_name + # ELSE +# def get_func_name(self, frame): + # ENDIF + code_obj = frame.f_code + func_name = code_obj.co_name + try: + cls_name = get_clsname_for_code(code_obj, frame) + if cls_name is not None: + return "%s.%s" % (cls_name, func_name) + else: + return func_name + except: + pydev_log.exception() + return func_name + + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cdef _show_return_values(self, frame, arg): + # ELSE +# def _show_return_values(self, frame, arg): + # ENDIF + try: + try: + f_locals_back = getattr(frame.f_back, "f_locals", None) + if f_locals_back is not None: + return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + if return_values_dict is None: + return_values_dict = {} + f_locals_back[RETURN_VALUES_DICT] = return_values_dict + name = self.get_func_name(frame) + return_values_dict[name] = arg + except: + pydev_log.exception() + finally: + f_locals_back = None + + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cdef _remove_return_values(self, py_db, frame): + # ELSE +# def _remove_return_values(self, py_db, frame): + # ENDIF + try: + try: + # Showing return values was turned off, we should remove them from locals dict. + # The values can be in the current frame or in the back one + frame.f_locals.pop(RETURN_VALUES_DICT, None) + + f_locals_back = getattr(frame.f_back, "f_locals", None) + if f_locals_back is not None: + f_locals_back.pop(RETURN_VALUES_DICT, None) + except: + pydev_log.exception() + finally: + f_locals_back = None + + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cdef _get_unfiltered_back_frame(self, py_db, frame): + # ELSE +# def _get_unfiltered_back_frame(self, py_db, frame): + # ENDIF + f = frame.f_back + while f is not None: + if not py_db.is_files_filter_enabled: + return f + + else: + if py_db.apply_files_filter(f, f.f_code.co_filename, False): + f = f.f_back + + else: + return f + + return f + + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cdef _is_same_frame(self, target_frame, current_frame): + cdef PyDBAdditionalThreadInfo info; + # ELSE +# def _is_same_frame(self, target_frame, current_frame): + # ENDIF + if target_frame is current_frame: + return True + + info = self._args[2] + if info.pydev_use_scoped_step_frame: + # If using scoped step we don't check the target, we just need to check + # if the current matches the same heuristic where the target was defined. + if target_frame is not None and current_frame is not None: + if target_frame.f_code.co_filename == current_frame.f_code.co_filename: + # The co_name may be different (it may include the line number), but + # the filename must still be the same. + f = current_frame.f_back + if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + f = f.f_back + if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + return True + + return False + + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cpdef trace_dispatch(self, frame, str event, arg): + cdef tuple abs_path_canonical_path_and_base; + cdef bint is_exception_event; + cdef bint has_exception_breakpoints; + cdef bint can_skip; + cdef bint stop; + cdef bint stop_on_plugin_breakpoint; + cdef PyDBAdditionalThreadInfo info; + cdef int step_cmd; + cdef int line; + cdef bint is_line; + cdef bint is_call; + cdef bint is_return; + cdef bint should_stop; + cdef dict breakpoints_for_file; + cdef dict stop_info; + cdef str curr_func_name; + cdef dict frame_skips_cache; + cdef object frame_cache_key; + cdef tuple line_cache_key; + cdef int breakpoints_in_line_cache; + cdef int breakpoints_in_frame_cache; + cdef bint has_breakpoint_in_frame; + cdef bint is_coroutine_or_generator; + cdef int bp_line; + cdef object bp; + cdef int pydev_smart_parent_offset + cdef int pydev_smart_child_offset + cdef tuple pydev_smart_step_into_variants + # ELSE +# def trace_dispatch(self, frame, event, arg): + # ENDIF + # Note: this is a big function because most of the logic related to hitting a breakpoint and + # stepping is contained in it. Ideally this could be split among multiple functions, but the + # problem in this case is that in pure-python function calls are expensive and even more so + # when tracing is on (because each function call will get an additional tracing call). We + # try to address this by using the info.is_tracing for the fastest possible return, but the + # cost is still high (maybe we could use code-generation in the future and make the code + # generation be better split among what each part does). + + try: + # DEBUG = '_debugger_case_yield_from.py' in frame.f_code.co_filename + py_db, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args + # if DEBUG: print('frame trace_dispatch %s %s %s %s %s %s, stop: %s' % (frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename, event, constant_to_str(info.pydev_step_cmd), arg, info.pydev_step_stop)) + info.is_tracing += 1 + + # TODO: This shouldn't be needed. The fact that frame.f_lineno + # is None seems like a bug in Python 3.11. + # Reported in: https://github.com/python/cpython/issues/94485 + line = frame.f_lineno or 0 # Workaround or case where frame.f_lineno is None + line_cache_key = (frame_cache_key, line) + + if py_db.pydb_disposed: + return None if event == "call" else NO_FTRACE + + plugin_manager = py_db.plugin + has_exception_breakpoints = ( + py_db.break_on_caught_exceptions or py_db.break_on_user_uncaught_exceptions or py_db.has_plugin_exception_breaks + ) + + stop_frame = info.pydev_step_stop + step_cmd = info.pydev_step_cmd + function_breakpoint_on_call_event = None + + if frame.f_code.co_flags & 0xA0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80 + # Dealing with coroutines and generators: + # When in a coroutine we change the perceived event to the debugger because + # a call, StopIteration exception and return are usually just pausing/unpausing it. + if event == "line": + is_line = True + is_call = False + is_return = False + is_exception_event = False + + elif event == "return": + is_line = False + is_call = False + is_return = True + is_exception_event = False + + returns_cache_key = (frame_cache_key, "returns") + return_lines = frame_skips_cache.get(returns_cache_key) + if return_lines is None: + # Note: we're collecting the return lines by inspecting the bytecode as + # there are multiple returns and multiple stop iterations when awaiting and + # it doesn't give any clear indication when a coroutine or generator is + # finishing or just pausing. + return_lines = set() + for x in py_db.collect_return_info(frame.f_code): + # Note: cython does not support closures in cpdefs (so we can't use + # a list comprehension). + return_lines.add(x.return_line) + + frame_skips_cache[returns_cache_key] = return_lines + + if line not in return_lines: + # Not really a return (coroutine/generator paused). + return self.trace_dispatch + else: + if self.exc_info: + self.handle_user_exception(frame) + return self.trace_dispatch + + # Tricky handling: usually when we're on a frame which is about to exit + # we set the step mode to step into, but in this case we'd end up in the + # asyncio internal machinery, which is not what we want, so, we just + # ask the stop frame to be a level up. + # + # Note that there's an issue here which we may want to fix in the future: if + # the back frame is a frame which is filtered, we won't stop properly. + # Solving this may not be trivial as we'd need to put a scope in the step + # in, but we may have to do it anyways to have a step in which doesn't end + # up in asyncio). + # + # Note2: we don't revert to a step in if we're doing scoped stepping + # (because on scoped stepping we're always receiving a call/line/return + # event for each line in ipython, so, we can't revert to step in on return + # as the return shouldn't mean that we've actually completed executing a + # frame in this case). + if stop_frame is frame and not info.pydev_use_scoped_step_frame: + if step_cmd in (108, 159, 107, 144): + f = self._get_unfiltered_back_frame(py_db, frame) + if f is not None: + info.pydev_step_cmd = 206 + info.pydev_step_stop = f + else: + if step_cmd == 108: + info.pydev_step_cmd = 107 + info.pydev_step_stop = None + + elif step_cmd == 159: + info.pydev_step_cmd = 144 + info.pydev_step_stop = None + + elif step_cmd == 206: + # We're exiting this one, so, mark the new coroutine context. + f = self._get_unfiltered_back_frame(py_db, frame) + if f is not None: + info.pydev_step_stop = f + else: + info.pydev_step_cmd = 107 + info.pydev_step_stop = None + + elif event == "exception": + breakpoints_for_file = None + if has_exception_breakpoints: + should_stop, frame, exc_info = should_stop_on_exception( + self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + ) + self.exc_info = exc_info + if should_stop: + if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + return self.trace_dispatch + + return self.trace_dispatch + else: + # event == 'call' or event == 'c_XXX' + return self.trace_dispatch + + else: # Not coroutine nor generator + if event == "line": + is_line = True + is_call = False + is_return = False + is_exception_event = False + + elif event == "return": + is_line = False + is_return = True + is_call = False + is_exception_event = False + + # If we are in single step mode and something causes us to exit the current frame, we need to make sure we break + # eventually. Force the step mode to step into and the step stop frame to None. + # I.e.: F6 in the end of a function should stop in the next possible position (instead of forcing the user + # to make a step in or step over at that location). + # Note: this is especially troublesome when we're skipping code with the + # @DontTrace comment. + if ( + stop_frame is frame + and not info.pydev_use_scoped_step_frame + and is_return + and step_cmd + in (108, 109, 159, 160, 128) + ): + if step_cmd in (108, 109, 128): + info.pydev_step_cmd = 107 + else: + info.pydev_step_cmd = 144 + info.pydev_step_stop = None + + if self.exc_info: + if self.handle_user_exception(frame): + return self.trace_dispatch + + elif event == "call": + is_line = False + is_call = True + is_return = False + is_exception_event = False + if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. + function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + + elif event == "exception": + is_exception_event = True + breakpoints_for_file = None + if has_exception_breakpoints: + should_stop, frame, exc_info = should_stop_on_exception( + self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + ) + self.exc_info = exc_info + if should_stop: + if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + return self.trace_dispatch + is_line = False + is_return = False + is_call = False + + else: + # Unexpected: just keep the same trace func (i.e.: event == 'c_XXX'). + return self.trace_dispatch + + if not is_exception_event: + breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1]) + + can_skip = False + + if info.pydev_state == 1: # 1 = 1 + # we can skip if: + # - we have no stop marked + # - we should make a step return/step over and we're not in the current frame + # - we're stepping into a coroutine context and we're not in that context + if step_cmd == -1: + can_skip = True + + elif step_cmd in ( + 108, + 109, + 159, + 160, + ) and not self._is_same_frame(stop_frame, frame): + can_skip = True + + elif step_cmd == 128 and ( + stop_frame is not None + and stop_frame is not frame + and stop_frame is not frame.f_back + and (frame.f_back is None or stop_frame is not frame.f_back.f_back) + ): + can_skip = True + + elif step_cmd == 144: + if py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( + frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + ): + can_skip = True + + elif step_cmd == 206: + f = frame + while f is not None: + if self._is_same_frame(stop_frame, f): + break + f = f.f_back + else: + can_skip = True + + if can_skip: + if plugin_manager is not None and (py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): + can_skip = plugin_manager.can_skip(py_db, frame) + + if ( + can_skip + and py_db.show_return_values + and info.pydev_step_cmd in (108, 159) + and self._is_same_frame(stop_frame, frame.f_back) + ): + # trace function for showing return values after step over + can_skip = False + + # Let's check to see if we are in a function that has a breakpoint. If we don't have a breakpoint, + # we will return nothing for the next trace + # also, after we hit a breakpoint and go to some other debugging state, we have to force the set trace anyway, + # so, that's why the additional checks are there. + + if function_breakpoint_on_call_event: + pass # Do nothing here (just keep on going as we can't skip it). + + elif not breakpoints_for_file: + if can_skip: + if has_exception_breakpoints: + return self.trace_exception + else: + return None if is_call else NO_FTRACE + + else: + # When cached, 0 means we don't have a breakpoint and 1 means we have. + if can_skip: + breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) + if breakpoints_in_line_cache == 0: + return self.trace_dispatch + + breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) + if breakpoints_in_frame_cache != -1: + # Gotten from cache. + has_breakpoint_in_frame = breakpoints_in_frame_cache == 1 + + else: + has_breakpoint_in_frame = False + + try: + func_lines = set() + for offset_and_lineno in dis.findlinestarts(frame.f_code): + if offset_and_lineno[1] is not None: + func_lines.add(offset_and_lineno[1]) + except: + # This is a fallback for implementations where we can't get the function + # lines -- i.e.: jython (in this case clients need to provide the function + # name to decide on the skip or we won't be able to skip the function + # completely). + + # Checks the breakpoint to see if there is a context match in some function. + curr_func_name = frame.f_code.co_name + + # global context is set with an empty name + if curr_func_name in ("?", "", ""): + curr_func_name = "" + + for bp in breakpoints_for_file.values(): + # will match either global or some function + if bp.func_name in ("None", curr_func_name): + has_breakpoint_in_frame = True + break + else: + for bp_line in breakpoints_for_file: # iterate on keys + if bp_line in func_lines: + has_breakpoint_in_frame = True + break + + # Cache the value (1 or 0 or -1 for default because of cython). + if has_breakpoint_in_frame: + frame_skips_cache[frame_cache_key] = 1 + else: + frame_skips_cache[frame_cache_key] = 0 + + if can_skip and not has_breakpoint_in_frame: + if has_exception_breakpoints: + return self.trace_exception + else: + return None if is_call else NO_FTRACE + + # We may have hit a breakpoint or we are already in step mode. Either way, let's check what we should do in this frame + # if DEBUG: print('NOT skipped: %s %s %s %s' % (frame.f_lineno, frame.f_code.co_name, event, frame.__class__.__name__)) + + try: + stop_on_plugin_breakpoint = False + # return is not taken into account for breakpoint hit because we'd have a double-hit in this case + # (one for the line and the other for the return). + + stop_info = {} + breakpoint = None + stop = False + stop_reason = 111 + bp_type = None + + if function_breakpoint_on_call_event: + breakpoint = function_breakpoint_on_call_event + stop = True + new_frame = frame + stop_reason = CMD_SET_FUNCTION_BREAK + + elif is_line and info.pydev_state != 2 and breakpoints_for_file is not None and line in breakpoints_for_file: + breakpoint = breakpoints_for_file[line] + new_frame = frame + stop = True + + elif plugin_manager is not None and py_db.has_plugin_line_breaks: + result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) + if result: + stop_on_plugin_breakpoint = True + breakpoint, new_frame, bp_type = result + + if breakpoint: + # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint + # lets do the conditional stuff here + if breakpoint.expression is not None: + py_db.handle_breakpoint_expression(breakpoint, info, new_frame) + + if stop or stop_on_plugin_breakpoint: + eval_result = False + if breakpoint.has_condition: + eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + if not eval_result: + stop = False + stop_on_plugin_breakpoint = False + + if is_call and ( + frame.f_code.co_name in ("", "") or (line == 1 and frame.f_code.co_name.startswith(" may be executed having each line compiled as a new + # module, so it's the same case as . + + return self.trace_dispatch + + # Handle logpoint (on a logpoint we should never stop). + if (stop or stop_on_plugin_breakpoint) and breakpoint.is_logpoint: + stop = False + stop_on_plugin_breakpoint = False + + if info.pydev_message is not None and len(info.pydev_message) > 0: + cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, "1") + py_db.writer.add_command(cmd) + + if py_db.show_return_values: + if is_return and ( + ( + info.pydev_step_cmd in (108, 159, 128) + and (self._is_same_frame(stop_frame, frame.f_back)) + ) + or (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame))) + or (info.pydev_step_cmd in (107, 206)) + or ( + info.pydev_step_cmd == 144 + and frame.f_back is not None + and not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + ) + ): + self._show_return_values(frame, arg) + + elif py_db.remove_return_values_flag: + try: + self._remove_return_values(py_db, frame) + finally: + py_db.remove_return_values_flag = False + + if stop: + self.set_suspend( + thread, + stop_reason, + suspend_other_threads=breakpoint and breakpoint.suspend_policy == "ALL", + ) + + elif stop_on_plugin_breakpoint and plugin_manager is not None: + result = plugin_manager.suspend(py_db, thread, frame, bp_type) + if result: + frame = result + + # if thread has a suspend flag, we suspend with a busy wait + if info.pydev_state == 2: + self.do_wait_suspend(thread, frame, event, arg) + return self.trace_dispatch + else: + if not breakpoint and is_line: + # No stop from anyone and no breakpoint found in line (cache that). + frame_skips_cache[line_cache_key] = 0 + + except: + # Unfortunately Python itself stops the tracing when it originates from + # the tracing function, so, we can't do much about it (just let the user know). + exc = sys.exc_info()[0] + cmd = py_db.cmd_factory.make_console_message( + "%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n" + % ( + exc, + thread, + ) + ) + py_db.writer.add_command(cmd) + if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + pydev_log.exception() + + raise + + # step handling. We stop when we hit the right frame + try: + should_skip = 0 + if pydevd_dont_trace.should_trace_hook is not None: + if self.should_skip == -1: + # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). + # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code + # Which will be handled by this frame is read-only, so, we can cache it safely. + if not pydevd_dont_trace.should_trace_hook(frame.f_code, abs_path_canonical_path_and_base[0]): + # -1, 0, 1 to be Cython-friendly + should_skip = self.should_skip = 1 + else: + should_skip = self.should_skip = 0 + else: + should_skip = self.should_skip + + plugin_stop = False + if should_skip: + stop = False + + elif step_cmd in (107, 144, 206): + force_check_project_scope = step_cmd == 144 + if is_line: + if not info.pydev_use_scoped_step_frame: + if force_check_project_scope or py_db.is_files_filter_enabled: + stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + else: + stop = True + else: + if force_check_project_scope or py_db.is_files_filter_enabled: + # Make sure we check the filtering inside ipython calls too... + if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): + return None if is_call else NO_FTRACE + + # We can only stop inside the ipython call. + filename = frame.f_code.co_filename + if filename.endswith(".pyc"): + filename = filename[:-1] + + if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): + f = frame.f_back + while f is not None: + if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + f2 = f.f_back + if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + pydev_log.debug("Stop inside ipython call") + stop = True + break + f = f.f_back + + del f + + if not stop: + # In scoped mode if step in didn't work in this context it won't work + # afterwards anyways. + return None if is_call else NO_FTRACE + + elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: + if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + stop = False + else: + if force_check_project_scope or py_db.is_files_filter_enabled: + stop = not py_db.apply_files_filter( + frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope + ) + if stop: + # Prevent stopping in a return to the same location we were initially + # (i.e.: double-stop at the same place due to some filtering). + if info.step_in_initial_location == (frame.f_back, frame.f_back.f_lineno): + stop = False + else: + stop = True + else: + stop = False + + if stop: + if step_cmd == 206: + # i.e.: Check if we're stepping into the proper context. + f = frame + while f is not None: + if self._is_same_frame(stop_frame, f): + break + f = f.f_back + else: + stop = False + + if plugin_manager is not None: + result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + if result: + stop, plugin_stop = result + + elif step_cmd in (108, 159): + # Note: when dealing with a step over my code it's the same as a step over (the + # difference is that when we return from a frame in one we go to regular step + # into and in the other we go to a step into my code). + stop = self._is_same_frame(stop_frame, frame) and is_line + # Note: don't stop on a return for step over, only for line events + # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. + + if plugin_manager is not None: + result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + if result: + stop, plugin_stop = result + + elif step_cmd == 128: + stop = False + back = frame.f_back + if self._is_same_frame(stop_frame, frame) and is_return: + # We're exiting the smart step into initial frame (so, we probably didn't find our target). + stop = True + + elif self._is_same_frame(stop_frame, back) and is_line: + if info.pydev_smart_child_offset != -1: + # i.e.: in this case, we're not interested in the pause in the parent, rather + # we're interested in the pause in the child (when the parent is at the proper place). + stop = False + + else: + pydev_smart_parent_offset = info.pydev_smart_parent_offset + + pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: + # Preferred mode (when the smart step into variants are available + # and the offset is set). + stop = get_smart_step_into_variant_from_frame_offset( + back.f_lasti, pydev_smart_step_into_variants + ) is get_smart_step_into_variant_from_frame_offset( + pydev_smart_parent_offset, pydev_smart_step_into_variants + ) + + else: + # Only the name/line is available, so, check that. + curr_func_name = frame.f_code.co_name + + # global context is set with an empty name + if curr_func_name in ("?", "") or curr_func_name is None: + curr_func_name = "" + if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: + stop = True + + if not stop: + # In smart step into, if we didn't hit it in this frame once, that'll + # not be the case next time either, so, disable tracing for this frame. + return None if is_call else NO_FTRACE + + elif back is not None and self._is_same_frame(stop_frame, back.f_back) and is_line: + # Ok, we have to track 2 stops at this point, the parent and the child offset. + # This happens when handling a step into which targets a function inside a list comprehension + # or generator (in which case an intermediary frame is created due to an internal function call). + pydev_smart_parent_offset = info.pydev_smart_parent_offset + pydev_smart_child_offset = info.pydev_smart_child_offset + # print('matched back frame', pydev_smart_parent_offset, pydev_smart_child_offset) + # print('parent f_lasti', back.f_back.f_lasti) + # print('child f_lasti', back.f_lasti) + stop = False + if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: + pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + + if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: + # Note that we don't really check the parent offset, only the offset of + # the child (because this is a generator, the parent may have moved forward + # already -- and that's ok, so, we just check that the parent frame + # matches in this case). + smart_step_into_variant = get_smart_step_into_variant_from_frame_offset( + pydev_smart_parent_offset, pydev_smart_step_into_variants + ) + # print('matched parent offset', pydev_smart_parent_offset) + # Ok, now, check the child variant + children_variants = smart_step_into_variant.children_variants + stop = children_variants and ( + get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) + is get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants) + ) + # print('stop at child', stop) + + if not stop: + # In smart step into, if we didn't hit it in this frame once, that'll + # not be the case next time either, so, disable tracing for this frame. + return None if is_call else NO_FTRACE + + elif step_cmd in (109, 160): + stop = is_return and self._is_same_frame(stop_frame, frame) + + else: + stop = False + + if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): + f_code = getattr(frame.f_back, "f_code", None) + if f_code is not None: + if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + stop = False + + if plugin_stop: + plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + elif stop: + if is_line: + self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + self.do_wait_suspend(thread, frame, event, arg) + elif is_return: # return event + back = frame.f_back + if back is not None: + # When we get to the pydevd run function, the debugging has actually finished for the main thread + # (note that it can still go on for other threads, but for this one, we just make it finish) + # So, just setting it to None should be OK + back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) + if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): + back = None + + elif base == TRACE_PROPERTY: + # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) + # if we're in a return, we want it to appear to the user in the previous frame! + return None if is_call else NO_FTRACE + + elif pydevd_dont_trace.should_trace_hook is not None: + if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename): + # In this case, we'll have to skip the previous one because it shouldn't be traced. + # Also, we have to reset the tracing, because if the parent's parent (or some + # other parent) has to be traced and it's not currently, we wouldn't stop where + # we should anymore (so, a step in/over/return may not stop anywhere if no parent is traced). + # Related test: _debugger_case17a.py + py_db.set_trace_for_frame_and_parents(thread.ident, back) + return None if is_call else NO_FTRACE + + if back is not None: + # if we're in a return, we want it to appear to the user in the previous frame! + self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + self.do_wait_suspend(thread, back, event, arg) + else: + # in jython we may not have a back frame + info.pydev_step_stop = None + info.pydev_original_step_cmd = -1 + info.pydev_step_cmd = -1 + info.pydev_state = 1 + info.update_stepping_info() + + # if we are quitting, let's stop the tracing + if py_db.quitting: + return None if is_call else NO_FTRACE + + return self.trace_dispatch + except: + # Unfortunately Python itself stops the tracing when it originates from + # the tracing function, so, we can't do much about it (just let the user know). + exc = sys.exc_info()[0] + cmd = py_db.cmd_factory.make_console_message( + "%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n" + % ( + exc, + thread, + ) + ) + py_db.writer.add_command(cmd) + if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + pydev_log.exception() + raise + + finally: + info.is_tracing -= 1 + + # end trace_dispatch + + +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info, is_unwind=False): + cdef bint should_stop; + cdef bint was_just_raised; + cdef list check_excs; +# ELSE +# def should_stop_on_exception(py_db, info, frame, thread, arg, prev_user_uncaught_exc_info, is_unwind=False): + # ENDIF + + should_stop = False + maybe_user_uncaught_exc_info = prev_user_uncaught_exc_info + + # 2 = 2 + if info.pydev_state != 2: # and breakpoint is not None: + exception, value, trace = arg + + if trace is not None and hasattr(trace, "tb_next"): + # on jython trace is None on the first event and it may not have a tb_next. + + should_stop = False + exception_breakpoint = None + try: + if py_db.plugin is not None: + result = py_db.plugin.exception_break(py_db, frame, thread, arg, is_unwind) + if result: + should_stop, frame = result + except: + pydev_log.exception() + + if not should_stop: + # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). + if exception == SystemExit and py_db.ignore_system_exit_code(value): + pass + + elif exception in (GeneratorExit, StopIteration, StopAsyncIteration): + # These exceptions are control-flow related (they work as a generator + # pause), so, we shouldn't stop on them. + pass + + elif ignore_exception_trace(trace): + pass + + else: + was_just_raised = trace.tb_next is None + + # It was not handled by any plugin, lets check exception breakpoints. + check_excs = [] + + # Note: check user unhandled before regular exceptions. + exc_break_user = py_db.get_exception_breakpoint(exception, py_db.break_on_user_uncaught_exceptions) + if exc_break_user is not None: + check_excs.append((exc_break_user, True)) + + exc_break_caught = py_db.get_exception_breakpoint(exception, py_db.break_on_caught_exceptions) + if exc_break_caught is not None: + check_excs.append((exc_break_caught, False)) + + for exc_break, is_user_uncaught in check_excs: + # Initially mark that it should stop and then go into exclusions. + should_stop = True + + if py_db.exclude_exception_by_filter(exc_break, trace): + pydev_log.debug( + "Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name) + ) + should_stop = False + + elif exc_break.condition is not None and not py_db.handle_breakpoint_condition(info, exc_break, frame): + should_stop = False + + elif is_user_uncaught: + # Note: we don't stop here, we just collect the exc_info to use later on... + should_stop = False + if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( + frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + ): + # User uncaught means that we're currently in user code but the code + # up the stack is library code. + exc_info = prev_user_uncaught_exc_info + if not exc_info: + exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + else: + lines = exc_info[2] + lines.add(frame.f_lineno) + exc_info = (arg, frame.f_lineno, lines) + maybe_user_uncaught_exc_info = exc_info + else: + # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + if ( + exc_break.notify_on_first_raise_only + and py_db.skip_on_exceptions_thrown_in_same_context + and not was_just_raised + and not just_raised(trace.tb_next) + ): + # In this case we never stop if it was just raised, so, to know if it was the first we + # need to check if we're in the 2nd method. + should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + + elif ( + exc_break.notify_on_first_raise_only + and not py_db.skip_on_exceptions_thrown_in_same_context + and not was_just_raised + ): + should_stop = False # I.e.: we stop only when it was just raised + + elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context: + # Option: Don't break if an exception is caught in the same function from which it is thrown + should_stop = False + + if should_stop: + exception_breakpoint = exc_break + try: + info.pydev_message = exc_break.qname + except: + info.pydev_message = exc_break.qname.encode("utf-8") + break + + if should_stop: + # Always add exception to frame (must remove later after we proceed). + add_exception_to_frame(frame, (exception, value, trace)) + + if exception_breakpoint is not None and exception_breakpoint.expression is not None: + py_db.handle_breakpoint_expression(exception_breakpoint, info, frame) + + return should_stop, frame, maybe_user_uncaught_exc_info + + +# Same thing in the main debugger but only considering the file contents, while the one in the main debugger +# considers the user input (so, the actual result must be a join of both). +filename_to_lines_where_exceptions_are_ignored: dict = {} +filename_to_stat_info: dict = {} + + +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +def handle_exception(py_db, thread, frame, arg, str exception_type): + cdef bint stopped; + cdef tuple abs_real_path_and_base; + cdef str absolute_filename; + cdef str canonical_normalized_filename; + cdef dict lines_ignored; + cdef dict frame_id_to_frame; + cdef dict merged; + cdef object trace_obj; +# ELSE +# def handle_exception(py_db, thread, frame, arg, exception_type): + # ENDIF + stopped = False + try: + # print('handle_exception', frame.f_lineno, frame.f_code.co_name) + + # We have 3 things in arg: exception type, description, traceback object + trace_obj = arg[2] + + initial_trace_obj = trace_obj + if trace_obj.tb_next is None and trace_obj.tb_frame is frame: + # I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check). + pass + else: + # Get the trace_obj from where the exception was raised... + while trace_obj.tb_next is not None: + trace_obj = trace_obj.tb_next + + if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: + for check_trace_obj in (initial_trace_obj, trace_obj): + abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + absolute_filename = abs_real_path_and_base[0] + canonical_normalized_filename = abs_real_path_and_base[1] + + lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + if lines_ignored is None: + lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + + try: + curr_stat = os.stat(absolute_filename) + curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + except: + curr_stat = None + + last_stat = filename_to_stat_info.get(absolute_filename) + if last_stat != curr_stat: + filename_to_stat_info[absolute_filename] = curr_stat + lines_ignored.clear() + try: + linecache.checkcache(absolute_filename) + except: + pydev_log.exception("Error in linecache.checkcache(%r)", absolute_filename) + + from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + if from_user_input: + merged = {} + merged.update(lines_ignored) + # Override what we have with the related entries that the user entered + merged.update(from_user_input) + else: + merged = lines_ignored + + exc_lineno = check_trace_obj.tb_lineno + + # print ('lines ignored', lines_ignored) + # print ('user input', from_user_input) + # print ('merged', merged, 'curr', exc_lineno) + + if exc_lineno not in merged: # Note: check on merged but update lines_ignored. + try: + line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + except: + pydev_log.exception("Error in linecache.getline(%r, %s, f_globals)", absolute_filename, exc_lineno) + line = "" + + if IGNORE_EXCEPTION_TAG.match(line) is not None: + lines_ignored[exc_lineno] = 1 + return False + else: + # Put in the cache saying not to ignore + lines_ignored[exc_lineno] = 0 + else: + # Ok, dict has it already cached, so, let's check it... + if merged.get(exc_lineno, 0): + return False + + try: + frame_id_to_frame = {} + frame_id_to_frame[id(frame)] = frame + f = trace_obj.tb_frame + while f is not None: + frame_id_to_frame[id(f)] = f + f = f.f_back + f = None + + stopped = True + py_db.send_caught_exception_stack(thread, arg, id(frame)) + try: + py_db.set_suspend(thread, 137) + py_db.do_wait_suspend(thread, frame, "exception", arg, exception_type=exception_type) + finally: + py_db.send_caught_exception_stack_proceeded(thread) + except: + pydev_log.exception() + + py_db.set_trace_for_frame_and_parents(thread.ident, frame) + finally: + # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. + remove_exception_from_frame(frame) + # Clear some local variables... + frame = None + trace_obj = None + initial_trace_obj = None + check_trace_obj = None + f = None + frame_id_to_frame = None + py_db = None + thread = None + + return stopped +from _pydev_bundle.pydev_is_thread_alive import is_thread_alive +from _pydev_bundle.pydev_log import exception as pydev_log_exception +from _pydev_bundle._pydev_saved_modules import threading +from _pydevd_bundle.pydevd_constants import ( + get_current_thread_id, + NO_FTRACE, + USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, + ForkSafeLock, + PYDEVD_USE_SYS_MONITORING, +) +from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER + +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +from cpython.object cimport PyObject +from cpython.ref cimport Py_INCREF, Py_XDECREF +# ELSE +# from _pydevd_bundle.pydevd_frame import PyDBFrame, is_unhandled_exception +# ENDIF +# fmt: on + +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cdef dict _global_notify_skipped_step_in +# ELSE +# # Note: those are now inlined on cython. +# 107 = 107 +# 144 = 144 +# 109 = 109 +# 160 = 160 +# ENDIF +# fmt: on + +# Cache where we should keep that we completely skipped entering some context. +# It needs to be invalidated when: +# - Breakpoints are changed +# It can be used when running regularly (without step over/step in/step return) +global_cache_skips = {} +global_cache_frame_skips = {} + +_global_notify_skipped_step_in = False +_global_notify_skipped_step_in_lock = ForkSafeLock() + + +def notify_skipped_step_in_because_of_filters(py_db, frame): + global _global_notify_skipped_step_in + + with _global_notify_skipped_step_in_lock: + if _global_notify_skipped_step_in: + # Check with lock in place (callers should actually have checked + # before without the lock in place due to performance). + return + _global_notify_skipped_step_in = True + py_db.notify_skipped_step_in_because_of_filters(frame) + + +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cdef class SafeCallWrapper: + cdef method_object + def __init__(self, method_object): + self.method_object = method_object + def __call__(self, *args): + #Cannot use 'self' once inside the delegate call since we are borrowing the self reference f_trace field + #in the frame, and that reference might get destroyed by set trace on frame and parents + cdef PyObject* method_obj = self.method_object + Py_INCREF(method_obj) + ret = (method_obj)(*args) + Py_XDECREF (method_obj) + return SafeCallWrapper(ret) if ret is not None else None + def get_method_object(self): + return self.method_object +# ELSE +# ENDIF +# fmt: on + + +def fix_top_level_trace_and_get_trace_func(py_db, frame): + # fmt: off + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cdef str filename; + cdef str name; + cdef tuple args; + # ENDIF + # fmt: on + + # Note: this is always the first entry-point in the tracing for any thread. + # After entering here we'll set a new tracing function for this thread + # where more information is cached (and will also setup the tracing for + # frames where we should deal with unhandled exceptions). + thread = None + # Cache the frame which should be traced to deal with unhandled exceptions. + # (i.e.: thread entry-points). + + f_unhandled = frame + # print('called at', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) + force_only_unhandled_tracer = False + while f_unhandled is not None: + # name = splitext(basename(f_unhandled.f_code.co_filename))[0] + + name = f_unhandled.f_code.co_filename + # basename + i = name.rfind("/") + j = name.rfind("\\") + if j > i: + i = j + if i >= 0: + name = name[i + 1 :] + # remove ext + i = name.rfind(".") + if i >= 0: + name = name[:i] + + if name == "threading": + if f_unhandled.f_code.co_name in ("__bootstrap", "_bootstrap"): + # We need __bootstrap_inner, not __bootstrap. + return None, False + + elif f_unhandled.f_code.co_name in ("__bootstrap_inner", "_bootstrap_inner"): + # Note: be careful not to use threading.currentThread to avoid creating a dummy thread. + t = f_unhandled.f_locals.get("self") + force_only_unhandled_tracer = True + if t is not None and isinstance(t, threading.Thread): + thread = t + break + + elif name == "pydev_monkey": + if f_unhandled.f_code.co_name == "__call__": + force_only_unhandled_tracer = True + break + + elif name == "pydevd": + if f_unhandled.f_code.co_name in ("run", "main"): + # We need to get to _exec + return None, False + + if f_unhandled.f_code.co_name == "_exec": + force_only_unhandled_tracer = True + break + + elif name == "pydevd_tracing": + return None, False + + elif f_unhandled.f_back is None: + break + + f_unhandled = f_unhandled.f_back + + if thread is None: + # Important: don't call threadingCurrentThread if we're in the threading module + # to avoid creating dummy threads. + if py_db.threading_get_ident is not None: + thread = py_db.threading_active.get(py_db.threading_get_ident()) + if thread is None: + return None, False + else: + # Jython does not have threading.get_ident(). + thread = py_db.threading_current_thread() + + if getattr(thread, "pydev_do_not_trace", None): + py_db.disable_tracing() + return None, False + + try: + additional_info = thread.additional_info + if additional_info is None: + raise AttributeError() + except: + additional_info = py_db.set_additional_thread_info(thread) + + # print('enter thread tracer', thread, get_current_thread_id(thread)) + args = (py_db, thread, additional_info, global_cache_skips, global_cache_frame_skips) + + if f_unhandled is not None: + if f_unhandled.f_back is None and not force_only_unhandled_tracer: + # Happens when we attach to a running program (cannot reuse instance because it's mutable). + top_level_thread_tracer = TopLevelThreadTracerNoBackFrame(ThreadTracer(args), args) + additional_info.top_level_thread_tracer_no_back_frames.append( + top_level_thread_tracer + ) # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). + else: + top_level_thread_tracer = additional_info.top_level_thread_tracer_unhandled + if top_level_thread_tracer is None: + # Stop in some internal place to report about unhandled exceptions + top_level_thread_tracer = TopLevelThreadTracerOnlyUnhandledExceptions(args) + additional_info.top_level_thread_tracer_unhandled = top_level_thread_tracer # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). + + # print(' --> found to trace unhandled', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) + f_trace = top_level_thread_tracer.get_trace_dispatch_func() + # fmt: off + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + f_trace = SafeCallWrapper(f_trace) + # ENDIF + # fmt: on + f_unhandled.f_trace = f_trace + + if frame is f_unhandled: + return f_trace, False + + thread_tracer = additional_info.thread_tracer + if thread_tracer is None or thread_tracer._args[0] is not py_db: + thread_tracer = ThreadTracer(args) + additional_info.thread_tracer = thread_tracer + + # fmt: off + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + return SafeCallWrapper(thread_tracer), True + # ELSE +# return thread_tracer, True + # ENDIF + # fmt: on + + +def trace_dispatch(py_db, frame, event, arg): + thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) + if thread_trace_func is None: + return None if event == "call" else NO_FTRACE + if apply_to_settrace: + py_db.enable_tracing(thread_trace_func) + return thread_trace_func(frame, event, arg) + + +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cdef class TopLevelThreadTracerOnlyUnhandledExceptions: + cdef public tuple _args; + def __init__(self, tuple args): + self._args = args +# ELSE +# class TopLevelThreadTracerOnlyUnhandledExceptions(object): +# def __init__(self, args): +# self._args = args +# +# ENDIF +# fmt: on + + def trace_unhandled_exceptions(self, frame, event, arg): + # Note that we ignore the frame as this tracing method should only be put in topmost frames already. + # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) + if event == "exception" and arg is not None: + py_db, t, additional_info = self._args[0:3] + if arg is not None: + if not additional_info.suspended_at_unhandled: + additional_info.suspended_at_unhandled = True + + py_db.stop_on_unhandled_exception(py_db, t, additional_info, arg) + + # No need to reset frame.f_trace to keep the same trace function. + return self.trace_unhandled_exceptions + + def get_trace_dispatch_func(self): + return self.trace_unhandled_exceptions + +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cdef class TopLevelThreadTracerNoBackFrame: + cdef public object _frame_trace_dispatch; + cdef public tuple _args; + cdef public object try_except_infos; + cdef public object _last_exc_arg; + cdef public set _raise_lines; + cdef public int _last_raise_line; + def __init__(self, frame_trace_dispatch, tuple args): + self._frame_trace_dispatch = frame_trace_dispatch + self._args = args + self.try_except_infos = None + self._last_exc_arg = None + self._raise_lines = set() + self._last_raise_line = -1 +# ELSE +# class TopLevelThreadTracerNoBackFrame(object): +# """ +# This tracer is pretty special in that it's dealing with a frame without f_back (i.e.: top frame +# on remote attach or QThread). +# +# This means that we have to carefully inspect exceptions to discover whether the exception will +# be unhandled or not (if we're dealing with an unhandled exception we need to stop as unhandled, +# otherwise we need to use the regular tracer -- unfortunately the debugger has little info to +# work with in the tracing -- see: https://bugs.python.org/issue34099, so, we inspect bytecode to +# determine if some exception will be traced or not... note that if this is not available -- such +# as on Jython -- we consider any top-level exception to be unnhandled). +# """ +# +# def __init__(self, frame_trace_dispatch, args): +# self._frame_trace_dispatch = frame_trace_dispatch +# self._args = args +# self.try_except_infos = None +# self._last_exc_arg = None +# self._raise_lines = set() +# self._last_raise_line = -1 +# +# ENDIF +# fmt: on + + def trace_dispatch_and_unhandled_exceptions(self, frame, event, arg): + # DEBUG = 'code_to_debug' in frame.f_code.co_filename + # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) + frame_trace_dispatch = self._frame_trace_dispatch + if frame_trace_dispatch is not None: + self._frame_trace_dispatch = frame_trace_dispatch(frame, event, arg) + + if event == "exception": + self._last_exc_arg = arg + self._raise_lines.add(frame.f_lineno) + self._last_raise_line = frame.f_lineno + + elif event == "return" and self._last_exc_arg is not None: + # For unhandled exceptions we actually track the return when at the topmost level. + try: + py_db, t, additional_info = self._args[0:3] + if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. + if is_unhandled_exception(self, py_db, frame, self._last_raise_line, self._raise_lines): + py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) + finally: + # Remove reference to exception after handling it. + self._last_exc_arg = None + + ret = self.trace_dispatch_and_unhandled_exceptions + + # Need to reset (the call to _frame_trace_dispatch may have changed it). + # fmt: off + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + frame.f_trace = SafeCallWrapper(ret) + # ELSE +# frame.f_trace = ret + # ENDIF + # fmt: on + return ret + + def get_trace_dispatch_func(self): + return self.trace_dispatch_and_unhandled_exceptions + + +# fmt: off +# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) +cdef class ThreadTracer: + cdef public tuple _args; + def __init__(self, tuple args): + self._args = args +# ELSE +# class ThreadTracer(object): +# def __init__(self, args): +# self._args = args +# +# ENDIF +# fmt: on + + def __call__(self, frame, event, arg): + """This is the callback used when we enter some context in the debugger. + + We also decorate the thread we are in with info about the debugging. + The attributes added are: + pydev_state + pydev_step_stop + pydev_step_cmd + pydev_notify_kill + + :param PyDB py_db: + This is the global debugger (this method should actually be added as a method to it). + """ + # fmt: off + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + cdef str filename; + cdef str base; + cdef int pydev_step_cmd; + cdef object frame_cache_key; + cdef dict cache_skips; + cdef bint is_stepping; + cdef tuple abs_path_canonical_path_and_base; + cdef PyDBAdditionalThreadInfo additional_info; + # ENDIF + # fmt: on + + # DEBUG = 'code_to_debug' in frame.f_code.co_filename + # if DEBUG: print('ENTER: trace_dispatch: %s %s %s %s' % (frame.f_code.co_filename, frame.f_lineno, event, frame.f_code.co_name)) + py_db, t, additional_info, cache_skips, frame_skips_cache = self._args + if additional_info.is_tracing: + return None if event == "call" else NO_FTRACE # we don't wan't to trace code invoked from pydevd_frame.trace_dispatch + + additional_info.is_tracing += 1 + try: + pydev_step_cmd = additional_info.pydev_step_cmd + is_stepping = pydev_step_cmd != -1 + if py_db.pydb_disposed: + return None if event == "call" else NO_FTRACE + + # if thread is not alive, cancel trace_dispatch processing + if not is_thread_alive(t): + py_db.notify_thread_not_alive(get_current_thread_id(t)) + return None if event == "call" else NO_FTRACE + + # Note: it's important that the context name is also given because we may hit something once + # in the global context and another in the local context. + frame_cache_key = frame.f_code + if frame_cache_key in cache_skips: + if not is_stepping: + # if DEBUG: print('skipped: trace_dispatch (cache hit)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + return None if event == "call" else NO_FTRACE + else: + # When stepping we can't take into account caching based on the breakpoints (only global filtering). + if cache_skips.get(frame_cache_key) == 1: + if ( + additional_info.pydev_original_step_cmd in (107, 144) + and not _global_notify_skipped_step_in + ): + notify_skipped_step_in_because_of_filters(py_db, frame) + + back_frame = frame.f_back + if back_frame is not None and pydev_step_cmd in ( + 107, + 144, + 109, + 160, + ): + back_frame_cache_key = back_frame.f_code + if cache_skips.get(back_frame_cache_key) == 1: + # if DEBUG: print('skipped: trace_dispatch (cache hit: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + return None if event == "call" else NO_FTRACE + else: + # if DEBUG: print('skipped: trace_dispatch (cache hit: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + return None if event == "call" else NO_FTRACE + + try: + # Make fast path faster! + abs_path_canonical_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] + except: + abs_path_canonical_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) + + file_type = py_db.get_file_type( + frame, abs_path_canonical_path_and_base + ) # we don't want to debug threading or anything related to pydevd + + if file_type is not None: + if file_type == 1: # inlining LIB_FILE = 1 + if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): + # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + cache_skips[frame_cache_key] = 1 + return None if event == "call" else NO_FTRACE + else: + # if DEBUG: print('skipped: trace_dispatch', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + cache_skips[frame_cache_key] = 1 + return None if event == "call" else NO_FTRACE + + if py_db.is_files_filter_enabled: + if py_db.apply_files_filter(frame, abs_path_canonical_path_and_base[0], False): + cache_skips[frame_cache_key] = 1 + + if ( + is_stepping + and additional_info.pydev_original_step_cmd in (107, 144) + and not _global_notify_skipped_step_in + ): + notify_skipped_step_in_because_of_filters(py_db, frame) + + # A little gotcha, sometimes when we're stepping in we have to stop in a + # return event showing the back frame as the current frame, so, we need + # to check not only the current frame but the back frame too. + back_frame = frame.f_back + if back_frame is not None and pydev_step_cmd in ( + 107, + 144, + 109, + 160, + ): + if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False): + back_frame_cache_key = back_frame.f_code + cache_skips[back_frame_cache_key] = 1 + # if DEBUG: print('skipped: trace_dispatch (filtered out: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + return None if event == "call" else NO_FTRACE + else: + # if DEBUG: print('skipped: trace_dispatch (filtered out: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + return None if event == "call" else NO_FTRACE + + # if DEBUG: print('trace_dispatch', filename, frame.f_lineno, event, frame.f_code.co_name, file_type) + + # Just create PyDBFrame directly (removed support for Python versions < 2.5, which required keeping a weak + # reference to the frame). + ret = PyDBFrame( + ( + py_db, + abs_path_canonical_path_and_base, + additional_info, + t, + frame_skips_cache, + frame_cache_key, + ) + ).trace_dispatch(frame, event, arg) + if ret is None: + # 1 means skipped because of filters. + # 2 means skipped because no breakpoints were hit. + cache_skips[frame_cache_key] = 2 + return None if event == "call" else NO_FTRACE + + # fmt: off + # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) + frame.f_trace = SafeCallWrapper(ret) # Make sure we keep the returned tracer. + # ELSE +# frame.f_trace = ret # Make sure we keep the returned tracer. + # ENDIF + # fmt: on + return ret + + except SystemExit: + return None if event == "call" else NO_FTRACE + + except Exception: + if py_db.pydb_disposed: + return None if event == "call" else NO_FTRACE # Don't log errors when we're shutting down. + # Log it + try: + if pydev_log_exception is not None: + # This can actually happen during the interpreter shutdown in Python 2.7 + pydev_log_exception() + except: + # Error logging? We're really in the interpreter shutdown... + # (https://github.com/fabioz/PyDev.Debugger/issues/8) + pass + return None if event == "call" else NO_FTRACE + finally: + additional_info.is_tracing -= 1 + + +if USE_CUSTOM_SYS_CURRENT_FRAMES_MAP: + # This is far from ideal, as we'll leak frames (we'll always have the last created frame, not really + # the last topmost frame saved -- this should be Ok for our usage, but it may leak frames and things + # may live longer... as IronPython is garbage-collected, things should live longer anyways, so, it + # shouldn't be an issue as big as it's in CPython -- it may still be annoying, but this should + # be a reasonable workaround until IronPython itself is able to provide that functionality). + # + # See: https://github.com/IronLanguages/main/issues/1630 + from _pydevd_bundle.pydevd_constants import constructed_tid_to_last_frame + + _original_call = ThreadTracer.__call__ + + def __call__(self, frame, event, arg): + constructed_tid_to_last_frame[self._args[1].ident] = frame + return _original_call(self, frame, event, arg) + + ThreadTracer.__call__ = __call__ + +if PYDEVD_USE_SYS_MONITORING: + + def fix_top_level_trace_and_get_trace_func(*args, **kwargs): + raise RuntimeError("Not used in sys.monitoring mode.") diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython_wrapper.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython_wrapper.py new file mode 100644 index 0000000..4d5038c --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython_wrapper.py @@ -0,0 +1,63 @@ +import sys + +try: + try: + from _pydevd_bundle_ext import pydevd_cython as mod + + except ImportError: + from _pydevd_bundle import pydevd_cython as mod + +except ImportError: + import struct + + try: + is_python_64bit = struct.calcsize("P") == 8 + except: + # In Jython this call fails, but this is Ok, we don't support Jython for speedups anyways. + raise ImportError + plat = "32" + if is_python_64bit: + plat = "64" + + # We also accept things as: + # + # _pydevd_bundle.pydevd_cython_win32_27_32 + # _pydevd_bundle.pydevd_cython_win32_34_64 + # + # to have multiple pre-compiled pyds distributed along the IDE + # (generated by build_tools/build_binaries_windows.py). + + mod_name = "pydevd_cython_%s_%s%s_%s" % (sys.platform, sys.version_info[0], sys.version_info[1], plat) + check_name = "_pydevd_bundle.%s" % (mod_name,) + mod = getattr(__import__(check_name), mod_name) + +# Regardless of how it was found, make sure it's later available as the +# initial name so that the expected types from cython in frame eval +# are valid. +sys.modules["_pydevd_bundle.pydevd_cython"] = mod + +trace_dispatch = mod.trace_dispatch + +PyDBAdditionalThreadInfo = mod.PyDBAdditionalThreadInfo + +set_additional_thread_info = mod.set_additional_thread_info + +any_thread_stepping = mod.any_thread_stepping + +remove_additional_info = mod.remove_additional_info + +global_cache_skips = mod.global_cache_skips + +global_cache_frame_skips = mod.global_cache_frame_skips + +_set_additional_thread_info_lock = mod._set_additional_thread_info_lock + +fix_top_level_trace_and_get_trace_func = mod.fix_top_level_trace_and_get_trace_func + +handle_exception = mod.handle_exception + +should_stop_on_exception = mod.should_stop_on_exception + +is_unhandled_exception = mod.is_unhandled_exception + +version = getattr(mod, "version", 0) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py new file mode 100644 index 0000000..8b50c22 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py @@ -0,0 +1,202 @@ +from _pydev_bundle._pydev_saved_modules import threading +from _pydev_bundle import _pydev_saved_modules +from _pydevd_bundle.pydevd_utils import notify_about_gevent_if_needed +import weakref +from _pydevd_bundle.pydevd_constants import ( + IS_JYTHON, + IS_IRONPYTHON, + PYDEVD_APPLY_PATCHING_TO_HIDE_PYDEVD_THREADS, + PYDEVD_USE_SYS_MONITORING, +) +from _pydev_bundle.pydev_log import exception as pydev_log_exception +import sys +from _pydev_bundle import pydev_log +import pydevd_tracing +from _pydevd_bundle.pydevd_collect_bytecode_info import iter_instructions +from _pydevd_sys_monitoring import pydevd_sys_monitoring + +if IS_JYTHON: + import org.python.core as JyCore # @UnresolvedImport + + +class PyDBDaemonThread(threading.Thread): + def __init__(self, py_db, target_and_args=None): + """ + :param target_and_args: + tuple(func, args, kwargs) if this should be a function and args to run. + -- Note: use through run_as_pydevd_daemon_thread(). + """ + threading.Thread.__init__(self) + notify_about_gevent_if_needed() + self._py_db = weakref.ref(py_db) + self._kill_received = False + mark_as_pydevd_daemon_thread(self) + self._target_and_args = target_and_args + + @property + def py_db(self): + return self._py_db() + + def run(self): + created_pydb_daemon = self.py_db.created_pydb_daemon_threads + created_pydb_daemon[self] = 1 + try: + try: + if IS_JYTHON and not isinstance(threading.current_thread(), threading._MainThread): + # we shouldn't update sys.modules for the main thread, cause it leads to the second importing 'threading' + # module, and the new instance of main thread is created + ss = JyCore.PySystemState() + # Note: Py.setSystemState() affects only the current thread. + JyCore.Py.setSystemState(ss) + + self._stop_trace() + self._on_run() + except: + if sys is not None and pydev_log_exception is not None: + pydev_log_exception() + finally: + del created_pydb_daemon[self] + + def _on_run(self): + if self._target_and_args is not None: + target, args, kwargs = self._target_and_args + target(*args, **kwargs) + else: + raise NotImplementedError("Should be reimplemented by: %s" % self.__class__) + + def do_kill_pydev_thread(self): + if not self._kill_received: + pydev_log.debug("%s received kill signal", self.name) + self._kill_received = True + + def _stop_trace(self): + if self.pydev_do_not_trace: + if PYDEVD_USE_SYS_MONITORING: + pydevd_sys_monitoring.stop_monitoring(all_threads=False) + return + pydevd_tracing.SetTrace(None) # no debugging on this thread + + +def _collect_load_names(func): + found_load_names = set() + for instruction in iter_instructions(func.__code__): + if instruction.opname in ("LOAD_GLOBAL", "LOAD_ATTR", "LOAD_METHOD"): + found_load_names.add(instruction.argrepr) + return found_load_names + + +def _patch_threading_to_hide_pydevd_threads(): + """ + Patches the needed functions on the `threading` module so that the pydevd threads are hidden. + + Note that we patch the functions __code__ to avoid issues if some code had already imported those + variables prior to the patching. + """ + found_load_names = _collect_load_names(threading.enumerate) + # i.e.: we'll only apply the patching if the function seems to be what we expect. + + new_threading_enumerate = None + + if found_load_names in ( + {"_active_limbo_lock", "_limbo", "_active", "values", "list"}, + {"_active_limbo_lock", "_limbo", "_active", "values", "NULL + list"}, + {"NULL + list", "_active", "_active_limbo_lock", "NULL|self + values", "_limbo"}, + {"_active_limbo_lock", "values + NULL|self", "_limbo", "_active", "list + NULL"}, + ): + pydev_log.debug("Applying patching to hide pydevd threads (Py3 version).") + + def new_threading_enumerate(): + with _active_limbo_lock: + ret = list(_active.values()) + list(_limbo.values()) + + return [t for t in ret if not getattr(t, "is_pydev_daemon_thread", False)] + + elif found_load_names == set(("_active_limbo_lock", "_limbo", "_active", "values")): + pydev_log.debug("Applying patching to hide pydevd threads (Py2 version).") + + def new_threading_enumerate(): + with _active_limbo_lock: + ret = _active.values() + _limbo.values() + + return [t for t in ret if not getattr(t, "is_pydev_daemon_thread", False)] + + else: + pydev_log.info("Unable to hide pydevd threads. Found names in threading.enumerate: %s", found_load_names) + + if new_threading_enumerate is not None: + + def pydevd_saved_threading_enumerate(): + with threading._active_limbo_lock: + return list(threading._active.values()) + list(threading._limbo.values()) + + _pydev_saved_modules.pydevd_saved_threading_enumerate = pydevd_saved_threading_enumerate + + threading.enumerate.__code__ = new_threading_enumerate.__code__ + + # We also need to patch the active count (to match what we have in the enumerate). + def new_active_count(): + # Note: as this will be executed in the `threading` module, `enumerate` will + # actually be threading.enumerate. + return len(enumerate()) + + threading.active_count.__code__ = new_active_count.__code__ + + # When shutting down, Python (on some versions) may do something as: + # + # def _pickSomeNonDaemonThread(): + # for t in enumerate(): + # if not t.daemon and t.is_alive(): + # return t + # return None + # + # But in this particular case, we do want threads with `is_pydev_daemon_thread` to appear + # explicitly due to the pydevd `CheckAliveThread` (because we want the shutdown to wait on it). + # So, it can't rely on the `enumerate` for that anymore as it's patched to not return pydevd threads. + if hasattr(threading, "_pickSomeNonDaemonThread"): + + def new_pick_some_non_daemon_thread(): + with _active_limbo_lock: + # Ok for py2 and py3. + threads = list(_active.values()) + list(_limbo.values()) + + for t in threads: + if not t.daemon and t.is_alive(): + return t + return None + + threading._pickSomeNonDaemonThread.__code__ = new_pick_some_non_daemon_thread.__code__ + + +_patched_threading_to_hide_pydevd_threads = False + + +def mark_as_pydevd_daemon_thread(thread): + if not IS_JYTHON and not IS_IRONPYTHON and PYDEVD_APPLY_PATCHING_TO_HIDE_PYDEVD_THREADS: + global _patched_threading_to_hide_pydevd_threads + if not _patched_threading_to_hide_pydevd_threads: + # When we mark the first thread as a pydevd daemon thread, we also change the threading + # functions to hide pydevd threads. + # Note: we don't just "hide" the pydevd threads from the threading module by not using it + # (i.e.: just using the `thread.start_new_thread` instead of `threading.Thread`) + # because there's 1 thread (the `CheckAliveThread`) which is a pydevd thread but + # isn't really a daemon thread (so, we need CPython to wait on it for shutdown, + # in which case it needs to be in `threading` and the patching would be needed anyways). + _patched_threading_to_hide_pydevd_threads = True + try: + _patch_threading_to_hide_pydevd_threads() + except: + pydev_log.exception("Error applying patching to hide pydevd threads.") + + thread.pydev_do_not_trace = True + thread.is_pydev_daemon_thread = True + thread.daemon = True + + +def run_as_pydevd_daemon_thread(py_db, func, *args, **kwargs): + """ + Runs a function as a pydevd daemon thread (without any tracing in place). + """ + t = PyDBDaemonThread(py_db, target_and_args=(func, args, kwargs)) + t.name = "%s (pydevd daemon thread)" % (func.__name__,) + t.start() + return t diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_defaults.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_defaults.py new file mode 100644 index 0000000..b32576b --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_defaults.py @@ -0,0 +1,64 @@ +""" +This module holds the customization settings for the debugger. +""" + +from _pydevd_bundle.pydevd_constants import QUOTED_LINE_PROTOCOL +from _pydev_bundle import pydev_log +import sys + + +class PydevdCustomization(object): + DEFAULT_PROTOCOL: str = QUOTED_LINE_PROTOCOL + + # Debug mode may be set to 'debugpy-dap'. + # + # In 'debugpy-dap' mode the following settings are done to PyDB: + # + # py_db.skip_suspend_on_breakpoint_exception = (BaseException,) + # py_db.skip_print_breakpoint_exception = (NameError,) + # py_db.multi_threads_single_notification = True + DEBUG_MODE: str = "" + + # This may be a ; to be pre-imported + # Something as: 'c:/temp/foo;my_module.bar' + # + # What's done in this case is something as: + # + # sys.path.insert(0, ) + # try: + # import + # finally: + # del sys.path[0] + # + # If the pre-import fails an output message is + # sent (but apart from that debugger execution + # should continue). + PREIMPORT: str = "" + + +def on_pydb_init(py_db): + if PydevdCustomization.DEBUG_MODE == "debugpy-dap": + pydev_log.debug("Apply debug mode: debugpy-dap") + py_db.skip_suspend_on_breakpoint_exception = (BaseException,) + py_db.skip_print_breakpoint_exception = (NameError,) + py_db.multi_threads_single_notification = True + elif not PydevdCustomization.DEBUG_MODE: + pydev_log.debug("Apply debug mode: default") + else: + pydev_log.debug("WARNING: unknown debug mode: %s", PydevdCustomization.DEBUG_MODE) + + if PydevdCustomization.PREIMPORT: + pydev_log.debug("Preimport: %s", PydevdCustomization.PREIMPORT) + try: + sys_path_entry, module_name = PydevdCustomization.PREIMPORT.rsplit(";", maxsplit=1) + except Exception: + pydev_log.exception("Expected ';' in %s" % (PydevdCustomization.PREIMPORT,)) + else: + try: + sys.path.insert(0, sys_path_entry) + try: + __import__(module_name) + finally: + sys.path.remove(sys_path_entry) + except Exception: + pydev_log.exception("Error importing %s (with sys.path entry: %s)" % (module_name, sys_path_entry)) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace.py new file mode 100644 index 0000000..500cbce --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace.py @@ -0,0 +1,123 @@ +""" +Support for a tag that allows skipping over functions while debugging. +""" +import linecache +import re + +# To suppress tracing a method, add the tag @DontTrace +# to a comment either preceding or on the same line as +# the method definition +# +# E.g.: +# #@DontTrace +# def test1(): +# pass +# +# ... or ... +# +# def test2(): #@DontTrace +# pass +DONT_TRACE_TAG = "@DontTrace" + +# Regular expression to match a decorator (at the beginning +# of a line). +RE_DECORATOR = re.compile(r"^\s*@") + +# Mapping from code object to bool. +# If the key exists, the value is the cached result of should_trace_hook +_filename_to_ignored_lines = {} + + +def default_should_trace_hook(code, absolute_filename): + """ + Return True if this frame should be traced, False if tracing should be blocked. + """ + # First, check whether this code object has a cached value + ignored_lines = _filename_to_ignored_lines.get(absolute_filename) + if ignored_lines is None: + # Now, look up that line of code and check for a @DontTrace + # preceding or on the same line as the method. + # E.g.: + # #@DontTrace + # def test(): + # pass + # ... or ... + # def test(): #@DontTrace + # pass + ignored_lines = {} + lines = linecache.getlines(absolute_filename) + for i_line, line in enumerate(lines): + j = line.find("#") + if j >= 0: + comment = line[j:] + if DONT_TRACE_TAG in comment: + ignored_lines[i_line] = 1 + + # Note: when it's found in the comment, mark it up and down for the decorator lines found. + k = i_line - 1 + while k >= 0: + if RE_DECORATOR.match(lines[k]): + ignored_lines[k] = 1 + k -= 1 + else: + break + + k = i_line + 1 + while k <= len(lines): + if RE_DECORATOR.match(lines[k]): + ignored_lines[k] = 1 + k += 1 + else: + break + + _filename_to_ignored_lines[absolute_filename] = ignored_lines + + func_line = code.co_firstlineno - 1 # co_firstlineno is 1-based, so -1 is needed + return not ( + func_line - 1 in ignored_lines # -1 to get line before method + or func_line in ignored_lines + ) # method line + + +should_trace_hook = None + + +def clear_trace_filter_cache(): + """ + Clear the trace filter cache. + Call this after reloading. + """ + global should_trace_hook + try: + # Need to temporarily disable a hook because otherwise + # _filename_to_ignored_lines.clear() will never complete. + old_hook = should_trace_hook + should_trace_hook = None + + # Clear the linecache + linecache.clearcache() + _filename_to_ignored_lines.clear() + + finally: + should_trace_hook = old_hook + + +def trace_filter(mode): + """ + Set the trace filter mode. + + mode: Whether to enable the trace hook. + True: Trace filtering on (skipping methods tagged @DontTrace) + False: Trace filtering off (trace methods tagged @DontTrace) + None/default: Toggle trace filtering. + """ + global should_trace_hook + if mode is None: + mode = should_trace_hook is None + + if mode: + should_trace_hook = default_should_trace_hook + else: + should_trace_hook = None + + return mode diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py new file mode 100644 index 0000000..7fe1981 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py @@ -0,0 +1,178 @@ +# Important: Autogenerated file. + +# fmt: off +# DO NOT edit manually! +# DO NOT edit manually! + +LIB_FILE = 1 +PYDEV_FILE = 2 + +DONT_TRACE_DIRS = { + '_pydev_bundle': PYDEV_FILE, + '_pydev_runfiles': PYDEV_FILE, + '_pydevd_bundle': PYDEV_FILE, + '_pydevd_frame_eval': PYDEV_FILE, + '_pydevd_sys_monitoring': PYDEV_FILE, + 'pydev_ipython': LIB_FILE, + 'pydev_sitecustomize': PYDEV_FILE, + 'pydevd_attach_to_process': PYDEV_FILE, + 'pydevd_concurrency_analyser': PYDEV_FILE, + 'pydevd_plugins': PYDEV_FILE, + 'test_pydevd_reload': PYDEV_FILE, +} + +LIB_FILES_IN_DONT_TRACE_DIRS = { + '__init__.py', + 'inputhook.py', + 'inputhookglut.py', + 'inputhookgtk.py', + 'inputhookgtk3.py', + 'inputhookpyglet.py', + 'inputhookqt4.py', + 'inputhookqt5.py', + 'inputhookqt6.py', + 'inputhooktk.py', + 'inputhookwx.py', + 'matplotlibtools.py', + 'qt.py', + 'qt_for_kernel.py', + 'qt_loaders.py', + 'version.py', +} + +DONT_TRACE = { + # commonly used things from the stdlib that we don't want to trace + 'Queue.py':LIB_FILE, + 'queue.py':LIB_FILE, + 'socket.py':LIB_FILE, + 'weakref.py':LIB_FILE, + '_weakrefset.py':LIB_FILE, + 'linecache.py':LIB_FILE, + 'threading.py':LIB_FILE, + 'dis.py':LIB_FILE, + + # things from pydev that we don't want to trace + '__main__pydevd_gen_debug_adapter_protocol.py': PYDEV_FILE, + '_pydev_calltip_util.py': PYDEV_FILE, + '_pydev_completer.py': PYDEV_FILE, + '_pydev_execfile.py': PYDEV_FILE, + '_pydev_filesystem_encoding.py': PYDEV_FILE, + '_pydev_getopt.py': PYDEV_FILE, + '_pydev_imports_tipper.py': PYDEV_FILE, + '_pydev_jy_imports_tipper.py': PYDEV_FILE, + '_pydev_log.py': PYDEV_FILE, + '_pydev_saved_modules.py': PYDEV_FILE, + '_pydev_sys_patch.py': PYDEV_FILE, + '_pydev_tipper_common.py': PYDEV_FILE, + '_pydevd_sys_monitoring.py': PYDEV_FILE, + 'django_debug.py': PYDEV_FILE, + 'jinja2_debug.py': PYDEV_FILE, + 'pycompletionserver.py': PYDEV_FILE, + 'pydev_app_engine_debug_startup.py': PYDEV_FILE, + 'pydev_console_utils.py': PYDEV_FILE, + 'pydev_import_hook.py': PYDEV_FILE, + 'pydev_imports.py': PYDEV_FILE, + 'pydev_ipython_console.py': PYDEV_FILE, + 'pydev_ipython_console_011.py': PYDEV_FILE, + 'pydev_is_thread_alive.py': PYDEV_FILE, + 'pydev_localhost.py': PYDEV_FILE, + 'pydev_log.py': PYDEV_FILE, + 'pydev_monkey.py': PYDEV_FILE, + 'pydev_monkey_qt.py': PYDEV_FILE, + 'pydev_override.py': PYDEV_FILE, + 'pydev_run_in_console.py': PYDEV_FILE, + 'pydev_runfiles.py': PYDEV_FILE, + 'pydev_runfiles_coverage.py': PYDEV_FILE, + 'pydev_runfiles_nose.py': PYDEV_FILE, + 'pydev_runfiles_parallel.py': PYDEV_FILE, + 'pydev_runfiles_parallel_client.py': PYDEV_FILE, + 'pydev_runfiles_pytest2.py': PYDEV_FILE, + 'pydev_runfiles_unittest.py': PYDEV_FILE, + 'pydev_runfiles_xml_rpc.py': PYDEV_FILE, + 'pydev_umd.py': PYDEV_FILE, + 'pydev_versioncheck.py': PYDEV_FILE, + 'pydevconsole.py': PYDEV_FILE, + 'pydevconsole_code.py': PYDEV_FILE, + 'pydevd.py': PYDEV_FILE, + 'pydevd_additional_thread_info.py': PYDEV_FILE, + 'pydevd_additional_thread_info_regular.py': PYDEV_FILE, + 'pydevd_api.py': PYDEV_FILE, + 'pydevd_base_schema.py': PYDEV_FILE, + 'pydevd_breakpoints.py': PYDEV_FILE, + 'pydevd_bytecode_utils.py': PYDEV_FILE, + 'pydevd_bytecode_utils_py311.py': PYDEV_FILE, + 'pydevd_code_to_source.py': PYDEV_FILE, + 'pydevd_collect_bytecode_info.py': PYDEV_FILE, + 'pydevd_comm.py': PYDEV_FILE, + 'pydevd_comm_constants.py': PYDEV_FILE, + 'pydevd_command_line_handling.py': PYDEV_FILE, + 'pydevd_concurrency_logger.py': PYDEV_FILE, + 'pydevd_console.py': PYDEV_FILE, + 'pydevd_constants.py': PYDEV_FILE, + 'pydevd_custom_frames.py': PYDEV_FILE, + 'pydevd_cython_wrapper.py': PYDEV_FILE, + 'pydevd_daemon_thread.py': PYDEV_FILE, + 'pydevd_defaults.py': PYDEV_FILE, + 'pydevd_dont_trace.py': PYDEV_FILE, + 'pydevd_dont_trace_files.py': PYDEV_FILE, + 'pydevd_exec2.py': PYDEV_FILE, + 'pydevd_extension_api.py': PYDEV_FILE, + 'pydevd_extension_utils.py': PYDEV_FILE, + 'pydevd_file_utils.py': PYDEV_FILE, + 'pydevd_filtering.py': PYDEV_FILE, + 'pydevd_frame.py': PYDEV_FILE, + 'pydevd_frame_eval_cython_wrapper.py': PYDEV_FILE, + 'pydevd_frame_eval_main.py': PYDEV_FILE, + 'pydevd_frame_tracing.py': PYDEV_FILE, + 'pydevd_frame_utils.py': PYDEV_FILE, + 'pydevd_gevent_integration.py': PYDEV_FILE, + 'pydevd_helpers.py': PYDEV_FILE, + 'pydevd_import_class.py': PYDEV_FILE, + 'pydevd_io.py': PYDEV_FILE, + 'pydevd_json_debug_options.py': PYDEV_FILE, + 'pydevd_line_validation.py': PYDEV_FILE, + 'pydevd_modify_bytecode.py': PYDEV_FILE, + 'pydevd_net_command.py': PYDEV_FILE, + 'pydevd_net_command_factory_json.py': PYDEV_FILE, + 'pydevd_net_command_factory_xml.py': PYDEV_FILE, + 'pydevd_plugin_numpy_types.py': PYDEV_FILE, + 'pydevd_plugin_pandas_types.py': PYDEV_FILE, + 'pydevd_plugin_utils.py': PYDEV_FILE, + 'pydevd_plugins_django_form_str.py': PYDEV_FILE, + 'pydevd_process_net_command.py': PYDEV_FILE, + 'pydevd_process_net_command_json.py': PYDEV_FILE, + 'pydevd_referrers.py': PYDEV_FILE, + 'pydevd_reload.py': PYDEV_FILE, + 'pydevd_resolver.py': PYDEV_FILE, + 'pydevd_runpy.py': PYDEV_FILE, + 'pydevd_safe_repr.py': PYDEV_FILE, + 'pydevd_save_locals.py': PYDEV_FILE, + 'pydevd_schema.py': PYDEV_FILE, + 'pydevd_schema_log.py': PYDEV_FILE, + 'pydevd_signature.py': PYDEV_FILE, + 'pydevd_source_mapping.py': PYDEV_FILE, + 'pydevd_stackless.py': PYDEV_FILE, + 'pydevd_suspended_frames.py': PYDEV_FILE, + 'pydevd_sys_monitoring.py': PYDEV_FILE, + 'pydevd_thread_lifecycle.py': PYDEV_FILE, + 'pydevd_thread_wrappers.py': PYDEV_FILE, + 'pydevd_timeout.py': PYDEV_FILE, + 'pydevd_trace_dispatch.py': PYDEV_FILE, + 'pydevd_trace_dispatch_regular.py': PYDEV_FILE, + 'pydevd_traceproperty.py': PYDEV_FILE, + 'pydevd_tracing.py': PYDEV_FILE, + 'pydevd_utils.py': PYDEV_FILE, + 'pydevd_vars.py': PYDEV_FILE, + 'pydevd_vm_type.py': PYDEV_FILE, + 'pydevd_xml.py': PYDEV_FILE, +} + +# if we try to trace io.py it seems it can get halted (see http://bugs.python.org/issue4716) +DONT_TRACE['io.py'] = LIB_FILE + +# Don't trace common encodings too +DONT_TRACE['cp1252.py'] = LIB_FILE +DONT_TRACE['utf_8.py'] = LIB_FILE +DONT_TRACE['codecs.py'] = LIB_FILE + +# fmt: on diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_exec2.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_exec2.py new file mode 100644 index 0000000..486e8eb --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_exec2.py @@ -0,0 +1,5 @@ +def Exec(exp, global_vars, local_vars=None): + if local_vars is not None: + exec(exp, global_vars, local_vars) + else: + exec(exp, global_vars) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_api.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_api.py new file mode 100644 index 0000000..8cabe79 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_api.py @@ -0,0 +1,107 @@ +import abc +from typing import Any + + +# borrowed from from six +def _with_metaclass(meta, *bases): + """Create a base class with a metaclass.""" + + class metaclass(meta): + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + + return type.__new__(metaclass, "temporary_class", (), {}) + + +# ======================================================================================================================= +# AbstractResolver +# ======================================================================================================================= +class _AbstractResolver(_with_metaclass(abc.ABCMeta)): + """ + This class exists only for documentation purposes to explain how to create a resolver. + + Some examples on how to resolve things: + - list: get_dictionary could return a dict with index->item and use the index to resolve it later + - set: get_dictionary could return a dict with id(object)->object and reiterate in that array to resolve it later + - arbitrary instance: get_dictionary could return dict with attr_name->attr and use getattr to resolve it later + """ + + @abc.abstractmethod + def resolve(self, var, attribute): + """ + In this method, we'll resolve some child item given the string representation of the item in the key + representing the previously asked dictionary. + + :param var: this is the actual variable to be resolved. + :param attribute: this is the string representation of a key previously returned in get_dictionary. + """ + raise NotImplementedError + + @abc.abstractmethod + def get_dictionary(self, var): + """ + :param var: this is the variable that should have its children gotten. + + :return: a dictionary where each pair key, value should be shown to the user as children items + in the variables view for the given var. + """ + raise NotImplementedError + + +class _AbstractProvider(_with_metaclass(abc.ABCMeta)): + @abc.abstractmethod + def can_provide(self, type_object, type_name): + raise NotImplementedError + + +# ======================================================================================================================= +# API CLASSES: +# ======================================================================================================================= + + +class TypeResolveProvider(_AbstractResolver, _AbstractProvider): + """ + Implement this in an extension to provide a custom resolver, see _AbstractResolver + """ + + +class StrPresentationProvider(_AbstractProvider): + """ + Implement this in an extension to provide a str presentation for a type + """ + + def get_str_in_context(self, val: Any, context: str): + """ + :param val: + This is the object for which we want a string representation. + + :param context: + This is the context in which the variable is being requested. Valid values: + "watch", + "repl", + "hover", + "clipboard" + + :note: this method is not required (if it's not available, get_str is called directly, + so, it's only needed if the string representation needs to be converted based on + the context). + """ + return self.get_str(val) + + @abc.abstractmethod + def get_str(self, val): + raise NotImplementedError + + +class DebuggerEventHandler(_with_metaclass(abc.ABCMeta)): + """ + Implement this to receive lifecycle events from the debugger + """ + + def on_debugger_modules_loaded(self, **kwargs): + """ + This method invoked after all debugger modules are loaded. Useful for importing and/or patching debugger + modules at a safe time + :param kwargs: This is intended to be flexible dict passed from the debugger. + Currently passes the debugger version + """ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_utils.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_utils.py new file mode 100644 index 0000000..e10b69b --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_utils.py @@ -0,0 +1,65 @@ +import pkgutil +import sys +from _pydev_bundle import pydev_log + +try: + import pydevd_plugins.extensions as extensions +except: + pydev_log.exception() + extensions = None + + +class ExtensionManager(object): + def __init__(self): + self.loaded_extensions = None + self.type_to_instance = {} + + def _load_modules(self): + self.loaded_extensions = [] + if extensions: + for module_loader, name, ispkg in pkgutil.walk_packages(extensions.__path__, extensions.__name__ + "."): + mod_name = name.split(".")[-1] + if not ispkg and mod_name.startswith("pydevd_plugin"): + try: + __import__(name) + module = sys.modules[name] + self.loaded_extensions.append(module) + except ImportError: + pydev_log.critical("Unable to load extension: %s", name) + + def _ensure_loaded(self): + if self.loaded_extensions is None: + self._load_modules() + + def _iter_attr(self): + for extension in self.loaded_extensions: + dunder_all = getattr(extension, "__all__", None) + for attr_name in dir(extension): + if not attr_name.startswith("_"): + if dunder_all is None or attr_name in dunder_all: + yield attr_name, getattr(extension, attr_name) + + def get_extension_classes(self, extension_type): + self._ensure_loaded() + if extension_type in self.type_to_instance: + return self.type_to_instance[extension_type] + handlers = self.type_to_instance.setdefault(extension_type, []) + for attr_name, attr in self._iter_attr(): + if isinstance(attr, type) and issubclass(attr, extension_type) and attr is not extension_type: + try: + handlers.append(attr()) + except: + pydev_log.exception("Unable to load extension class: %s", attr_name) + return handlers + + +EXTENSION_MANAGER_INSTANCE = ExtensionManager() + + +def extensions_of_type(extension_type): + """ + + :param T extension_type: The type of the extension hook + :rtype: list[T] + """ + return EXTENSION_MANAGER_INSTANCE.get_extension_classes(extension_type) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py new file mode 100644 index 0000000..c0cf395 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py @@ -0,0 +1,338 @@ +import fnmatch +import glob +import os.path +import sys + +from _pydev_bundle import pydev_log +import pydevd_file_utils +import json +from collections import namedtuple +from _pydev_bundle._pydev_saved_modules import threading +from pydevd_file_utils import normcase +from _pydevd_bundle.pydevd_constants import USER_CODE_BASENAMES_STARTING_WITH, LIBRARY_CODE_BASENAMES_STARTING_WITH, IS_PYPY, IS_WINDOWS +from _pydevd_bundle import pydevd_constants +from _pydevd_bundle.pydevd_constants import is_true_in_env + +ExcludeFilter = namedtuple("ExcludeFilter", "name, exclude, is_path") + + +def _convert_to_str_and_clear_empty(roots): + new_roots = [] + for root in roots: + assert isinstance(root, str), "%s not str (found: %s)" % (root, type(root)) + if root: + new_roots.append(root) + return new_roots + + +def _check_matches(patterns, paths): + if not patterns and not paths: + # Matched to the end. + return True + + if (not patterns and paths) or (patterns and not paths): + return False + + pattern = normcase(patterns[0]) + path = normcase(paths[0]) + + if not glob.has_magic(pattern): + if pattern != path: + return False + + elif pattern == "**": + if len(patterns) == 1: + return True # if ** is the last one it matches anything to the right. + + for i in range(len(paths)): + # Recursively check the remaining patterns as the + # current pattern could match any number of paths. + if _check_matches(patterns[1:], paths[i:]): + return True + + elif not fnmatch.fnmatch(path, pattern): + # Current part doesn't match. + return False + + return _check_matches(patterns[1:], paths[1:]) + + +def glob_matches_path(path, pattern, sep=os.sep, altsep=os.altsep): + if altsep: + pattern = pattern.replace(altsep, sep) + path = path.replace(altsep, sep) + + drive = "" + if len(path) > 1 and path[1] == ":": + drive, path = path[0], path[2:] + + if drive and len(pattern) > 1: + if pattern[1] == ":": + if drive.lower() != pattern[0].lower(): + return False + pattern = pattern[2:] + + patterns = pattern.split(sep) + paths = path.split(sep) + if paths: + if paths[0] == "": + paths = paths[1:] + if patterns: + if patterns[0] == "": + patterns = patterns[1:] + + return _check_matches(patterns, paths) + + +class FilesFiltering(object): + """ + Note: calls at FilesFiltering are uncached. + + The actual API used should be through PyDB. + """ + + def __init__(self): + self._exclude_filters = [] + self._project_roots = [] + self._library_roots = [] + + # Filter out libraries? + self._use_libraries_filter = False + self.require_module = False # True if some exclude filter filters by the module. + + self.set_use_libraries_filter(is_true_in_env("PYDEVD_FILTER_LIBRARIES")) + + project_roots = os.getenv("IDE_PROJECT_ROOTS", None) + if project_roots is not None: + project_roots = project_roots.split(os.pathsep) + else: + project_roots = [] + self.set_project_roots(project_roots) + + library_roots = os.getenv("LIBRARY_ROOTS", None) + if library_roots is not None: + library_roots = library_roots.split(os.pathsep) + else: + library_roots = self._get_default_library_roots() + self.set_library_roots(library_roots) + + # Stepping filters. + pydevd_filters = os.getenv("PYDEVD_FILTERS", "") + # To filter out it's something as: {'**/not_my_code/**': True} + if pydevd_filters: + pydev_log.debug("PYDEVD_FILTERS %s", (pydevd_filters,)) + if pydevd_filters.startswith("{"): + # dict(glob_pattern (str) -> exclude(True or False)) + exclude_filters = [] + for key, val in json.loads(pydevd_filters).items(): + exclude_filters.append(ExcludeFilter(key, val, True)) + self._exclude_filters = exclude_filters + else: + # A ';' separated list of strings with globs for the + # list of excludes. + filters = pydevd_filters.split(";") + new_filters = [] + for new_filter in filters: + if new_filter.strip(): + new_filters.append(ExcludeFilter(new_filter.strip(), True, True)) + self._exclude_filters = new_filters + + @classmethod + def _get_default_library_roots(cls): + pydev_log.debug("Collecting default library roots.") + # Provide sensible defaults if not in env vars. + import site + + roots = [] + + try: + import sysconfig # Python 2.7 onwards only. + except ImportError: + pass + else: + for path_name in set(("stdlib", "platstdlib", "purelib", "platlib")) & set(sysconfig.get_path_names()): + roots.append(sysconfig.get_path(path_name)) + + # Make sure we always get at least the standard library location (based on the `os` and + # `threading` modules -- it's a bit weird that it may be different on the ci, but it happens). + roots.append(os.path.dirname(os.__file__)) + roots.append(os.path.dirname(threading.__file__)) + if IS_PYPY: + # On PyPy 3.6 (7.3.1) it wrongly says that sysconfig.get_path('stdlib') is + # /lib-pypy when the installed version is /lib_pypy. + try: + import _pypy_wait + except ImportError: + pydev_log.debug("Unable to import _pypy_wait on PyPy when collecting default library roots.") + else: + pypy_lib_dir = os.path.dirname(_pypy_wait.__file__) + pydev_log.debug("Adding %s to default library roots.", pypy_lib_dir) + roots.append(pypy_lib_dir) + + if hasattr(site, "getusersitepackages"): + site_paths = site.getusersitepackages() + if isinstance(site_paths, (list, tuple)): + for site_path in site_paths: + roots.append(site_path) + else: + roots.append(site_paths) + + if hasattr(site, "getsitepackages"): + site_paths = site.getsitepackages() + if isinstance(site_paths, (list, tuple)): + for site_path in site_paths: + roots.append(site_path) + else: + roots.append(site_paths) + + for path in sys.path: + if os.path.exists(path) and os.path.basename(path) in ("site-packages", "pip-global"): + roots.append(path) + + # On WASM some of the roots may not exist, filter those out. + roots = [path for path in roots if path is not None] + roots.extend([os.path.realpath(path) for path in roots]) + + return sorted(set(roots)) + + def _fix_roots(self, roots): + roots = _convert_to_str_and_clear_empty(roots) + new_roots = [] + for root in roots: + path = self._absolute_normalized_path(root) + if pydevd_constants.IS_WINDOWS: + new_roots.append(path + "\\") + else: + new_roots.append(path + "/") + return new_roots + + def _absolute_normalized_path(self, filename): + """ + Provides a version of the filename that's absolute and normalized. + """ + return normcase(pydevd_file_utils.absolute_path(filename)) + + def set_project_roots(self, project_roots): + self._project_roots = self._fix_roots(project_roots) + pydev_log.debug("IDE_PROJECT_ROOTS %s\n" % project_roots) + + def _get_project_roots(self): + return self._project_roots + + def set_library_roots(self, roots): + self._library_roots = self._fix_roots(roots) + pydev_log.debug("LIBRARY_ROOTS %s\n" % roots) + + def _get_library_roots(self): + return self._library_roots + + def in_project_roots(self, received_filename): + """ + Note: don't call directly. Use PyDb.in_project_scope (there's no caching here and it doesn't + handle all possibilities for knowing whether a project is actually in the scope, it + just handles the heuristics based on the absolute_normalized_filename without the actual frame). + """ + DEBUG = False + + if received_filename.startswith(USER_CODE_BASENAMES_STARTING_WITH): + if DEBUG: + pydev_log.debug( + "In in_project_roots - user basenames - starts with %s (%s)", received_filename, USER_CODE_BASENAMES_STARTING_WITH + ) + return True + + if received_filename.startswith(LIBRARY_CODE_BASENAMES_STARTING_WITH): + if DEBUG: + pydev_log.debug( + "Not in in_project_roots - library basenames - starts with %s (%s)", + received_filename, + LIBRARY_CODE_BASENAMES_STARTING_WITH, + ) + return False + + project_roots = self._get_project_roots() # roots are absolute/normalized. + + absolute_normalized_filename = self._absolute_normalized_path(received_filename) + absolute_normalized_filename_as_dir = absolute_normalized_filename + ("\\" if IS_WINDOWS else "/") + + found_in_project = [] + for root in project_roots: + if root and (absolute_normalized_filename.startswith(root) or root == absolute_normalized_filename_as_dir): + if DEBUG: + pydev_log.debug("In project: %s (%s)", absolute_normalized_filename, root) + found_in_project.append(root) + + found_in_library = [] + library_roots = self._get_library_roots() + for root in library_roots: + if root and (absolute_normalized_filename.startswith(root) or root == absolute_normalized_filename_as_dir): + found_in_library.append(root) + if DEBUG: + pydev_log.debug("In library: %s (%s)", absolute_normalized_filename, root) + else: + if DEBUG: + pydev_log.debug("Not in library: %s (%s)", absolute_normalized_filename, root) + + if not project_roots: + # If we have no project roots configured, consider it being in the project + # roots if it's not found in site-packages (because we have defaults for those + # and not the other way around). + in_project = not found_in_library + if DEBUG: + pydev_log.debug("Final in project (no project roots): %s (%s)", absolute_normalized_filename, in_project) + + else: + in_project = False + if found_in_project: + if not found_in_library: + if DEBUG: + pydev_log.debug("Final in project (in_project and not found_in_library): %s (True)", absolute_normalized_filename) + in_project = True + else: + # Found in both, let's see which one has the bigger path matched. + if max(len(x) for x in found_in_project) > max(len(x) for x in found_in_library): + in_project = True + if DEBUG: + pydev_log.debug("Final in project (found in both): %s (%s)", absolute_normalized_filename, in_project) + + return in_project + + def use_libraries_filter(self): + """ + Should we debug only what's inside project folders? + """ + return self._use_libraries_filter + + def set_use_libraries_filter(self, use): + pydev_log.debug("pydevd: Use libraries filter: %s\n" % use) + self._use_libraries_filter = use + + def use_exclude_filters(self): + # Enabled if we have any filters registered. + return len(self._exclude_filters) > 0 + + def exclude_by_filter(self, absolute_filename, module_name): + """ + :return: True if it should be excluded, False if it should be included and None + if no rule matched the given file. + """ + for exclude_filter in self._exclude_filters: # : :type exclude_filter: ExcludeFilter + if exclude_filter.is_path: + if glob_matches_path(absolute_filename, exclude_filter.name): + return exclude_filter.exclude + else: + # Module filter. + if exclude_filter.name == module_name or module_name.startswith(exclude_filter.name + "."): + return exclude_filter.exclude + return None + + def set_exclude_filters(self, exclude_filters): + """ + :param list(ExcludeFilter) exclude_filters: + """ + self._exclude_filters = exclude_filters + self.require_module = False + for exclude_filter in exclude_filters: + if not exclude_filter.is_path: + self.require_module = True + break diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py new file mode 100644 index 0000000..0ca23e8 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py @@ -0,0 +1,1307 @@ +import linecache +import os.path +import re + +from _pydev_bundle import pydev_log +from _pydevd_bundle import pydevd_dont_trace +from _pydevd_bundle.pydevd_constants import ( + RETURN_VALUES_DICT, + NO_FTRACE, + EXCEPTION_TYPE_HANDLED, + EXCEPTION_TYPE_USER_UNHANDLED, + PYDEVD_IPYTHON_CONTEXT, + PYDEVD_USE_SYS_MONITORING, +) +from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace +from _pydevd_bundle.pydevd_utils import get_clsname_for_code +from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame +from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK +import sys + +try: + from _pydevd_bundle.pydevd_bytecode_utils import get_smart_step_into_variant_from_frame_offset +except ImportError: + + def get_smart_step_into_variant_from_frame_offset(*args, **kwargs): + return None + +# IFDEF CYTHON +# cython_inline_constant: CMD_STEP_INTO = 107 +# cython_inline_constant: CMD_STEP_INTO_MY_CODE = 144 +# cython_inline_constant: CMD_STEP_RETURN = 109 +# cython_inline_constant: CMD_STEP_RETURN_MY_CODE = 160 +# cython_inline_constant: CMD_STEP_OVER = 108 +# cython_inline_constant: CMD_STEP_OVER_MY_CODE = 159 +# cython_inline_constant: CMD_STEP_CAUGHT_EXCEPTION = 137 +# cython_inline_constant: CMD_SET_BREAK = 111 +# cython_inline_constant: CMD_SMART_STEP_INTO = 128 +# cython_inline_constant: CMD_STEP_INTO_COROUTINE = 206 +# cython_inline_constant: STATE_RUN = 1 +# cython_inline_constant: STATE_SUSPEND = 2 +# ELSE +# Note: those are now inlined on cython. +CMD_STEP_INTO = 107 +CMD_STEP_INTO_MY_CODE = 144 +CMD_STEP_RETURN = 109 +CMD_STEP_RETURN_MY_CODE = 160 +CMD_STEP_OVER = 108 +CMD_STEP_OVER_MY_CODE = 159 +CMD_STEP_CAUGHT_EXCEPTION = 137 +CMD_SET_BREAK = 111 +CMD_SMART_STEP_INTO = 128 +CMD_STEP_INTO_COROUTINE = 206 +STATE_RUN = 1 +STATE_SUSPEND = 2 +# ENDIF + +basename = os.path.basename + +IGNORE_EXCEPTION_TAG = re.compile("[^#]*#.*@IgnoreException") +DEBUG_START = ("pydevd.py", "run") +DEBUG_START_PY3K = ("_pydev_execfile.py", "execfile") +TRACE_PROPERTY = "pydevd_traceproperty.py" + +import dis + +try: + StopAsyncIteration +except NameError: + StopAsyncIteration = StopIteration + + +# IFDEF CYTHON +# def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines): +# ELSE +def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines): + # ENDIF + if frame.f_lineno in raise_lines: + return True + + else: + try_except_infos = container_obj.try_except_infos + if try_except_infos is None: + container_obj.try_except_infos = try_except_infos = py_db.collect_try_except_info(frame.f_code) + + if not try_except_infos: + # Consider the last exception as unhandled because there's no try..except in it. + return True + else: + # Now, consider only the try..except for the raise + valid_try_except_infos = [] + for try_except_info in try_except_infos: + if try_except_info.is_line_in_try_block(last_raise_line): + valid_try_except_infos.append(try_except_info) + + if not valid_try_except_infos: + return True + + else: + # Note: check all, not only the "valid" ones to cover the case + # in "tests_python.test_tracing_on_top_level.raise_unhandled10" + # where one try..except is inside the other with only a raise + # and it's gotten in the except line. + for try_except_info in try_except_infos: + if try_except_info.is_line_in_except_block(frame.f_lineno): + if frame.f_lineno == try_except_info.except_line or frame.f_lineno in try_except_info.raise_lines_in_except: + # In a raise inside a try..except block or some except which doesn't + # match the raised exception. + return True + return False + + +# IFDEF CYTHON +# cdef class _TryExceptContainerObj: +# cdef public list try_except_infos; +# def __init__(self): +# self.try_except_infos = None +# ELSE +class _TryExceptContainerObj(object): + """ + A dumb container object just to contain the try..except info when needed. Meant to be + persistent among multiple PyDBFrames to the same code object. + """ + + try_except_infos = None + +# ENDIF + + +# ======================================================================================================================= +# PyDBFrame +# ======================================================================================================================= +# IFDEF CYTHON +# cdef class PyDBFrame: +# ELSE +class PyDBFrame: + """This makes the tracing for a given frame, so, the trace_dispatch + is used initially when we enter into a new context ('call') and then + is reused for the entire context. + """ + + # ENDIF + + # IFDEF CYTHON + # cdef tuple _args + # cdef int should_skip + # cdef object exc_info + # def __init__(self, tuple args): + # self._args = args # In the cython version we don't need to pass the frame + # self.should_skip = -1 # On cythonized version, put in instance. + # self.exc_info = () + # ELSE + should_skip = -1 # Default value in class (put in instance on set). + exc_info = () # Default value in class (put in instance on set). + + if PYDEVD_USE_SYS_MONITORING: + + def __init__(self, *args, **kwargs): + raise RuntimeError("Not expected to be used in sys.monitoring.") + + else: + + def __init__(self, args): + # args = py_db, abs_path_canonical_path_and_base, base, info, t, frame + # yeap, much faster than putting in self and then getting it from self later on + self._args = args + # ENDIF + + def set_suspend(self, *args, **kwargs): + self._args[0].set_suspend(*args, **kwargs) + + def do_wait_suspend(self, *args, **kwargs): + self._args[0].do_wait_suspend(*args, **kwargs) + + # IFDEF CYTHON + # def trace_exception(self, frame, str event, arg): + # cdef bint should_stop; + # cdef tuple exc_info; + # ELSE + def trace_exception(self, frame, event, arg): + # ENDIF + if event == "exception": + should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info) + self.exc_info = exc_info + + if should_stop: + if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + return self.trace_dispatch + + elif event == "return": + exc_info = self.exc_info + if exc_info and arg is None: + frame_skips_cache, frame_cache_key = self._args[4], self._args[5] + custom_key = (frame_cache_key, "try_exc_info") + container_obj = frame_skips_cache.get(custom_key) + if container_obj is None: + container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj() + if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and self.handle_user_exception( + frame + ): + return self.trace_dispatch + + return self.trace_exception + + def handle_user_exception(self, frame): + exc_info = self.exc_info + if exc_info: + return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED) + return False + + # IFDEF CYTHON + # cdef get_func_name(self, frame): + # cdef str func_name + # ELSE + def get_func_name(self, frame): + # ENDIF + code_obj = frame.f_code + func_name = code_obj.co_name + try: + cls_name = get_clsname_for_code(code_obj, frame) + if cls_name is not None: + return "%s.%s" % (cls_name, func_name) + else: + return func_name + except: + pydev_log.exception() + return func_name + + # IFDEF CYTHON + # cdef _show_return_values(self, frame, arg): + # ELSE + def _show_return_values(self, frame, arg): + # ENDIF + try: + try: + f_locals_back = getattr(frame.f_back, "f_locals", None) + if f_locals_back is not None: + return_values_dict = f_locals_back.get(RETURN_VALUES_DICT, None) + if return_values_dict is None: + return_values_dict = {} + f_locals_back[RETURN_VALUES_DICT] = return_values_dict + name = self.get_func_name(frame) + return_values_dict[name] = arg + except: + pydev_log.exception() + finally: + f_locals_back = None + + # IFDEF CYTHON + # cdef _remove_return_values(self, py_db, frame): + # ELSE + def _remove_return_values(self, py_db, frame): + # ENDIF + try: + try: + # Showing return values was turned off, we should remove them from locals dict. + # The values can be in the current frame or in the back one + frame.f_locals.pop(RETURN_VALUES_DICT, None) + + f_locals_back = getattr(frame.f_back, "f_locals", None) + if f_locals_back is not None: + f_locals_back.pop(RETURN_VALUES_DICT, None) + except: + pydev_log.exception() + finally: + f_locals_back = None + + # IFDEF CYTHON + # cdef _get_unfiltered_back_frame(self, py_db, frame): + # ELSE + def _get_unfiltered_back_frame(self, py_db, frame): + # ENDIF + f = frame.f_back + while f is not None: + if not py_db.is_files_filter_enabled: + return f + + else: + if py_db.apply_files_filter(f, f.f_code.co_filename, False): + f = f.f_back + + else: + return f + + return f + + # IFDEF CYTHON + # cdef _is_same_frame(self, target_frame, current_frame): + # cdef PyDBAdditionalThreadInfo info; + # ELSE + def _is_same_frame(self, target_frame, current_frame): + # ENDIF + if target_frame is current_frame: + return True + + info = self._args[2] + if info.pydev_use_scoped_step_frame: + # If using scoped step we don't check the target, we just need to check + # if the current matches the same heuristic where the target was defined. + if target_frame is not None and current_frame is not None: + if target_frame.f_code.co_filename == current_frame.f_code.co_filename: + # The co_name may be different (it may include the line number), but + # the filename must still be the same. + f = current_frame.f_back + if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + f = f.f_back + if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + return True + + return False + + # IFDEF CYTHON + # cpdef trace_dispatch(self, frame, str event, arg): + # cdef tuple abs_path_canonical_path_and_base; + # cdef bint is_exception_event; + # cdef bint has_exception_breakpoints; + # cdef bint can_skip; + # cdef bint stop; + # cdef bint stop_on_plugin_breakpoint; + # cdef PyDBAdditionalThreadInfo info; + # cdef int step_cmd; + # cdef int line; + # cdef bint is_line; + # cdef bint is_call; + # cdef bint is_return; + # cdef bint should_stop; + # cdef dict breakpoints_for_file; + # cdef dict stop_info; + # cdef str curr_func_name; + # cdef dict frame_skips_cache; + # cdef object frame_cache_key; + # cdef tuple line_cache_key; + # cdef int breakpoints_in_line_cache; + # cdef int breakpoints_in_frame_cache; + # cdef bint has_breakpoint_in_frame; + # cdef bint is_coroutine_or_generator; + # cdef int bp_line; + # cdef object bp; + # cdef int pydev_smart_parent_offset + # cdef int pydev_smart_child_offset + # cdef tuple pydev_smart_step_into_variants + # ELSE + def trace_dispatch(self, frame, event, arg): + # ENDIF + # Note: this is a big function because most of the logic related to hitting a breakpoint and + # stepping is contained in it. Ideally this could be split among multiple functions, but the + # problem in this case is that in pure-python function calls are expensive and even more so + # when tracing is on (because each function call will get an additional tracing call). We + # try to address this by using the info.is_tracing for the fastest possible return, but the + # cost is still high (maybe we could use code-generation in the future and make the code + # generation be better split among what each part does). + + try: + # DEBUG = '_debugger_case_yield_from.py' in frame.f_code.co_filename + py_db, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args + # if DEBUG: print('frame trace_dispatch %s %s %s %s %s %s, stop: %s' % (frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename, event, constant_to_str(info.pydev_step_cmd), arg, info.pydev_step_stop)) + info.is_tracing += 1 + + # TODO: This shouldn't be needed. The fact that frame.f_lineno + # is None seems like a bug in Python 3.11. + # Reported in: https://github.com/python/cpython/issues/94485 + line = frame.f_lineno or 0 # Workaround or case where frame.f_lineno is None + line_cache_key = (frame_cache_key, line) + + if py_db.pydb_disposed: + return None if event == "call" else NO_FTRACE + + plugin_manager = py_db.plugin + has_exception_breakpoints = ( + py_db.break_on_caught_exceptions or py_db.break_on_user_uncaught_exceptions or py_db.has_plugin_exception_breaks + ) + + stop_frame = info.pydev_step_stop + step_cmd = info.pydev_step_cmd + function_breakpoint_on_call_event = None + + if frame.f_code.co_flags & 0xA0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80 + # Dealing with coroutines and generators: + # When in a coroutine we change the perceived event to the debugger because + # a call, StopIteration exception and return are usually just pausing/unpausing it. + if event == "line": + is_line = True + is_call = False + is_return = False + is_exception_event = False + + elif event == "return": + is_line = False + is_call = False + is_return = True + is_exception_event = False + + returns_cache_key = (frame_cache_key, "returns") + return_lines = frame_skips_cache.get(returns_cache_key) + if return_lines is None: + # Note: we're collecting the return lines by inspecting the bytecode as + # there are multiple returns and multiple stop iterations when awaiting and + # it doesn't give any clear indication when a coroutine or generator is + # finishing or just pausing. + return_lines = set() + for x in py_db.collect_return_info(frame.f_code): + # Note: cython does not support closures in cpdefs (so we can't use + # a list comprehension). + return_lines.add(x.return_line) + + frame_skips_cache[returns_cache_key] = return_lines + + if line not in return_lines: + # Not really a return (coroutine/generator paused). + return self.trace_dispatch + else: + if self.exc_info: + self.handle_user_exception(frame) + return self.trace_dispatch + + # Tricky handling: usually when we're on a frame which is about to exit + # we set the step mode to step into, but in this case we'd end up in the + # asyncio internal machinery, which is not what we want, so, we just + # ask the stop frame to be a level up. + # + # Note that there's an issue here which we may want to fix in the future: if + # the back frame is a frame which is filtered, we won't stop properly. + # Solving this may not be trivial as we'd need to put a scope in the step + # in, but we may have to do it anyways to have a step in which doesn't end + # up in asyncio). + # + # Note2: we don't revert to a step in if we're doing scoped stepping + # (because on scoped stepping we're always receiving a call/line/return + # event for each line in ipython, so, we can't revert to step in on return + # as the return shouldn't mean that we've actually completed executing a + # frame in this case). + if stop_frame is frame and not info.pydev_use_scoped_step_frame: + if step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE, CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE): + f = self._get_unfiltered_back_frame(py_db, frame) + if f is not None: + info.pydev_step_cmd = CMD_STEP_INTO_COROUTINE + info.pydev_step_stop = f + else: + if step_cmd == CMD_STEP_OVER: + info.pydev_step_cmd = CMD_STEP_INTO + info.pydev_step_stop = None + + elif step_cmd == CMD_STEP_OVER_MY_CODE: + info.pydev_step_cmd = CMD_STEP_INTO_MY_CODE + info.pydev_step_stop = None + + elif step_cmd == CMD_STEP_INTO_COROUTINE: + # We're exiting this one, so, mark the new coroutine context. + f = self._get_unfiltered_back_frame(py_db, frame) + if f is not None: + info.pydev_step_stop = f + else: + info.pydev_step_cmd = CMD_STEP_INTO + info.pydev_step_stop = None + + elif event == "exception": + breakpoints_for_file = None + if has_exception_breakpoints: + should_stop, frame, exc_info = should_stop_on_exception( + self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + ) + self.exc_info = exc_info + if should_stop: + if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + return self.trace_dispatch + + return self.trace_dispatch + else: + # event == 'call' or event == 'c_XXX' + return self.trace_dispatch + + else: # Not coroutine nor generator + if event == "line": + is_line = True + is_call = False + is_return = False + is_exception_event = False + + elif event == "return": + is_line = False + is_return = True + is_call = False + is_exception_event = False + + # If we are in single step mode and something causes us to exit the current frame, we need to make sure we break + # eventually. Force the step mode to step into and the step stop frame to None. + # I.e.: F6 in the end of a function should stop in the next possible position (instead of forcing the user + # to make a step in or step over at that location). + # Note: this is especially troublesome when we're skipping code with the + # @DontTrace comment. + if ( + stop_frame is frame + and not info.pydev_use_scoped_step_frame + and is_return + and step_cmd + in (CMD_STEP_OVER, CMD_STEP_RETURN, CMD_STEP_OVER_MY_CODE, CMD_STEP_RETURN_MY_CODE, CMD_SMART_STEP_INTO) + ): + if step_cmd in (CMD_STEP_OVER, CMD_STEP_RETURN, CMD_SMART_STEP_INTO): + info.pydev_step_cmd = CMD_STEP_INTO + else: + info.pydev_step_cmd = CMD_STEP_INTO_MY_CODE + info.pydev_step_stop = None + + if self.exc_info: + if self.handle_user_exception(frame): + return self.trace_dispatch + + elif event == "call": + is_line = False + is_call = True + is_return = False + is_exception_event = False + if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await. + function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name) + + elif event == "exception": + is_exception_event = True + breakpoints_for_file = None + if has_exception_breakpoints: + should_stop, frame, exc_info = should_stop_on_exception( + self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info + ) + self.exc_info = exc_info + if should_stop: + if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED): + return self.trace_dispatch + is_line = False + is_return = False + is_call = False + + else: + # Unexpected: just keep the same trace func (i.e.: event == 'c_XXX'). + return self.trace_dispatch + + if not is_exception_event: + breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1]) + + can_skip = False + + if info.pydev_state == 1: # STATE_RUN = 1 + # we can skip if: + # - we have no stop marked + # - we should make a step return/step over and we're not in the current frame + # - we're stepping into a coroutine context and we're not in that context + if step_cmd == -1: + can_skip = True + + elif step_cmd in ( + CMD_STEP_OVER, + CMD_STEP_RETURN, + CMD_STEP_OVER_MY_CODE, + CMD_STEP_RETURN_MY_CODE, + ) and not self._is_same_frame(stop_frame, frame): + can_skip = True + + elif step_cmd == CMD_SMART_STEP_INTO and ( + stop_frame is not None + and stop_frame is not frame + and stop_frame is not frame.f_back + and (frame.f_back is None or stop_frame is not frame.f_back.f_back) + ): + can_skip = True + + elif step_cmd == CMD_STEP_INTO_MY_CODE: + if py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( + frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + ): + can_skip = True + + elif step_cmd == CMD_STEP_INTO_COROUTINE: + f = frame + while f is not None: + if self._is_same_frame(stop_frame, f): + break + f = f.f_back + else: + can_skip = True + + if can_skip: + if plugin_manager is not None and (py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks): + can_skip = plugin_manager.can_skip(py_db, frame) + + if ( + can_skip + and py_db.show_return_values + and info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) + and self._is_same_frame(stop_frame, frame.f_back) + ): + # trace function for showing return values after step over + can_skip = False + + # Let's check to see if we are in a function that has a breakpoint. If we don't have a breakpoint, + # we will return nothing for the next trace + # also, after we hit a breakpoint and go to some other debugging state, we have to force the set trace anyway, + # so, that's why the additional checks are there. + + if function_breakpoint_on_call_event: + pass # Do nothing here (just keep on going as we can't skip it). + + elif not breakpoints_for_file: + if can_skip: + if has_exception_breakpoints: + return self.trace_exception + else: + return None if is_call else NO_FTRACE + + else: + # When cached, 0 means we don't have a breakpoint and 1 means we have. + if can_skip: + breakpoints_in_line_cache = frame_skips_cache.get(line_cache_key, -1) + if breakpoints_in_line_cache == 0: + return self.trace_dispatch + + breakpoints_in_frame_cache = frame_skips_cache.get(frame_cache_key, -1) + if breakpoints_in_frame_cache != -1: + # Gotten from cache. + has_breakpoint_in_frame = breakpoints_in_frame_cache == 1 + + else: + has_breakpoint_in_frame = False + + try: + func_lines = set() + for offset_and_lineno in dis.findlinestarts(frame.f_code): + if offset_and_lineno[1] is not None: + func_lines.add(offset_and_lineno[1]) + except: + # This is a fallback for implementations where we can't get the function + # lines -- i.e.: jython (in this case clients need to provide the function + # name to decide on the skip or we won't be able to skip the function + # completely). + + # Checks the breakpoint to see if there is a context match in some function. + curr_func_name = frame.f_code.co_name + + # global context is set with an empty name + if curr_func_name in ("?", "", ""): + curr_func_name = "" + + for bp in breakpoints_for_file.values(): + # will match either global or some function + if bp.func_name in ("None", curr_func_name): + has_breakpoint_in_frame = True + break + else: + for bp_line in breakpoints_for_file: # iterate on keys + if bp_line in func_lines: + has_breakpoint_in_frame = True + break + + # Cache the value (1 or 0 or -1 for default because of cython). + if has_breakpoint_in_frame: + frame_skips_cache[frame_cache_key] = 1 + else: + frame_skips_cache[frame_cache_key] = 0 + + if can_skip and not has_breakpoint_in_frame: + if has_exception_breakpoints: + return self.trace_exception + else: + return None if is_call else NO_FTRACE + + # We may have hit a breakpoint or we are already in step mode. Either way, let's check what we should do in this frame + # if DEBUG: print('NOT skipped: %s %s %s %s' % (frame.f_lineno, frame.f_code.co_name, event, frame.__class__.__name__)) + + try: + stop_on_plugin_breakpoint = False + # return is not taken into account for breakpoint hit because we'd have a double-hit in this case + # (one for the line and the other for the return). + + stop_info = {} + breakpoint = None + stop = False + stop_reason = CMD_SET_BREAK + bp_type = None + + if function_breakpoint_on_call_event: + breakpoint = function_breakpoint_on_call_event + stop = True + new_frame = frame + stop_reason = CMD_SET_FUNCTION_BREAK + + elif is_line and info.pydev_state != STATE_SUSPEND and breakpoints_for_file is not None and line in breakpoints_for_file: + breakpoint = breakpoints_for_file[line] + new_frame = frame + stop = True + + elif plugin_manager is not None and py_db.has_plugin_line_breaks: + result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2]) + if result: + stop_on_plugin_breakpoint = True + breakpoint, new_frame, bp_type = result + + if breakpoint: + # ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint + # lets do the conditional stuff here + if breakpoint.expression is not None: + py_db.handle_breakpoint_expression(breakpoint, info, new_frame) + + if stop or stop_on_plugin_breakpoint: + eval_result = False + if breakpoint.has_condition: + eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame) + if not eval_result: + stop = False + stop_on_plugin_breakpoint = False + + if is_call and ( + frame.f_code.co_name in ("", "") or (line == 1 and frame.f_code.co_name.startswith(" may be executed having each line compiled as a new + # module, so it's the same case as . + + return self.trace_dispatch + + # Handle logpoint (on a logpoint we should never stop). + if (stop or stop_on_plugin_breakpoint) and breakpoint.is_logpoint: + stop = False + stop_on_plugin_breakpoint = False + + if info.pydev_message is not None and len(info.pydev_message) > 0: + cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, "1") + py_db.writer.add_command(cmd) + + if py_db.show_return_values: + if is_return and ( + ( + info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE, CMD_SMART_STEP_INTO) + and (self._is_same_frame(stop_frame, frame.f_back)) + ) + or (info.pydev_step_cmd in (CMD_STEP_RETURN, CMD_STEP_RETURN_MY_CODE) and (self._is_same_frame(stop_frame, frame))) + or (info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_COROUTINE)) + or ( + info.pydev_step_cmd == CMD_STEP_INTO_MY_CODE + and frame.f_back is not None + and not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + ) + ): + self._show_return_values(frame, arg) + + elif py_db.remove_return_values_flag: + try: + self._remove_return_values(py_db, frame) + finally: + py_db.remove_return_values_flag = False + + if stop: + self.set_suspend( + thread, + stop_reason, + suspend_other_threads=breakpoint and breakpoint.suspend_policy == "ALL", + ) + + elif stop_on_plugin_breakpoint and plugin_manager is not None: + result = plugin_manager.suspend(py_db, thread, frame, bp_type) + if result: + frame = result + + # if thread has a suspend flag, we suspend with a busy wait + if info.pydev_state == STATE_SUSPEND: + self.do_wait_suspend(thread, frame, event, arg) + return self.trace_dispatch + else: + if not breakpoint and is_line: + # No stop from anyone and no breakpoint found in line (cache that). + frame_skips_cache[line_cache_key] = 0 + + except: + # Unfortunately Python itself stops the tracing when it originates from + # the tracing function, so, we can't do much about it (just let the user know). + exc = sys.exc_info()[0] + cmd = py_db.cmd_factory.make_console_message( + "%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n" + % ( + exc, + thread, + ) + ) + py_db.writer.add_command(cmd) + if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + pydev_log.exception() + + raise + + # step handling. We stop when we hit the right frame + try: + should_skip = 0 + if pydevd_dont_trace.should_trace_hook is not None: + if self.should_skip == -1: + # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). + # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code + # Which will be handled by this frame is read-only, so, we can cache it safely. + if not pydevd_dont_trace.should_trace_hook(frame.f_code, abs_path_canonical_path_and_base[0]): + # -1, 0, 1 to be Cython-friendly + should_skip = self.should_skip = 1 + else: + should_skip = self.should_skip = 0 + else: + should_skip = self.should_skip + + plugin_stop = False + if should_skip: + stop = False + + elif step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE): + force_check_project_scope = step_cmd == CMD_STEP_INTO_MY_CODE + if is_line: + if not info.pydev_use_scoped_step_frame: + if force_check_project_scope or py_db.is_files_filter_enabled: + stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope) + else: + stop = True + else: + if force_check_project_scope or py_db.is_files_filter_enabled: + # Make sure we check the filtering inside ipython calls too... + if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope): + return None if is_call else NO_FTRACE + + # We can only stop inside the ipython call. + filename = frame.f_code.co_filename + if filename.endswith(".pyc"): + filename = filename[:-1] + + if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]): + f = frame.f_back + while f is not None: + if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]: + f2 = f.f_back + if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]: + pydev_log.debug("Stop inside ipython call") + stop = True + break + f = f.f_back + + del f + + if not stop: + # In scoped mode if step in didn't work in this context it won't work + # afterwards anyways. + return None if is_call else NO_FTRACE + + elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame: + if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + stop = False + else: + if force_check_project_scope or py_db.is_files_filter_enabled: + stop = not py_db.apply_files_filter( + frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope + ) + if stop: + # Prevent stopping in a return to the same location we were initially + # (i.e.: double-stop at the same place due to some filtering). + if info.step_in_initial_location == (frame.f_back, frame.f_back.f_lineno): + stop = False + else: + stop = True + else: + stop = False + + if stop: + if step_cmd == CMD_STEP_INTO_COROUTINE: + # i.e.: Check if we're stepping into the proper context. + f = frame + while f is not None: + if self._is_same_frame(stop_frame, f): + break + f = f.f_back + else: + stop = False + + if plugin_manager is not None: + result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + if result: + stop, plugin_stop = result + + elif step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE): + # Note: when dealing with a step over my code it's the same as a step over (the + # difference is that when we return from a frame in one we go to regular step + # into and in the other we go to a step into my code). + stop = self._is_same_frame(stop_frame, frame) and is_line + # Note: don't stop on a return for step over, only for line events + # i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line. + + if plugin_manager is not None: + result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop) + if result: + stop, plugin_stop = result + + elif step_cmd == CMD_SMART_STEP_INTO: + stop = False + back = frame.f_back + if self._is_same_frame(stop_frame, frame) and is_return: + # We're exiting the smart step into initial frame (so, we probably didn't find our target). + stop = True + + elif self._is_same_frame(stop_frame, back) and is_line: + if info.pydev_smart_child_offset != -1: + # i.e.: in this case, we're not interested in the pause in the parent, rather + # we're interested in the pause in the child (when the parent is at the proper place). + stop = False + + else: + pydev_smart_parent_offset = info.pydev_smart_parent_offset + + pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: + # Preferred mode (when the smart step into variants are available + # and the offset is set). + stop = get_smart_step_into_variant_from_frame_offset( + back.f_lasti, pydev_smart_step_into_variants + ) is get_smart_step_into_variant_from_frame_offset( + pydev_smart_parent_offset, pydev_smart_step_into_variants + ) + + else: + # Only the name/line is available, so, check that. + curr_func_name = frame.f_code.co_name + + # global context is set with an empty name + if curr_func_name in ("?", "") or curr_func_name is None: + curr_func_name = "" + if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line: + stop = True + + if not stop: + # In smart step into, if we didn't hit it in this frame once, that'll + # not be the case next time either, so, disable tracing for this frame. + return None if is_call else NO_FTRACE + + elif back is not None and self._is_same_frame(stop_frame, back.f_back) and is_line: + # Ok, we have to track 2 stops at this point, the parent and the child offset. + # This happens when handling a step into which targets a function inside a list comprehension + # or generator (in which case an intermediary frame is created due to an internal function call). + pydev_smart_parent_offset = info.pydev_smart_parent_offset + pydev_smart_child_offset = info.pydev_smart_child_offset + # print('matched back frame', pydev_smart_parent_offset, pydev_smart_child_offset) + # print('parent f_lasti', back.f_back.f_lasti) + # print('child f_lasti', back.f_lasti) + stop = False + if pydev_smart_child_offset >= 0 and pydev_smart_child_offset >= 0: + pydev_smart_step_into_variants = info.pydev_smart_step_into_variants + + if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants: + # Note that we don't really check the parent offset, only the offset of + # the child (because this is a generator, the parent may have moved forward + # already -- and that's ok, so, we just check that the parent frame + # matches in this case). + smart_step_into_variant = get_smart_step_into_variant_from_frame_offset( + pydev_smart_parent_offset, pydev_smart_step_into_variants + ) + # print('matched parent offset', pydev_smart_parent_offset) + # Ok, now, check the child variant + children_variants = smart_step_into_variant.children_variants + stop = children_variants and ( + get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants) + is get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants) + ) + # print('stop at child', stop) + + if not stop: + # In smart step into, if we didn't hit it in this frame once, that'll + # not be the case next time either, so, disable tracing for this frame. + return None if is_call else NO_FTRACE + + elif step_cmd in (CMD_STEP_RETURN, CMD_STEP_RETURN_MY_CODE): + stop = is_return and self._is_same_frame(stop_frame, frame) + + else: + stop = False + + if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"): + f_code = getattr(frame.f_back, "f_code", None) + if f_code is not None: + if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE: + stop = False + + if plugin_stop: + plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd) + elif stop: + if is_line: + self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + self.do_wait_suspend(thread, frame, event, arg) + elif is_return: # return event + back = frame.f_back + if back is not None: + # When we get to the pydevd run function, the debugging has actually finished for the main thread + # (note that it can still go on for other threads, but for this one, we just make it finish) + # So, just setting it to None should be OK + back_absolute_filename, _, base = get_abs_path_real_path_and_base_from_frame(back) + if (base, back.f_code.co_name) in (DEBUG_START, DEBUG_START_PY3K): + back = None + + elif base == TRACE_PROPERTY: + # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) + # if we're in a return, we want it to appear to the user in the previous frame! + return None if is_call else NO_FTRACE + + elif pydevd_dont_trace.should_trace_hook is not None: + if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename): + # In this case, we'll have to skip the previous one because it shouldn't be traced. + # Also, we have to reset the tracing, because if the parent's parent (or some + # other parent) has to be traced and it's not currently, we wouldn't stop where + # we should anymore (so, a step in/over/return may not stop anywhere if no parent is traced). + # Related test: _debugger_case17a.py + py_db.set_trace_for_frame_and_parents(thread.ident, back) + return None if is_call else NO_FTRACE + + if back is not None: + # if we're in a return, we want it to appear to the user in the previous frame! + self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd) + self.do_wait_suspend(thread, back, event, arg) + else: + # in jython we may not have a back frame + info.pydev_step_stop = None + info.pydev_original_step_cmd = -1 + info.pydev_step_cmd = -1 + info.pydev_state = STATE_RUN + info.update_stepping_info() + + # if we are quitting, let's stop the tracing + if py_db.quitting: + return None if is_call else NO_FTRACE + + return self.trace_dispatch + except: + # Unfortunately Python itself stops the tracing when it originates from + # the tracing function, so, we can't do much about it (just let the user know). + exc = sys.exc_info()[0] + cmd = py_db.cmd_factory.make_console_message( + "%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n" + % ( + exc, + thread, + ) + ) + py_db.writer.add_command(cmd) + if not issubclass(exc, (KeyboardInterrupt, SystemExit)): + pydev_log.exception() + raise + + finally: + info.is_tracing -= 1 + + # end trace_dispatch + + +# IFDEF CYTHON +# def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info, is_unwind=False): +# cdef bint should_stop; +# cdef bint was_just_raised; +# cdef list check_excs; +# ELSE +def should_stop_on_exception(py_db, info, frame, thread, arg, prev_user_uncaught_exc_info, is_unwind=False): + # ENDIF + + should_stop = False + maybe_user_uncaught_exc_info = prev_user_uncaught_exc_info + + # STATE_SUSPEND = 2 + if info.pydev_state != 2: # and breakpoint is not None: + exception, value, trace = arg + + if trace is not None and hasattr(trace, "tb_next"): + # on jython trace is None on the first event and it may not have a tb_next. + + should_stop = False + exception_breakpoint = None + try: + if py_db.plugin is not None: + result = py_db.plugin.exception_break(py_db, frame, thread, arg, is_unwind) + if result: + should_stop, frame = result + except: + pydev_log.exception() + + if not should_stop: + # Apply checks that don't need the exception breakpoint (where we shouldn't ever stop). + if exception == SystemExit and py_db.ignore_system_exit_code(value): + pass + + elif exception in (GeneratorExit, StopIteration, StopAsyncIteration): + # These exceptions are control-flow related (they work as a generator + # pause), so, we shouldn't stop on them. + pass + + elif ignore_exception_trace(trace): + pass + + else: + was_just_raised = trace.tb_next is None + + # It was not handled by any plugin, lets check exception breakpoints. + check_excs = [] + + # Note: check user unhandled before regular exceptions. + exc_break_user = py_db.get_exception_breakpoint(exception, py_db.break_on_user_uncaught_exceptions) + if exc_break_user is not None: + check_excs.append((exc_break_user, True)) + + exc_break_caught = py_db.get_exception_breakpoint(exception, py_db.break_on_caught_exceptions) + if exc_break_caught is not None: + check_excs.append((exc_break_caught, False)) + + for exc_break, is_user_uncaught in check_excs: + # Initially mark that it should stop and then go into exclusions. + should_stop = True + + if py_db.exclude_exception_by_filter(exc_break, trace): + pydev_log.debug( + "Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name) + ) + should_stop = False + + elif exc_break.condition is not None and not py_db.handle_breakpoint_condition(info, exc_break, frame): + should_stop = False + + elif is_user_uncaught: + # Note: we don't stop here, we just collect the exc_info to use later on... + should_stop = False + if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and ( + frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True) + ): + # User uncaught means that we're currently in user code but the code + # up the stack is library code. + exc_info = prev_user_uncaught_exc_info + if not exc_info: + exc_info = (arg, frame.f_lineno, set([frame.f_lineno])) + else: + lines = exc_info[2] + lines.add(frame.f_lineno) + exc_info = (arg, frame.f_lineno, lines) + maybe_user_uncaught_exc_info = exc_info + else: + # I.e.: these are only checked if we're not dealing with user uncaught exceptions. + if ( + exc_break.notify_on_first_raise_only + and py_db.skip_on_exceptions_thrown_in_same_context + and not was_just_raised + and not just_raised(trace.tb_next) + ): + # In this case we never stop if it was just raised, so, to know if it was the first we + # need to check if we're in the 2nd method. + should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception + + elif ( + exc_break.notify_on_first_raise_only + and not py_db.skip_on_exceptions_thrown_in_same_context + and not was_just_raised + ): + should_stop = False # I.e.: we stop only when it was just raised + + elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context: + # Option: Don't break if an exception is caught in the same function from which it is thrown + should_stop = False + + if should_stop: + exception_breakpoint = exc_break + try: + info.pydev_message = exc_break.qname + except: + info.pydev_message = exc_break.qname.encode("utf-8") + break + + if should_stop: + # Always add exception to frame (must remove later after we proceed). + add_exception_to_frame(frame, (exception, value, trace)) + + if exception_breakpoint is not None and exception_breakpoint.expression is not None: + py_db.handle_breakpoint_expression(exception_breakpoint, info, frame) + + return should_stop, frame, maybe_user_uncaught_exc_info + + +# Same thing in the main debugger but only considering the file contents, while the one in the main debugger +# considers the user input (so, the actual result must be a join of both). +filename_to_lines_where_exceptions_are_ignored: dict = {} +filename_to_stat_info: dict = {} + + +# IFDEF CYTHON +# def handle_exception(py_db, thread, frame, arg, str exception_type): +# cdef bint stopped; +# cdef tuple abs_real_path_and_base; +# cdef str absolute_filename; +# cdef str canonical_normalized_filename; +# cdef dict lines_ignored; +# cdef dict frame_id_to_frame; +# cdef dict merged; +# cdef object trace_obj; +# ELSE +def handle_exception(py_db, thread, frame, arg, exception_type): + # ENDIF + stopped = False + try: + # print('handle_exception', frame.f_lineno, frame.f_code.co_name) + + # We have 3 things in arg: exception type, description, traceback object + trace_obj = arg[2] + + initial_trace_obj = trace_obj + if trace_obj.tb_next is None and trace_obj.tb_frame is frame: + # I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check). + pass + else: + # Get the trace_obj from where the exception was raised... + while trace_obj.tb_next is not None: + trace_obj = trace_obj.tb_next + + if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception: + for check_trace_obj in (initial_trace_obj, trace_obj): + abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame) + absolute_filename = abs_real_path_and_base[0] + canonical_normalized_filename = abs_real_path_and_base[1] + + lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + if lines_ignored is None: + lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + + try: + curr_stat = os.stat(absolute_filename) + curr_stat = (curr_stat.st_size, curr_stat.st_mtime) + except: + curr_stat = None + + last_stat = filename_to_stat_info.get(absolute_filename) + if last_stat != curr_stat: + filename_to_stat_info[absolute_filename] = curr_stat + lines_ignored.clear() + try: + linecache.checkcache(absolute_filename) + except: + pydev_log.exception("Error in linecache.checkcache(%r)", absolute_filename) + + from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + if from_user_input: + merged = {} + merged.update(lines_ignored) + # Override what we have with the related entries that the user entered + merged.update(from_user_input) + else: + merged = lines_ignored + + exc_lineno = check_trace_obj.tb_lineno + + # print ('lines ignored', lines_ignored) + # print ('user input', from_user_input) + # print ('merged', merged, 'curr', exc_lineno) + + if exc_lineno not in merged: # Note: check on merged but update lines_ignored. + try: + line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals) + except: + pydev_log.exception("Error in linecache.getline(%r, %s, f_globals)", absolute_filename, exc_lineno) + line = "" + + if IGNORE_EXCEPTION_TAG.match(line) is not None: + lines_ignored[exc_lineno] = 1 + return False + else: + # Put in the cache saying not to ignore + lines_ignored[exc_lineno] = 0 + else: + # Ok, dict has it already cached, so, let's check it... + if merged.get(exc_lineno, 0): + return False + + try: + frame_id_to_frame = {} + frame_id_to_frame[id(frame)] = frame + f = trace_obj.tb_frame + while f is not None: + frame_id_to_frame[id(f)] = f + f = f.f_back + f = None + + stopped = True + py_db.send_caught_exception_stack(thread, arg, id(frame)) + try: + py_db.set_suspend(thread, CMD_STEP_CAUGHT_EXCEPTION) + py_db.do_wait_suspend(thread, frame, "exception", arg, exception_type=exception_type) + finally: + py_db.send_caught_exception_stack_proceeded(thread) + except: + pydev_log.exception() + + py_db.set_trace_for_frame_and_parents(thread.ident, frame) + finally: + # Make sure the user cannot see the '__exception__' we added after we leave the suspend state. + remove_exception_from_frame(frame) + # Clear some local variables... + frame = None + trace_obj = None + initial_trace_obj = None + check_trace_obj = None + f = None + frame_id_to_frame = None + py_db = None + thread = None + + return stopped diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame_utils.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame_utils.py new file mode 100644 index 0000000..07c45c7 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame_utils.py @@ -0,0 +1,445 @@ +from _pydevd_bundle.pydevd_constants import EXCEPTION_TYPE_USER_UNHANDLED, EXCEPTION_TYPE_UNHANDLED, IS_PY311_OR_GREATER, IS_PY313_0 +from _pydev_bundle import pydev_log +import itertools +from typing import Any, Dict +from os.path import basename, splitext + + +class Frame(object): + def __init__(self, f_back, f_fileno, f_code, f_locals, f_globals=None, f_trace=None): + self.f_back = f_back + self.f_lineno = f_fileno + self.f_code = f_code + self.f_locals = f_locals + self.f_globals = f_globals + self.f_trace = f_trace + + if self.f_globals is None: + self.f_globals = {} + + +class FCode(object): + def __init__(self, name, filename): + self.co_name = name + self.co_filename = filename + self.co_firstlineno = 1 + self.co_flags = 0 + + def co_lines(self): + return () + + +def add_exception_to_frame(frame, exception_info): + frame.f_locals["__exception__"] = exception_info + + +def remove_exception_from_frame(frame): + if IS_PY313_0: + # In 3.13.0 frame.f_locals became a proxy for a dict, It does not + # have methods to allow items to be removed, only added. So just set the item to None. + # Should be fixed in 3.13.1 in PR: https://github.com/python/cpython/pull/125616 + frame.f_locals["__exception__"] = None + else: + frame.f_locals.pop("__exception__", None) + + +FILES_WITH_IMPORT_HOOKS = ["pydev_monkey_qt.py", "pydev_import_hook.py"] + + +def just_raised(trace): + if trace is None: + return False + + return trace.tb_next is None + + +def short_tb(exc_tb): + traceback = [] + while exc_tb: + traceback.append("{%r, %r, %r}" % (exc_tb.tb_frame.f_code.co_filename, exc_tb.tb_frame.f_code.co_name, exc_tb.tb_lineno)) + exc_tb = exc_tb.tb_next + return "Traceback: %s\n" % (" -> ".join(traceback)) + + +def short_frame(frame): + if frame is None: + return "None" + + filename = frame.f_code.co_filename + name = splitext(basename(filename))[0] + line = hasattr(frame, "f_lineno") and frame.f_lineno or 1 + return "%s::%s %s" % (name, frame.f_code.co_name, line) + + +def short_stack(frame): + stack = [] + while frame: + stack.append(short_frame(frame)) + frame = frame.f_back if hasattr(frame, "f_back") else None + return "Stack: %s\n" % (" -> ".join(stack)) + + +def ignore_exception_trace(trace): + while trace is not None: + filename = trace.tb_frame.f_code.co_filename + if filename in ("", ""): + # Do not stop on inner exceptions in py3 while importing + return True + + # ImportError should appear in a user's code, not inside debugger + for file in FILES_WITH_IMPORT_HOOKS: + if filename.endswith(file): + return True + + trace = trace.tb_next + + return False + + +def cached_call(obj, func, *args): + cached_name = "_cached_" + func.__name__ + if not hasattr(obj, cached_name): + setattr(obj, cached_name, func(*args)) + + return getattr(obj, cached_name) + + +class _LineColInfo: + def __init__(self, lineno, end_lineno, colno, end_colno): + self.lineno = lineno + self.end_lineno = end_lineno + self.colno = colno + self.end_colno = end_colno + + def map_columns_to_line(self, original_line: str): + """ + The columns internally are actually based on bytes. + + Also, the position isn't always the ideal one as the start may not be + what we want (if the user has many subscripts in the line the start + will always be the same and only the end would change). + For more details see: + https://github.com/microsoft/debugpy/issues/1099#issuecomment-1303403995 + + So, this function maps the start/end columns to the position to be shown in the editor. + """ + colno = _utf8_byte_offset_to_character_offset(original_line, self.colno) + end_colno = _utf8_byte_offset_to_character_offset(original_line, self.end_colno) + + if self.lineno == self.end_lineno: + try: + ret = _extract_caret_anchors_in_bytes_from_line_segment(original_line[colno:end_colno]) + if ret is not None: + return ( + _utf8_byte_offset_to_character_offset(original_line, ret[0] + self.colno), + _utf8_byte_offset_to_character_offset(original_line, ret[1] + self.colno), + ) + except Exception: + pass # Suppress exception + + return colno, end_colno + + +_utf8_with_2_bytes = 0x80 +_utf8_with_3_bytes = 0x800 +_utf8_with_4_bytes = 0x10000 + + +def _utf8_byte_offset_to_character_offset(s: str, offset: int): + byte_offset = 0 + char_offset = 0 + offset = offset or 0 + + for char_offset, character in enumerate(s): + byte_offset += 1 + + codepoint = ord(character) + + if codepoint >= _utf8_with_4_bytes: + byte_offset += 3 + + elif codepoint >= _utf8_with_3_bytes: + byte_offset += 2 + + elif codepoint >= _utf8_with_2_bytes: + byte_offset += 1 + + if byte_offset > offset: + break + else: + char_offset += 1 + + return char_offset + + +# Based on traceback._extract_caret_anchors_in_bytes_from_line_segment (Python 3.11.0) +def _extract_caret_anchors_in_bytes_from_line_segment(segment: str): + import ast + + try: + segment = segment.encode("utf-8") + except UnicodeEncodeError: + return None + try: + tree = ast.parse(segment) + except SyntaxError: + return None + + if len(tree.body) != 1: + return None + + statement = tree.body[0] + if isinstance(statement, ast.Expr): + expr = statement.value + if isinstance(expr, ast.BinOp): + operator_str = segment[expr.left.end_col_offset : expr.right.col_offset] + operator_offset = len(operator_str) - len(operator_str.lstrip()) + + left_anchor = expr.left.end_col_offset + operator_offset + right_anchor = left_anchor + 1 + if operator_offset + 1 < len(operator_str) and not operator_str[operator_offset + 1] == ord(b" "): + right_anchor += 1 + return left_anchor, right_anchor + if isinstance(expr, ast.Subscript): + return expr.value.end_col_offset, expr.slice.end_col_offset + 1 + + return None + + +class FramesList(object): + def __init__(self): + self._frames = [] + + # If available, the line number for the frame will be gotten from this dict, + # otherwise frame.f_lineno will be used (needed for unhandled exceptions as + # the place where we report may be different from the place where it's raised). + self.frame_id_to_lineno = {} + self.frame_id_to_line_col_info: Dict[Any, _LineColInfo] = {} + + self.exc_type = None + self.exc_desc = None + self.trace_obj = None + + # This may be set to set the current frame (for the case where we have + # an unhandled exception where we want to show the root bu we have a different + # executing frame). + self.current_frame = None + + # This is to know whether an exception was extracted from a __cause__ or __context__. + self.exc_context_msg = "" + + self.chained_frames_list = None + + def append(self, frame): + self._frames.append(frame) + + def last_frame(self): + return self._frames[-1] + + def __len__(self): + return len(self._frames) + + def __iter__(self): + return iter(self._frames) + + def __repr__(self): + lst = ["FramesList("] + + lst.append("\n exc_type: ") + lst.append(str(self.exc_type)) + + lst.append("\n exc_desc: ") + lst.append(str(self.exc_desc)) + + lst.append("\n trace_obj: ") + lst.append(str(self.trace_obj)) + + lst.append("\n current_frame: ") + lst.append(str(self.current_frame)) + + for frame in self._frames: + lst.append("\n ") + lst.append(repr(frame)) + lst.append(",") + + if self.chained_frames_list is not None: + lst.append("\n--- Chained ---\n") + lst.append(str(self.chained_frames_list)) + + lst.append("\n)") + + return "".join(lst) + + __str__ = __repr__ + + +class _DummyFrameWrapper(object): + def __init__(self, frame, f_lineno, f_back): + self._base_frame = frame + self.f_lineno = f_lineno + self.f_back = f_back + self.f_trace = None + original_code = frame.f_code + name = original_code.co_name + self.f_code = FCode(name, original_code.co_filename) + + @property + def f_locals(self): + return self._base_frame.f_locals + + @property + def f_globals(self): + return self._base_frame.f_globals + + def __str__(self): + return "<_DummyFrameWrapper, file '%s', line %s, %s" % (self.f_code.co_filename, self.f_lineno, self.f_code.co_name) + + __repr__ = __str__ + + +_cause_message = "\nThe above exception was the direct cause " "of the following exception:\n\n" + +_context_message = "\nDuring handling of the above exception, " "another exception occurred:\n\n" + + +def create_frames_list_from_exception_cause(trace_obj, frame, exc_type, exc_desc, memo): + lst = [] + msg = "" + try: + exc_cause = getattr(exc_desc, "__cause__", None) + msg = _cause_message + except Exception: + exc_cause = None + + if exc_cause is None: + try: + exc_cause = getattr(exc_desc, "__context__", None) + msg = _context_message + except Exception: + exc_cause = None + + if exc_cause is None or id(exc_cause) in memo: + return None + + # The traceback module does this, so, let's play safe here too... + memo.add(id(exc_cause)) + + tb = exc_cause.__traceback__ + frames_list = FramesList() + frames_list.exc_type = type(exc_cause) + frames_list.exc_desc = exc_cause + frames_list.trace_obj = tb + frames_list.exc_context_msg = msg + + while tb is not None: + # Note: we don't use the actual tb.tb_frame because if the cause of the exception + # uses the same frame object, the id(frame) would be the same and the frame_id_to_lineno + # would be wrong as the same frame needs to appear with 2 different lines. + lst.append((_DummyFrameWrapper(tb.tb_frame, tb.tb_lineno, None), tb.tb_lineno, _get_line_col_info_from_tb(tb))) + tb = tb.tb_next + + for tb_frame, tb_lineno, line_col_info in lst: + frames_list.append(tb_frame) + frames_list.frame_id_to_lineno[id(tb_frame)] = tb_lineno + frames_list.frame_id_to_line_col_info[id(tb_frame)] = line_col_info + + return frames_list + + +if IS_PY311_OR_GREATER: + + def _get_code_position(code, instruction_index): + if instruction_index < 0: + return (None, None, None, None) + positions_gen = code.co_positions() + # Note: some or all of the tuple elements can be None... + return next(itertools.islice(positions_gen, instruction_index // 2, None)) + + def _get_line_col_info_from_tb(tb): + positions = _get_code_position(tb.tb_frame.f_code, tb.tb_lasti) + if positions[0] is None: + return _LineColInfo(tb.tb_lineno, *positions[1:]) + else: + return _LineColInfo(*positions) + +else: + + def _get_line_col_info_from_tb(tb): + # Not available on older versions of Python. + return None + + +def create_frames_list_from_traceback(trace_obj, frame, exc_type, exc_desc, exception_type=None): + """ + :param trace_obj: + This is the traceback from which the list should be created. + + :param frame: + This is the first frame to be considered (i.e.: topmost frame). If None is passed, all + the frames from the traceback are shown (so, None should be passed for unhandled exceptions). + + :param exception_type: + If this is an unhandled exception or user unhandled exception, we'll not trim the stack to create from the passed + frame, rather, we'll just mark the frame in the frames list. + """ + lst = [] + + tb = trace_obj + if tb is not None and tb.tb_frame is not None: + f = tb.tb_frame.f_back + while f is not None: + lst.insert(0, (f, f.f_lineno, None)) + f = f.f_back + + while tb is not None: + lst.append((tb.tb_frame, tb.tb_lineno, _get_line_col_info_from_tb(tb))) + tb = tb.tb_next + + frames_list = None + + for tb_frame, tb_lineno, line_col_info in reversed(lst): + if frames_list is None and ((frame is tb_frame) or (frame is None) or (exception_type == EXCEPTION_TYPE_USER_UNHANDLED)): + frames_list = FramesList() + + if frames_list is not None: + frames_list.append(tb_frame) + frames_list.frame_id_to_lineno[id(tb_frame)] = tb_lineno + frames_list.frame_id_to_line_col_info[id(tb_frame)] = line_col_info + + if frames_list is None and frame is not None: + # Fallback (shouldn't happen in practice). + pydev_log.info("create_frames_list_from_traceback did not find topmost frame in list.") + frames_list = create_frames_list_from_frame(frame) + + frames_list.exc_type = exc_type + frames_list.exc_desc = exc_desc + frames_list.trace_obj = trace_obj + + if exception_type == EXCEPTION_TYPE_USER_UNHANDLED: + frames_list.current_frame = frame + elif exception_type == EXCEPTION_TYPE_UNHANDLED: + if len(frames_list) > 0: + frames_list.current_frame = frames_list.last_frame() + + curr = frames_list + memo = set() + memo.add(id(exc_desc)) + + while True: + chained = create_frames_list_from_exception_cause(None, None, None, curr.exc_desc, memo) + if chained is None: + break + else: + curr.chained_frames_list = chained + curr = chained + + return frames_list + + +def create_frames_list_from_frame(frame): + lst = FramesList() + while frame is not None: + lst.append(frame) + frame = frame.f_back + + return lst diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_gevent_integration.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_gevent_integration.py new file mode 100644 index 0000000..ee5acc2 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_gevent_integration.py @@ -0,0 +1,91 @@ +import pydevd_tracing +import greenlet +import gevent +from _pydev_bundle._pydev_saved_modules import threading +from _pydevd_bundle.pydevd_custom_frames import add_custom_frame, update_custom_frame, remove_custom_frame +from _pydevd_bundle.pydevd_constants import GEVENT_SHOW_PAUSED_GREENLETS, get_global_debugger, thread_get_ident +from _pydev_bundle import pydev_log +from pydevd_file_utils import basename + +_saved_greenlets_to_custom_frame_thread_id = {} + +if GEVENT_SHOW_PAUSED_GREENLETS: + + def _get_paused_name(py_db, g): + frame = g.gr_frame + use_frame = frame + + # i.e.: Show in the description of the greenlet the last user-code found. + while use_frame is not None: + if py_db.apply_files_filter(use_frame, use_frame.f_code.co_filename, True): + frame = use_frame + use_frame = use_frame.f_back + else: + break + + if use_frame is None: + use_frame = frame + + return "%s: %s - %s" % (type(g).__name__, use_frame.f_code.co_name, basename(use_frame.f_code.co_filename)) + + def greenlet_events(event, args): + if event in ("switch", "throw"): + py_db = get_global_debugger() + origin, target = args + + if not origin.dead and origin.gr_frame is not None: + frame_custom_thread_id = _saved_greenlets_to_custom_frame_thread_id.get(origin) + if frame_custom_thread_id is None: + _saved_greenlets_to_custom_frame_thread_id[origin] = add_custom_frame( + origin.gr_frame, _get_paused_name(py_db, origin), thread_get_ident() + ) + else: + update_custom_frame(frame_custom_thread_id, origin.gr_frame, _get_paused_name(py_db, origin), thread_get_ident()) + else: + frame_custom_thread_id = _saved_greenlets_to_custom_frame_thread_id.pop(origin, None) + if frame_custom_thread_id is not None: + remove_custom_frame(frame_custom_thread_id) + + # This one will be resumed, so, remove custom frame from it. + frame_custom_thread_id = _saved_greenlets_to_custom_frame_thread_id.pop(target, None) + if frame_custom_thread_id is not None: + remove_custom_frame(frame_custom_thread_id) + + # The tracing needs to be reapplied for each greenlet as gevent + # clears the tracing set through sys.settrace for each greenlet. + pydevd_tracing.reapply_settrace() + +else: + # i.e.: no logic related to showing paused greenlets is needed. + def greenlet_events(event, args): + pydevd_tracing.reapply_settrace() + + +def enable_gevent_integration(): + # References: + # https://greenlet.readthedocs.io/en/latest/api.html#greenlet.settrace + # https://greenlet.readthedocs.io/en/latest/tracing.html + + # Note: gevent.version_info is WRONG (gevent.__version__ must be used). + try: + if tuple(int(x) for x in gevent.__version__.split(".")[:2]) <= (20, 0): + if not GEVENT_SHOW_PAUSED_GREENLETS: + return + + if not hasattr(greenlet, "settrace"): + # In older versions it was optional. + # We still try to use if available though. + pydev_log.debug("greenlet.settrace not available. GEVENT_SHOW_PAUSED_GREENLETS will have no effect.") + return + try: + greenlet.settrace(greenlet_events) + except: + pydev_log.exception("Error with greenlet.settrace.") + except: + pydev_log.exception("Error setting up gevent %s.", gevent.__version__) + + +def log_gevent_debug_info(): + pydev_log.debug("Greenlet version: %s", greenlet.__version__) + pydev_log.debug("Gevent version: %s", gevent.__version__) + pydev_log.debug("Gevent install location: %s", gevent.__file__) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_import_class.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_import_class.py new file mode 100644 index 0000000..a655e47 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_import_class.py @@ -0,0 +1,70 @@ +# Note: code gotten from _pydev_imports_tipper. + +import sys + + +def _imp(name, log=None): + try: + return __import__(name) + except: + if "." in name: + sub = name[0 : name.rfind(".")] + + if log is not None: + log.add_content("Unable to import", name, "trying with", sub) + log.add_exception() + + return _imp(sub, log) + else: + s = "Unable to import module: %s - sys.path: %s" % (str(name), sys.path) + if log is not None: + log.add_content(s) + log.add_exception() + + raise ImportError(s) + + +IS_IPY = False +if sys.platform == "cli": + IS_IPY = True + _old_imp = _imp + + def _imp(name, log=None): + # We must add a reference in clr for .Net + import clr # @UnresolvedImport + + initial_name = name + while "." in name: + try: + clr.AddReference(name) + break # If it worked, that's OK. + except: + name = name[0 : name.rfind(".")] + else: + try: + clr.AddReference(name) + except: + pass # That's OK (not dot net module). + + return _old_imp(initial_name, log) + + +def import_name(name, log=None): + mod = _imp(name, log) + + components = name.split(".") + + old_comp = None + for comp in components[1:]: + try: + # this happens in the following case: + # we have mx.DateTime.mxDateTime.mxDateTime.pyd + # but after importing it, mx.DateTime.mxDateTime shadows access to mxDateTime.pyd + mod = getattr(mod, comp) + except AttributeError: + if old_comp != comp: + raise + + old_comp = comp + + return mod diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_io.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_io.py new file mode 100644 index 0000000..7d3bffb --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_io.py @@ -0,0 +1,256 @@ +from _pydevd_bundle.pydevd_constants import ForkSafeLock, get_global_debugger +import os +import sys +from contextlib import contextmanager + + +class IORedirector: + """ + This class works to wrap a stream (stdout/stderr) with an additional redirect. + """ + + def __init__(self, original, new_redirect, wrap_buffer=False): + """ + :param stream original: + The stream to be wrapped (usually stdout/stderr, but could be None). + + :param stream new_redirect: + Usually IOBuf (below). + + :param bool wrap_buffer: + Whether to create a buffer attribute (needed to mimick python 3 s + tdout/stderr which has a buffer to write binary data). + """ + self._lock = ForkSafeLock(rlock=True) + self._writing = False + self._redirect_to = (original, new_redirect) + if wrap_buffer and hasattr(original, "buffer"): + self.buffer = IORedirector(original.buffer, new_redirect.buffer, False) + + def write(self, s): + # Note that writing to the original stream may fail for some reasons + # (such as trying to write something that's not a string or having it closed). + with self._lock: + if self._writing: + return + self._writing = True + try: + for r in self._redirect_to: + if hasattr(r, "write"): + r.write(s) + finally: + self._writing = False + + def isatty(self): + for r in self._redirect_to: + if hasattr(r, "isatty"): + return r.isatty() + return False + + def flush(self): + for r in self._redirect_to: + if hasattr(r, "flush"): + r.flush() + + def __getattr__(self, name): + for r in self._redirect_to: + if hasattr(r, name): + return getattr(r, name) + raise AttributeError(name) + + +class RedirectToPyDBIoMessages(object): + def __init__(self, out_ctx, wrap_stream, wrap_buffer, on_write=None): + """ + :param out_ctx: + 1=stdout and 2=stderr + + :param wrap_stream: + Either sys.stdout or sys.stderr. + + :param bool wrap_buffer: + If True the buffer attribute (which wraps writing bytes) should be + wrapped. + + :param callable(str) on_write: + May be a custom callable to be called when to write something. + If not passed the default implementation will create an io message + and send it through the debugger. + """ + encoding = getattr(wrap_stream, "encoding", None) + if not encoding: + encoding = os.environ.get("PYTHONIOENCODING", "utf-8") + self.encoding = encoding + self._out_ctx = out_ctx + if wrap_buffer: + self.buffer = RedirectToPyDBIoMessages(out_ctx, wrap_stream, wrap_buffer=False, on_write=on_write) + self._on_write = on_write + + def get_pydb(self): + # Note: separate method for mocking on tests. + return get_global_debugger() + + def flush(self): + pass # no-op here + + def write(self, s): + if self._on_write is not None: + self._on_write(s) + return + + if s: + # Need s in str + if isinstance(s, bytes): + s = s.decode(self.encoding, errors="replace") + + py_db = self.get_pydb() + if py_db is not None: + # Note that the actual message contents will be a xml with utf-8, although + # the entry is str on py3 and bytes on py2. + cmd = py_db.cmd_factory.make_io_message(s, self._out_ctx) + if py_db.writer is not None: + py_db.writer.add_command(cmd) + + +class IOBuf: + """This class works as a replacement for stdio and stderr. + It is a buffer and when its contents are requested, it will erase what + it has so far so that the next return will not return the same contents again. + """ + + def __init__(self): + self.buflist = [] + import os + + self.encoding = os.environ.get("PYTHONIOENCODING", "utf-8") + + def getvalue(self): + b = self.buflist + self.buflist = [] # clear it + return "".join(b) # bytes on py2, str on py3. + + def write(self, s): + if isinstance(s, bytes): + s = s.decode(self.encoding, errors="replace") + self.buflist.append(s) + + def isatty(self): + return False + + def flush(self): + pass + + def empty(self): + return len(self.buflist) == 0 + + +class _RedirectInfo(object): + def __init__(self, original, redirect_to): + self.original = original + self.redirect_to = redirect_to + + +class _RedirectionsHolder: + _lock = ForkSafeLock(rlock=True) + _stack_stdout = [] + _stack_stderr = [] + + _pydevd_stdout_redirect_ = None + _pydevd_stderr_redirect_ = None + + +def start_redirect(keep_original_redirection=False, std="stdout", redirect_to=None): + """ + @param std: 'stdout', 'stderr', or 'both' + """ + with _RedirectionsHolder._lock: + if redirect_to is None: + redirect_to = IOBuf() + + if std == "both": + config_stds = ["stdout", "stderr"] + else: + config_stds = [std] + + for std in config_stds: + original = getattr(sys, std) + stack = getattr(_RedirectionsHolder, "_stack_%s" % std) + + if keep_original_redirection: + wrap_buffer = True if hasattr(redirect_to, "buffer") else False + new_std_instance = IORedirector(getattr(sys, std), redirect_to, wrap_buffer=wrap_buffer) + setattr(sys, std, new_std_instance) + else: + new_std_instance = redirect_to + setattr(sys, std, redirect_to) + + stack.append(_RedirectInfo(original, new_std_instance)) + + return redirect_to + + +def end_redirect(std="stdout"): + with _RedirectionsHolder._lock: + if std == "both": + config_stds = ["stdout", "stderr"] + else: + config_stds = [std] + for std in config_stds: + stack = getattr(_RedirectionsHolder, "_stack_%s" % std) + redirect_info = stack.pop() + setattr(sys, std, redirect_info.original) + + +def redirect_stream_to_pydb_io_messages(std): + """ + :param std: + 'stdout' or 'stderr' + """ + with _RedirectionsHolder._lock: + redirect_to_name = "_pydevd_%s_redirect_" % (std,) + if getattr(_RedirectionsHolder, redirect_to_name) is None: + wrap_buffer = True + original = getattr(sys, std) + + redirect_to = RedirectToPyDBIoMessages(1 if std == "stdout" else 2, original, wrap_buffer) + start_redirect(keep_original_redirection=True, std=std, redirect_to=redirect_to) + + stack = getattr(_RedirectionsHolder, "_stack_%s" % std) + setattr(_RedirectionsHolder, redirect_to_name, stack[-1]) + return True + + return False + + +def stop_redirect_stream_to_pydb_io_messages(std): + """ + :param std: + 'stdout' or 'stderr' + """ + with _RedirectionsHolder._lock: + redirect_to_name = "_pydevd_%s_redirect_" % (std,) + redirect_info = getattr(_RedirectionsHolder, redirect_to_name) + if redirect_info is not None: # :type redirect_info: _RedirectInfo + setattr(_RedirectionsHolder, redirect_to_name, None) + + stack = getattr(_RedirectionsHolder, "_stack_%s" % std) + prev_info = stack.pop() + + curr = getattr(sys, std) + if curr is redirect_info.redirect_to: + setattr(sys, std, redirect_info.original) + + +@contextmanager +def redirect_stream_to_pydb_io_messages_context(): + with _RedirectionsHolder._lock: + redirecting = [] + for std in ("stdout", "stderr"): + if redirect_stream_to_pydb_io_messages(std): + redirecting.append(std) + + try: + yield + finally: + for std in redirecting: + stop_redirect_stream_to_pydb_io_messages(std) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py new file mode 100644 index 0000000..d8f93c1 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py @@ -0,0 +1,200 @@ +import json +import urllib.parse as urllib_parse + + +class DebugOptions(object): + __slots__ = [ + "just_my_code", + "redirect_output", + "show_return_value", + "break_system_exit_zero", + "django_debug", + "flask_debug", + "stop_on_entry", + "max_exception_stack_frames", + "gui_event_loop", + "client_os", + ] + + def __init__(self): + self.just_my_code = True + self.redirect_output = False + self.show_return_value = False + self.break_system_exit_zero = False + self.django_debug = False + self.flask_debug = False + self.stop_on_entry = False + self.max_exception_stack_frames = 0 + self.gui_event_loop = "matplotlib" + self.client_os = None + + def to_json(self): + dct = {} + for s in self.__slots__: + dct[s] = getattr(self, s) + return json.dumps(dct) + + def update_fom_debug_options(self, debug_options): + if "DEBUG_STDLIB" in debug_options: + self.just_my_code = not debug_options.get("DEBUG_STDLIB") + + if "REDIRECT_OUTPUT" in debug_options: + self.redirect_output = debug_options.get("REDIRECT_OUTPUT") + + if "SHOW_RETURN_VALUE" in debug_options: + self.show_return_value = debug_options.get("SHOW_RETURN_VALUE") + + if "BREAK_SYSTEMEXIT_ZERO" in debug_options: + self.break_system_exit_zero = debug_options.get("BREAK_SYSTEMEXIT_ZERO") + + if "DJANGO_DEBUG" in debug_options: + self.django_debug = debug_options.get("DJANGO_DEBUG") + + if "FLASK_DEBUG" in debug_options: + self.flask_debug = debug_options.get("FLASK_DEBUG") + + if "STOP_ON_ENTRY" in debug_options: + self.stop_on_entry = debug_options.get("STOP_ON_ENTRY") + + if "CLIENT_OS_TYPE" in debug_options: + self.client_os = debug_options.get("CLIENT_OS_TYPE") + + # Note: _max_exception_stack_frames cannot be set by debug options. + + def update_from_args(self, args): + if "justMyCode" in args: + self.just_my_code = bool_parser(args["justMyCode"]) + else: + # i.e.: if justMyCode is provided, don't check the deprecated value + if "debugStdLib" in args: + self.just_my_code = not bool_parser(args["debugStdLib"]) + + if "redirectOutput" in args: + self.redirect_output = bool_parser(args["redirectOutput"]) + + if "showReturnValue" in args: + self.show_return_value = bool_parser(args["showReturnValue"]) + + if "breakOnSystemExitZero" in args: + self.break_system_exit_zero = bool_parser(args["breakOnSystemExitZero"]) + + if "django" in args: + self.django_debug = bool_parser(args["django"]) + + if "flask" in args: + self.flask_debug = bool_parser(args["flask"]) + + if "jinja" in args: + self.flask_debug = bool_parser(args["jinja"]) + + if "stopOnEntry" in args: + self.stop_on_entry = bool_parser(args["stopOnEntry"]) + + self.max_exception_stack_frames = int_parser(args.get("maxExceptionStackFrames", 0)) + + if "guiEventLoop" in args: + self.gui_event_loop = str(args["guiEventLoop"]) + + if "clientOS" in args: + self.client_os = str(args["clientOS"]).upper() + + +def int_parser(s, default_value=0): + try: + return int(s) + except Exception: + return default_value + + +def bool_parser(s): + return s in ("True", "true", "1", True, 1) + + +def unquote(s): + return None if s is None else urllib_parse.unquote(s) + + +DEBUG_OPTIONS_PARSER = { + "WAIT_ON_ABNORMAL_EXIT": bool_parser, + "WAIT_ON_NORMAL_EXIT": bool_parser, + "BREAK_SYSTEMEXIT_ZERO": bool_parser, + "REDIRECT_OUTPUT": bool_parser, + "DJANGO_DEBUG": bool_parser, + "FLASK_DEBUG": bool_parser, + "FIX_FILE_PATH_CASE": bool_parser, + "CLIENT_OS_TYPE": unquote, + "DEBUG_STDLIB": bool_parser, + "STOP_ON_ENTRY": bool_parser, + "SHOW_RETURN_VALUE": bool_parser, + "MULTIPROCESS": bool_parser, +} + +DEBUG_OPTIONS_BY_FLAG = { + "RedirectOutput": "REDIRECT_OUTPUT=True", + "WaitOnNormalExit": "WAIT_ON_NORMAL_EXIT=True", + "WaitOnAbnormalExit": "WAIT_ON_ABNORMAL_EXIT=True", + "BreakOnSystemExitZero": "BREAK_SYSTEMEXIT_ZERO=True", + "Django": "DJANGO_DEBUG=True", + "Flask": "FLASK_DEBUG=True", + "Jinja": "FLASK_DEBUG=True", + "FixFilePathCase": "FIX_FILE_PATH_CASE=True", + "DebugStdLib": "DEBUG_STDLIB=True", + "WindowsClient": "CLIENT_OS_TYPE=WINDOWS", + "UnixClient": "CLIENT_OS_TYPE=UNIX", + "StopOnEntry": "STOP_ON_ENTRY=True", + "ShowReturnValue": "SHOW_RETURN_VALUE=True", + "Multiprocess": "MULTIPROCESS=True", +} + + +def _build_debug_options(flags): + """Build string representation of debug options from the launch config.""" + return ";".join(DEBUG_OPTIONS_BY_FLAG[flag] for flag in flags or [] if flag in DEBUG_OPTIONS_BY_FLAG) + + +def _parse_debug_options(opts): + """Debug options are semicolon separated key=value pairs""" + options = {} + if not opts: + return options + + for opt in opts.split(";"): + try: + key, value = opt.split("=") + except ValueError: + continue + try: + options[key] = DEBUG_OPTIONS_PARSER[key](value) + except KeyError: + continue + + return options + + +def _extract_debug_options(opts, flags=None): + """Return the debug options encoded in the given value. + + "opts" is a semicolon-separated string of "key=value" pairs. + "flags" is a list of strings. + + If flags is provided then it is used as a fallback. + + The values come from the launch config: + + { + type:'python', + request:'launch'|'attach', + name:'friendly name for debug config', + debugOptions:[ + 'RedirectOutput', 'Django' + ], + options:'REDIRECT_OUTPUT=True;DJANGO_DEBUG=True' + } + + Further information can be found here: + + https://code.visualstudio.com/docs/editor/debugging#_launchjson-attributes + """ + if not opts: + opts = _build_debug_options(flags) + return _parse_debug_options(opts) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py new file mode 100644 index 0000000..cc345f1 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py @@ -0,0 +1,147 @@ +from _pydevd_bundle.pydevd_constants import ( + DebugInfoHolder, + get_global_debugger, + GetGlobalDebugger, + set_global_debugger, +) # Keep for backward compatibility @UnusedImport +from _pydevd_bundle.pydevd_utils import quote_smart as quote, to_string +from _pydevd_bundle.pydevd_comm_constants import ID_TO_MEANING, CMD_EXIT +from _pydevd_bundle.pydevd_constants import HTTP_PROTOCOL, HTTP_JSON_PROTOCOL, get_protocol, IS_JYTHON, ForkSafeLock +import json +from _pydev_bundle import pydev_log + + +class _BaseNetCommand(object): + # Command id. Should be set in instance. + id = -1 + + # Dict representation of the command to be set in instance. Only set for json commands. + as_dict = None + + def send(self, *args, **kwargs): + pass + + def call_after_send(self, callback): + pass + + +class _NullNetCommand(_BaseNetCommand): + pass + + +class _NullExitCommand(_NullNetCommand): + id = CMD_EXIT + + +# Constant meant to be passed to the writer when the command is meant to be ignored. +NULL_NET_COMMAND = _NullNetCommand() + +# Exit command -- only internal (we don't want/need to send this to the IDE). +NULL_EXIT_COMMAND = _NullExitCommand() + + +class NetCommand(_BaseNetCommand): + """ + Commands received/sent over the network. + + Command can represent command received from the debugger, + or one to be sent by daemon. + """ + + next_seq = 0 # sequence numbers + + _showing_debug_info = 0 + _show_debug_info_lock = ForkSafeLock(rlock=True) + + _after_send = None + + def __init__(self, cmd_id, seq, text, is_json=False): + """ + If sequence is 0, new sequence will be generated (otherwise, this was the response + to a command from the client). + """ + protocol = get_protocol() + self.id = cmd_id + if seq == 0: + NetCommand.next_seq += 2 + seq = NetCommand.next_seq + + self.seq = seq + + if is_json: + if hasattr(text, "to_dict"): + as_dict = text.to_dict(update_ids_to_dap=True) + else: + assert isinstance(text, dict) + as_dict = text + as_dict["pydevd_cmd_id"] = cmd_id + as_dict["seq"] = seq + self.as_dict = as_dict + text = json.dumps(as_dict) + + assert isinstance(text, str) + + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 1: + self._show_debug_info(cmd_id, seq, text) + + if is_json: + msg = text + else: + if protocol not in (HTTP_PROTOCOL, HTTP_JSON_PROTOCOL): + encoded = quote(to_string(text), '/<>_=" \t') + msg = "%s\t%s\t%s\n" % (cmd_id, seq, encoded) + + else: + msg = "%s\t%s\t%s" % (cmd_id, seq, text) + + if isinstance(msg, str): + msg = msg.encode("utf-8") + + assert isinstance(msg, bytes) + as_bytes = msg + self._as_bytes = as_bytes + + def send(self, sock): + as_bytes = self._as_bytes + try: + if get_protocol() in (HTTP_PROTOCOL, HTTP_JSON_PROTOCOL): + sock.sendall(("Content-Length: %s\r\n\r\n" % len(as_bytes)).encode("ascii")) + sock.sendall(as_bytes) + if self._after_send: + for method in self._after_send: + method(sock) + except: + if IS_JYTHON: + # Ignore errors in sock.sendall in Jython (seems to be common for Jython to + # give spurious exceptions at interpreter shutdown here). + pass + else: + raise + + def call_after_send(self, callback): + if not self._after_send: + self._after_send = [callback] + else: + self._after_send.append(callback) + + @classmethod + def _show_debug_info(cls, cmd_id, seq, text): + with cls._show_debug_info_lock: + # Only one thread each time (rlock). + if cls._showing_debug_info: + # avoid recursing in the same thread (just printing could create + # a new command when redirecting output). + return + + cls._showing_debug_info += 1 + try: + out_message = "sending cmd (%s) --> " % (get_protocol(),) + out_message += "%20s" % ID_TO_MEANING.get(str(cmd_id), "UNKNOWN") + out_message += " " + out_message += text.replace("\n", " ") + try: + pydev_log.critical("%s\n", out_message) + except: + pass + finally: + cls._showing_debug_info -= 1 diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py new file mode 100644 index 0000000..7715ddb --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py @@ -0,0 +1,586 @@ +from functools import partial +import itertools +import os +import sys +import socket as socket_module + +from _pydev_bundle._pydev_imports_tipper import TYPE_IMPORT, TYPE_CLASS, TYPE_FUNCTION, TYPE_ATTR, TYPE_BUILTIN, TYPE_PARAM +from _pydev_bundle.pydev_is_thread_alive import is_thread_alive +from _pydev_bundle.pydev_override import overrides +from _pydevd_bundle._debug_adapter import pydevd_schema +from _pydevd_bundle._debug_adapter.pydevd_schema import ( + ModuleEvent, + ModuleEventBody, + Module, + OutputEventBody, + OutputEvent, + ContinuedEventBody, + ExitedEventBody, + ExitedEvent, +) +from _pydevd_bundle.pydevd_comm_constants import ( + CMD_THREAD_CREATE, + CMD_RETURN, + CMD_MODULE_EVENT, + CMD_WRITE_TO_CONSOLE, + CMD_STEP_INTO, + CMD_STEP_INTO_MY_CODE, + CMD_STEP_OVER, + CMD_STEP_OVER_MY_CODE, + CMD_STEP_RETURN, + CMD_STEP_CAUGHT_EXCEPTION, + CMD_ADD_EXCEPTION_BREAK, + CMD_SET_BREAK, + CMD_SET_NEXT_STATEMENT, + CMD_THREAD_SUSPEND_SINGLE_NOTIFICATION, + CMD_THREAD_RESUME_SINGLE_NOTIFICATION, + CMD_THREAD_KILL, + CMD_STOP_ON_START, + CMD_INPUT_REQUESTED, + CMD_EXIT, + CMD_STEP_INTO_COROUTINE, + CMD_STEP_RETURN_MY_CODE, + CMD_SMART_STEP_INTO, + CMD_SET_FUNCTION_BREAK, + CMD_THREAD_RUN, +) +from _pydevd_bundle.pydevd_constants import get_thread_id, ForkSafeLock, DebugInfoHolder +from _pydevd_bundle.pydevd_net_command import NetCommand, NULL_NET_COMMAND +from _pydevd_bundle.pydevd_net_command_factory_xml import NetCommandFactory +from _pydevd_bundle.pydevd_utils import get_non_pydevd_threads +import pydevd_file_utils +from _pydevd_bundle.pydevd_comm import build_exception_info_response +from _pydevd_bundle.pydevd_additional_thread_info import set_additional_thread_info +from _pydevd_bundle import pydevd_frame_utils, pydevd_constants, pydevd_utils +import linecache +from io import StringIO +from _pydev_bundle import pydev_log + + +class ModulesManager(object): + def __init__(self): + self._lock = ForkSafeLock() + self._modules = {} + self._next_id = partial(next, itertools.count(0)) + + def track_module(self, filename_in_utf8, module_name, frame): + """ + :return list(NetCommand): + Returns a list with the module events to be sent. + """ + if filename_in_utf8 in self._modules: + return [] + + module_events = [] + with self._lock: + # Must check again after getting the lock. + if filename_in_utf8 in self._modules: + return + + try: + version = str(frame.f_globals.get("__version__", "")) + except: + version = "" + + try: + package_name = str(frame.f_globals.get("__package__", "")) + except: + package_name = "" + + module_id = self._next_id() + + module = Module(module_id, module_name, filename_in_utf8) + if version: + module.version = version + + if package_name: + # Note: package doesn't appear in the docs but seems to be expected? + module.kwargs["package"] = package_name + + module_event = ModuleEvent(ModuleEventBody("new", module)) + + module_events.append(NetCommand(CMD_MODULE_EVENT, 0, module_event, is_json=True)) + + self._modules[filename_in_utf8] = module.to_dict() + return module_events + + def get_modules_info(self): + """ + :return list(Module) + """ + with self._lock: + return list(self._modules.values()) + + +class NetCommandFactoryJson(NetCommandFactory): + """ + Factory for commands which will provide messages as json (they should be + similar to the debug adapter where possible, although some differences + are currently Ok). + + Note that it currently overrides the xml version so that messages + can be done one at a time (any message not overridden will currently + use the xml version) -- after having all messages handled, it should + no longer use NetCommandFactory as the base class. + """ + + def __init__(self): + NetCommandFactory.__init__(self) + self.modules_manager = ModulesManager() + + @overrides(NetCommandFactory.make_version_message) + def make_version_message(self, seq): + return NULL_NET_COMMAND # Not a part of the debug adapter protocol + + @overrides(NetCommandFactory.make_protocol_set_message) + def make_protocol_set_message(self, seq): + return NULL_NET_COMMAND # Not a part of the debug adapter protocol + + @overrides(NetCommandFactory.make_thread_created_message) + def make_thread_created_message(self, thread): + # Note: the thread id for the debug adapter must be an int + # (make the actual id from get_thread_id respect that later on). + msg = pydevd_schema.ThreadEvent( + pydevd_schema.ThreadEventBody("started", get_thread_id(thread)), + ) + + return NetCommand(CMD_THREAD_CREATE, 0, msg, is_json=True) + + @overrides(NetCommandFactory.make_custom_frame_created_message) + def make_custom_frame_created_message(self, frame_id, frame_description): + self._additional_thread_id_to_thread_name[frame_id] = frame_description + msg = pydevd_schema.ThreadEvent( + pydevd_schema.ThreadEventBody("started", frame_id), + ) + + return NetCommand(CMD_THREAD_CREATE, 0, msg, is_json=True) + + @overrides(NetCommandFactory.make_thread_killed_message) + def make_thread_killed_message(self, tid): + self._additional_thread_id_to_thread_name.pop(tid, None) + msg = pydevd_schema.ThreadEvent( + pydevd_schema.ThreadEventBody("exited", tid), + ) + + return NetCommand(CMD_THREAD_KILL, 0, msg, is_json=True) + + @overrides(NetCommandFactory.make_list_threads_message) + def make_list_threads_message(self, py_db, seq): + threads = [] + for thread in get_non_pydevd_threads(): + if is_thread_alive(thread): + thread_id = get_thread_id(thread) + + # Notify that it's created (no-op if we already notified before). + py_db.notify_thread_created(thread_id, thread) + + thread_schema = pydevd_schema.Thread(id=thread_id, name=thread.name) + threads.append(thread_schema.to_dict()) + + for thread_id, thread_name in list(self._additional_thread_id_to_thread_name.items()): + thread_schema = pydevd_schema.Thread(id=thread_id, name=thread_name) + threads.append(thread_schema.to_dict()) + + body = pydevd_schema.ThreadsResponseBody(threads) + response = pydevd_schema.ThreadsResponse(request_seq=seq, success=True, command="threads", body=body) + + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + @overrides(NetCommandFactory.make_get_completions_message) + def make_get_completions_message(self, seq, completions, qualifier, start): + COMPLETION_TYPE_LOOK_UP = { + TYPE_IMPORT: pydevd_schema.CompletionItemType.MODULE, + TYPE_CLASS: pydevd_schema.CompletionItemType.CLASS, + TYPE_FUNCTION: pydevd_schema.CompletionItemType.FUNCTION, + TYPE_ATTR: pydevd_schema.CompletionItemType.FIELD, + TYPE_BUILTIN: pydevd_schema.CompletionItemType.KEYWORD, + TYPE_PARAM: pydevd_schema.CompletionItemType.VARIABLE, + } + + qualifier = qualifier.lower() + qualifier_len = len(qualifier) + targets = [] + for completion in completions: + label = completion[0] + if label.lower().startswith(qualifier): + completion = pydevd_schema.CompletionItem( + label=label, type=COMPLETION_TYPE_LOOK_UP[completion[3]], start=start, length=qualifier_len + ) + targets.append(completion.to_dict()) + + body = pydevd_schema.CompletionsResponseBody(targets) + response = pydevd_schema.CompletionsResponse(request_seq=seq, success=True, command="completions", body=body) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def _format_frame_name(self, fmt, initial_name, module_name, line, path): + if fmt is None: + return initial_name + frame_name = initial_name + if fmt.get("module", False): + if module_name: + if initial_name == "": + frame_name = module_name + else: + frame_name = "%s.%s" % (module_name, initial_name) + else: + basename = os.path.basename(path) + basename = basename[0:-3] if basename.lower().endswith(".py") else basename + if initial_name == "": + frame_name = "%s in %s" % (initial_name, basename) + else: + frame_name = "%s.%s" % (basename, initial_name) + + if fmt.get("line", False): + frame_name = "%s : %d" % (frame_name, line) + + return frame_name + + @overrides(NetCommandFactory.make_get_thread_stack_message) + def make_get_thread_stack_message(self, py_db, seq, thread_id, topmost_frame, fmt, must_be_suspended=False, start_frame=0, levels=0): + frames = [] + module_events = [] + + try: + # : :type suspended_frames_manager: SuspendedFramesManager + suspended_frames_manager = py_db.suspended_frames_manager + frames_list = suspended_frames_manager.get_frames_list(thread_id) + if frames_list is None: + # Could not find stack of suspended frame... + if must_be_suspended: + return None + else: + frames_list = pydevd_frame_utils.create_frames_list_from_frame(topmost_frame) + + for ( + frame_id, + frame, + method_name, + original_filename, + filename_in_utf8, + lineno, + applied_mapping, + show_as_current_frame, + line_col_info, + ) in self._iter_visible_frames_info(py_db, frames_list, flatten_chained=True): + try: + module_name = str(frame.f_globals.get("__name__", "")) + except: + module_name = "" + + module_events.extend(self.modules_manager.track_module(filename_in_utf8, module_name, frame)) + + presentation_hint = None + if not getattr(frame, "IS_PLUGIN_FRAME", False): # Never filter out plugin frames! + if py_db.is_files_filter_enabled and py_db.apply_files_filter(frame, original_filename, False): + continue + + if not py_db.in_project_scope(frame): + presentation_hint = "subtle" + + formatted_name = self._format_frame_name(fmt, method_name, module_name, lineno, filename_in_utf8) + if show_as_current_frame: + formatted_name += " (Current frame)" + source_reference = pydevd_file_utils.get_client_filename_source_reference(filename_in_utf8) + + if not source_reference and not applied_mapping and not os.path.exists(original_filename): + if getattr(frame.f_code, "co_lines", None) or getattr(frame.f_code, "co_lnotab", None): + # Create a source-reference to be used where we provide the source by decompiling the code. + # Note: When the time comes to retrieve the source reference in this case, we'll + # check the linecache first (see: get_decompiled_source_from_frame_id). + source_reference = pydevd_file_utils.create_source_reference_for_frame_id(frame_id, original_filename) + else: + # Check if someone added a source reference to the linecache (Python attrs does this). + if linecache.getline(original_filename, 1): + source_reference = pydevd_file_utils.create_source_reference_for_linecache(original_filename) + + column = 1 + endcol = None + if line_col_info is not None: + try: + line_text = linecache.getline(original_filename, lineno) + except: + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 2: + pydev_log.exception("Unable to get line from linecache for file: %s", original_filename) + else: + if line_text: + colno, endcolno = line_col_info.map_columns_to_line(line_text) + column = colno + 1 + if line_col_info.lineno == line_col_info.end_lineno: + endcol = endcolno + 1 + + frames.append( + pydevd_schema.StackFrame( + frame_id, + formatted_name, + lineno, + column=column, + endColumn=endcol, + source={ + "path": filename_in_utf8, + "sourceReference": source_reference, + }, + presentationHint=presentation_hint, + ).to_dict() + ) + finally: + topmost_frame = None + + for module_event in module_events: + py_db.writer.add_command(module_event) + + total_frames = len(frames) + stack_frames = frames + if bool(levels): + start = start_frame + end = min(start + levels, total_frames) + stack_frames = frames[start:end] + + response = pydevd_schema.StackTraceResponse( + request_seq=seq, + success=True, + command="stackTrace", + body=pydevd_schema.StackTraceResponseBody(stackFrames=stack_frames, totalFrames=total_frames), + ) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + @overrides(NetCommandFactory.make_warning_message) + def make_warning_message(self, msg): + category = "important" + body = OutputEventBody(msg, category) + event = OutputEvent(body) + return NetCommand(CMD_WRITE_TO_CONSOLE, 0, event, is_json=True) + + @overrides(NetCommandFactory.make_io_message) + def make_io_message(self, msg, ctx): + category = "stdout" if int(ctx) == 1 else "stderr" + body = OutputEventBody(msg, category) + event = OutputEvent(body) + return NetCommand(CMD_WRITE_TO_CONSOLE, 0, event, is_json=True) + + @overrides(NetCommandFactory.make_console_message) + def make_console_message(self, msg): + category = "console" + body = OutputEventBody(msg, category) + event = OutputEvent(body) + return NetCommand(CMD_WRITE_TO_CONSOLE, 0, event, is_json=True) + + _STEP_REASONS = set( + [ + CMD_STEP_INTO, + CMD_STEP_INTO_MY_CODE, + CMD_STEP_OVER, + CMD_STEP_OVER_MY_CODE, + CMD_STEP_RETURN, + CMD_STEP_RETURN_MY_CODE, + CMD_STEP_INTO_MY_CODE, + CMD_STOP_ON_START, + CMD_STEP_INTO_COROUTINE, + CMD_SMART_STEP_INTO, + ] + ) + _EXCEPTION_REASONS = set( + [ + CMD_STEP_CAUGHT_EXCEPTION, + CMD_ADD_EXCEPTION_BREAK, + ] + ) + + @overrides(NetCommandFactory.make_thread_suspend_single_notification) + def make_thread_suspend_single_notification(self, py_db, thread_id, thread, stop_reason): + exc_desc = None + exc_name = None + info = set_additional_thread_info(thread) + + preserve_focus_hint = False + if stop_reason in self._STEP_REASONS: + if info.pydev_original_step_cmd == CMD_STOP_ON_START: + # Just to make sure that's not set as the original reason anymore. + info.pydev_original_step_cmd = -1 + stop_reason = "entry" + else: + stop_reason = "step" + elif stop_reason in self._EXCEPTION_REASONS: + stop_reason = "exception" + elif stop_reason == CMD_SET_BREAK: + stop_reason = "breakpoint" + elif stop_reason == CMD_SET_FUNCTION_BREAK: + stop_reason = "function breakpoint" + elif stop_reason == CMD_SET_NEXT_STATEMENT: + stop_reason = "goto" + else: + stop_reason = "pause" + preserve_focus_hint = True + + if stop_reason == "exception": + exception_info_response = build_exception_info_response( + py_db, thread_id, thread, -1, set_additional_thread_info, self._iter_visible_frames_info, max_frames=-1 + ) + exception_info_response + + exc_name = exception_info_response.body.exceptionId + exc_desc = exception_info_response.body.description + + body = pydevd_schema.StoppedEventBody( + reason=stop_reason, + description=exc_desc, + threadId=thread_id, + text=exc_name, + allThreadsStopped=True, + preserveFocusHint=preserve_focus_hint, + ) + event = pydevd_schema.StoppedEvent(body) + return NetCommand(CMD_THREAD_SUSPEND_SINGLE_NOTIFICATION, 0, event, is_json=True) + + @overrides(NetCommandFactory.make_thread_resume_single_notification) + def make_thread_resume_single_notification(self, thread_id): + body = ContinuedEventBody(threadId=thread_id, allThreadsContinued=True) + event = pydevd_schema.ContinuedEvent(body) + return NetCommand(CMD_THREAD_RESUME_SINGLE_NOTIFICATION, 0, event, is_json=True) + + @overrides(NetCommandFactory.make_set_next_stmnt_status_message) + def make_set_next_stmnt_status_message(self, seq, is_success, exception_msg): + response = pydevd_schema.GotoResponse( + request_seq=int(seq), success=is_success, command="goto", body={}, message=(None if is_success else exception_msg) + ) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + @overrides(NetCommandFactory.make_send_curr_exception_trace_message) + def make_send_curr_exception_trace_message(self, *args, **kwargs): + return NULL_NET_COMMAND # Not a part of the debug adapter protocol + + @overrides(NetCommandFactory.make_send_curr_exception_trace_proceeded_message) + def make_send_curr_exception_trace_proceeded_message(self, *args, **kwargs): + return NULL_NET_COMMAND # Not a part of the debug adapter protocol + + @overrides(NetCommandFactory.make_send_breakpoint_exception_message) + def make_send_breakpoint_exception_message(self, *args, **kwargs): + return NULL_NET_COMMAND # Not a part of the debug adapter protocol + + @overrides(NetCommandFactory.make_process_created_message) + def make_process_created_message(self, *args, **kwargs): + return NULL_NET_COMMAND # Not a part of the debug adapter protocol + + @overrides(NetCommandFactory.make_process_about_to_be_replaced_message) + def make_process_about_to_be_replaced_message(self): + event = ExitedEvent(ExitedEventBody(-1, pydevdReason="processReplaced")) + + cmd = NetCommand(CMD_RETURN, 0, event, is_json=True) + + def after_send(socket): + socket.setsockopt(socket_module.IPPROTO_TCP, socket_module.TCP_NODELAY, 1) + + cmd.call_after_send(after_send) + return cmd + + @overrides(NetCommandFactory.make_thread_suspend_message) + def make_thread_suspend_message(self, py_db, thread_id, frames_list, stop_reason, message, trace_suspend_type, thread, info): + from _pydevd_bundle.pydevd_comm_constants import CMD_THREAD_SUSPEND + + if py_db.multi_threads_single_notification: + pydev_log.debug("Skipping per-thread thread suspend notification.") + return NULL_NET_COMMAND # Don't send per-thread, send a single one. + pydev_log.debug("Sending per-thread thread suspend notification (stop_reason: %s)", stop_reason) + + exc_desc = None + exc_name = None + preserve_focus_hint = False + if stop_reason in self._STEP_REASONS: + if info.pydev_original_step_cmd == CMD_STOP_ON_START: + # Just to make sure that's not set as the original reason anymore. + info.pydev_original_step_cmd = -1 + stop_reason = "entry" + else: + stop_reason = "step" + elif stop_reason in self._EXCEPTION_REASONS: + stop_reason = "exception" + elif stop_reason == CMD_SET_BREAK: + stop_reason = "breakpoint" + elif stop_reason == CMD_SET_FUNCTION_BREAK: + stop_reason = "function breakpoint" + elif stop_reason == CMD_SET_NEXT_STATEMENT: + stop_reason = "goto" + else: + stop_reason = "pause" + preserve_focus_hint = True + + if stop_reason == "exception": + exception_info_response = build_exception_info_response( + py_db, thread_id, thread, -1, set_additional_thread_info, self._iter_visible_frames_info, max_frames=-1 + ) + exception_info_response + + exc_name = exception_info_response.body.exceptionId + exc_desc = exception_info_response.body.description + + body = pydevd_schema.StoppedEventBody( + reason=stop_reason, + description=exc_desc, + threadId=thread_id, + text=exc_name, + allThreadsStopped=False, + preserveFocusHint=preserve_focus_hint, + ) + event = pydevd_schema.StoppedEvent(body) + return NetCommand(CMD_THREAD_SUSPEND, 0, event, is_json=True) + + @overrides(NetCommandFactory.make_thread_run_message) + def make_thread_run_message(self, py_db, thread_id, reason): + if py_db.multi_threads_single_notification: + return NULL_NET_COMMAND # Don't send per-thread, send a single one. + body = ContinuedEventBody(threadId=thread_id, allThreadsContinued=False) + event = pydevd_schema.ContinuedEvent(body) + return NetCommand(CMD_THREAD_RUN, 0, event, is_json=True) + + @overrides(NetCommandFactory.make_reloaded_code_message) + def make_reloaded_code_message(self, *args, **kwargs): + return NULL_NET_COMMAND # Not a part of the debug adapter protocol + + @overrides(NetCommandFactory.make_input_requested_message) + def make_input_requested_message(self, started): + event = pydevd_schema.PydevdInputRequestedEvent(body={}) + return NetCommand(CMD_INPUT_REQUESTED, 0, event, is_json=True) + + @overrides(NetCommandFactory.make_skipped_step_in_because_of_filters) + def make_skipped_step_in_because_of_filters(self, py_db, frame): + msg = "Frame skipped from debugging during step-in." + if py_db.get_use_libraries_filter(): + msg += ( + '\nNote: may have been skipped because of "justMyCode" option (default == true). ' + 'Try setting "justMyCode": false in the debug configuration (e.g., launch.json).\n' + ) + return self.make_warning_message(msg) + + @overrides(NetCommandFactory.make_evaluation_timeout_msg) + def make_evaluation_timeout_msg(self, py_db, expression, curr_thread): + msg = """Evaluating: %s did not finish after %.2f seconds. +This may mean a number of things: +- This evaluation is really slow and this is expected. + In this case it's possible to silence this error by raising the timeout, setting the + PYDEVD_WARN_EVALUATION_TIMEOUT environment variable to a bigger value. + +- The evaluation may need other threads running while it's running: + In this case, it's possible to set the PYDEVD_UNBLOCK_THREADS_TIMEOUT + environment variable so that if after a given timeout an evaluation doesn't finish, + other threads are unblocked or you can manually resume all threads. + + Alternatively, it's also possible to skip breaking on a particular thread by setting a + `pydev_do_not_trace = True` attribute in the related threading.Thread instance + (if some thread should always be running and no breakpoints are expected to be hit in it). + +- The evaluation is deadlocked: + In this case you may set the PYDEVD_THREAD_DUMP_ON_WARN_EVALUATION_TIMEOUT + environment variable to true so that a thread dump is shown along with this message and + optionally, set the PYDEVD_INTERRUPT_THREAD_TIMEOUT to some value so that the debugger + tries to interrupt the evaluation (if possible) when this happens. +""" % (expression, pydevd_constants.PYDEVD_WARN_EVALUATION_TIMEOUT) + + if pydevd_constants.PYDEVD_THREAD_DUMP_ON_WARN_EVALUATION_TIMEOUT: + stream = StringIO() + pydevd_utils.dump_threads(stream, show_pydevd_threads=False) + msg += "\n\n%s\n" % stream.getvalue() + return self.make_warning_message(msg) + + @overrides(NetCommandFactory.make_exit_command) + def make_exit_command(self, py_db): + event = pydevd_schema.TerminatedEvent(pydevd_schema.TerminatedEventBody()) + return NetCommand(CMD_EXIT, 0, event, is_json=True) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py new file mode 100644 index 0000000..a9c3ad5 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py @@ -0,0 +1,558 @@ +import json + +from _pydev_bundle.pydev_is_thread_alive import is_thread_alive +from _pydev_bundle._pydev_saved_modules import thread +from _pydevd_bundle import pydevd_xml, pydevd_frame_utils, pydevd_constants, pydevd_utils +from _pydevd_bundle.pydevd_comm_constants import ( + CMD_THREAD_CREATE, + CMD_THREAD_KILL, + CMD_THREAD_SUSPEND, + CMD_THREAD_RUN, + CMD_GET_VARIABLE, + CMD_EVALUATE_EXPRESSION, + CMD_GET_FRAME, + CMD_WRITE_TO_CONSOLE, + CMD_GET_COMPLETIONS, + CMD_LOAD_SOURCE, + CMD_SET_NEXT_STATEMENT, + CMD_EXIT, + CMD_GET_FILE_CONTENTS, + CMD_EVALUATE_CONSOLE_EXPRESSION, + CMD_RUN_CUSTOM_OPERATION, + CMD_GET_BREAKPOINT_EXCEPTION, + CMD_SEND_CURR_EXCEPTION_TRACE, + CMD_SEND_CURR_EXCEPTION_TRACE_PROCEEDED, + CMD_SHOW_CONSOLE, + CMD_GET_ARRAY, + CMD_INPUT_REQUESTED, + CMD_GET_DESCRIPTION, + CMD_PROCESS_CREATED, + CMD_SHOW_CYTHON_WARNING, + CMD_LOAD_FULL_VALUE, + CMD_GET_THREAD_STACK, + CMD_GET_EXCEPTION_DETAILS, + CMD_THREAD_SUSPEND_SINGLE_NOTIFICATION, + CMD_THREAD_RESUME_SINGLE_NOTIFICATION, + CMD_GET_NEXT_STATEMENT_TARGETS, + CMD_VERSION, + CMD_RETURN, + CMD_SET_PROTOCOL, + CMD_ERROR, + MAX_IO_MSG_SIZE, + VERSION_STRING, + CMD_RELOAD_CODE, + CMD_LOAD_SOURCE_FROM_FRAME_ID, +) +from _pydevd_bundle.pydevd_constants import ( + DebugInfoHolder, + get_thread_id, + get_global_debugger, + GetGlobalDebugger, + set_global_debugger, +) # Keep for backward compatibility @UnusedImport +from _pydevd_bundle.pydevd_net_command import NetCommand, NULL_NET_COMMAND, NULL_EXIT_COMMAND +from _pydevd_bundle.pydevd_utils import quote_smart as quote, get_non_pydevd_threads +from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame +import pydevd_file_utils +from pydevd_tracing import get_exception_traceback_str +from _pydev_bundle._pydev_completer import completions_to_xml +from _pydev_bundle import pydev_log +from _pydevd_bundle.pydevd_frame_utils import FramesList +from io import StringIO + + +# ======================================================================================================================= +# NetCommandFactory +# ======================================================================================================================= +class NetCommandFactory(object): + def __init__(self): + self._additional_thread_id_to_thread_name = {} + + def _thread_to_xml(self, thread): + """thread information as XML""" + name = pydevd_xml.make_valid_xml_value(thread.name) + cmd_text = '' % (quote(name), get_thread_id(thread)) + return cmd_text + + def make_error_message(self, seq, text): + cmd = NetCommand(CMD_ERROR, seq, text) + if DebugInfoHolder.DEBUG_TRACE_LEVEL > 2: + pydev_log.error("Error: %s" % (text,)) + return cmd + + def make_protocol_set_message(self, seq): + return NetCommand(CMD_SET_PROTOCOL, seq, "") + + def make_thread_created_message(self, thread): + cmdText = "" + self._thread_to_xml(thread) + "" + return NetCommand(CMD_THREAD_CREATE, 0, cmdText) + + def make_process_created_message(self): + cmdText = "" + return NetCommand(CMD_PROCESS_CREATED, 0, cmdText) + + def make_process_about_to_be_replaced_message(self): + return NULL_NET_COMMAND + + def make_show_cython_warning_message(self): + try: + return NetCommand(CMD_SHOW_CYTHON_WARNING, 0, "") + except: + return self.make_error_message(0, get_exception_traceback_str()) + + def make_custom_frame_created_message(self, frame_id, frame_description): + self._additional_thread_id_to_thread_name[frame_id] = frame_description + frame_description = pydevd_xml.make_valid_xml_value(frame_description) + return NetCommand(CMD_THREAD_CREATE, 0, '' % (frame_description, frame_id)) + + def make_list_threads_message(self, py_db, seq): + """returns thread listing as XML""" + try: + threads = get_non_pydevd_threads() + cmd_text = [""] + append = cmd_text.append + for thread in threads: + if is_thread_alive(thread): + append(self._thread_to_xml(thread)) + + for thread_id, thread_name in list(self._additional_thread_id_to_thread_name.items()): + name = pydevd_xml.make_valid_xml_value(thread_name) + append('' % (quote(name), thread_id)) + + append("") + return NetCommand(CMD_RETURN, seq, "".join(cmd_text)) + except: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_get_thread_stack_message(self, py_db, seq, thread_id, topmost_frame, fmt, must_be_suspended=False, start_frame=0, levels=0): + """ + Returns thread stack as XML. + + :param must_be_suspended: If True and the thread is not suspended, returns None. + """ + try: + # If frame is None, the return is an empty frame list. + cmd_text = ['' % (thread_id,)] + + if topmost_frame is not None: + try: + # : :type suspended_frames_manager: SuspendedFramesManager + suspended_frames_manager = py_db.suspended_frames_manager + frames_list = suspended_frames_manager.get_frames_list(thread_id) + if frames_list is None: + # Could not find stack of suspended frame... + if must_be_suspended: + return None + else: + frames_list = pydevd_frame_utils.create_frames_list_from_frame(topmost_frame) + + cmd_text.append(self.make_thread_stack_str(py_db, frames_list)) + finally: + topmost_frame = None + cmd_text.append("") + return NetCommand(CMD_GET_THREAD_STACK, seq, "".join(cmd_text)) + except: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_variable_changed_message(self, seq, payload): + # notify debugger that value was changed successfully + return NetCommand(CMD_RETURN, seq, payload) + + def make_warning_message(self, msg): + return self.make_io_message(msg, 2) + + def make_console_message(self, msg): + return self.make_io_message(msg, 2) + + def make_io_message(self, msg, ctx): + """ + @param msg: the message to pass to the debug server + @param ctx: 1 for stdio 2 for stderr + """ + try: + msg = pydevd_constants.as_str(msg) + + if len(msg) > MAX_IO_MSG_SIZE: + msg = msg[0:MAX_IO_MSG_SIZE] + msg += "..." + + msg = pydevd_xml.make_valid_xml_value(quote(msg, "/>_= ")) + return NetCommand(str(CMD_WRITE_TO_CONSOLE), 0, '' % (msg, ctx)) + except: + return self.make_error_message(0, get_exception_traceback_str()) + + def make_version_message(self, seq): + try: + return NetCommand(CMD_VERSION, seq, VERSION_STRING) + except: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_thread_killed_message(self, tid): + self._additional_thread_id_to_thread_name.pop(tid, None) + try: + return NetCommand(CMD_THREAD_KILL, 0, str(tid)) + except: + return self.make_error_message(0, get_exception_traceback_str()) + + def _iter_visible_frames_info(self, py_db, frames_list, flatten_chained=False): + assert frames_list.__class__ == FramesList + is_chained = False + while True: + for frame in frames_list: + show_as_current_frame = frame is frames_list.current_frame + if frame.f_code is None: + pydev_log.info("Frame without f_code: %s", frame) + continue # IronPython sometimes does not have it! + + method_name = frame.f_code.co_name # method name (if in method) or ? if global + if method_name is None: + pydev_log.info("Frame without co_name: %s", frame) + continue # IronPython sometimes does not have it! + + if is_chained: + method_name = "[Chained Exc: %s] %s" % (frames_list.exc_desc, method_name) + + abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) + if py_db.get_file_type(frame, abs_path_real_path_and_base) == py_db.PYDEV_FILE: + # Skip pydevd files. + frame = frame.f_back + continue + + frame_id = id(frame) + lineno = frames_list.frame_id_to_lineno.get(frame_id, frame.f_lineno) + line_col_info = frames_list.frame_id_to_line_col_info.get(frame_id) + + filename_in_utf8, lineno, changed = py_db.source_mapping.map_to_client(abs_path_real_path_and_base[0], lineno) + new_filename_in_utf8, applied_mapping = pydevd_file_utils.map_file_to_client(filename_in_utf8) + applied_mapping = applied_mapping or changed + + yield ( + frame_id, + frame, + method_name, + abs_path_real_path_and_base[0], + new_filename_in_utf8, + lineno, + applied_mapping, + show_as_current_frame, + line_col_info, + ) + + if not flatten_chained: + break + + frames_list = frames_list.chained_frames_list + if frames_list is None or len(frames_list) == 0: + break + is_chained = True + + def make_thread_stack_str(self, py_db, frames_list): + assert frames_list.__class__ == FramesList + make_valid_xml_value = pydevd_xml.make_valid_xml_value + cmd_text_list = [] + append = cmd_text_list.append + + try: + for ( + frame_id, + frame, + method_name, + _original_filename, + filename_in_utf8, + lineno, + _applied_mapping, + _show_as_current_frame, + line_col_info, + ) in self._iter_visible_frames_info(py_db, frames_list, flatten_chained=True): + # print("file is ", filename_in_utf8) + # print("line is ", lineno) + + # Note: variables are all gotten 'on-demand'. + append('' % (quote(make_valid_xml_value(filename_in_utf8), "/>_= \t"), lineno)) + append("") + except: + pydev_log.exception() + + return "".join(cmd_text_list) + + def make_thread_suspend_str( + self, + py_db, + thread_id, + frames_list, + stop_reason=None, + message=None, + trace_suspend_type="trace", + ): + """ + :return tuple(str,str): + Returns tuple(thread_suspended_str, thread_stack_str). + + i.e.: + ( + ''' + + + + + + + ''' + , + ''' + + + ''' + ) + """ + assert frames_list.__class__ == FramesList + make_valid_xml_value = pydevd_xml.make_valid_xml_value + cmd_text_list = [] + append = cmd_text_list.append + + cmd_text_list.append("") + if message: + message = make_valid_xml_value(message) + + append('") + thread_stack_str = self.make_thread_stack_str(py_db, frames_list) + append(thread_stack_str) + append("") + + return "".join(cmd_text_list), thread_stack_str + + def make_thread_suspend_message(self, py_db, thread_id, frames_list, stop_reason, message, trace_suspend_type, thread, additional_info): + try: + thread_suspend_str, thread_stack_str = self.make_thread_suspend_str( + py_db, thread_id, frames_list, stop_reason, message, trace_suspend_type + ) + cmd = NetCommand(CMD_THREAD_SUSPEND, 0, thread_suspend_str) + cmd.thread_stack_str = thread_stack_str + cmd.thread_suspend_str = thread_suspend_str + return cmd + except: + return self.make_error_message(0, get_exception_traceback_str()) + + def make_thread_suspend_single_notification(self, py_db, thread_id, thread, stop_reason): + try: + return NetCommand(CMD_THREAD_SUSPEND_SINGLE_NOTIFICATION, 0, json.dumps({"thread_id": thread_id, "stop_reason": stop_reason})) + except: + return self.make_error_message(0, get_exception_traceback_str()) + + def make_thread_resume_single_notification(self, thread_id): + try: + return NetCommand(CMD_THREAD_RESUME_SINGLE_NOTIFICATION, 0, json.dumps({"thread_id": thread_id})) + except: + return self.make_error_message(0, get_exception_traceback_str()) + + def make_thread_run_message(self, py_db, thread_id, reason): + try: + return NetCommand(CMD_THREAD_RUN, 0, "%s\t%s" % (thread_id, reason)) + except: + return self.make_error_message(0, get_exception_traceback_str()) + + def make_get_variable_message(self, seq, payload): + try: + return NetCommand(CMD_GET_VARIABLE, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_get_array_message(self, seq, payload): + try: + return NetCommand(CMD_GET_ARRAY, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_get_description_message(self, seq, payload): + try: + return NetCommand(CMD_GET_DESCRIPTION, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_get_frame_message(self, seq, payload): + try: + return NetCommand(CMD_GET_FRAME, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_evaluate_expression_message(self, seq, payload): + try: + return NetCommand(CMD_EVALUATE_EXPRESSION, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_get_completions_message(self, seq, completions, qualifier, start): + try: + payload = completions_to_xml(completions) + return NetCommand(CMD_GET_COMPLETIONS, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_get_file_contents(self, seq, payload): + try: + return NetCommand(CMD_GET_FILE_CONTENTS, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_reloaded_code_message(self, seq, reloaded_ok): + try: + return NetCommand(CMD_RELOAD_CODE, seq, '' % reloaded_ok) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_send_breakpoint_exception_message(self, seq, payload): + try: + return NetCommand(CMD_GET_BREAKPOINT_EXCEPTION, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def _make_send_curr_exception_trace_str(self, py_db, thread_id, exc_type, exc_desc, trace_obj): + frames_list = pydevd_frame_utils.create_frames_list_from_traceback(trace_obj, None, exc_type, exc_desc) + + exc_type = pydevd_xml.make_valid_xml_value(str(exc_type)).replace("\t", " ") or "exception: type unknown" + exc_desc = pydevd_xml.make_valid_xml_value(str(exc_desc)).replace("\t", " ") or "exception: no description" + + thread_suspend_str, thread_stack_str = self.make_thread_suspend_str( + py_db, thread_id, frames_list, CMD_SEND_CURR_EXCEPTION_TRACE, "" + ) + return exc_type, exc_desc, thread_suspend_str, thread_stack_str + + def make_send_curr_exception_trace_message(self, py_db, seq, thread_id, curr_frame_id, exc_type, exc_desc, trace_obj): + try: + exc_type, exc_desc, thread_suspend_str, _thread_stack_str = self._make_send_curr_exception_trace_str( + py_db, thread_id, exc_type, exc_desc, trace_obj + ) + payload = str(curr_frame_id) + "\t" + exc_type + "\t" + exc_desc + "\t" + thread_suspend_str + return NetCommand(CMD_SEND_CURR_EXCEPTION_TRACE, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_get_exception_details_message(self, py_db, seq, thread_id, topmost_frame): + """Returns exception details as XML""" + try: + # If the debugger is not suspended, just return the thread and its id. + cmd_text = ['") + cmd_text.append(thread_stack_str) + break + frame = frame.f_back + else: + cmd_text.append(">") + finally: + frame = None + cmd_text.append("") + return NetCommand(CMD_GET_EXCEPTION_DETAILS, seq, "".join(cmd_text)) + except: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_send_curr_exception_trace_proceeded_message(self, seq, thread_id): + try: + return NetCommand(CMD_SEND_CURR_EXCEPTION_TRACE_PROCEEDED, 0, str(thread_id)) + except: + return self.make_error_message(0, get_exception_traceback_str()) + + def make_send_console_message(self, seq, payload): + try: + return NetCommand(CMD_EVALUATE_CONSOLE_EXPRESSION, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_custom_operation_message(self, seq, payload): + try: + return NetCommand(CMD_RUN_CUSTOM_OPERATION, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_load_source_message(self, seq, source): + return NetCommand(CMD_LOAD_SOURCE, seq, source) + + def make_load_source_from_frame_id_message(self, seq, source): + return NetCommand(CMD_LOAD_SOURCE_FROM_FRAME_ID, seq, source) + + def make_show_console_message(self, py_db, thread_id, frame): + try: + frames_list = pydevd_frame_utils.create_frames_list_from_frame(frame) + thread_suspended_str, _thread_stack_str = self.make_thread_suspend_str(py_db, thread_id, frames_list, CMD_SHOW_CONSOLE, "") + return NetCommand(CMD_SHOW_CONSOLE, 0, thread_suspended_str) + except: + return self.make_error_message(0, get_exception_traceback_str()) + + def make_input_requested_message(self, started): + try: + return NetCommand(CMD_INPUT_REQUESTED, 0, str(started)) + except: + return self.make_error_message(0, get_exception_traceback_str()) + + def make_set_next_stmnt_status_message(self, seq, is_success, exception_msg): + try: + message = str(is_success) + "\t" + exception_msg + return NetCommand(CMD_SET_NEXT_STATEMENT, int(seq), message) + except: + return self.make_error_message(0, get_exception_traceback_str()) + + def make_load_full_value_message(self, seq, payload): + try: + return NetCommand(CMD_LOAD_FULL_VALUE, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_get_next_statement_targets_message(self, seq, payload): + try: + return NetCommand(CMD_GET_NEXT_STATEMENT_TARGETS, seq, payload) + except Exception: + return self.make_error_message(seq, get_exception_traceback_str()) + + def make_skipped_step_in_because_of_filters(self, py_db, frame): + return NULL_NET_COMMAND # Not a part of the xml protocol + + def make_evaluation_timeout_msg(self, py_db, expression, thread): + msg = """pydevd: Evaluating: %s did not finish after %.2f seconds. +This may mean a number of things: +- This evaluation is really slow and this is expected. + In this case it's possible to silence this error by raising the timeout, setting the + PYDEVD_WARN_EVALUATION_TIMEOUT environment variable to a bigger value. + +- The evaluation may need other threads running while it's running: + In this case, you may need to manually let other paused threads continue. + + Alternatively, it's also possible to skip breaking on a particular thread by setting a + `pydev_do_not_trace = True` attribute in the related threading.Thread instance + (if some thread should always be running and no breakpoints are expected to be hit in it). + +- The evaluation is deadlocked: + In this case you may set the PYDEVD_THREAD_DUMP_ON_WARN_EVALUATION_TIMEOUT + environment variable to true so that a thread dump is shown along with this message and + optionally, set the PYDEVD_INTERRUPT_THREAD_TIMEOUT to some value so that the debugger + tries to interrupt the evaluation (if possible) when this happens. +""" % (expression, pydevd_constants.PYDEVD_WARN_EVALUATION_TIMEOUT) + + if pydevd_constants.PYDEVD_THREAD_DUMP_ON_WARN_EVALUATION_TIMEOUT: + stream = StringIO() + pydevd_utils.dump_threads(stream, show_pydevd_threads=False) + msg += "\n\n%s\n" % stream.getvalue() + return self.make_warning_message(msg) + + def make_exit_command(self, py_db): + return NULL_EXIT_COMMAND diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py new file mode 100644 index 0000000..df1f50c --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py @@ -0,0 +1,208 @@ +import types + +from _pydev_bundle import pydev_log +from typing import Tuple, Literal + +try: + from pydevd_plugins import django_debug +except: + django_debug = None + pydev_log.debug("Unable to load django_debug plugin") + +try: + from pydevd_plugins import jinja2_debug +except: + jinja2_debug = None + pydev_log.debug("Unable to load jinja2_debug plugin") + + +def load_plugins(): + plugins = [] + if django_debug is not None: + plugins.append(django_debug) + + if jinja2_debug is not None: + plugins.append(jinja2_debug) + return plugins + + +def bind_func_to_method(func, obj, method_name): + bound_method = types.MethodType(func, obj) + + setattr(obj, method_name, bound_method) + return bound_method + + +class PluginManager(object): + EMPTY_SENTINEL = object() + + def __init__(self, main_debugger): + self.plugins = load_plugins() + + # When some breakpoint is added for a given plugin it becomes active. + self.active_plugins = [] + + self.main_debugger = main_debugger + + def add_breakpoint(self, func_name, *args, **kwargs): + # add breakpoint for plugin + for plugin in self.plugins: + if hasattr(plugin, func_name): + func = getattr(plugin, func_name) + result = func(*args, **kwargs) + if result: + self.activate(plugin) + return result + return None + + def activate(self, plugin): + if plugin not in self.active_plugins: + self.active_plugins.append(plugin) + + # These are not a part of the API, rather, `add_breakpoint` should be used with `add_line_breakpoint` or `add_exception_breakpoint` + # which will call it for all plugins and then if it's valid it'll be activated. + # + # def add_line_breakpoint(self, py_db, type, canonical_normalized_filename, breakpoint_id, line, condition, expression, func_name, hit_condition=None, is_logpoint=False, add_breakpoint_result=None, on_changed_breakpoint_state=None): + # def add_exception_breakpoint(plugin, py_db, type, exception): + + def after_breakpoints_consolidated(self, py_db, canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints): + for plugin in self.active_plugins: + plugin.after_breakpoints_consolidated(py_db, canonical_normalized_filename, id_to_pybreakpoint, file_to_line_to_breakpoints) + + def remove_exception_breakpoint(self, py_db, exception_type, exception): + """ + :param exception_type: 'django', 'jinja2' (can be extended) + """ + for plugin in self.active_plugins: + ret = plugin.remove_exception_breakpoint(py_db, exception_type, exception) + if ret: + return ret + + return None + + def remove_all_exception_breakpoints(self, py_db): + for plugin in self.active_plugins: + plugin.remove_all_exception_breakpoints(py_db) + + def get_breakpoints(self, py_db, breakpoint_type): + """ + :param breakpoint_type: 'django-line', 'jinja2-line' + """ + for plugin in self.active_plugins: + ret = plugin.get_breakpoints(py_db, breakpoint_type) + if ret: + return ret + + def can_skip(self, py_db, frame): + for plugin in self.active_plugins: + if not plugin.can_skip(py_db, frame): + return False + return True + + def required_events_breakpoint(self) -> Tuple[Literal["line", "call"], ...]: + ret = () + for plugin in self.active_plugins: + new = plugin.required_events_breakpoint() + if new: + ret += new + + return ret + + def required_events_stepping(self) -> Tuple[Literal["line", "call", "return"], ...]: + ret = () + for plugin in self.active_plugins: + new = plugin.required_events_stepping() + if new: + ret += new + + return ret + + def is_tracked_frame(self, frame) -> bool: + for plugin in self.active_plugins: + if plugin.is_tracked_frame(frame): + return True + return False + + def has_exception_breaks(self, py_db) -> bool: + for plugin in self.active_plugins: + if plugin.has_exception_breaks(py_db): + return True + return False + + def has_line_breaks(self, py_db) -> bool: + for plugin in self.active_plugins: + if plugin.has_line_breaks(py_db): + return True + return False + + def cmd_step_into(self, py_db, frame, event, info, thread, stop_info, stop: bool): + """ + :param stop_info: in/out information. If it should stop then it'll be + filled by the plugin. + :param stop: whether the stop has already been flagged for this frame. + :returns: + tuple(stop, plugin_stop) + """ + plugin_stop = False + for plugin in self.active_plugins: + stop, plugin_stop = plugin.cmd_step_into(py_db, frame, event, info, thread, stop_info, stop) + if plugin_stop: + return stop, plugin_stop + return stop, plugin_stop + + def cmd_step_over(self, py_db, frame, event, info, thread, stop_info, stop): + plugin_stop = False + for plugin in self.active_plugins: + stop, plugin_stop = plugin.cmd_step_over(py_db, frame, event, info, thread, stop_info, stop) + if plugin_stop: + return stop, plugin_stop + return stop, plugin_stop + + def stop(self, py_db, frame, event, thread, stop_info, arg, step_cmd): + """ + The way this works is that the `cmd_step_into` or `cmd_step_over` + is called which then fills the `stop_info` and then this method + is called to do the actual stop. + """ + for plugin in self.active_plugins: + stopped = plugin.stop(py_db, frame, event, thread, stop_info, arg, step_cmd) + if stopped: + return stopped + return False + + def get_breakpoint(self, py_db, frame, event, info): + for plugin in self.active_plugins: + ret = plugin.get_breakpoint(py_db, frame, event, info) + if ret: + return ret + return None + + def suspend(self, py_db, thread, frame, bp_type): + """ + :param bp_type: 'django' or 'jinja2' + + :return: + The frame for the suspend or None if it should not be suspended. + """ + for plugin in self.active_plugins: + ret = plugin.suspend(py_db, thread, frame, bp_type) + if ret is not None: + return ret + + return None + + def exception_break(self, py_db, frame, thread, arg, is_unwind=False): + for plugin in self.active_plugins: + ret = plugin.exception_break(py_db, frame, thread, arg, is_unwind) + if ret is not None: + return ret + + return None + + def change_variable(self, frame, attr, expression): + for plugin in self.active_plugins: + ret = plugin.change_variable(frame, attr, expression, self.EMPTY_SENTINEL) + if ret is not self.EMPTY_SENTINEL: + return ret + + return self.EMPTY_SENTINEL diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py new file mode 100644 index 0000000..92902ed --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py @@ -0,0 +1,805 @@ +import json +import os +import sys +import traceback + +from _pydev_bundle import pydev_log +from _pydev_bundle.pydev_log import exception as pydev_log_exception +from _pydevd_bundle import pydevd_traceproperty, pydevd_dont_trace, pydevd_utils +from _pydevd_bundle.pydevd_additional_thread_info import set_additional_thread_info +from _pydevd_bundle.pydevd_breakpoints import get_exception_class +from _pydevd_bundle.pydevd_comm import ( + InternalEvaluateConsoleExpression, + InternalConsoleGetCompletions, + InternalRunCustomOperation, + internal_get_next_statement_targets, + internal_get_smart_step_into_variants, +) +from _pydevd_bundle.pydevd_constants import NEXT_VALUE_SEPARATOR, IS_WINDOWS, NULL +from _pydevd_bundle.pydevd_comm_constants import ID_TO_MEANING, CMD_EXEC_EXPRESSION, CMD_AUTHENTICATE +from _pydevd_bundle.pydevd_api import PyDevdAPI +from io import StringIO +from _pydevd_bundle.pydevd_net_command import NetCommand +from _pydevd_bundle.pydevd_thread_lifecycle import pydevd_find_thread_by_id +import pydevd_file_utils + + +class _PyDevCommandProcessor(object): + def __init__(self): + self.api = PyDevdAPI() + + def process_net_command(self, py_db, cmd_id, seq, text): + """Processes a command received from the Java side + + @param cmd_id: the id of the command + @param seq: the sequence of the command + @param text: the text received in the command + """ + + # We can only proceed if the client is already authenticated or if it's the + # command to authenticate. + if cmd_id != CMD_AUTHENTICATE and not py_db.authentication.is_authenticated(): + cmd = py_db.cmd_factory.make_error_message(seq, "Client not authenticated.") + py_db.writer.add_command(cmd) + return + + meaning = ID_TO_MEANING[str(cmd_id)] + + # print('Handling %s (%s)' % (meaning, text)) + + method_name = meaning.lower() + + on_command = getattr(self, method_name.lower(), None) + if on_command is None: + # I have no idea what this is all about + cmd = py_db.cmd_factory.make_error_message(seq, "unexpected command " + str(cmd_id)) + py_db.writer.add_command(cmd) + return + + lock = py_db._main_lock + if method_name == "cmd_thread_dump_to_stderr": + # We can skip the main debugger locks for cases where we know it's not needed. + lock = NULL + + with lock: + try: + cmd = on_command(py_db, cmd_id, seq, text) + if cmd is not None: + py_db.writer.add_command(cmd) + except: + if traceback is not None and sys is not None and pydev_log_exception is not None: + pydev_log_exception() + + stream = StringIO() + traceback.print_exc(file=stream) + cmd = py_db.cmd_factory.make_error_message( + seq, + "Unexpected exception in process_net_command.\nInitial params: %s. Exception: %s" + % (((cmd_id, seq, text), stream.getvalue())), + ) + if cmd is not None: + py_db.writer.add_command(cmd) + + def cmd_authenticate(self, py_db, cmd_id, seq, text): + access_token = text + py_db.authentication.login(access_token) + if py_db.authentication.is_authenticated(): + return NetCommand(cmd_id, seq, py_db.authentication.client_access_token) + + return py_db.cmd_factory.make_error_message(seq, "Client not authenticated.") + + def cmd_run(self, py_db, cmd_id, seq, text): + return self.api.run(py_db) + + def cmd_list_threads(self, py_db, cmd_id, seq, text): + return self.api.list_threads(py_db, seq) + + def cmd_get_completions(self, py_db, cmd_id, seq, text): + # we received some command to get a variable + # the text is: thread_id\tframe_id\tactivation token + thread_id, frame_id, _scope, act_tok = text.split("\t", 3) + + return self.api.request_completions(py_db, seq, thread_id, frame_id, act_tok) + + def cmd_get_thread_stack(self, py_db, cmd_id, seq, text): + # Receives a thread_id and a given timeout, which is the time we should + # wait to the provide the stack if a given thread is still not suspended. + if "\t" in text: + thread_id, timeout = text.split("\t") + timeout = float(timeout) + else: + thread_id = text + timeout = 0.5 # Default timeout is .5 seconds + + return self.api.request_stack(py_db, seq, thread_id, fmt={}, timeout=timeout) + + def cmd_set_protocol(self, py_db, cmd_id, seq, text): + return self.api.set_protocol(py_db, seq, text.strip()) + + def cmd_thread_suspend(self, py_db, cmd_id, seq, text): + return self.api.request_suspend_thread(py_db, text.strip()) + + def cmd_version(self, py_db, cmd_id, seq, text): + # Default based on server process (although ideally the IDE should + # provide it). + if IS_WINDOWS: + ide_os = "WINDOWS" + else: + ide_os = "UNIX" + + # Breakpoints can be grouped by 'LINE' or by 'ID'. + breakpoints_by = "LINE" + + splitted = text.split("\t") + if len(splitted) == 1: + _local_version = splitted + + elif len(splitted) == 2: + _local_version, ide_os = splitted + + elif len(splitted) == 3: + _local_version, ide_os, breakpoints_by = splitted + + version_msg = self.api.set_ide_os_and_breakpoints_by(py_db, seq, ide_os, breakpoints_by) + + # Enable thread notifications after the version command is completed. + self.api.set_enable_thread_notifications(py_db, True) + + return version_msg + + def cmd_thread_run(self, py_db, cmd_id, seq, text): + return self.api.request_resume_thread(text.strip()) + + def _cmd_step(self, py_db, cmd_id, seq, text): + return self.api.request_step(py_db, text.strip(), cmd_id) + + cmd_step_into = _cmd_step + cmd_step_into_my_code = _cmd_step + cmd_step_over = _cmd_step + cmd_step_over_my_code = _cmd_step + cmd_step_return = _cmd_step + cmd_step_return_my_code = _cmd_step + + def _cmd_set_next(self, py_db, cmd_id, seq, text): + thread_id, line, func_name = text.split("\t", 2) + return self.api.request_set_next(py_db, seq, thread_id, cmd_id, None, line, func_name) + + cmd_run_to_line = _cmd_set_next + cmd_set_next_statement = _cmd_set_next + + def cmd_smart_step_into(self, py_db, cmd_id, seq, text): + thread_id, line_or_bytecode_offset, func_name = text.split("\t", 2) + if line_or_bytecode_offset.startswith("offset="): + # In this case we request the smart step into to stop given the parent frame + # and the location of the parent frame bytecode offset and not just the func_name + # (this implies that `CMD_GET_SMART_STEP_INTO_VARIANTS` was previously used + # to know what are the valid stop points). + + temp = line_or_bytecode_offset[len("offset=") :] + if ";" in temp: + offset, child_offset = temp.split(";") + offset = int(offset) + child_offset = int(child_offset) + else: + child_offset = -1 + offset = int(temp) + return self.api.request_smart_step_into(py_db, seq, thread_id, offset, child_offset) + else: + # If the offset wasn't passed, just use the line/func_name to do the stop. + return self.api.request_smart_step_into_by_func_name(py_db, seq, thread_id, line_or_bytecode_offset, func_name) + + def cmd_reload_code(self, py_db, cmd_id, seq, text): + text = text.strip() + if "\t" not in text: + module_name = text.strip() + filename = None + else: + module_name, filename = text.split("\t", 1) + self.api.request_reload_code(py_db, seq, module_name, filename) + + def cmd_change_variable(self, py_db, cmd_id, seq, text): + # the text is: thread\tstackframe\tFRAME|GLOBAL\tattribute_to_change\tvalue_to_change + thread_id, frame_id, scope, attr_and_value = text.split("\t", 3) + + tab_index = attr_and_value.rindex("\t") + attr = attr_and_value[0:tab_index].replace("\t", ".") + value = attr_and_value[tab_index + 1 :] + self.api.request_change_variable(py_db, seq, thread_id, frame_id, scope, attr, value) + + def cmd_get_variable(self, py_db, cmd_id, seq, text): + # we received some command to get a variable + # the text is: thread_id\tframe_id\tFRAME|GLOBAL\tattributes* + thread_id, frame_id, scopeattrs = text.split("\t", 2) + + if scopeattrs.find("\t") != -1: # there are attributes beyond scope + scope, attrs = scopeattrs.split("\t", 1) + else: + scope, attrs = (scopeattrs, None) + + self.api.request_get_variable(py_db, seq, thread_id, frame_id, scope, attrs) + + def cmd_get_array(self, py_db, cmd_id, seq, text): + # Note: untested and unused in pydev + # we received some command to get an array variable + # the text is: thread_id\tframe_id\tFRAME|GLOBAL\tname\ttemp\troffs\tcoffs\trows\tcols\tformat + roffset, coffset, rows, cols, format, thread_id, frame_id, scopeattrs = text.split("\t", 7) + + if scopeattrs.find("\t") != -1: # there are attributes beyond scope + scope, attrs = scopeattrs.split("\t", 1) + else: + scope, attrs = (scopeattrs, None) + + self.api.request_get_array(py_db, seq, roffset, coffset, rows, cols, format, thread_id, frame_id, scope, attrs) + + def cmd_show_return_values(self, py_db, cmd_id, seq, text): + show_return_values = text.split("\t")[1] + self.api.set_show_return_values(py_db, int(show_return_values) == 1) + + def cmd_load_full_value(self, py_db, cmd_id, seq, text): + # Note: untested and unused in pydev + thread_id, frame_id, scopeattrs = text.split("\t", 2) + vars = scopeattrs.split(NEXT_VALUE_SEPARATOR) + + self.api.request_load_full_value(py_db, seq, thread_id, frame_id, vars) + + def cmd_get_description(self, py_db, cmd_id, seq, text): + # Note: untested and unused in pydev + thread_id, frame_id, expression = text.split("\t", 2) + self.api.request_get_description(py_db, seq, thread_id, frame_id, expression) + + def cmd_get_frame(self, py_db, cmd_id, seq, text): + thread_id, frame_id, scope = text.split("\t", 2) + self.api.request_get_frame(py_db, seq, thread_id, frame_id) + + def cmd_set_break(self, py_db, cmd_id, seq, text): + # func name: 'None': match anything. Empty: match global, specified: only method context. + # command to add some breakpoint. + # text is filename\tline. Add to breakpoints dictionary + suspend_policy = "NONE" # Can be 'NONE' or 'ALL' + is_logpoint = False + hit_condition = None + if py_db._set_breakpoints_with_id: + try: + try: + ( + breakpoint_id, + btype, + filename, + line, + func_name, + condition, + expression, + hit_condition, + is_logpoint, + suspend_policy, + ) = text.split("\t", 9) + except ValueError: # not enough values to unpack + # No suspend_policy passed (use default). + breakpoint_id, btype, filename, line, func_name, condition, expression, hit_condition, is_logpoint = text.split("\t", 8) + is_logpoint = is_logpoint == "True" + except ValueError: # not enough values to unpack + breakpoint_id, btype, filename, line, func_name, condition, expression = text.split("\t", 6) + + breakpoint_id = int(breakpoint_id) + line = int(line) + + # We must restore new lines and tabs as done in + # AbstractDebugTarget.breakpointAdded + condition = condition.replace("@_@NEW_LINE_CHAR@_@", "\n").replace("@_@TAB_CHAR@_@", "\t").strip() + + expression = expression.replace("@_@NEW_LINE_CHAR@_@", "\n").replace("@_@TAB_CHAR@_@", "\t").strip() + else: + # Note: this else should be removed after PyCharm migrates to setting + # breakpoints by id (and ideally also provides func_name). + btype, filename, line, func_name, suspend_policy, condition, expression = text.split("\t", 6) + # If we don't have an id given for each breakpoint, consider + # the id to be the line. + breakpoint_id = line = int(line) + + condition = condition.replace("@_@NEW_LINE_CHAR@_@", "\n").replace("@_@TAB_CHAR@_@", "\t").strip() + + expression = expression.replace("@_@NEW_LINE_CHAR@_@", "\n").replace("@_@TAB_CHAR@_@", "\t").strip() + + if condition is not None and (len(condition) <= 0 or condition == "None"): + condition = None + + if expression is not None and (len(expression) <= 0 or expression == "None"): + expression = None + + if hit_condition is not None and (len(hit_condition) <= 0 or hit_condition == "None"): + hit_condition = None + + def on_changed_breakpoint_state(breakpoint_id, add_breakpoint_result): + error_code = add_breakpoint_result.error_code + + translated_line = add_breakpoint_result.translated_line + translated_filename = add_breakpoint_result.translated_filename + msg = "" + if error_code: + if error_code == self.api.ADD_BREAKPOINT_FILE_NOT_FOUND: + msg = "pydev debugger: Trying to add breakpoint to file that does not exist: %s (will have no effect).\n" % ( + translated_filename, + ) + + elif error_code == self.api.ADD_BREAKPOINT_FILE_EXCLUDED_BY_FILTERS: + msg = "pydev debugger: Trying to add breakpoint to file that is excluded by filters: %s (will have no effect).\n" % ( + translated_filename, + ) + + elif error_code == self.api.ADD_BREAKPOINT_LAZY_VALIDATION: + msg = "" # Ignore this here (if/when loaded, it'll call on_changed_breakpoint_state again accordingly). + + elif error_code == self.api.ADD_BREAKPOINT_INVALID_LINE: + msg = "pydev debugger: Trying to add breakpoint to line (%s) that is not valid in: %s.\n" % ( + translated_line, + translated_filename, + ) + + else: + # Shouldn't get here. + msg = "pydev debugger: Breakpoint not validated (reason unknown -- please report as error): %s (%s).\n" % ( + translated_filename, + translated_line, + ) + + else: + if add_breakpoint_result.original_line != translated_line: + msg = "pydev debugger (info): Breakpoint in line: %s moved to line: %s (in %s).\n" % ( + add_breakpoint_result.original_line, + translated_line, + translated_filename, + ) + + if msg: + py_db.writer.add_command(py_db.cmd_factory.make_warning_message(msg)) + + result = self.api.add_breakpoint( + py_db, + self.api.filename_to_str(filename), + btype, + breakpoint_id, + line, + condition, + func_name, + expression, + suspend_policy, + hit_condition, + is_logpoint, + on_changed_breakpoint_state=on_changed_breakpoint_state, + ) + + on_changed_breakpoint_state(breakpoint_id, result) + + def cmd_remove_break(self, py_db, cmd_id, seq, text): + # command to remove some breakpoint + # text is type\file\tid. Remove from breakpoints dictionary + breakpoint_type, filename, breakpoint_id = text.split("\t", 2) + + filename = self.api.filename_to_str(filename) + + try: + breakpoint_id = int(breakpoint_id) + except ValueError: + pydev_log.critical("Error removing breakpoint. Expected breakpoint_id to be an int. Found: %s", breakpoint_id) + + else: + self.api.remove_breakpoint(py_db, filename, breakpoint_type, breakpoint_id) + + def _cmd_exec_or_evaluate_expression(self, py_db, cmd_id, seq, text): + # command to evaluate the given expression + # text is: thread\tstackframe\tLOCAL\texpression + attr_to_set_result = "" + try: + thread_id, frame_id, scope, expression, trim, attr_to_set_result = text.split("\t", 5) + except ValueError: + thread_id, frame_id, scope, expression, trim = text.split("\t", 4) + is_exec = cmd_id == CMD_EXEC_EXPRESSION + trim_if_too_big = int(trim) == 1 + + self.api.request_exec_or_evaluate(py_db, seq, thread_id, frame_id, expression, is_exec, trim_if_too_big, attr_to_set_result) + + cmd_evaluate_expression = _cmd_exec_or_evaluate_expression + cmd_exec_expression = _cmd_exec_or_evaluate_expression + + def cmd_console_exec(self, py_db, cmd_id, seq, text): + # command to exec expression in console, in case expression is only partially valid 'False' is returned + # text is: thread\tstackframe\tLOCAL\texpression + + thread_id, frame_id, scope, expression = text.split("\t", 3) + self.api.request_console_exec(py_db, seq, thread_id, frame_id, expression) + + def cmd_set_path_mapping_json(self, py_db, cmd_id, seq, text): + """ + :param text: + Json text. Something as: + + { + "pathMappings": [ + { + "localRoot": "c:/temp", + "remoteRoot": "/usr/temp" + } + ], + "debug": true, + "force": false + } + """ + as_json = json.loads(text) + force = as_json.get("force", False) + + path_mappings = [] + for pathMapping in as_json.get("pathMappings", []): + localRoot = pathMapping.get("localRoot", "") + remoteRoot = pathMapping.get("remoteRoot", "") + if (localRoot != "") and (remoteRoot != ""): + path_mappings.append((localRoot, remoteRoot)) + + if bool(path_mappings) or force: + pydevd_file_utils.setup_client_server_paths(path_mappings) + + debug = as_json.get("debug", False) + if debug or force: + pydevd_file_utils.DEBUG_CLIENT_SERVER_TRANSLATION = debug + + def cmd_set_py_exception_json(self, py_db, cmd_id, seq, text): + # This API is optional and works 'in bulk' -- it's possible + # to get finer-grained control with CMD_ADD_EXCEPTION_BREAK/CMD_REMOVE_EXCEPTION_BREAK + # which allows setting caught/uncaught per exception, although global settings such as: + # - skip_on_exceptions_thrown_in_same_context + # - ignore_exceptions_thrown_in_lines_with_ignore_exception + # must still be set through this API (before anything else as this clears all existing + # exception breakpoints). + try: + py_db.break_on_uncaught_exceptions = {} + py_db.break_on_caught_exceptions = {} + py_db.break_on_user_uncaught_exceptions = {} + + as_json = json.loads(text) + break_on_uncaught = as_json.get("break_on_uncaught", False) + break_on_caught = as_json.get("break_on_caught", False) + break_on_user_caught = as_json.get("break_on_user_caught", False) + py_db.skip_on_exceptions_thrown_in_same_context = as_json.get("skip_on_exceptions_thrown_in_same_context", False) + py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception = as_json.get( + "ignore_exceptions_thrown_in_lines_with_ignore_exception", False + ) + ignore_libraries = as_json.get("ignore_libraries", False) + exception_types = as_json.get("exception_types", []) + + for exception_type in exception_types: + if not exception_type: + continue + + py_db.add_break_on_exception( + exception_type, + condition=None, + expression=None, + notify_on_handled_exceptions=break_on_caught, + notify_on_unhandled_exceptions=break_on_uncaught, + notify_on_user_unhandled_exceptions=break_on_user_caught, + notify_on_first_raise_only=True, + ignore_libraries=ignore_libraries, + ) + + py_db.on_breakpoints_changed() + except: + pydev_log.exception("Error when setting exception list. Received: %s", text) + + def cmd_set_py_exception(self, py_db, cmd_id, seq, text): + # DEPRECATED. Use cmd_set_py_exception_json instead. + try: + splitted = text.split(";") + py_db.break_on_uncaught_exceptions = {} + py_db.break_on_caught_exceptions = {} + py_db.break_on_user_uncaught_exceptions = {} + if len(splitted) >= 5: + if splitted[0] == "true": + break_on_uncaught = True + else: + break_on_uncaught = False + + if splitted[1] == "true": + break_on_caught = True + else: + break_on_caught = False + + if splitted[2] == "true": + py_db.skip_on_exceptions_thrown_in_same_context = True + else: + py_db.skip_on_exceptions_thrown_in_same_context = False + + if splitted[3] == "true": + py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception = True + else: + py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception = False + + if splitted[4] == "true": + ignore_libraries = True + else: + ignore_libraries = False + + for exception_type in splitted[5:]: + exception_type = exception_type.strip() + if not exception_type: + continue + + py_db.add_break_on_exception( + exception_type, + condition=None, + expression=None, + notify_on_handled_exceptions=break_on_caught, + notify_on_unhandled_exceptions=break_on_uncaught, + notify_on_user_unhandled_exceptions=False, # TODO (not currently supported in this API). + notify_on_first_raise_only=True, + ignore_libraries=ignore_libraries, + ) + else: + pydev_log.exception("Expected to have at least 5 ';' separated items. Received: %s", text) + + except: + pydev_log.exception("Error when setting exception list. Received: %s", text) + + def _load_source(self, py_db, cmd_id, seq, text): + filename = text + filename = self.api.filename_to_str(filename) + self.api.request_load_source(py_db, seq, filename) + + cmd_load_source = _load_source + cmd_get_file_contents = _load_source + + def cmd_load_source_from_frame_id(self, py_db, cmd_id, seq, text): + frame_id = text + self.api.request_load_source_from_frame_id(py_db, seq, frame_id) + + def cmd_set_property_trace(self, py_db, cmd_id, seq, text): + # Command which receives whether to trace property getter/setter/deleter + # text is feature_state(true/false);disable_getter/disable_setter/disable_deleter + if text: + splitted = text.split(";") + if len(splitted) >= 3: + if not py_db.disable_property_trace and splitted[0] == "true": + # Replacing property by custom property only when the debugger starts + pydevd_traceproperty.replace_builtin_property() + py_db.disable_property_trace = True + # Enable/Disable tracing of the property getter + if splitted[1] == "true": + py_db.disable_property_getter_trace = True + else: + py_db.disable_property_getter_trace = False + # Enable/Disable tracing of the property setter + if splitted[2] == "true": + py_db.disable_property_setter_trace = True + else: + py_db.disable_property_setter_trace = False + # Enable/Disable tracing of the property deleter + if splitted[3] == "true": + py_db.disable_property_deleter_trace = True + else: + py_db.disable_property_deleter_trace = False + + def cmd_add_exception_break(self, py_db, cmd_id, seq, text): + # Note that this message has some idiosyncrasies... + # + # notify_on_handled_exceptions can be 0, 1 or 2 + # 0 means we should not stop on handled exceptions. + # 1 means we should stop on handled exceptions showing it on all frames where the exception passes. + # 2 means we should stop on handled exceptions but we should only notify about it once. + # + # To ignore_libraries properly, besides setting ignore_libraries to 1, the IDE_PROJECT_ROOTS environment + # variable must be set (so, we'll ignore anything not below IDE_PROJECT_ROOTS) -- this is not ideal as + # the environment variable may not be properly set if it didn't start from the debugger (we should + # create a custom message for that). + # + # There are 2 global settings which can only be set in CMD_SET_PY_EXCEPTION. Namely: + # + # py_db.skip_on_exceptions_thrown_in_same_context + # - If True, we should only show the exception in a caller, not where it was first raised. + # + # py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception + # - If True exceptions thrown in lines with '@IgnoreException' will not be shown. + + condition = "" + expression = "" + if text.find("\t") != -1: + try: + ( + exception, + condition, + expression, + notify_on_handled_exceptions, + notify_on_unhandled_exceptions, + ignore_libraries, + ) = text.split("\t", 5) + except: + exception, notify_on_handled_exceptions, notify_on_unhandled_exceptions, ignore_libraries = text.split("\t", 3) + else: + exception, notify_on_handled_exceptions, notify_on_unhandled_exceptions, ignore_libraries = text, 0, 0, 0 + + condition = condition.replace("@_@NEW_LINE_CHAR@_@", "\n").replace("@_@TAB_CHAR@_@", "\t").strip() + + if condition is not None and (len(condition) == 0 or condition == "None"): + condition = None + + expression = expression.replace("@_@NEW_LINE_CHAR@_@", "\n").replace("@_@TAB_CHAR@_@", "\t").strip() + + if expression is not None and (len(expression) == 0 or expression == "None"): + expression = None + + if exception.find("-") != -1: + breakpoint_type, exception = exception.split("-") + else: + breakpoint_type = "python" + + if breakpoint_type == "python": + self.api.add_python_exception_breakpoint( + py_db, + exception, + condition, + expression, + notify_on_handled_exceptions=int(notify_on_handled_exceptions) > 0, + notify_on_unhandled_exceptions=int(notify_on_unhandled_exceptions) == 1, + notify_on_user_unhandled_exceptions=0, # TODO (not currently supported in this API). + notify_on_first_raise_only=int(notify_on_handled_exceptions) == 2, + ignore_libraries=int(ignore_libraries) > 0, + ) + else: + self.api.add_plugins_exception_breakpoint(py_db, breakpoint_type, exception) + + def cmd_remove_exception_break(self, py_db, cmd_id, seq, text): + exception = text + if exception.find("-") != -1: + exception_type, exception = exception.split("-") + else: + exception_type = "python" + + if exception_type == "python": + self.api.remove_python_exception_breakpoint(py_db, exception) + else: + self.api.remove_plugins_exception_breakpoint(py_db, exception_type, exception) + + def cmd_add_django_exception_break(self, py_db, cmd_id, seq, text): + self.api.add_plugins_exception_breakpoint(py_db, breakpoint_type="django", exception=text) + + def cmd_remove_django_exception_break(self, py_db, cmd_id, seq, text): + self.api.remove_plugins_exception_breakpoint(py_db, exception_type="django", exception=text) + + def cmd_evaluate_console_expression(self, py_db, cmd_id, seq, text): + # Command which takes care for the debug console communication + if text != "": + thread_id, frame_id, console_command = text.split("\t", 2) + console_command, line = console_command.split("\t") + + if console_command == "EVALUATE": + int_cmd = InternalEvaluateConsoleExpression(seq, thread_id, frame_id, line, buffer_output=True) + + elif console_command == "EVALUATE_UNBUFFERED": + int_cmd = InternalEvaluateConsoleExpression(seq, thread_id, frame_id, line, buffer_output=False) + + elif console_command == "GET_COMPLETIONS": + int_cmd = InternalConsoleGetCompletions(seq, thread_id, frame_id, line) + + else: + raise ValueError("Unrecognized command: %s" % (console_command,)) + + py_db.post_internal_command(int_cmd, thread_id) + + def cmd_run_custom_operation(self, py_db, cmd_id, seq, text): + # Command which runs a custom operation + if text != "": + try: + location, custom = text.split("||", 1) + except: + sys.stderr.write("Custom operation now needs a || separator. Found: %s\n" % (text,)) + raise + + thread_id, frame_id, scopeattrs = location.split("\t", 2) + + if scopeattrs.find("\t") != -1: # there are attributes beyond scope + scope, attrs = scopeattrs.split("\t", 1) + else: + scope, attrs = (scopeattrs, None) + + # : style: EXECFILE or EXEC + # : encoded_code_or_file: file to execute or code + # : fname: name of function to be executed in the resulting namespace + style, encoded_code_or_file, fnname = custom.split("\t", 3) + int_cmd = InternalRunCustomOperation(seq, thread_id, frame_id, scope, attrs, style, encoded_code_or_file, fnname) + py_db.post_internal_command(int_cmd, thread_id) + + def cmd_ignore_thrown_exception_at(self, py_db, cmd_id, seq, text): + if text: + replace = "REPLACE:" # Not all 3.x versions support u'REPLACE:', so, doing workaround. + if text.startswith(replace): + text = text[8:] + py_db.filename_to_lines_where_exceptions_are_ignored.clear() + + if text: + for line in text.split("||"): # Can be bulk-created (one in each line) + original_filename, line_number = line.split("|") + original_filename = self.api.filename_to_server(original_filename) + + canonical_normalized_filename = pydevd_file_utils.canonical_normalized_path(original_filename) + absolute_filename = pydevd_file_utils.absolute_path(original_filename) + + if os.path.exists(absolute_filename): + lines_ignored = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename) + if lines_ignored is None: + lines_ignored = py_db.filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {} + lines_ignored[int(line_number)] = 1 + else: + sys.stderr.write( + "pydev debugger: warning: trying to ignore exception thrown" + " on file that does not exist: %s (will have no effect)\n" % (absolute_filename,) + ) + + def cmd_enable_dont_trace(self, py_db, cmd_id, seq, text): + if text: + true_str = "true" # Not all 3.x versions support u'str', so, doing workaround. + mode = text.strip() == true_str + pydevd_dont_trace.trace_filter(mode) + + def cmd_redirect_output(self, py_db, cmd_id, seq, text): + if text: + py_db.enable_output_redirection("STDOUT" in text, "STDERR" in text) + + def cmd_get_next_statement_targets(self, py_db, cmd_id, seq, text): + thread_id, frame_id = text.split("\t", 1) + + py_db.post_method_as_internal_command(thread_id, internal_get_next_statement_targets, seq, thread_id, frame_id) + + def cmd_get_smart_step_into_variants(self, py_db, cmd_id, seq, text): + thread_id, frame_id, start_line, end_line = text.split("\t", 3) + + py_db.post_method_as_internal_command( + thread_id, + internal_get_smart_step_into_variants, + seq, + thread_id, + frame_id, + start_line, + end_line, + set_additional_thread_info=set_additional_thread_info, + ) + + def cmd_set_project_roots(self, py_db, cmd_id, seq, text): + self.api.set_project_roots(py_db, text.split("\t")) + + def cmd_thread_dump_to_stderr(self, py_db, cmd_id, seq, text): + pydevd_utils.dump_threads() + + def cmd_stop_on_start(self, py_db, cmd_id, seq, text): + if text.strip() in ("True", "true", "1"): + self.api.stop_on_entry() + + def cmd_pydevd_json_config(self, py_db, cmd_id, seq, text): + # Expected to receive a json string as: + # { + # 'skip_suspend_on_breakpoint_exception': [], + # 'skip_print_breakpoint_exception': [], + # 'multi_threads_single_notification': bool, + # } + msg = json.loads(text.strip()) + if "skip_suspend_on_breakpoint_exception" in msg: + py_db.skip_suspend_on_breakpoint_exception = tuple(get_exception_class(x) for x in msg["skip_suspend_on_breakpoint_exception"]) + + if "skip_print_breakpoint_exception" in msg: + py_db.skip_print_breakpoint_exception = tuple(get_exception_class(x) for x in msg["skip_print_breakpoint_exception"]) + + if "multi_threads_single_notification" in msg: + py_db.multi_threads_single_notification = msg["multi_threads_single_notification"] + + def cmd_get_exception_details(self, py_db, cmd_id, seq, text): + thread_id = text + t = pydevd_find_thread_by_id(thread_id) + frame = None + if t is not None and not getattr(t, "pydev_do_not_trace", None): + additional_info = set_additional_thread_info(t) + frame = additional_info.get_topmost_frame(t) + try: + # Note: provide the return even if the thread is empty. + return py_db.cmd_factory.make_get_exception_details_message(py_db, seq, thread_id, frame) + finally: + frame = None + t = None + + +process_net_command = _PyDevCommandProcessor().process_net_command diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py new file mode 100644 index 0000000..9e11819 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py @@ -0,0 +1,1354 @@ +import itertools +import json +import linecache +import os +import platform +import sys +from functools import partial + +import pydevd_file_utils +from _pydev_bundle import pydev_log +from _pydevd_bundle._debug_adapter import pydevd_base_schema, pydevd_schema +from _pydevd_bundle._debug_adapter.pydevd_schema import ( + CompletionsResponseBody, + EvaluateResponseBody, + ExceptionOptions, + GotoTargetsResponseBody, + ModulesResponseBody, + ProcessEventBody, + ProcessEvent, + Scope, + ScopesResponseBody, + SetExpressionResponseBody, + SetVariableResponseBody, + SourceBreakpoint, + SourceResponseBody, + VariablesResponseBody, + SetBreakpointsResponseBody, + Response, + Capabilities, + PydevdAuthorizeRequest, + Request, + StepInTargetsResponseBody, + SetFunctionBreakpointsResponseBody, + BreakpointEvent, + BreakpointEventBody, + InitializedEvent, +) +from _pydevd_bundle.pydevd_api import PyDevdAPI +from _pydevd_bundle.pydevd_breakpoints import get_exception_class, FunctionBreakpoint +from _pydevd_bundle.pydevd_comm_constants import ( + CMD_PROCESS_EVENT, + CMD_RETURN, + CMD_SET_NEXT_STATEMENT, + CMD_STEP_INTO, + CMD_STEP_INTO_MY_CODE, + CMD_STEP_OVER, + CMD_STEP_OVER_MY_CODE, + file_system_encoding, + CMD_STEP_RETURN_MY_CODE, + CMD_STEP_RETURN, +) +from _pydevd_bundle.pydevd_filtering import ExcludeFilter +from _pydevd_bundle.pydevd_json_debug_options import _extract_debug_options, DebugOptions +from _pydevd_bundle.pydevd_net_command import NetCommand +from _pydevd_bundle.pydevd_utils import convert_dap_log_message_to_expression, ScopeRequest +from _pydevd_bundle.pydevd_constants import PY_IMPL_NAME, DebugInfoHolder, PY_VERSION_STR, PY_IMPL_VERSION_STR, IS_64BIT_PROCESS +from _pydevd_bundle.pydevd_trace_dispatch import USING_CYTHON +from _pydevd_frame_eval.pydevd_frame_eval_main import USING_FRAME_EVAL +from _pydevd_bundle.pydevd_comm import internal_get_step_in_targets_json +from _pydevd_bundle.pydevd_additional_thread_info import set_additional_thread_info +from _pydevd_bundle.pydevd_thread_lifecycle import pydevd_find_thread_by_id + + +def _convert_rules_to_exclude_filters(rules, on_error): + exclude_filters = [] + if not isinstance(rules, list): + on_error('Invalid "rules" (expected list of dicts). Found: %s' % (rules,)) + + else: + directory_exclude_filters = [] + module_exclude_filters = [] + glob_exclude_filters = [] + + for rule in rules: + if not isinstance(rule, dict): + on_error('Invalid "rules" (expected list of dicts). Found: %s' % (rules,)) + continue + + include = rule.get("include") + if include is None: + on_error('Invalid "rule" (expected dict with "include"). Found: %s' % (rule,)) + continue + + path = rule.get("path") + module = rule.get("module") + if path is None and module is None: + on_error('Invalid "rule" (expected dict with "path" or "module"). Found: %s' % (rule,)) + continue + + if path is not None: + glob_pattern = path + if "*" not in path and "?" not in path: + if os.path.isdir(glob_pattern): + # If a directory was specified, add a '/**' + # to be consistent with the glob pattern required + # by pydevd. + if not glob_pattern.endswith("/") and not glob_pattern.endswith("\\"): + glob_pattern += "/" + glob_pattern += "**" + directory_exclude_filters.append(ExcludeFilter(glob_pattern, not include, True)) + else: + glob_exclude_filters.append(ExcludeFilter(glob_pattern, not include, True)) + + elif module is not None: + module_exclude_filters.append(ExcludeFilter(module, not include, False)) + + else: + on_error("Internal error: expected path or module to be specified.") + + # Note that we have to sort the directory/module exclude filters so that the biggest + # paths match first. + # i.e.: if we have: + # /sub1/sub2/sub3 + # a rule with /sub1/sub2 would match before a rule only with /sub1. + directory_exclude_filters = sorted(directory_exclude_filters, key=lambda exclude_filter: -len(exclude_filter.name)) + module_exclude_filters = sorted(module_exclude_filters, key=lambda exclude_filter: -len(exclude_filter.name)) + exclude_filters = directory_exclude_filters + glob_exclude_filters + module_exclude_filters + + return exclude_filters + + +class IDMap(object): + def __init__(self): + self._value_to_key = {} + self._key_to_value = {} + self._next_id = partial(next, itertools.count(0)) + + def obtain_value(self, key): + return self._key_to_value[key] + + def obtain_key(self, value): + try: + key = self._value_to_key[value] + except KeyError: + key = self._next_id() + self._key_to_value[key] = value + self._value_to_key[value] = key + return key + + +class PyDevJsonCommandProcessor(object): + def __init__(self, from_json): + self.from_json = from_json + self.api = PyDevdAPI() + self._options = DebugOptions() + self._next_breakpoint_id = partial(next, itertools.count(0)) + self._goto_targets_map = IDMap() + self._launch_or_attach_request_done = False + + def process_net_command_json(self, py_db, json_contents, send_response=True): + """ + Processes a debug adapter protocol json command. + """ + + DEBUG = False + + try: + if isinstance(json_contents, bytes): + json_contents = json_contents.decode("utf-8") + + request = self.from_json(json_contents, update_ids_from_dap=True) + except Exception as e: + try: + loaded_json = json.loads(json_contents) + request = Request(loaded_json.get("command", ""), loaded_json["seq"]) + except: + # There's not much we can do in this case... + pydev_log.exception("Error loading json: %s", json_contents) + return + + error_msg = str(e) + if error_msg.startswith("'") and error_msg.endswith("'"): + error_msg = error_msg[1:-1] + + # This means a failure processing the request (but we were able to load the seq, + # so, answer with a failure response). + def on_request(py_db, request): + error_response = { + "type": "response", + "request_seq": request.seq, + "success": False, + "command": request.command, + "message": error_msg, + } + return NetCommand(CMD_RETURN, 0, error_response, is_json=True) + + else: + if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 1: + pydev_log.info( + "Process %s: %s\n" + % ( + request.__class__.__name__, + json.dumps(request.to_dict(update_ids_to_dap=True), indent=4, sort_keys=True), + ) + ) + + assert request.type == "request" + method_name = "on_%s_request" % (request.command.lower(),) + on_request = getattr(self, method_name, None) + if on_request is None: + print("Unhandled: %s not available in PyDevJsonCommandProcessor.\n" % (method_name,)) + return + + if DEBUG: + print("Handled in pydevd: %s (in PyDevJsonCommandProcessor).\n" % (method_name,)) + + with py_db._main_lock: + if request.__class__ == PydevdAuthorizeRequest: + authorize_request = request # : :type authorize_request: PydevdAuthorizeRequest + access_token = authorize_request.arguments.debugServerAccessToken + py_db.authentication.login(access_token) + + if not py_db.authentication.is_authenticated(): + response = Response(request.seq, success=False, command=request.command, message="Client not authenticated.", body={}) + cmd = NetCommand(CMD_RETURN, 0, response, is_json=True) + py_db.writer.add_command(cmd) + return + + cmd = on_request(py_db, request) + if cmd is not None and send_response: + py_db.writer.add_command(cmd) + + def on_pydevdauthorize_request(self, py_db, request): + client_access_token = py_db.authentication.client_access_token + body = {"clientAccessToken": None} + if client_access_token: + body["clientAccessToken"] = client_access_token + + response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_initialize_request(self, py_db, request): + body = Capabilities( + # Supported. + supportsConfigurationDoneRequest=True, + supportsConditionalBreakpoints=True, + supportsHitConditionalBreakpoints=True, + supportsEvaluateForHovers=True, + supportsSetVariable=True, + supportsGotoTargetsRequest=True, + supportsCompletionsRequest=True, + supportsModulesRequest=True, + supportsExceptionOptions=True, + supportsValueFormattingOptions=True, + supportsExceptionInfoRequest=True, + supportTerminateDebuggee=True, + supportsDelayedStackTraceLoading=True, + supportsLogPoints=True, + supportsSetExpression=True, + supportsTerminateRequest=True, + supportsClipboardContext=True, + supportsFunctionBreakpoints=True, + exceptionBreakpointFilters=[ + {"filter": "raised", "label": "Raised Exceptions", "default": False}, + {"filter": "uncaught", "label": "Uncaught Exceptions", "default": True}, + {"filter": "userUnhandled", "label": "User Uncaught Exceptions", "default": False}, + ], + # Not supported. + supportsStepBack=False, + supportsRestartFrame=False, + supportsStepInTargetsRequest=True, + supportsRestartRequest=False, + supportsLoadedSourcesRequest=False, + supportsTerminateThreadsRequest=False, + supportsDataBreakpoints=False, + supportsReadMemoryRequest=False, + supportsDisassembleRequest=False, + additionalModuleColumns=[], + completionTriggerCharacters=[], + supportedChecksumAlgorithms=[], + ).to_dict() + + # Non-standard capabilities/info below. + body["supportsDebuggerProperties"] = True + + body["pydevd"] = pydevd_info = {} + pydevd_info["processId"] = os.getpid() + self.api.notify_initialize(py_db) + response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_configurationdone_request(self, py_db, request): + """ + :param ConfigurationDoneRequest request: + """ + if not self._launch_or_attach_request_done: + pydev_log.critical("Missing launch request or attach request before configuration done request.") + + self.api.run(py_db) + self.api.notify_configuration_done(py_db) + + configuration_done_response = pydevd_base_schema.build_response(request) + return NetCommand(CMD_RETURN, 0, configuration_done_response, is_json=True) + + def on_threads_request(self, py_db, request): + """ + :param ThreadsRequest request: + """ + return self.api.list_threads(py_db, request.seq) + + def on_terminate_request(self, py_db, request): + """ + :param TerminateRequest request: + """ + self._request_terminate_process(py_db) + response = pydevd_base_schema.build_response(request) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def _request_terminate_process(self, py_db): + self.api.request_terminate_process(py_db) + + def on_completions_request(self, py_db, request): + """ + :param CompletionsRequest request: + """ + arguments = request.arguments # : :type arguments: CompletionsArguments + seq = request.seq + text = arguments.text + frame_id = arguments.frameId + thread_id = py_db.suspended_frames_manager.get_thread_id_for_variable_reference(frame_id) + + if thread_id is None: + body = CompletionsResponseBody([]) + variables_response = pydevd_base_schema.build_response( + request, kwargs={"body": body, "success": False, "message": "Thread to get completions seems to have resumed already."} + ) + return NetCommand(CMD_RETURN, 0, variables_response, is_json=True) + + # Note: line and column are 1-based (convert to 0-based for pydevd). + column = arguments.column - 1 + + if arguments.line is None: + # line is optional + line = -1 + else: + line = arguments.line - 1 + + self.api.request_completions(py_db, seq, thread_id, frame_id, text, line=line, column=column) + + def _resolve_remote_root(self, local_root, remote_root): + if remote_root == ".": + cwd = os.getcwd() + append_pathsep = local_root.endswith("\\") or local_root.endswith("/") + return cwd + (os.path.sep if append_pathsep else "") + return remote_root + + def _set_debug_options(self, py_db, args, start_reason): + rules = args.get("rules") + stepping_resumes_all_threads = args.get("steppingResumesAllThreads", True) + self.api.set_stepping_resumes_all_threads(py_db, stepping_resumes_all_threads) + + terminate_child_processes = args.get("terminateChildProcesses", True) + self.api.set_terminate_child_processes(py_db, terminate_child_processes) + + terminate_keyboard_interrupt = args.get("onTerminate", "kill") == "KeyboardInterrupt" + self.api.set_terminate_keyboard_interrupt(py_db, terminate_keyboard_interrupt) + + variable_presentation = args.get("variablePresentation", None) + if isinstance(variable_presentation, dict): + + def get_variable_presentation(setting, default): + value = variable_presentation.get(setting, default) + if value not in ("group", "inline", "hide"): + pydev_log.info( + 'The value set for "%s" (%s) in the variablePresentation is not valid. Valid values are: "group", "inline", "hide"' + % ( + setting, + value, + ) + ) + value = default + + return value + + default = get_variable_presentation("all", "group") + + special_presentation = get_variable_presentation("special", default) + function_presentation = get_variable_presentation("function", default) + class_presentation = get_variable_presentation("class", default) + protected_presentation = get_variable_presentation("protected", default) + + self.api.set_variable_presentation( + py_db, + self.api.VariablePresentation(special_presentation, function_presentation, class_presentation, protected_presentation), + ) + + exclude_filters = [] + + if rules is not None: + exclude_filters = _convert_rules_to_exclude_filters(rules, lambda msg: self.api.send_error_message(py_db, msg)) + + self.api.set_exclude_filters(py_db, exclude_filters) + + debug_options = _extract_debug_options( + args.get("options"), + args.get("debugOptions"), + ) + self._options.update_fom_debug_options(debug_options) + self._options.update_from_args(args) + + self.api.set_use_libraries_filter(py_db, self._options.just_my_code) + + if self._options.client_os: + self.api.set_ide_os(self._options.client_os) + + path_mappings = [] + for pathMapping in args.get("pathMappings", []): + localRoot = pathMapping.get("localRoot", "") + remoteRoot = pathMapping.get("remoteRoot", "") + remoteRoot = self._resolve_remote_root(localRoot, remoteRoot) + if (localRoot != "") and (remoteRoot != ""): + path_mappings.append((localRoot, remoteRoot)) + + if bool(path_mappings): + pydevd_file_utils.setup_client_server_paths(path_mappings) + + resolve_symlinks = args.get("resolveSymlinks", None) + if resolve_symlinks is not None: + pydevd_file_utils.set_resolve_symlinks(resolve_symlinks) + + redirecting = args.get("isOutputRedirected") + if self._options.redirect_output: + py_db.enable_output_redirection(True, True) + redirecting = True + else: + py_db.enable_output_redirection(False, False) + + py_db.is_output_redirected = redirecting + + self.api.set_show_return_values(py_db, self._options.show_return_value) + + if not self._options.break_system_exit_zero: + ignore_system_exit_codes = [0, None] + if self._options.django_debug or self._options.flask_debug: + ignore_system_exit_codes += [3] + + self.api.set_ignore_system_exit_codes(py_db, ignore_system_exit_codes) + + auto_reload = args.get("autoReload", {}) + if not isinstance(auto_reload, dict): + pydev_log.info("Expected autoReload to be a dict. Received: %s" % (auto_reload,)) + auto_reload = {} + + enable_auto_reload = auto_reload.get("enable", False) + watch_dirs = auto_reload.get("watchDirectories") + if not watch_dirs: + watch_dirs = [] + # Note: by default this is no longer done because on some cases there are entries in the PYTHONPATH + # such as the home directory or /python/x64, where the site packages are in /python/x64/libs, so, + # we only watch the current working directory as well as executed script. + # check = getattr(sys, 'path', [])[:] + # # By default only watch directories that are in the project roots / + # # program dir (if available), sys.argv[0], as well as the current dir (we don't want to + # # listen to the whole site-packages by default as it can be huge). + # watch_dirs = [pydevd_file_utils.absolute_path(w) for w in check] + # watch_dirs = [w for w in watch_dirs if py_db.in_project_roots_filename_uncached(w) and os.path.isdir(w)] + + program = args.get("program") + if program: + if os.path.isdir(program): + watch_dirs.append(program) + else: + watch_dirs.append(os.path.dirname(program)) + watch_dirs.append(os.path.abspath(".")) + + argv = getattr(sys, "argv", []) + if argv: + f = argv[0] + if f: # argv[0] could be None (https://github.com/microsoft/debugpy/issues/987) + if os.path.isdir(f): + watch_dirs.append(f) + else: + watch_dirs.append(os.path.dirname(f)) + + if not isinstance(watch_dirs, (list, set, tuple)): + watch_dirs = (watch_dirs,) + new_watch_dirs = set() + for w in watch_dirs: + try: + new_watch_dirs.add(pydevd_file_utils.get_path_with_real_case(pydevd_file_utils.absolute_path(w))) + except Exception: + pydev_log.exception("Error adding watch dir: %s", w) + watch_dirs = new_watch_dirs + + poll_target_time = auto_reload.get("pollingInterval", 1) + exclude_patterns = auto_reload.get( + "exclude", ("**/.git/**", "**/__pycache__/**", "**/node_modules/**", "**/.metadata/**", "**/site-packages/**") + ) + include_patterns = auto_reload.get("include", ("**/*.py", "**/*.pyw")) + self.api.setup_auto_reload_watcher(py_db, enable_auto_reload, watch_dirs, poll_target_time, exclude_patterns, include_patterns) + + if self._options.stop_on_entry and start_reason == "launch": + self.api.stop_on_entry() + + self.api.set_gui_event_loop(py_db, self._options.gui_event_loop) + + def _send_process_event(self, py_db, start_method): + argv = getattr(sys, "argv", []) + if len(argv) > 0: + name = argv[0] + else: + name = "" + + if isinstance(name, bytes): + name = name.decode(file_system_encoding, "replace") + name = name.encode("utf-8") + + body = ProcessEventBody( + name=name, + systemProcessId=os.getpid(), + isLocalProcess=True, + startMethod=start_method, + ) + event = ProcessEvent(body) + py_db.writer.add_command(NetCommand(CMD_PROCESS_EVENT, 0, event, is_json=True)) + + def _handle_launch_or_attach_request(self, py_db, request, start_reason): + self._send_process_event(py_db, start_reason) + self._launch_or_attach_request_done = True + self.api.set_enable_thread_notifications(py_db, True) + self._set_debug_options(py_db, request.arguments.kwargs, start_reason=start_reason) + response = pydevd_base_schema.build_response(request) + + initialized_event = InitializedEvent() + py_db.writer.add_command(NetCommand(CMD_RETURN, 0, initialized_event, is_json=True)) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_launch_request(self, py_db, request): + """ + :param LaunchRequest request: + """ + return self._handle_launch_or_attach_request(py_db, request, start_reason="launch") + + def on_attach_request(self, py_db, request): + """ + :param AttachRequest request: + """ + return self._handle_launch_or_attach_request(py_db, request, start_reason="attach") + + def on_pause_request(self, py_db, request): + """ + :param PauseRequest request: + """ + arguments = request.arguments # : :type arguments: PauseArguments + thread_id = arguments.threadId + + self.api.request_suspend_thread(py_db, thread_id=thread_id) + + response = pydevd_base_schema.build_response(request) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_continue_request(self, py_db, request): + """ + :param ContinueRequest request: + """ + arguments = request.arguments # : :type arguments: ContinueArguments + thread_id = arguments.threadId + + def on_resumed(): + body = {"allThreadsContinued": thread_id == "*"} + response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + cmd = NetCommand(CMD_RETURN, 0, response, is_json=True) + py_db.writer.add_command(cmd) + + if py_db.multi_threads_single_notification: + # Only send resumed notification when it has actually resumed! + # (otherwise the user could send a continue, receive the notification and then + # request a new pause which would be paused without sending any notification as + # it didn't really run in the first place). + py_db.threads_suspended_single_notification.add_on_resumed_callback(on_resumed) + self.api.request_resume_thread(thread_id) + else: + # Only send resumed notification when it has actually resumed! + # (otherwise the user could send a continue, receive the notification and then + # request a new pause which would be paused without sending any notification as + # it didn't really run in the first place). + self.api.request_resume_thread(thread_id) + on_resumed() + + def on_next_request(self, py_db, request): + """ + :param NextRequest request: + """ + arguments = request.arguments # : :type arguments: NextArguments + thread_id = arguments.threadId + + if py_db.get_use_libraries_filter(): + step_cmd_id = CMD_STEP_OVER_MY_CODE + else: + step_cmd_id = CMD_STEP_OVER + + self.api.request_step(py_db, thread_id, step_cmd_id) + + response = pydevd_base_schema.build_response(request) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_stepin_request(self, py_db, request): + """ + :param StepInRequest request: + """ + arguments = request.arguments # : :type arguments: StepInArguments + thread_id = arguments.threadId + + target_id = arguments.targetId + if target_id is not None: + thread = pydevd_find_thread_by_id(thread_id) + if thread is None: + response = Response( + request_seq=request.seq, + success=False, + command=request.command, + message="Unable to find thread from thread_id: %s" % (thread_id,), + body={}, + ) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + info = set_additional_thread_info(thread) + target_id_to_smart_step_into_variant = info.target_id_to_smart_step_into_variant + if not target_id_to_smart_step_into_variant: + variables_response = pydevd_base_schema.build_response( + request, kwargs={"success": False, "message": "Unable to step into target (no targets are saved in the thread info)."} + ) + return NetCommand(CMD_RETURN, 0, variables_response, is_json=True) + + variant = target_id_to_smart_step_into_variant.get(target_id) + if variant is not None: + parent = variant.parent + if parent is not None: + self.api.request_smart_step_into(py_db, request.seq, thread_id, parent.offset, variant.offset) + else: + self.api.request_smart_step_into(py_db, request.seq, thread_id, variant.offset, -1) + else: + variables_response = pydevd_base_schema.build_response( + request, + kwargs={ + "success": False, + "message": "Unable to find step into target %s. Available targets: %s" + % (target_id, target_id_to_smart_step_into_variant), + }, + ) + return NetCommand(CMD_RETURN, 0, variables_response, is_json=True) + + else: + if py_db.get_use_libraries_filter(): + step_cmd_id = CMD_STEP_INTO_MY_CODE + else: + step_cmd_id = CMD_STEP_INTO + + self.api.request_step(py_db, thread_id, step_cmd_id) + + response = pydevd_base_schema.build_response(request) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_stepintargets_request(self, py_db, request): + """ + :param StepInTargetsRequest request: + """ + frame_id = request.arguments.frameId + thread_id = py_db.suspended_frames_manager.get_thread_id_for_variable_reference(frame_id) + + if thread_id is None: + body = StepInTargetsResponseBody([]) + variables_response = pydevd_base_schema.build_response( + request, + kwargs={ + "body": body, + "success": False, + "message": "Unable to get thread_id from frame_id (thread to get step in targets seems to have resumed already).", + }, + ) + return NetCommand(CMD_RETURN, 0, variables_response, is_json=True) + + py_db.post_method_as_internal_command( + thread_id, internal_get_step_in_targets_json, request.seq, thread_id, frame_id, request, set_additional_thread_info + ) + + def on_stepout_request(self, py_db, request): + """ + :param StepOutRequest request: + """ + arguments = request.arguments # : :type arguments: StepOutArguments + thread_id = arguments.threadId + + if py_db.get_use_libraries_filter(): + step_cmd_id = CMD_STEP_RETURN_MY_CODE + else: + step_cmd_id = CMD_STEP_RETURN + + self.api.request_step(py_db, thread_id, step_cmd_id) + + response = pydevd_base_schema.build_response(request) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def _get_hit_condition_expression(self, hit_condition): + """Following hit condition values are supported + + * x or == x when breakpoint is hit x times + * >= x when breakpoint is hit more than or equal to x times + * % x when breakpoint is hit multiple of x times + + Returns '@HIT@ == x' where @HIT@ will be replaced by number of hits + """ + if not hit_condition: + return None + + expr = hit_condition.strip() + try: + int(expr) + return "@HIT@ == {}".format(expr) + except ValueError: + pass + + if expr.startswith("%"): + return "@HIT@ {} == 0".format(expr) + + if expr.startswith("==") or expr.startswith(">") or expr.startswith("<"): + return "@HIT@ {}".format(expr) + + return hit_condition + + def on_disconnect_request(self, py_db, request): + """ + :param DisconnectRequest request: + """ + if request.arguments.terminateDebuggee: + self._request_terminate_process(py_db) + response = pydevd_base_schema.build_response(request) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + self._launch_or_attach_request_done = False + py_db.enable_output_redirection(False, False) + self.api.request_disconnect(py_db, resume_threads=True) + + response = pydevd_base_schema.build_response(request) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def _verify_launch_or_attach_done(self, request): + if not self._launch_or_attach_request_done: + # Note that to validate the breakpoints we need the launch request to be done already + # (otherwise the filters wouldn't be set for the breakpoint validation). + if request.command == "setFunctionBreakpoints": + body = SetFunctionBreakpointsResponseBody([]) + else: + body = SetBreakpointsResponseBody([]) + response = pydevd_base_schema.build_response( + request, + kwargs={"body": body, "success": False, "message": "Breakpoints may only be set after the launch request is received."}, + ) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_setfunctionbreakpoints_request(self, py_db, request): + """ + :param SetFunctionBreakpointsRequest request: + """ + response = self._verify_launch_or_attach_done(request) + if response is not None: + return response + + arguments = request.arguments # : :type arguments: SetFunctionBreakpointsArguments + function_breakpoints = [] + suspend_policy = "ALL" if py_db.multi_threads_single_notification else "NONE" + + # Not currently covered by the DAP. + is_logpoint = False + expression = None + + breakpoints_set = [] + arguments.breakpoints = arguments.breakpoints or [] + for bp in arguments.breakpoints: + hit_condition = self._get_hit_condition_expression(bp.get("hitCondition")) + condition = bp.get("condition") + + function_breakpoints.append(FunctionBreakpoint(bp["name"], condition, expression, suspend_policy, hit_condition, is_logpoint)) + + # Note: always succeeds. + breakpoints_set.append(pydevd_schema.Breakpoint(verified=True, id=self._next_breakpoint_id()).to_dict()) + + self.api.set_function_breakpoints(py_db, function_breakpoints) + + body = {"breakpoints": breakpoints_set} + set_breakpoints_response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + return NetCommand(CMD_RETURN, 0, set_breakpoints_response, is_json=True) + + def on_setbreakpoints_request(self, py_db, request): + """ + :param SetBreakpointsRequest request: + """ + response = self._verify_launch_or_attach_done(request) + if response is not None: + return response + + arguments = request.arguments # : :type arguments: SetBreakpointsArguments + # TODO: Path is optional here it could be source reference. + filename = self.api.filename_to_str(arguments.source.path) + func_name = "None" + + self.api.remove_all_breakpoints(py_db, filename) + + btype = "python-line" + suspend_policy = "ALL" if py_db.multi_threads_single_notification else "NONE" + + if not filename.lower().endswith(".py"): # Note: check based on original file, not mapping. + if self._options.django_debug: + btype = "django-line" + elif self._options.flask_debug: + btype = "jinja2-line" + + breakpoints_set = [] + arguments.breakpoints = arguments.breakpoints or [] + for source_breakpoint in arguments.breakpoints: + source_breakpoint = SourceBreakpoint(**source_breakpoint) + line = source_breakpoint.line + condition = source_breakpoint.condition + breakpoint_id = self._next_breakpoint_id() + + hit_condition = self._get_hit_condition_expression(source_breakpoint.hitCondition) + log_message = source_breakpoint.logMessage + if not log_message: + is_logpoint = None + expression = None + else: + is_logpoint = True + expression = convert_dap_log_message_to_expression(log_message) + + on_changed_breakpoint_state = partial(self._on_changed_breakpoint_state, py_db, arguments.source) + result = self.api.add_breakpoint( + py_db, + filename, + btype, + breakpoint_id, + line, + condition, + func_name, + expression, + suspend_policy, + hit_condition, + is_logpoint, + adjust_line=True, + on_changed_breakpoint_state=on_changed_breakpoint_state, + ) + + bp = self._create_breakpoint_from_add_breakpoint_result(py_db, arguments.source, breakpoint_id, result) + breakpoints_set.append(bp) + + body = {"breakpoints": breakpoints_set} + set_breakpoints_response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + return NetCommand(CMD_RETURN, 0, set_breakpoints_response, is_json=True) + + def _on_changed_breakpoint_state(self, py_db, source, breakpoint_id, result): + bp = self._create_breakpoint_from_add_breakpoint_result(py_db, source, breakpoint_id, result) + body = BreakpointEventBody( + reason="changed", + breakpoint=bp, + ) + event = BreakpointEvent(body) + event_id = 0 # Actually ignored in this case + py_db.writer.add_command(NetCommand(event_id, 0, event, is_json=True)) + + def _create_breakpoint_from_add_breakpoint_result(self, py_db, source, breakpoint_id, result): + error_code = result.error_code + + if error_code: + if error_code == self.api.ADD_BREAKPOINT_FILE_NOT_FOUND: + error_msg = "Breakpoint in file that does not exist." + + elif error_code == self.api.ADD_BREAKPOINT_FILE_EXCLUDED_BY_FILTERS: + error_msg = "Breakpoint in file excluded by filters." + if py_db.get_use_libraries_filter(): + error_msg += ( + '\nNote: may be excluded because of "justMyCode" option (default == true).' + 'Try setting "justMyCode": false in the debug configuration (e.g., launch.json).\n' + ) + + elif error_code == self.api.ADD_BREAKPOINT_LAZY_VALIDATION: + error_msg = "Waiting for code to be loaded to verify breakpoint." + + elif error_code == self.api.ADD_BREAKPOINT_INVALID_LINE: + error_msg = "Breakpoint added to invalid line." + + else: + # Shouldn't get here. + error_msg = "Breakpoint not validated (reason unknown -- please report as bug)." + + return pydevd_schema.Breakpoint( + verified=False, id=breakpoint_id, line=result.translated_line, message=error_msg, source=source + ).to_dict() + else: + return pydevd_schema.Breakpoint(verified=True, id=breakpoint_id, line=result.translated_line, source=source).to_dict() + + def on_setexceptionbreakpoints_request(self, py_db, request): + """ + :param SetExceptionBreakpointsRequest request: + """ + # : :type arguments: SetExceptionBreakpointsArguments + arguments = request.arguments + filters = arguments.filters + exception_options = arguments.exceptionOptions + self.api.remove_all_exception_breakpoints(py_db) + + # Can't set these in the DAP. + condition = None + expression = None + notify_on_first_raise_only = False + + ignore_libraries = 1 if py_db.get_use_libraries_filter() else 0 + + if exception_options: + break_raised = False + break_uncaught = False + + for option in exception_options: + option = ExceptionOptions(**option) + if not option.path: + continue + + # never: never breaks + # + # always: always breaks + # + # unhandled: breaks when exception unhandled + # + # userUnhandled: breaks if the exception is not handled by user code + + notify_on_handled_exceptions = 1 if option.breakMode == "always" else 0 + notify_on_unhandled_exceptions = 1 if option.breakMode == "unhandled" else 0 + notify_on_user_unhandled_exceptions = 1 if option.breakMode == "userUnhandled" else 0 + exception_paths = option.path + break_raised |= notify_on_handled_exceptions + break_uncaught |= notify_on_unhandled_exceptions + + exception_names = [] + if len(exception_paths) == 0: + continue + + elif len(exception_paths) == 1: + if "Python Exceptions" in exception_paths[0]["names"]: + exception_names = ["BaseException"] + + else: + path_iterator = iter(exception_paths) + if "Python Exceptions" in next(path_iterator)["names"]: + for path in path_iterator: + for ex_name in path["names"]: + exception_names.append(ex_name) + + for exception_name in exception_names: + self.api.add_python_exception_breakpoint( + py_db, + exception_name, + condition, + expression, + notify_on_handled_exceptions, + notify_on_unhandled_exceptions, + notify_on_user_unhandled_exceptions, + notify_on_first_raise_only, + ignore_libraries, + ) + + else: + break_raised = "raised" in filters + break_uncaught = "uncaught" in filters + break_user = "userUnhandled" in filters + if break_raised or break_uncaught or break_user: + notify_on_handled_exceptions = 1 if break_raised else 0 + notify_on_unhandled_exceptions = 1 if break_uncaught else 0 + notify_on_user_unhandled_exceptions = 1 if break_user else 0 + exception = "BaseException" + + self.api.add_python_exception_breakpoint( + py_db, + exception, + condition, + expression, + notify_on_handled_exceptions, + notify_on_unhandled_exceptions, + notify_on_user_unhandled_exceptions, + notify_on_first_raise_only, + ignore_libraries, + ) + + if break_raised: + btype = None + if self._options.django_debug: + btype = "django" + elif self._options.flask_debug: + btype = "jinja2" + + if btype: + self.api.add_plugins_exception_breakpoint(py_db, btype, "BaseException") # Note: Exception name could be anything here. + + # Note: no body required on success. + set_breakpoints_response = pydevd_base_schema.build_response(request) + return NetCommand(CMD_RETURN, 0, set_breakpoints_response, is_json=True) + + def on_stacktrace_request(self, py_db, request): + """ + :param StackTraceRequest request: + """ + # : :type stack_trace_arguments: StackTraceArguments + stack_trace_arguments = request.arguments + thread_id = stack_trace_arguments.threadId + + if stack_trace_arguments.startFrame: + start_frame = int(stack_trace_arguments.startFrame) + else: + start_frame = 0 + + if stack_trace_arguments.levels: + levels = int(stack_trace_arguments.levels) + else: + levels = 0 + + fmt = stack_trace_arguments.format + if hasattr(fmt, "to_dict"): + fmt = fmt.to_dict() + self.api.request_stack(py_db, request.seq, thread_id, fmt=fmt, start_frame=start_frame, levels=levels) + + def on_exceptioninfo_request(self, py_db, request): + """ + :param ExceptionInfoRequest request: + """ + # : :type exception_into_arguments: ExceptionInfoArguments + exception_into_arguments = request.arguments + thread_id = exception_into_arguments.threadId + max_frames = self._options.max_exception_stack_frames + thread = pydevd_find_thread_by_id(thread_id) + if thread is not None: + self.api.request_exception_info_json(py_db, request, thread_id, thread, max_frames) + else: + response = Response( + request_seq=request.seq, + success=False, + command=request.command, + message="Unable to find thread from thread_id: %s" % (thread_id,), + body={}, + ) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_scopes_request(self, py_db, request): + """ + Scopes are the top-level items which appear for a frame (so, we receive the frame id + and provide the scopes it has). + + :param ScopesRequest request: + """ + frame_id = request.arguments.frameId + + variables_reference = frame_id + scopes = [ + Scope("Locals", ScopeRequest(int(variables_reference), "locals"), False, presentationHint="locals"), + Scope("Globals", ScopeRequest(int(variables_reference), "globals"), False), + ] + body = ScopesResponseBody(scopes) + scopes_response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + return NetCommand(CMD_RETURN, 0, scopes_response, is_json=True) + + def on_evaluate_request(self, py_db, request): + """ + :param EvaluateRequest request: + """ + # : :type arguments: EvaluateArguments + arguments = request.arguments + + if arguments.frameId is None: + self.api.request_exec_or_evaluate_json(py_db, request, thread_id="*") + else: + thread_id = py_db.suspended_frames_manager.get_thread_id_for_variable_reference(arguments.frameId) + + if thread_id is not None: + self.api.request_exec_or_evaluate_json(py_db, request, thread_id) + else: + body = EvaluateResponseBody("", 0) + response = pydevd_base_schema.build_response( + request, kwargs={"body": body, "success": False, "message": "Unable to find thread for evaluation."} + ) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_setexpression_request(self, py_db, request): + # : :type arguments: SetExpressionArguments + arguments = request.arguments + + thread_id = py_db.suspended_frames_manager.get_thread_id_for_variable_reference(arguments.frameId) + + if thread_id is not None: + self.api.request_set_expression_json(py_db, request, thread_id) + else: + body = SetExpressionResponseBody("") + response = pydevd_base_schema.build_response( + request, kwargs={"body": body, "success": False, "message": "Unable to find thread to set expression."} + ) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_variables_request(self, py_db, request): + """ + Variables can be asked whenever some place returned a variables reference (so, it + can be a scope gotten from on_scopes_request, the result of some evaluation, etc.). + + Note that in the DAP the variables reference requires a unique int... the way this works for + pydevd is that an instance is generated for that specific variable reference and we use its + id(instance) to identify it to make sure all items are unique (and the actual {id->instance} + is added to a dict which is only valid while the thread is suspended and later cleared when + the related thread resumes execution). + + see: SuspendedFramesManager + + :param VariablesRequest request: + """ + arguments = request.arguments # : :type arguments: VariablesArguments + variables_reference = arguments.variablesReference + + if isinstance(variables_reference, ScopeRequest): + variables_reference = variables_reference.variable_reference + + thread_id = py_db.suspended_frames_manager.get_thread_id_for_variable_reference(variables_reference) + if thread_id is not None: + self.api.request_get_variable_json(py_db, request, thread_id) + else: + variables = [] + body = VariablesResponseBody(variables) + variables_response = pydevd_base_schema.build_response( + request, kwargs={"body": body, "success": False, "message": "Unable to find thread to evaluate variable reference."} + ) + return NetCommand(CMD_RETURN, 0, variables_response, is_json=True) + + def on_setvariable_request(self, py_db, request): + arguments = request.arguments # : :type arguments: SetVariableArguments + variables_reference = arguments.variablesReference + + if isinstance(variables_reference, ScopeRequest): + variables_reference = variables_reference.variable_reference + + if arguments.name.startswith("(return) "): + response = pydevd_base_schema.build_response( + request, kwargs={"body": SetVariableResponseBody(""), "success": False, "message": "Cannot change return value"} + ) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + thread_id = py_db.suspended_frames_manager.get_thread_id_for_variable_reference(variables_reference) + + if thread_id is not None: + self.api.request_change_variable_json(py_db, request, thread_id) + else: + response = pydevd_base_schema.build_response( + request, + kwargs={ + "body": SetVariableResponseBody(""), + "success": False, + "message": "Unable to find thread to evaluate variable reference.", + }, + ) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_modules_request(self, py_db, request): + modules_manager = py_db.cmd_factory.modules_manager # : :type modules_manager: ModulesManager + modules_info = modules_manager.get_modules_info() + body = ModulesResponseBody(modules_info) + variables_response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + return NetCommand(CMD_RETURN, 0, variables_response, is_json=True) + + def on_source_request(self, py_db, request): + """ + :param SourceRequest request: + """ + source_reference = request.arguments.sourceReference + server_filename = None + content = None + + if source_reference != 0: + server_filename = pydevd_file_utils.get_server_filename_from_source_reference(source_reference) + if not server_filename: + server_filename = pydevd_file_utils.get_source_reference_filename_from_linecache(source_reference) + + if server_filename: + # Try direct file access first - it's much faster when available. + try: + with open(server_filename, "r") as stream: + content = stream.read() + except: + pass + + if content is None: + # File might not exist at all, or we might not have a permission to read it, + # but it might also be inside a zipfile, or an IPython cell. In this case, + # linecache might still be able to retrieve the source. + lines = (linecache.getline(server_filename, i) for i in itertools.count(1)) + lines = itertools.takewhile(bool, lines) # empty lines are '\n', EOF is '' + + # If we didn't get at least one line back, reset it to None so that it's + # reported as error below, and not as an empty file. + content = "".join(lines) or None + + if content is None: + frame_id = pydevd_file_utils.get_frame_id_from_source_reference(source_reference) + pydev_log.debug("Found frame id: %s for source reference: %s", frame_id, source_reference) + if frame_id is not None: + try: + content = self.api.get_decompiled_source_from_frame_id(py_db, frame_id) + except Exception: + pydev_log.exception("Error getting source for frame id: %s", frame_id) + content = None + + body = SourceResponseBody(content or "") + response_args = {"body": body} + + if content is None: + if source_reference == 0: + message = "Source unavailable" + elif server_filename: + message = "Unable to retrieve source for %s" % (server_filename,) + else: + message = "Invalid sourceReference %d" % (source_reference,) + response_args.update({"success": False, "message": message}) + + response = pydevd_base_schema.build_response(request, kwargs=response_args) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_gototargets_request(self, py_db, request): + path = request.arguments.source.path + line = request.arguments.line + target_id = self._goto_targets_map.obtain_key((path, line)) + target = {"id": target_id, "label": "%s:%s" % (path, line), "line": line} + body = GotoTargetsResponseBody(targets=[target]) + response_args = {"body": body} + response = pydevd_base_schema.build_response(request, kwargs=response_args) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_goto_request(self, py_db, request): + target_id = int(request.arguments.targetId) + thread_id = request.arguments.threadId + try: + path, line = self._goto_targets_map.obtain_value(target_id) + except KeyError: + response = pydevd_base_schema.build_response( + request, + kwargs={ + "body": {}, + "success": False, + "message": "Unknown goto target id: %d" % (target_id,), + }, + ) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + self.api.request_set_next(py_db, request.seq, thread_id, CMD_SET_NEXT_STATEMENT, path, line, "*") + # See 'NetCommandFactoryJson.make_set_next_stmnt_status_message' for response + return None + + def on_setdebuggerproperty_request(self, py_db, request): + args = request.arguments # : :type args: SetDebuggerPropertyArguments + if args.ideOS is not None: + self.api.set_ide_os(args.ideOS) + + if args.dontTraceStartPatterns is not None and args.dontTraceEndPatterns is not None: + start_patterns = tuple(args.dontTraceStartPatterns) + end_patterns = tuple(args.dontTraceEndPatterns) + self.api.set_dont_trace_start_end_patterns(py_db, start_patterns, end_patterns) + + if args.skipSuspendOnBreakpointException is not None: + py_db.skip_suspend_on_breakpoint_exception = tuple(get_exception_class(x) for x in args.skipSuspendOnBreakpointException) + + if args.skipPrintBreakpointException is not None: + py_db.skip_print_breakpoint_exception = tuple(get_exception_class(x) for x in args.skipPrintBreakpointException) + + if args.multiThreadsSingleNotification is not None: + py_db.multi_threads_single_notification = args.multiThreadsSingleNotification + + # TODO: Support other common settings. Note that not all of these might be relevant to python. + # JustMyCodeStepping: 0 or 1 + # AllowOutOfProcessSymbols: 0 or 1 + # DisableJITOptimization: 0 or 1 + # InterpreterOptions: 0 or 1 + # StopOnExceptionCrossingManagedBoundary: 0 or 1 + # WarnIfNoUserCodeOnLaunch: 0 or 1 + # EnableStepFiltering: true of false + + response = pydevd_base_schema.build_response(request, kwargs={"body": {}}) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_pydevdsysteminfo_request(self, py_db, request): + try: + pid = os.getpid() + except AttributeError: + pid = None + + # It's possible to have the ppid reported from args. In this case, use that instead of the + # real ppid (athough we're using `ppid`, what we want in meaning is the `launcher_pid` -- + # so, if a python process is launched from another python process, consider that process the + # parent and not any intermediary stubs). + + ppid = py_db.get_arg_ppid() or self.api.get_ppid() + + try: + impl_desc = platform.python_implementation() + except AttributeError: + impl_desc = PY_IMPL_NAME + + py_info = pydevd_schema.PydevdPythonInfo( + version=PY_VERSION_STR, + implementation=pydevd_schema.PydevdPythonImplementationInfo( + name=PY_IMPL_NAME, + version=PY_IMPL_VERSION_STR, + description=impl_desc, + ), + ) + platform_info = pydevd_schema.PydevdPlatformInfo(name=sys.platform) + process_info = pydevd_schema.PydevdProcessInfo( + pid=pid, + ppid=ppid, + executable=sys.executable, + bitness=64 if IS_64BIT_PROCESS else 32, + ) + pydevd_info = pydevd_schema.PydevdInfo( + usingCython=USING_CYTHON, + usingFrameEval=USING_FRAME_EVAL, + ) + body = { + "python": py_info, + "platform": platform_info, + "process": process_info, + "pydevd": pydevd_info, + } + response = pydevd_base_schema.build_response(request, kwargs={"body": body}) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_setpydevdsourcemap_request(self, py_db, request): + args = request.arguments # : :type args: SetPydevdSourceMapArguments + SourceMappingEntry = self.api.SourceMappingEntry + + path = args.source.path + source_maps = args.pydevdSourceMaps + # : :type source_map: PydevdSourceMap + new_mappings = [ + SourceMappingEntry( + source_map["line"], + source_map["endLine"], + source_map["runtimeLine"], + self.api.filename_to_str(source_map["runtimeSource"]["path"]), + ) + for source_map in source_maps + ] + + error_msg = self.api.set_source_mapping(py_db, path, new_mappings) + if error_msg: + response = pydevd_base_schema.build_response( + request, + kwargs={ + "body": {}, + "success": False, + "message": error_msg, + }, + ) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + + response = pydevd_base_schema.build_response(request) + return NetCommand(CMD_RETURN, 0, response, is_json=True) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_referrers.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_referrers.py new file mode 100644 index 0000000..9f8a29c --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_referrers.py @@ -0,0 +1,252 @@ +import sys +from _pydevd_bundle import pydevd_xml +from os.path import basename +from _pydev_bundle import pydev_log +from urllib.parse import unquote_plus +from _pydevd_bundle.pydevd_constants import IS_PY311_OR_GREATER + + +# =================================================================================================== +# print_var_node +# =================================================================================================== +def print_var_node(xml_node, stream): + name = xml_node.getAttribute("name") + value = xml_node.getAttribute("value") + val_type = xml_node.getAttribute("type") + + found_as = xml_node.getAttribute("found_as") + stream.write("Name: ") + stream.write(unquote_plus(name)) + stream.write(", Value: ") + stream.write(unquote_plus(value)) + stream.write(", Type: ") + stream.write(unquote_plus(val_type)) + if found_as: + stream.write(", Found as: %s" % (unquote_plus(found_as),)) + stream.write("\n") + + +# =================================================================================================== +# print_referrers +# =================================================================================================== +def print_referrers(obj, stream=None): + if stream is None: + stream = sys.stdout + result = get_referrer_info(obj) + from xml.dom.minidom import parseString + + dom = parseString(result) + + xml = dom.getElementsByTagName("xml")[0] + for node in xml.childNodes: + if node.nodeType == node.TEXT_NODE: + continue + + if node.localName == "for": + stream.write("Searching references for: ") + for child in node.childNodes: + if child.nodeType == node.TEXT_NODE: + continue + print_var_node(child, stream) + + elif node.localName == "var": + stream.write("Referrer found: ") + print_var_node(node, stream) + + else: + sys.stderr.write("Unhandled node: %s\n" % (node,)) + + return result + + +# =================================================================================================== +# get_referrer_info +# =================================================================================================== +def get_referrer_info(searched_obj): + DEBUG = 0 + if DEBUG: + sys.stderr.write("Getting referrers info.\n") + try: + try: + if searched_obj is None: + ret = ["\n"] + + ret.append("\n") + ret.append( + pydevd_xml.var_to_xml( + searched_obj, "Skipping getting referrers for None", additional_in_xml=' id="%s"' % (id(searched_obj),) + ) + ) + ret.append("\n") + ret.append("") + ret = "".join(ret) + return ret + + obj_id = id(searched_obj) + + try: + if DEBUG: + sys.stderr.write("Getting referrers...\n") + import gc + + referrers = gc.get_referrers(searched_obj) + except: + pydev_log.exception() + ret = ["\n"] + + ret.append("\n") + ret.append( + pydevd_xml.var_to_xml( + searched_obj, "Exception raised while trying to get_referrers.", additional_in_xml=' id="%s"' % (id(searched_obj),) + ) + ) + ret.append("\n") + ret.append("") + ret = "".join(ret) + return ret + + if DEBUG: + sys.stderr.write("Found %s referrers.\n" % (len(referrers),)) + + curr_frame = sys._getframe() + frame_type = type(curr_frame) + + # Ignore this frame and any caller frame of this frame + + ignore_frames = {} # Should be a set, but it's not available on all python versions. + while curr_frame is not None: + if basename(curr_frame.f_code.co_filename).startswith("pydev"): + ignore_frames[curr_frame] = 1 + curr_frame = curr_frame.f_back + + ret = ["\n"] + + ret.append("\n") + if DEBUG: + sys.stderr.write('Searching Referrers of obj with id="%s"\n' % (obj_id,)) + + ret.append(pydevd_xml.var_to_xml(searched_obj, 'Referrers of obj with id="%s"' % (obj_id,))) + ret.append("\n") + + curr_frame = sys._getframe() + all_objects = None + + for r in referrers: + try: + if r in ignore_frames: + continue # Skip the references we may add ourselves + except: + pass # Ok: unhashable type checked... + + if r is referrers: + continue + + if r is curr_frame.f_locals: + continue + + r_type = type(r) + r_id = str(id(r)) + + representation = str(r_type) + + found_as = "" + if r_type == frame_type: + if DEBUG: + sys.stderr.write("Found frame referrer: %r\n" % (r,)) + for key, val in r.f_locals.items(): + if val is searched_obj: + found_as = key + break + + elif r_type == dict: + if DEBUG: + sys.stderr.write("Found dict referrer: %r\n" % (r,)) + + # Try to check if it's a value in the dict (and under which key it was found) + for key, val in r.items(): + if val is searched_obj: + found_as = key + if DEBUG: + sys.stderr.write(" Found as %r in dict\n" % (found_as,)) + break + + # Ok, there's one annoying thing: many times we find it in a dict from an instance, + # but with this we don't directly have the class, only the dict, so, to workaround that + # we iterate over all reachable objects ad check if one of those has the given dict. + if all_objects is None: + all_objects = gc.get_objects() + + for x in all_objects: + try: + if getattr(x, "__dict__", None) is r: + r = x + r_type = type(x) + r_id = str(id(r)) + representation = str(r_type) + break + except: + pass # Just ignore any error here (i.e.: ReferenceError, etc.) + + elif r_type in (tuple, list): + if DEBUG: + sys.stderr.write("Found tuple referrer: %r\n" % (r,)) + + for i, x in enumerate(r): + if x is searched_obj: + found_as = "%s[%s]" % (r_type.__name__, i) + if DEBUG: + sys.stderr.write(" Found as %s in tuple: \n" % (found_as,)) + break + + elif IS_PY311_OR_GREATER: + # Up to Python 3.10, gc.get_referrers for an instance actually returned the + # object.__dict__, but on Python 3.11 it returns the actual object, so, + # handling is a bit easier (we don't need the workaround from the dict + # case to find the actual instance, we just need to find the attribute name). + if DEBUG: + sys.stderr.write("Found dict referrer: %r\n" % (r,)) + + dct = getattr(r, "__dict__", None) + if dct: + # Try to check if it's a value in the dict (and under which key it was found) + for key, val in dct.items(): + if val is searched_obj: + found_as = key + if DEBUG: + sys.stderr.write(" Found as %r in object instance\n" % (found_as,)) + break + + if found_as: + if not isinstance(found_as, str): + found_as = str(found_as) + found_as = ' found_as="%s"' % (pydevd_xml.make_valid_xml_value(found_as),) + + ret.append(pydevd_xml.var_to_xml(r, representation, additional_in_xml=' id="%s"%s' % (r_id, found_as))) + finally: + if DEBUG: + sys.stderr.write("Done searching for references.\n") + + # If we have any exceptions, don't keep dangling references from this frame to any of our objects. + all_objects = None + referrers = None + searched_obj = None + r = None + x = None + key = None + val = None + curr_frame = None + ignore_frames = None + except: + pydev_log.exception() + ret = ["\n"] + + ret.append("\n") + ret.append(pydevd_xml.var_to_xml(searched_obj, "Error getting referrers for:", additional_in_xml=' id="%s"' % (id(searched_obj),))) + ret.append("\n") + ret.append("") + ret = "".join(ret) + return ret + + ret.append("") + ret = "".join(ret) + return ret diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_reload.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_reload.py new file mode 100644 index 0000000..60131a7 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_reload.py @@ -0,0 +1,433 @@ +""" +Based on the python xreload. + +Changes +====================== + +1. we don't recreate the old namespace from new classes. Rather, we keep the existing namespace, +load a new version of it and update only some of the things we can inplace. That way, we don't break +things such as singletons or end up with a second representation of the same class in memory. + +2. If we find it to be a __metaclass__, we try to update it as a regular class. + +3. We don't remove old attributes (and leave them lying around even if they're no longer used). + +4. Reload hooks were changed + +These changes make it more stable, especially in the common case (where in a debug session only the +contents of a function are changed), besides providing flexibility for users that want to extend +on it. + + + +Hooks +====================== + +Classes/modules can be specially crafted to work with the reload (so that it can, for instance, +update some constant which was changed). + +1. To participate in the change of some attribute: + + In a module: + + __xreload_old_new__(namespace, name, old, new) + + in a class: + + @classmethod + __xreload_old_new__(cls, name, old, new) + + A class or module may include a method called '__xreload_old_new__' which is called when we're + unable to reload a given attribute. + + + +2. To do something after the whole reload is finished: + + In a module: + + __xreload_after_reload_update__(namespace): + + In a class: + + @classmethod + __xreload_after_reload_update__(cls): + + + A class or module may include a method called '__xreload_after_reload_update__' which is called + after the reload finishes. + + +Important: when providing a hook, always use the namespace or cls provided and not anything in the global +namespace, as the global namespace are only temporarily created during the reload and may not reflect the +actual application state (while the cls and namespace passed are). + + +Current limitations +====================== + + +- Attributes/constants are added, but not changed (so singletons and the application state is not + broken -- use provided hooks to workaround it). + +- Code using metaclasses may not always work. + +- Functions and methods using decorators (other than classmethod and staticmethod) are not handled + correctly. + +- Renamings are not handled correctly. + +- Dependent modules are not reloaded. + +- New __slots__ can't be added to existing classes. + + +Info +====================== + +Original: http://svn.python.org/projects/sandbox/trunk/xreload/xreload.py +Note: it seems https://github.com/plone/plone.reload/blob/master/plone/reload/xreload.py enhances it (to check later) + +Interesting alternative: https://code.google.com/p/reimport/ + +Alternative to reload(). + +This works by executing the module in a scratch namespace, and then patching classes, methods and +functions in place. This avoids the need to patch instances. New objects are copied into the +target namespace. + +""" + +from _pydev_bundle.pydev_imports import execfile +from _pydevd_bundle import pydevd_dont_trace +import types +from _pydev_bundle import pydev_log +from _pydevd_bundle.pydevd_constants import get_global_debugger + +NO_DEBUG = 0 +LEVEL1 = 1 +LEVEL2 = 2 + +DEBUG = NO_DEBUG + + +def write_err(*args): + py_db = get_global_debugger() + if py_db is not None: + new_lst = [] + for a in args: + new_lst.append(str(a)) + + msg = " ".join(new_lst) + s = "code reload: %s\n" % (msg,) + cmd = py_db.cmd_factory.make_io_message(s, 2) + if py_db.writer is not None: + py_db.writer.add_command(cmd) + + +def notify_info0(*args): + write_err(*args) + + +def notify_info(*args): + if DEBUG >= LEVEL1: + write_err(*args) + + +def notify_info2(*args): + if DEBUG >= LEVEL2: + write_err(*args) + + +def notify_error(*args): + write_err(*args) + + +# ======================================================================================================================= +# code_objects_equal +# ======================================================================================================================= +def code_objects_equal(code0, code1): + for d in dir(code0): + if d.startswith("_") or "line" in d or d in ("replace", "co_positions", "co_qualname"): + continue + if getattr(code0, d) != getattr(code1, d): + return False + return True + + +# ======================================================================================================================= +# xreload +# ======================================================================================================================= +def xreload(mod): + """Reload a module in place, updating classes, methods and functions. + + mod: a module object + + Returns a boolean indicating whether a change was done. + """ + r = Reload(mod) + r.apply() + found_change = r.found_change + r = None + pydevd_dont_trace.clear_trace_filter_cache() + return found_change + + +# This isn't actually used... Initially I planned to reload variables which are immutable on the +# namespace, but this can destroy places where we're saving state, which may not be what we want, +# so, we're being conservative and giving the user hooks if he wants to do a reload. +# +# immutable_types = [int, str, float, tuple] #That should be common to all Python versions +# +# for name in 'long basestr unicode frozenset'.split(): +# try: +# immutable_types.append(__builtins__[name]) +# except: +# pass #Just ignore: not all python versions are created equal. +# immutable_types = tuple(immutable_types) + + +# ======================================================================================================================= +# Reload +# ======================================================================================================================= +class Reload: + def __init__(self, mod, mod_name=None, mod_filename=None): + self.mod = mod + if mod_name: + self.mod_name = mod_name + else: + self.mod_name = mod.__name__ if mod is not None else None + + if mod_filename: + self.mod_filename = mod_filename + else: + self.mod_filename = mod.__file__ if mod is not None else None + + self.found_change = False + + def apply(self): + mod = self.mod + self._on_finish_callbacks = [] + try: + # Get the module namespace (dict) early; this is part of the type check + modns = mod.__dict__ + + # Execute the code. We copy the module dict to a temporary; then + # clear the module dict; then execute the new code in the module + # dict; then swap things back and around. This trick (due to + # Glyph Lefkowitz) ensures that the (readonly) __globals__ + # attribute of methods and functions is set to the correct dict + # object. + new_namespace = modns.copy() + new_namespace.clear() + if self.mod_filename: + new_namespace["__file__"] = self.mod_filename + try: + new_namespace["__builtins__"] = __builtins__ + except NameError: + raise # Ok if not there. + + if self.mod_name: + new_namespace["__name__"] = self.mod_name + if new_namespace["__name__"] == "__main__": + # We do this because usually the __main__ starts-up the program, guarded by + # the if __name__ == '__main__', but we don't want to start the program again + # on a reload. + new_namespace["__name__"] = "__main_reloaded__" + + execfile(self.mod_filename, new_namespace, new_namespace) + # Now we get to the hard part + oldnames = set(modns) + newnames = set(new_namespace) + + # Create new tokens (note: not deleting existing) + for name in newnames - oldnames: + notify_info0("Added:", name, "to namespace") + self.found_change = True + modns[name] = new_namespace[name] + + # Update in-place what we can + for name in oldnames & newnames: + self._update(modns, name, modns[name], new_namespace[name]) + + self._handle_namespace(modns) + + for c in self._on_finish_callbacks: + c() + del self._on_finish_callbacks[:] + except: + pydev_log.exception() + + def _handle_namespace(self, namespace, is_class_namespace=False): + on_finish = None + if is_class_namespace: + xreload_after_update = getattr(namespace, "__xreload_after_reload_update__", None) + if xreload_after_update is not None: + self.found_change = True + on_finish = lambda: xreload_after_update() + + elif "__xreload_after_reload_update__" in namespace: + xreload_after_update = namespace["__xreload_after_reload_update__"] + self.found_change = True + on_finish = lambda: xreload_after_update(namespace) + + if on_finish is not None: + # If a client wants to know about it, give him a chance. + self._on_finish_callbacks.append(on_finish) + + def _update(self, namespace, name, oldobj, newobj, is_class_namespace=False): + """Update oldobj, if possible in place, with newobj. + + If oldobj is immutable, this simply returns newobj. + + Args: + oldobj: the object to be updated + newobj: the object used as the source for the update + """ + try: + notify_info2("Updating: ", oldobj) + if oldobj is newobj: + # Probably something imported + return + + if type(oldobj) is not type(newobj): + # Cop-out: if the type changed, give up + if name not in ("__builtins__",): + notify_error("Type of: %s (old: %s != new: %s) changed... Skipping." % (name, type(oldobj), type(newobj))) + return + + if isinstance(newobj, types.FunctionType): + self._update_function(oldobj, newobj) + return + + if isinstance(newobj, types.MethodType): + self._update_method(oldobj, newobj) + return + + if isinstance(newobj, classmethod): + self._update_classmethod(oldobj, newobj) + return + + if isinstance(newobj, staticmethod): + self._update_staticmethod(oldobj, newobj) + return + + if hasattr(types, "ClassType"): + classtype = (types.ClassType, type) # object is not instance of types.ClassType. + else: + classtype = type + + if isinstance(newobj, classtype): + self._update_class(oldobj, newobj) + return + + # New: dealing with metaclasses. + if hasattr(newobj, "__metaclass__") and hasattr(newobj, "__class__") and newobj.__metaclass__ == newobj.__class__: + self._update_class(oldobj, newobj) + return + + if namespace is not None: + # Check for the `__xreload_old_new__` protocol (don't even compare things + # as even doing a comparison may break things -- see: https://github.com/microsoft/debugpy/issues/615). + xreload_old_new = None + if is_class_namespace: + xreload_old_new = getattr(namespace, "__xreload_old_new__", None) + if xreload_old_new is not None: + self.found_change = True + xreload_old_new(name, oldobj, newobj) + + elif "__xreload_old_new__" in namespace: + xreload_old_new = namespace["__xreload_old_new__"] + xreload_old_new(namespace, name, oldobj, newobj) + self.found_change = True + + # Too much information to the user... + # else: + # notify_info0('%s NOT updated. Create __xreload_old_new__(name, old, new) for custom reload' % (name,)) + + except: + notify_error("Exception found when updating %s. Proceeding for other items." % (name,)) + pydev_log.exception() + + # All of the following functions have the same signature as _update() + + def _update_function(self, oldfunc, newfunc): + """Update a function object.""" + oldfunc.__doc__ = newfunc.__doc__ + oldfunc.__dict__.update(newfunc.__dict__) + + try: + newfunc.__code__ + attr_name = "__code__" + except AttributeError: + newfunc.func_code + attr_name = "func_code" + + old_code = getattr(oldfunc, attr_name) + new_code = getattr(newfunc, attr_name) + if not code_objects_equal(old_code, new_code): + notify_info0("Updated function code:", oldfunc) + setattr(oldfunc, attr_name, new_code) + self.found_change = True + + try: + oldfunc.__defaults__ = newfunc.__defaults__ + except AttributeError: + oldfunc.func_defaults = newfunc.func_defaults + + return oldfunc + + def _update_method(self, oldmeth, newmeth): + """Update a method object.""" + # XXX What if im_func is not a function? + if hasattr(oldmeth, "im_func") and hasattr(newmeth, "im_func"): + self._update(None, None, oldmeth.im_func, newmeth.im_func) + elif hasattr(oldmeth, "__func__") and hasattr(newmeth, "__func__"): + self._update(None, None, oldmeth.__func__, newmeth.__func__) + return oldmeth + + def _update_class(self, oldclass, newclass): + """Update a class object.""" + olddict = oldclass.__dict__ + newdict = newclass.__dict__ + + oldnames = set(olddict) + newnames = set(newdict) + + for name in newnames - oldnames: + setattr(oldclass, name, newdict[name]) + notify_info0("Added:", name, "to", oldclass) + self.found_change = True + + # Note: not removing old things... + # for name in oldnames - newnames: + # notify_info('Removed:', name, 'from', oldclass) + # delattr(oldclass, name) + + for name in (oldnames & newnames) - set(["__dict__", "__doc__"]): + self._update(oldclass, name, olddict[name], newdict[name], is_class_namespace=True) + + old_bases = getattr(oldclass, "__bases__", None) + new_bases = getattr(newclass, "__bases__", None) + if str(old_bases) != str(new_bases): + notify_error("Changing the hierarchy of a class is not supported. %s may be inconsistent." % (oldclass,)) + + self._handle_namespace(oldclass, is_class_namespace=True) + + def _update_classmethod(self, oldcm, newcm): + """Update a classmethod update.""" + # While we can't modify the classmethod object itself (it has no + # mutable attributes), we *can* extract the underlying function + # (by calling __get__(), which returns a method object) and update + # it in-place. We don't have the class available to pass to + # __get__() but any object except None will do. + self._update(None, None, oldcm.__get__(0), newcm.__get__(0)) + + def _update_staticmethod(self, oldsm, newsm): + """Update a staticmethod update.""" + # While we can't modify the staticmethod object itself (it has no + # mutable attributes), we *can* extract the underlying function + # (by calling __get__(), which returns it) and update it in-place. + # We don't have the class available to pass to __get__() but any + # object except None will do. + self._update(None, None, oldsm.__get__(0), newsm.__get__(0)) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py new file mode 100644 index 0000000..20a7351 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py @@ -0,0 +1,830 @@ +from _pydev_bundle import pydev_log +from _pydevd_bundle.pydevd_utils import hasattr_checked, DAPGrouper, Timer +from io import StringIO +import traceback +from os.path import basename + +from functools import partial +from _pydevd_bundle.pydevd_constants import ( + IS_PY36_OR_GREATER, + MethodWrapperType, + RETURN_VALUES_DICT, + DebugInfoHolder, + IS_PYPY, + GENERATED_LEN_ATTR_NAME, +) +from _pydevd_bundle.pydevd_safe_repr import SafeRepr +from _pydevd_bundle import pydevd_constants + +TOO_LARGE_MSG = "Maximum number of items (%s) reached. To show more items customize the value of the PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS environment variable." +TOO_LARGE_ATTR = "Unable to handle:" + + +# ======================================================================================================================= +# UnableToResolveVariableException +# ======================================================================================================================= +class UnableToResolveVariableException(Exception): + pass + + +try: + from collections import OrderedDict +except: + OrderedDict = dict + +try: + import java.lang # @UnresolvedImport +except: + pass + +# ======================================================================================================================= +# See: pydevd_extension_api module for resolver interface +# ======================================================================================================================= + + +def sorted_attributes_key(attr_name): + if attr_name.startswith("__"): + if attr_name.endswith("__"): + # __ double under before and after __ + return (3, attr_name) + else: + # __ double under before + return (2, attr_name) + elif attr_name.startswith("_"): + # _ single under + return (1, attr_name) + else: + # Regular (Before anything) + return (0, attr_name) + + +# ======================================================================================================================= +# DefaultResolver +# ======================================================================================================================= +class DefaultResolver: + """ + DefaultResolver is the class that'll actually resolve how to show some variable. + """ + + def resolve(self, var, attribute): + return getattr(var, attribute) + + def get_contents_debug_adapter_protocol(self, obj, fmt=None): + if MethodWrapperType: + dct, used___dict__ = self._get_py_dictionary(obj) + else: + dct = self._get_jy_dictionary(obj)[0] + + lst = sorted(dct.items(), key=lambda tup: sorted_attributes_key(tup[0])) + if used___dict__: + eval_name = ".__dict__[%s]" + else: + eval_name = ".%s" + + ret = [] + for attr_name, attr_value in lst: + entry = (attr_name, attr_value, eval_name % attr_name) + ret.append(entry) + + return ret + + def get_dictionary(self, var, names=None, used___dict__=False): + if MethodWrapperType: + return self._get_py_dictionary(var, names, used___dict__=used___dict__)[0] + else: + return self._get_jy_dictionary(var)[0] + + def _get_jy_dictionary(self, obj): + ret = {} + found = java.util.HashMap() + + original = obj + if hasattr_checked(obj, "__class__") and obj.__class__ == java.lang.Class: + # get info about superclasses + classes = [] + classes.append(obj) + c = obj.getSuperclass() + while c != None: + classes.append(c) + c = c.getSuperclass() + + # get info about interfaces + interfs = [] + for obj in classes: + interfs.extend(obj.getInterfaces()) + classes.extend(interfs) + + # now is the time when we actually get info on the declared methods and fields + for obj in classes: + declaredMethods = obj.getDeclaredMethods() + declaredFields = obj.getDeclaredFields() + for i in range(len(declaredMethods)): + name = declaredMethods[i].getName() + ret[name] = declaredMethods[i].toString() + found.put(name, 1) + + for i in range(len(declaredFields)): + name = declaredFields[i].getName() + found.put(name, 1) + # if declaredFields[i].isAccessible(): + declaredFields[i].setAccessible(True) + # ret[name] = declaredFields[i].get( declaredFields[i] ) + try: + ret[name] = declaredFields[i].get(original) + except: + ret[name] = declaredFields[i].toString() + + # this simple dir does not always get all the info, that's why we have the part before + # (e.g.: if we do a dir on String, some methods that are from other interfaces such as + # charAt don't appear) + try: + d = dir(original) + for name in d: + if found.get(name) != 1: + ret[name] = getattr(original, name) + except: + # sometimes we're unable to do a dir + pass + + return ret + + def get_names(self, var): + used___dict__ = False + try: + names = dir(var) + except Exception: + names = [] + if not names: + if hasattr_checked(var, "__dict__"): + names = list(var.__dict__) + used___dict__ = True + return names, used___dict__ + + def _get_py_dictionary(self, var, names=None, used___dict__=False): + """ + :return tuple(names, used___dict__), where used___dict__ means we have to access + using obj.__dict__[name] instead of getattr(obj, name) + """ + + # On PyPy we never show functions. This is because of a corner case where PyPy becomes + # absurdly slow -- it takes almost half a second to introspect a single numpy function (so, + # the related test, "test_case_16_resolve_numpy_array", times out... this probably isn't + # specific to numpy, but to any library where the CPython bridge is used, but as we + # can't be sure in the debugger, we play it safe and don't show it at all). + filter_function = IS_PYPY + + if not names: + names, used___dict__ = self.get_names(var) + d = {} + + # Be aware that the order in which the filters are applied attempts to + # optimize the operation by removing as many items as possible in the + # first filters, leaving fewer items for later filters + + timer = Timer() + cls = type(var) + for name in names: + try: + name_as_str = name + if name_as_str.__class__ != str: + name_as_str = "%r" % (name_as_str,) + + if not used___dict__: + attr = getattr(var, name) + else: + attr = var.__dict__[name] + + # filter functions? + if filter_function: + if inspect.isroutine(attr) or isinstance(attr, MethodWrapperType): + continue + except: + # if some error occurs getting it, let's put it to the user. + strIO = StringIO() + traceback.print_exc(file=strIO) + attr = strIO.getvalue() + + finally: + timer.report_if_getting_attr_slow(cls, name_as_str) + + d[name_as_str] = attr + + return d, used___dict__ + + +class DAPGrouperResolver: + def get_contents_debug_adapter_protocol(self, obj, fmt=None): + return obj.get_contents_debug_adapter_protocol() + + +_basic_immutable_types = (int, float, complex, str, bytes, type(None), bool, frozenset) + + +def _does_obj_repr_evaluate_to_obj(obj): + """ + If obj is an object where evaluating its representation leads to + the same object, return True, otherwise, return False. + """ + try: + if isinstance(obj, tuple): + for o in obj: + if not _does_obj_repr_evaluate_to_obj(o): + return False + return True + else: + return isinstance(obj, _basic_immutable_types) + except: + return False + + +# ======================================================================================================================= +# DictResolver +# ======================================================================================================================= +class DictResolver: + sort_keys = not IS_PY36_OR_GREATER + + def resolve(self, dct, key): + if key in (GENERATED_LEN_ATTR_NAME, TOO_LARGE_ATTR): + return None + + if "(" not in key: + # we have to treat that because the dict resolver is also used to directly resolve the global and local + # scopes (which already have the items directly) + try: + return dct[key] + except: + return getattr(dct, key) + + # ok, we have to iterate over the items to find the one that matches the id, because that's the only way + # to actually find the reference from the string we have before. + expected_id = int(key.split("(")[-1][:-1]) + for key, val in dct.items(): + if id(key) == expected_id: + return val + + raise UnableToResolveVariableException() + + def key_to_str(self, key, fmt=None): + if fmt is not None: + if fmt.get("hex", False): + safe_repr = SafeRepr() + safe_repr.convert_to_hex = True + return safe_repr(key) + return "%r" % (key,) + + def init_dict(self): + return {} + + def get_contents_debug_adapter_protocol(self, dct, fmt=None): + """ + This method is to be used in the case where the variables are all saved by its id (and as + such don't need to have the `resolve` method called later on, so, keys don't need to + embed the reference in the key). + + Note that the return should be ordered. + + :return list(tuple(name:str, value:object, evaluateName:str)) + """ + ret = [] + + i = 0 + + found_representations = set() + + for key, val in dct.items(): + i += 1 + key_as_str = self.key_to_str(key, fmt) + + if key_as_str not in found_representations: + found_representations.add(key_as_str) + else: + # If the key would be a duplicate, add the key id (otherwise + # VSCode won't show all keys correctly). + # See: https://github.com/microsoft/debugpy/issues/148 + key_as_str = "%s (id: %s)" % (key_as_str, id(key)) + found_representations.add(key_as_str) + + if _does_obj_repr_evaluate_to_obj(key): + s = self.key_to_str(key) # do not format the key + eval_key_str = "[%s]" % (s,) + else: + eval_key_str = None + ret.append((key_as_str, val, eval_key_str)) + if i >= pydevd_constants.PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS: + ret.append((TOO_LARGE_ATTR, TOO_LARGE_MSG % (pydevd_constants.PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS,), None)) + break + + # in case the class extends built-in type and has some additional fields + from_default_resolver = defaultResolver.get_contents_debug_adapter_protocol(dct, fmt) + + if from_default_resolver: + ret = from_default_resolver + ret + + if self.sort_keys: + ret = sorted(ret, key=lambda tup: sorted_attributes_key(tup[0])) + + ret.append((GENERATED_LEN_ATTR_NAME, len(dct), partial(_apply_evaluate_name, evaluate_name="len(%s)"))) + return ret + + def get_dictionary(self, dct): + ret = self.init_dict() + + i = 0 + for key, val in dct.items(): + i += 1 + # we need to add the id because otherwise we cannot find the real object to get its contents later on. + key = "%s (%s)" % (self.key_to_str(key), id(key)) + ret[key] = val + if i >= pydevd_constants.PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS: + ret[TOO_LARGE_ATTR] = TOO_LARGE_MSG % (pydevd_constants.PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS,) + break + + # in case if the class extends built-in type and has some additional fields + additional_fields = defaultResolver.get_dictionary(dct) + ret.update(additional_fields) + ret[GENERATED_LEN_ATTR_NAME] = len(dct) + return ret + + +def _apply_evaluate_name(parent_name, evaluate_name): + return evaluate_name % (parent_name,) + + +class MoreItemsRange: + def __init__(self, value, from_i, to_i): + self.value = value + self.from_i = from_i + self.to_i = to_i + + def get_contents_debug_adapter_protocol(self, _self, fmt=None): + l = len(self.value) + ret = [] + + format_str = "%0" + str(int(len(str(l - 1)))) + "d" + if fmt is not None and fmt.get("hex", False): + format_str = "0x%0" + str(int(len(hex(l).lstrip("0x")))) + "x" + + for i, item in enumerate(self.value[self.from_i : self.to_i]): + i += self.from_i + ret.append((format_str % i, item, "[%s]" % i)) + return ret + + def get_dictionary(self, _self, fmt=None): + dct = {} + for key, obj, _ in self.get_contents_debug_adapter_protocol(self, fmt): + dct[key] = obj + return dct + + def resolve(self, attribute): + """ + :param var: that's the original object we're dealing with. + :param attribute: that's the key to resolve + -- either the dict key in get_dictionary or the name in the dap protocol. + """ + return self.value[int(attribute)] + + def __eq__(self, o): + return isinstance(o, MoreItemsRange) and self.value is o.value and self.from_i == o.from_i and self.to_i == o.to_i + + def __str__(self): + return "[%s:%s]" % (self.from_i, self.to_i) + + __repr__ = __str__ + + +class MoreItems: + def __init__(self, value, handled_items): + self.value = value + self.handled_items = handled_items + + def get_contents_debug_adapter_protocol(self, _self, fmt=None): + total_items = len(self.value) + remaining = total_items - self.handled_items + bucket_size = pydevd_constants.PYDEVD_CONTAINER_BUCKET_SIZE + + from_i = self.handled_items + to_i = from_i + min(bucket_size, remaining) + + ret = [] + while remaining > 0: + remaining -= bucket_size + more_items_range = MoreItemsRange(self.value, from_i, to_i) + ret.append((str(more_items_range), more_items_range, None)) + + from_i = to_i + to_i = from_i + min(bucket_size, remaining) + + return ret + + def get_dictionary(self, _self, fmt=None): + dct = {} + for key, obj, _ in self.get_contents_debug_adapter_protocol(self, fmt): + dct[key] = obj + return dct + + def resolve(self, attribute): + from_i, to_i = attribute[1:-1].split(":") + from_i = int(from_i) + to_i = int(to_i) + return MoreItemsRange(self.value, from_i, to_i) + + def __eq__(self, o): + return isinstance(o, MoreItems) and self.value is o.value + + def __str__(self): + return "..." + + __repr__ = __str__ + + +class ForwardInternalResolverToObject: + """ + To be used when we provide some internal object that'll actually do the resolution. + """ + + def get_contents_debug_adapter_protocol(self, obj, fmt=None): + return obj.get_contents_debug_adapter_protocol(fmt) + + def get_dictionary(self, var, fmt={}): + return var.get_dictionary(var, fmt) + + def resolve(self, var, attribute): + return var.resolve(attribute) + + +class TupleResolver: # to enumerate tuples and lists + def resolve(self, var, attribute): + """ + :param var: that's the original object we're dealing with. + :param attribute: that's the key to resolve + -- either the dict key in get_dictionary or the name in the dap protocol. + """ + if attribute in (GENERATED_LEN_ATTR_NAME, TOO_LARGE_ATTR): + return None + try: + return var[int(attribute)] + except: + if attribute == "more": + return MoreItems(var, pydevd_constants.PYDEVD_CONTAINER_INITIAL_EXPANDED_ITEMS) + + return getattr(var, attribute) + + def get_contents_debug_adapter_protocol(self, lst, fmt=None): + """ + This method is to be used in the case where the variables are all saved by its id (and as + such don't need to have the `resolve` method called later on, so, keys don't need to + embed the reference in the key). + + Note that the return should be ordered. + + :return list(tuple(name:str, value:object, evaluateName:str)) + """ + lst_len = len(lst) + ret = [] + + format_str = "%0" + str(int(len(str(lst_len - 1)))) + "d" + if fmt is not None and fmt.get("hex", False): + format_str = "0x%0" + str(int(len(hex(lst_len).lstrip("0x")))) + "x" + + initial_expanded = pydevd_constants.PYDEVD_CONTAINER_INITIAL_EXPANDED_ITEMS + for i, item in enumerate(lst): + ret.append((format_str % i, item, "[%s]" % i)) + + if i >= initial_expanded - 1: + if (lst_len - initial_expanded) < pydevd_constants.PYDEVD_CONTAINER_BUCKET_SIZE: + # Special case: if we have just 1 more bucket just put it inline. + item = MoreItemsRange(lst, initial_expanded, lst_len) + + else: + # Multiple buckets + item = MoreItems(lst, initial_expanded) + ret.append(("more", item, None)) + break + + # Needed in case the class extends the built-in type and has some additional fields. + from_default_resolver = defaultResolver.get_contents_debug_adapter_protocol(lst, fmt=fmt) + if from_default_resolver: + ret = from_default_resolver + ret + + ret.append((GENERATED_LEN_ATTR_NAME, len(lst), partial(_apply_evaluate_name, evaluate_name="len(%s)"))) + return ret + + def get_dictionary(self, var, fmt={}): + l = len(var) + d = {} + + format_str = "%0" + str(int(len(str(l - 1)))) + "d" + if fmt is not None and fmt.get("hex", False): + format_str = "0x%0" + str(int(len(hex(l).lstrip("0x")))) + "x" + + initial_expanded = pydevd_constants.PYDEVD_CONTAINER_INITIAL_EXPANDED_ITEMS + for i, item in enumerate(var): + d[format_str % i] = item + + if i >= initial_expanded - 1: + item = MoreItems(var, initial_expanded) + d["more"] = item + break + + # in case if the class extends built-in type and has some additional fields + additional_fields = defaultResolver.get_dictionary(var) + d.update(additional_fields) + d[GENERATED_LEN_ATTR_NAME] = len(var) + return d + + +# ======================================================================================================================= +# SetResolver +# ======================================================================================================================= +class SetResolver: + """ + Resolves a set as dict id(object)->object + """ + + def get_contents_debug_adapter_protocol(self, obj, fmt=None): + ret = [] + + for i, item in enumerate(obj): + ret.append((str(id(item)), item, None)) + + if i >= pydevd_constants.PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS: + ret.append((TOO_LARGE_ATTR, TOO_LARGE_MSG % (pydevd_constants.PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS,), None)) + break + + # Needed in case the class extends the built-in type and has some additional fields. + from_default_resolver = defaultResolver.get_contents_debug_adapter_protocol(obj, fmt=fmt) + if from_default_resolver: + ret = from_default_resolver + ret + ret.append((GENERATED_LEN_ATTR_NAME, len(obj), partial(_apply_evaluate_name, evaluate_name="len(%s)"))) + return ret + + def resolve(self, var, attribute): + if attribute in (GENERATED_LEN_ATTR_NAME, TOO_LARGE_ATTR): + return None + + try: + attribute = int(attribute) + except: + return getattr(var, attribute) + + for v in var: + if id(v) == attribute: + return v + + raise UnableToResolveVariableException("Unable to resolve %s in %s" % (attribute, var)) + + def get_dictionary(self, var): + d = {} + for i, item in enumerate(var): + d[str(id(item))] = item + + if i >= pydevd_constants.PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS: + d[TOO_LARGE_ATTR] = TOO_LARGE_MSG % (pydevd_constants.PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS,) + break + + # in case if the class extends built-in type and has some additional fields + additional_fields = defaultResolver.get_dictionary(var) + d.update(additional_fields) + d[GENERATED_LEN_ATTR_NAME] = len(var) + return d + + def change_var_from_name(self, container, name, new_value): + # The name given in this case must be the id(item), so, we can actually + # iterate in the set and see which item matches the given id. + + try: + # Check that the new value can actually be added to a set (i.e.: it's hashable/comparable). + set().add(new_value) + except: + return None + + for item in container: + if str(id(item)) == name: + container.remove(item) + container.add(new_value) + return str(id(new_value)) + + return None + + +# ======================================================================================================================= +# InstanceResolver +# ======================================================================================================================= +class InstanceResolver: + def resolve(self, var, attribute): + field = var.__class__.getDeclaredField(attribute) + field.setAccessible(True) + return field.get(var) + + def get_dictionary(self, obj): + ret = {} + + declaredFields = obj.__class__.getDeclaredFields() + for i in range(len(declaredFields)): + name = declaredFields[i].getName() + try: + declaredFields[i].setAccessible(True) + ret[name] = declaredFields[i].get(obj) + except: + pydev_log.exception() + + return ret + + +# ======================================================================================================================= +# JyArrayResolver +# ======================================================================================================================= +class JyArrayResolver: + """ + This resolves a regular Object[] array from java + """ + + def resolve(self, var, attribute): + if attribute == GENERATED_LEN_ATTR_NAME: + return None + return var[int(attribute)] + + def get_dictionary(self, obj): + ret = {} + + for i in range(len(obj)): + ret[i] = obj[i] + + ret[GENERATED_LEN_ATTR_NAME] = len(obj) + return ret + + +# ======================================================================================================================= +# MultiValueDictResolver +# ======================================================================================================================= +class MultiValueDictResolver(DictResolver): + def resolve(self, dct, key): + if key in (GENERATED_LEN_ATTR_NAME, TOO_LARGE_ATTR): + return None + + # ok, we have to iterate over the items to find the one that matches the id, because that's the only way + # to actually find the reference from the string we have before. + expected_id = int(key.split("(")[-1][:-1]) + for key in list(dct.keys()): + val = dct.getlist(key) + if id(key) == expected_id: + return val + + raise UnableToResolveVariableException() + + +# ======================================================================================================================= +# DjangoFormResolver +# ======================================================================================================================= +class DjangoFormResolver(DefaultResolver): + def get_dictionary(self, var, names=None): + # Do not call self.errors because it is a property and has side effects. + names, used___dict__ = self.get_names(var) + + has_errors_attr = False + if "errors" in names: + has_errors_attr = True + names.remove("errors") + + d = defaultResolver.get_dictionary(var, names=names, used___dict__=used___dict__) + if has_errors_attr: + try: + errors_attr = getattr(var, "_errors") + except: + errors_attr = None + d["errors"] = errors_attr + return d + + +# ======================================================================================================================= +# DequeResolver +# ======================================================================================================================= +class DequeResolver(TupleResolver): + def get_dictionary(self, var): + d = TupleResolver.get_dictionary(self, var) + d["maxlen"] = getattr(var, "maxlen", None) + return d + + +# ======================================================================================================================= +# OrderedDictResolver +# ======================================================================================================================= +class OrderedDictResolver(DictResolver): + sort_keys = False + + def init_dict(self): + return OrderedDict() + + +# ======================================================================================================================= +# FrameResolver +# ======================================================================================================================= +class FrameResolver: + """ + This resolves a frame. + """ + + def resolve(self, obj, attribute): + if attribute == "__internals__": + return defaultResolver.get_dictionary(obj) + + if attribute == "stack": + return self.get_frame_stack(obj) + + if attribute == "f_locals": + return obj.f_locals + + return None + + def get_dictionary(self, obj): + ret = {} + ret["__internals__"] = defaultResolver.get_dictionary(obj) + ret["stack"] = self.get_frame_stack(obj) + ret["f_locals"] = obj.f_locals + return ret + + def get_frame_stack(self, frame): + ret = [] + if frame is not None: + ret.append(self.get_frame_name(frame)) + + while frame.f_back: + frame = frame.f_back + ret.append(self.get_frame_name(frame)) + + return ret + + def get_frame_name(self, frame): + if frame is None: + return "None" + try: + name = basename(frame.f_code.co_filename) + return "frame: %s [%s:%s] id:%s" % (frame.f_code.co_name, name, frame.f_lineno, id(frame)) + except: + return "frame object" + + +defaultResolver = DefaultResolver() +dictResolver = DictResolver() +tupleResolver = TupleResolver() +instanceResolver = InstanceResolver() +jyArrayResolver = JyArrayResolver() +setResolver = SetResolver() +multiValueDictResolver = MultiValueDictResolver() +djangoFormResolver = DjangoFormResolver() +dequeResolver = DequeResolver() +orderedDictResolver = OrderedDictResolver() +frameResolver = FrameResolver() +dapGrouperResolver = DAPGrouperResolver() +forwardInternalResolverToObject = ForwardInternalResolverToObject() + + +class InspectStub: + def isbuiltin(self, _args): + return False + + def isroutine(self, object): + return False + + +try: + import inspect +except: + inspect = InspectStub() + + +def get_var_scope(attr_name, attr_value, evaluate_name, handle_return_values): + if attr_name.startswith("'"): + if attr_name.endswith("'"): + # i.e.: strings denote that it is a regular value in some container. + return "" + else: + i = attr_name.find("__' (") + if i >= 0: + # Handle attr_name such as: >>'__name__' (1732494379184)<< + attr_name = attr_name[1 : i + 2] + + if handle_return_values and attr_name == RETURN_VALUES_DICT: + return "" + + elif attr_name == GENERATED_LEN_ATTR_NAME: + return "" + + if attr_name.startswith("__") and attr_name.endswith("__"): + return DAPGrouper.SCOPE_SPECIAL_VARS + + if attr_name.startswith("_") or attr_name.endswith("__"): + return DAPGrouper.SCOPE_PROTECTED_VARS + + try: + if inspect.isroutine(attr_value) or isinstance(attr_value, MethodWrapperType): + return DAPGrouper.SCOPE_FUNCTION_VARS + + elif inspect.isclass(attr_value): + return DAPGrouper.SCOPE_CLASS_VARS + except: + # It's possible that isinstance throws an exception when dealing with user-code. + if DebugInfoHolder.DEBUG_TRACE_LEVEL > 0: + pydev_log.exception() + + return "" diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py new file mode 100644 index 0000000..ba8f7af --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py @@ -0,0 +1,339 @@ +""" +Vendored copy of runpy from the standard library. + +It's vendored so that we can properly ignore it when used to start user code +while still making it possible for the user to debug runpy itself. + +runpy.py - locating and running Python code using the module namespace + +Provides support for locating and running Python scripts using the Python +module namespace instead of the native filesystem. + +This allows Python code to play nicely with non-filesystem based PEP 302 +importers when locating support scripts as well as when importing modules. +""" +# Written by Nick Coghlan +# to implement PEP 338 (Executing Modules as Scripts) + +import sys +import importlib.machinery # importlib first so we can test #15386 via -m +import importlib.util +import io +import types +import os + +__all__ = [ + "run_module", + "run_path", +] + + +# Note: fabioz: Don't use pkgutil (when handling caught exceptions we could end up +# showing exceptions in pkgutil.get_imported (specifically the KeyError), so, +# create a copy of the function we need to properly ignore this exception when +# running the program. +def pkgutil_get_importer(path_item): + """Retrieve a finder for the given path item + + The returned finder is cached in sys.path_importer_cache + if it was newly created by a path hook. + + The cache (or part of it) can be cleared manually if a + rescan of sys.path_hooks is necessary. + """ + try: + importer = sys.path_importer_cache[path_item] + except KeyError: + for path_hook in sys.path_hooks: + try: + importer = path_hook(path_item) + sys.path_importer_cache.setdefault(path_item, importer) + break + except ImportError: + pass + else: + importer = None + return importer + + +class _TempModule(object): + """Temporarily replace a module in sys.modules with an empty namespace""" + + def __init__(self, mod_name): + self.mod_name = mod_name + self.module = types.ModuleType(mod_name) + self._saved_module = [] + + def __enter__(self): + mod_name = self.mod_name + try: + self._saved_module.append(sys.modules[mod_name]) + except KeyError: + pass + sys.modules[mod_name] = self.module + return self + + def __exit__(self, *args): + if self._saved_module: + sys.modules[self.mod_name] = self._saved_module[0] + else: + del sys.modules[self.mod_name] + self._saved_module = [] + + +class _ModifiedArgv0(object): + def __init__(self, value): + self.value = value + self._saved_value = self._sentinel = object() + + def __enter__(self): + if self._saved_value is not self._sentinel: + raise RuntimeError("Already preserving saved value") + self._saved_value = sys.argv[0] + sys.argv[0] = self.value + + def __exit__(self, *args): + self.value = self._sentinel + sys.argv[0] = self._saved_value + + +# TODO: Replace these helpers with importlib._bootstrap_external functions. +def _run_code(code, run_globals, init_globals=None, mod_name=None, mod_spec=None, pkg_name=None, script_name=None): + """Helper to run code in nominated namespace""" + if init_globals is not None: + run_globals.update(init_globals) + if mod_spec is None: + loader = None + fname = script_name + cached = None + else: + loader = mod_spec.loader + fname = mod_spec.origin + cached = mod_spec.cached + if pkg_name is None: + pkg_name = mod_spec.parent + run_globals.update( + __name__=mod_name, __file__=fname, __cached__=cached, __doc__=None, __loader__=loader, __package__=pkg_name, __spec__=mod_spec + ) + exec(code, run_globals) + return run_globals + + +def _run_module_code(code, init_globals=None, mod_name=None, mod_spec=None, pkg_name=None, script_name=None): + """Helper to run code in new namespace with sys modified""" + fname = script_name if mod_spec is None else mod_spec.origin + with _TempModule(mod_name) as temp_module, _ModifiedArgv0(fname): + mod_globals = temp_module.module.__dict__ + _run_code(code, mod_globals, init_globals, mod_name, mod_spec, pkg_name, script_name) + # Copy the globals of the temporary module, as they + # may be cleared when the temporary module goes away + return mod_globals.copy() + + +# Helper to get the full name, spec and code for a module +def _get_module_details(mod_name, error=ImportError): + if mod_name.startswith("."): + raise error("Relative module names not supported") + pkg_name, _, _ = mod_name.rpartition(".") + if pkg_name: + # Try importing the parent to avoid catching initialization errors + try: + __import__(pkg_name) + except ImportError as e: + # If the parent or higher ancestor package is missing, let the + # error be raised by find_spec() below and then be caught. But do + # not allow other errors to be caught. + if e.name is None or (e.name != pkg_name and not pkg_name.startswith(e.name + ".")): + raise + # Warn if the module has already been imported under its normal name + existing = sys.modules.get(mod_name) + if existing is not None and not hasattr(existing, "__path__"): + from warnings import warn + + msg = ( + "{mod_name!r} found in sys.modules after import of " + "package {pkg_name!r}, but prior to execution of " + "{mod_name!r}; this may result in unpredictable " + "behaviour".format(mod_name=mod_name, pkg_name=pkg_name) + ) + warn(RuntimeWarning(msg)) + + try: + spec = importlib.util.find_spec(mod_name) + except (ImportError, AttributeError, TypeError, ValueError) as ex: + # This hack fixes an impedance mismatch between pkgutil and + # importlib, where the latter raises other errors for cases where + # pkgutil previously raised ImportError + msg = "Error while finding module specification for {!r} ({}: {})" + if mod_name.endswith(".py"): + msg += f". Try using '{mod_name[:-3]}' instead of " f"'{mod_name}' as the module name." + raise error(msg.format(mod_name, type(ex).__name__, ex)) from ex + if spec is None: + raise error("No module named %s" % mod_name) + if spec.submodule_search_locations is not None: + if mod_name == "__main__" or mod_name.endswith(".__main__"): + raise error("Cannot use package as __main__ module") + try: + pkg_main_name = mod_name + ".__main__" + return _get_module_details(pkg_main_name, error) + except error as e: + if mod_name not in sys.modules: + raise # No module loaded; being a package is irrelevant + raise error(("%s; %r is a package and cannot " + "be directly executed") % (e, mod_name)) + loader = spec.loader + if loader is None: + raise error("%r is a namespace package and cannot be executed" % mod_name) + try: + code = loader.get_code(mod_name) + except ImportError as e: + raise error(format(e)) from e + if code is None: + raise error("No code object available for %s" % mod_name) + return mod_name, spec, code + + +class _Error(Exception): + """Error that _run_module_as_main() should report without a traceback""" + + +# XXX ncoghlan: Should this be documented and made public? +# (Current thoughts: don't repeat the mistake that lead to its +# creation when run_module() no longer met the needs of +# mainmodule.c, but couldn't be changed because it was public) +def _run_module_as_main(mod_name, alter_argv=True): + """Runs the designated module in the __main__ namespace + + Note that the executed module will have full access to the + __main__ namespace. If this is not desirable, the run_module() + function should be used to run the module code in a fresh namespace. + + At the very least, these variables in __main__ will be overwritten: + __name__ + __file__ + __cached__ + __loader__ + __package__ + """ + try: + if alter_argv or mod_name != "__main__": # i.e. -m switch + mod_name, mod_spec, code = _get_module_details(mod_name, _Error) + else: # i.e. directory or zipfile execution + mod_name, mod_spec, code = _get_main_module_details(_Error) + except _Error as exc: + msg = "%s: %s" % (sys.executable, exc) + sys.exit(msg) + main_globals = sys.modules["__main__"].__dict__ + if alter_argv: + sys.argv[0] = mod_spec.origin + return _run_code(code, main_globals, None, "__main__", mod_spec) + + +def run_module(mod_name, init_globals=None, run_name=None, alter_sys=False): + """Execute a module's code without importing it + + Returns the resulting top level namespace dictionary + """ + mod_name, mod_spec, code = _get_module_details(mod_name) + if run_name is None: + run_name = mod_name + if alter_sys: + return _run_module_code(code, init_globals, run_name, mod_spec) + else: + # Leave the sys module alone + return _run_code(code, {}, init_globals, run_name, mod_spec) + + +def _get_main_module_details(error=ImportError): + # Helper that gives a nicer error message when attempting to + # execute a zipfile or directory by invoking __main__.py + # Also moves the standard __main__ out of the way so that the + # preexisting __loader__ entry doesn't cause issues + main_name = "__main__" + saved_main = sys.modules[main_name] + del sys.modules[main_name] + try: + return _get_module_details(main_name) + except ImportError as exc: + if main_name in str(exc): + raise error("can't find %r module in %r" % (main_name, sys.path[0])) from exc + raise + finally: + sys.modules[main_name] = saved_main + + +try: + io_open_code = io.open_code +except AttributeError: + # Compatibility with Python 3.6/3.7 + import tokenize + + io_open_code = tokenize.open + + +def _get_code_from_file(run_name, fname): + # Check for a compiled file first + from pkgutil import read_code + + decoded_path = os.path.abspath(os.fsdecode(fname)) + with io_open_code(decoded_path) as f: + code = read_code(f) + if code is None: + # That didn't work, so try it as normal source code + with io_open_code(decoded_path) as f: + code = compile(f.read(), fname, "exec") + return code, fname + + +def run_path(path_name, init_globals=None, run_name=None): + """Execute code located at the specified filesystem location + + Returns the resulting top level namespace dictionary + + The file path may refer directly to a Python script (i.e. + one that could be directly executed with execfile) or else + it may refer to a zipfile or directory containing a top + level __main__.py script. + """ + if run_name is None: + run_name = "" + pkg_name = run_name.rpartition(".")[0] + importer = pkgutil_get_importer(path_name) + # Trying to avoid importing imp so as to not consume the deprecation warning. + is_NullImporter = False + if type(importer).__module__ == "imp": + if type(importer).__name__ == "NullImporter": + is_NullImporter = True + if isinstance(importer, type(None)) or is_NullImporter: + # Not a valid sys.path entry, so run the code directly + # execfile() doesn't help as we want to allow compiled files + code, fname = _get_code_from_file(run_name, path_name) + return _run_module_code(code, init_globals, run_name, pkg_name=pkg_name, script_name=fname) + else: + # Finder is defined for path, so add it to + # the start of sys.path + sys.path.insert(0, path_name) + try: + # Here's where things are a little different from the run_module + # case. There, we only had to replace the module in sys while the + # code was running and doing so was somewhat optional. Here, we + # have no choice and we have to remove it even while we read the + # code. If we don't do this, a __loader__ attribute in the + # existing __main__ module may prevent location of the new module. + mod_name, mod_spec, code = _get_main_module_details() + with _TempModule(run_name) as temp_module, _ModifiedArgv0(path_name): + mod_globals = temp_module.module.__dict__ + return _run_code(code, mod_globals, init_globals, run_name, mod_spec, pkg_name).copy() + finally: + try: + sys.path.remove(path_name) + except ValueError: + pass + + +if __name__ == "__main__": + # Run the module specified as the next command line argument + if len(sys.argv) < 2: + print("No module specified for execution", file=sys.stderr) + else: + del sys.argv[0] # Make the requested module sys.argv[0] + _run_module_as_main(sys.argv[0]) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_safe_repr.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_safe_repr.py new file mode 100644 index 0000000..df5e8f4 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_safe_repr.py @@ -0,0 +1,395 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE in the project root +# for license information. + +# Gotten from ptvsd for supporting the format expected there. +import sys +from _pydevd_bundle.pydevd_constants import IS_PY36_OR_GREATER +import locale +from _pydev_bundle import pydev_log + + +class SafeRepr(object): + # Can be used to override the encoding from locale.getpreferredencoding() + locale_preferred_encoding = None + + # Can be used to override the encoding used for sys.stdout.encoding + sys_stdout_encoding = None + + # String types are truncated to maxstring_outer when at the outer- + # most level, and truncated to maxstring_inner characters inside + # collections. + maxstring_outer = 2**16 + maxstring_inner = 128 + string_types = (str, bytes) + bytes = bytes + set_info = (set, "{", "}", False) + frozenset_info = (frozenset, "frozenset({", "})", False) + int_types = (int,) + long_iter_types = (list, tuple, bytearray, range, dict, set, frozenset) + + # Collection types are recursively iterated for each limit in + # maxcollection. + maxcollection = (60, 20) + + # Specifies type, prefix string, suffix string, and whether to include a + # comma if there is only one element. (Using a sequence rather than a + # mapping because we use isinstance() to determine the matching type.) + collection_types = [ + (tuple, "(", ")", True), + (list, "[", "]", False), + frozenset_info, + set_info, + ] + try: + from collections import deque + + collection_types.append((deque, "deque([", "])", False)) + except Exception: + pass + + # type, prefix string, suffix string, item prefix string, + # item key/value separator, item suffix string + dict_types = [(dict, "{", "}", "", ": ", "")] + try: + from collections import OrderedDict + + dict_types.append((OrderedDict, "OrderedDict([", "])", "(", ", ", ")")) + except Exception: + pass + + # All other types are treated identically to strings, but using + # different limits. + maxother_outer = 2**16 + maxother_inner = 128 + + convert_to_hex = False + raw_value = False + + def __call__(self, obj): + """ + :param object obj: + The object for which we want a representation. + + :return str: + Returns bytes encoded as utf-8 on py2 and str on py3. + """ + try: + return "".join(self._repr(obj, 0)) + except Exception: + try: + return "An exception was raised: %r" % sys.exc_info()[1] + except Exception: + return "An exception was raised" + + def _repr(self, obj, level): + """Returns an iterable of the parts in the final repr string.""" + + try: + obj_repr = type(obj).__repr__ + except Exception: + obj_repr = None + + def has_obj_repr(t): + r = t.__repr__ + try: + return obj_repr == r + except Exception: + return obj_repr is r + + for t, prefix, suffix, comma in self.collection_types: + if isinstance(obj, t) and has_obj_repr(t): + return self._repr_iter(obj, level, prefix, suffix, comma) + + for t, prefix, suffix, item_prefix, item_sep, item_suffix in self.dict_types: # noqa + if isinstance(obj, t) and has_obj_repr(t): + return self._repr_dict(obj, level, prefix, suffix, item_prefix, item_sep, item_suffix) + + for t in self.string_types: + if isinstance(obj, t) and has_obj_repr(t): + return self._repr_str(obj, level) + + if self._is_long_iter(obj): + return self._repr_long_iter(obj) + + return self._repr_other(obj, level) + + # Determines whether an iterable exceeds the limits set in + # maxlimits, and is therefore unsafe to repr(). + def _is_long_iter(self, obj, level=0): + try: + # Strings have their own limits (and do not nest). Because + # they don't have __iter__ in 2.x, this check goes before + # the next one. + if isinstance(obj, self.string_types): + return len(obj) > self.maxstring_inner + + # If it's not an iterable (and not a string), it's fine. + if not hasattr(obj, "__iter__"): + return False + + # If it's not an instance of these collection types then it + # is fine. Note: this is a fix for + # https://github.com/Microsoft/ptvsd/issues/406 + if not isinstance(obj, self.long_iter_types): + return False + + # Iterable is its own iterator - this is a one-off iterable + # like generator or enumerate(). We can't really count that, + # but repr() for these should not include any elements anyway, + # so we can treat it the same as non-iterables. + if obj is iter(obj): + return False + + # range reprs fine regardless of length. + if isinstance(obj, range): + return False + + # numpy and scipy collections (ndarray etc) have + # self-truncating repr, so they're always safe. + try: + module = type(obj).__module__.partition(".")[0] + if module in ("numpy", "scipy"): + return False + except Exception: + pass + + # Iterables that nest too deep are considered long. + if level >= len(self.maxcollection): + return True + + # It is too long if the length exceeds the limit, or any + # of its elements are long iterables. + if hasattr(obj, "__len__"): + try: + size = len(obj) + except Exception: + size = None + if size is not None and size > self.maxcollection[level]: + return True + return any((self._is_long_iter(item, level + 1) for item in obj)) # noqa + return any(i > self.maxcollection[level] or self._is_long_iter(item, level + 1) for i, item in enumerate(obj)) # noqa + + except Exception: + # If anything breaks, assume the worst case. + return True + + def _repr_iter(self, obj, level, prefix, suffix, comma_after_single_element=False): + yield prefix + + if level >= len(self.maxcollection): + yield "..." + else: + count = self.maxcollection[level] + yield_comma = False + for item in obj: + if yield_comma: + yield ", " + yield_comma = True + + count -= 1 + if count <= 0: + yield "..." + break + + for p in self._repr(item, 100 if item is obj else level + 1): + yield p + else: + if comma_after_single_element: + if count == self.maxcollection[level] - 1: + yield "," + yield suffix + + def _repr_long_iter(self, obj): + try: + length = hex(len(obj)) if self.convert_to_hex else len(obj) + obj_repr = "<%s, len() = %s>" % (type(obj).__name__, length) + except Exception: + try: + obj_repr = "<" + type(obj).__name__ + ">" + except Exception: + obj_repr = "" + yield obj_repr + + def _repr_dict(self, obj, level, prefix, suffix, item_prefix, item_sep, item_suffix): + if not obj: + yield prefix + suffix + return + if level >= len(self.maxcollection): + yield prefix + "..." + suffix + return + + yield prefix + + count = self.maxcollection[level] + yield_comma = False + + if IS_PY36_OR_GREATER: + # On Python 3.6 (onwards) dictionaries now keep + # insertion order. + sorted_keys = list(obj) + else: + try: + sorted_keys = sorted(obj) + except Exception: + sorted_keys = list(obj) + + for key in sorted_keys: + if yield_comma: + yield ", " + yield_comma = True + + count -= 1 + if count <= 0: + yield "..." + break + + yield item_prefix + for p in self._repr(key, level + 1): + yield p + + yield item_sep + + try: + item = obj[key] + except Exception: + yield "" + else: + for p in self._repr(item, 100 if item is obj else level + 1): + yield p + yield item_suffix + + yield suffix + + def _repr_str(self, obj, level): + try: + if self.raw_value: + # For raw value retrieval, ignore all limits. + if isinstance(obj, bytes): + yield obj.decode("latin-1") + else: + yield obj + return + + limit_inner = self.maxother_inner + limit_outer = self.maxother_outer + limit = limit_inner if level > 0 else limit_outer + if len(obj) <= limit: + # Note that we check the limit before doing the repr (so, the final string + # may actually be considerably bigger on some cases, as besides + # the additional u, b, ' chars, some chars may be escaped in repr, so + # even a single char such as \U0010ffff may end up adding more + # chars than expected). + yield self._convert_to_unicode_or_bytes_repr(repr(obj)) + return + + # Slightly imprecise calculations - we may end up with a string that is + # up to 6 characters longer than limit. If you need precise formatting, + # you are using the wrong class. + left_count, right_count = max(1, int(2 * limit / 3)), max(1, int(limit / 3)) # noqa + + # Important: only do repr after slicing to avoid duplicating a byte array that could be + # huge. + + # Note: we don't deal with high surrogates here because we're not dealing with the + # repr() of a random object. + # i.e.: A high surrogate unicode char may be splitted on Py2, but as we do a `repr` + # afterwards, that's ok. + + # Also, we just show the unicode/string/bytes repr() directly to make clear what the + # input type was (so, on py2 a unicode would start with u' and on py3 a bytes would + # start with b'). + + part1 = obj[:left_count] + part1 = repr(part1) + part1 = part1[: part1.rindex("'")] # Remove the last ' + + part2 = obj[-right_count:] + part2 = repr(part2) + part2 = part2[part2.index("'") + 1 :] # Remove the first ' (and possibly u or b). + + yield part1 + yield "..." + yield part2 + except: + # This shouldn't really happen, but let's play it safe. + pydev_log.exception("Error getting string representation to show.") + for part in self._repr_obj(obj, level, self.maxother_inner, self.maxother_outer): + yield part + + def _repr_other(self, obj, level): + return self._repr_obj(obj, level, self.maxother_inner, self.maxother_outer) + + def _repr_obj(self, obj, level, limit_inner, limit_outer): + try: + if self.raw_value: + # For raw value retrieval, ignore all limits. + if isinstance(obj, bytes): + yield obj.decode("latin-1") + return + + try: + mv = memoryview(obj) + except Exception: + yield self._convert_to_unicode_or_bytes_repr(repr(obj)) + return + else: + # Map bytes to Unicode codepoints with same values. + yield mv.tobytes().decode("latin-1") + return + elif self.convert_to_hex and isinstance(obj, self.int_types): + obj_repr = hex(obj) + else: + obj_repr = repr(obj) + except Exception: + try: + obj_repr = object.__repr__(obj) + except Exception: + try: + obj_repr = "" # noqa + except Exception: + obj_repr = "" + + limit = limit_inner if level > 0 else limit_outer + + if limit >= len(obj_repr): + yield self._convert_to_unicode_or_bytes_repr(obj_repr) + return + + # Slightly imprecise calculations - we may end up with a string that is + # up to 3 characters longer than limit. If you need precise formatting, + # you are using the wrong class. + left_count, right_count = max(1, int(2 * limit / 3)), max(1, int(limit / 3)) # noqa + + yield obj_repr[:left_count] + yield "..." + yield obj_repr[-right_count:] + + def _convert_to_unicode_or_bytes_repr(self, obj_repr): + return obj_repr + + def _bytes_as_unicode_if_possible(self, obj_repr): + # We try to decode with 3 possible encoding (sys.stdout.encoding, + # locale.getpreferredencoding() and 'utf-8). If no encoding can decode + # the input, we return the original bytes. + try_encodings = [] + encoding = self.sys_stdout_encoding or getattr(sys.stdout, "encoding", "") + if encoding: + try_encodings.append(encoding.lower()) + + preferred_encoding = self.locale_preferred_encoding or locale.getpreferredencoding() + if preferred_encoding: + preferred_encoding = preferred_encoding.lower() + if preferred_encoding not in try_encodings: + try_encodings.append(preferred_encoding) + + if "utf-8" not in try_encodings: + try_encodings.append("utf-8") + + for encoding in try_encodings: + try: + return obj_repr.decode(encoding) + except UnicodeDecodeError: + pass + + return obj_repr # Return the original version (in bytes) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_save_locals.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_save_locals.py new file mode 100644 index 0000000..8a02fa6 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_save_locals.py @@ -0,0 +1,130 @@ +""" +Utility for saving locals. +""" +import sys +from _pydevd_bundle.pydevd_constants import IS_PY313_OR_GREATER +from _pydev_bundle import pydev_log + +try: + import types + + frame_type = types.FrameType +except: + frame_type = type(sys._getframe()) + + +def is_save_locals_available(): + return save_locals_impl is not None + + +def save_locals(frame): + """ + Copy values from locals_dict into the fast stack slots in the given frame. + + Note: the 'save_locals' branch had a different approach wrapping the frame (much more code, but it gives ideas + on how to save things partially, not the 'whole' locals). + """ + if not isinstance(frame, frame_type): + # Fix exception when changing Django variable (receiving DjangoTemplateFrame) + return + + if save_locals_impl is not None: + try: + save_locals_impl(frame) + except: + pass + + +def make_save_locals_impl(): + """ + Factory for the 'save_locals_impl' method. This may seem like a complicated pattern but it is essential that the method is created at + module load time. Inner imports after module load time would cause an occasional debugger deadlock due to the importer lock and debugger + lock being taken in different order in different threads. + """ + try: + if "__pypy__" in sys.builtin_module_names: + import __pypy__ # @UnresolvedImport + + save_locals = __pypy__.locals_to_fast + except: + pass + else: + if "__pypy__" in sys.builtin_module_names: + + def save_locals_pypy_impl(frame): + save_locals(frame) + + return save_locals_pypy_impl + + if IS_PY313_OR_GREATER: + # No longer needed in Python 3.13 (deprecated) + # See PEP 667 + return None + + try: + import ctypes + + locals_to_fast = ctypes.pythonapi.PyFrame_LocalsToFast + except: + pass + else: + + def save_locals_ctypes_impl(frame): + locals_to_fast(ctypes.py_object(frame), ctypes.c_int(0)) + + return save_locals_ctypes_impl + + return None + + +save_locals_impl = make_save_locals_impl() + +_SENTINEL = [] # Any mutable will do. + + +def update_globals_and_locals(updated_globals, initial_globals, frame): + # We don't have the locals and passed all in globals, so, we have to + # manually choose how to update the variables. + # + # Note that the current implementation is a bit tricky: it does work in general + # but if we do something as 'some_var = 10' and 'some_var' is already defined to have + # the value '10' in the globals, we won't actually put that value in the locals + # (which means that the frame locals won't be updated). + # Still, the approach to have a single namespace was chosen because it was the only + # one that enabled creating and using variables during the same evaluation. + assert updated_globals is not None + f_locals = None + + removed = set(initial_globals).difference(updated_globals) + + for key, val in updated_globals.items(): + if val is not initial_globals.get(key, _SENTINEL): + if f_locals is None: + # Note: we call f_locals only once because each time + # we call it the values may be reset. + f_locals = frame.f_locals + + f_locals[key] = val + + if removed: + if f_locals is None: + # Note: we call f_locals only once because each time + # we call it the values may be reset. + f_locals = frame.f_locals + + for key in removed: + try: + del f_locals[key] + except Exception: + # Python 3.13.0 has issues here: + # https://github.com/python/cpython/pull/125616 + # This should be backported from the pull request + # but we still need to handle it in this version + try: + if key in f_locals: + f_locals[key] = None + except Exception as e: + pydev_log.info("Unable to remove key: %s from locals. Exception: %s", key, e) + + if f_locals is not None: + save_locals(frame) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_signature.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_signature.py new file mode 100644 index 0000000..9664364 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_signature.py @@ -0,0 +1,201 @@ +from _pydev_bundle import pydev_log + +try: + import trace +except ImportError: + pass +else: + trace._warn = lambda *args: None # workaround for http://bugs.python.org/issue17143 (PY-8706) + +import os +from _pydevd_bundle.pydevd_comm import CMD_SIGNATURE_CALL_TRACE, NetCommand +from _pydevd_bundle import pydevd_xml +from _pydevd_bundle.pydevd_utils import get_clsname_for_code + + +class Signature(object): + def __init__(self, file, name): + self.file = file + self.name = name + self.args = [] + self.args_str = [] + self.return_type = None + + def add_arg(self, name, type): + self.args.append((name, type)) + self.args_str.append("%s:%s" % (name, type)) + + def set_args(self, frame, recursive=False): + self.args = [] + + code = frame.f_code + locals = frame.f_locals + + for i in range(0, code.co_argcount): + name = code.co_varnames[i] + class_name = get_type_of_value(locals[name], recursive=recursive) + + self.add_arg(name, class_name) + + def __str__(self): + return "%s %s(%s)" % (self.file, self.name, ", ".join(self.args_str)) + + +def get_type_of_value(value, ignore_module_name=("__main__", "__builtin__", "builtins"), recursive=False): + tp = type(value) + class_name = tp.__name__ + if class_name == "instance": # old-style classes + tp = value.__class__ + class_name = tp.__name__ + + if hasattr(tp, "__module__") and tp.__module__ and tp.__module__ not in ignore_module_name: + class_name = "%s.%s" % (tp.__module__, class_name) + + if class_name == "list": + class_name = "List" + if len(value) > 0 and recursive: + class_name += "[%s]" % get_type_of_value(value[0], recursive=recursive) + return class_name + + if class_name == "dict": + class_name = "Dict" + if len(value) > 0 and recursive: + for k, v in value.items(): + class_name += "[%s, %s]" % (get_type_of_value(k, recursive=recursive), get_type_of_value(v, recursive=recursive)) + break + return class_name + + if class_name == "tuple": + class_name = "Tuple" + if len(value) > 0 and recursive: + class_name += "[" + class_name += ", ".join(get_type_of_value(v, recursive=recursive) for v in value) + class_name += "]" + + return class_name + + +def _modname(path): + """Return a plausible module name for the path""" + base = os.path.basename(path) + filename, ext = os.path.splitext(base) + return filename + + +class SignatureFactory(object): + def __init__(self): + self._caller_cache = {} + self.cache = CallSignatureCache() + + def create_signature(self, frame, filename, with_args=True): + try: + _, modulename, funcname = self.file_module_function_of(frame) + signature = Signature(filename, funcname) + if with_args: + signature.set_args(frame, recursive=True) + return signature + except: + pydev_log.exception() + + def file_module_function_of(self, frame): # this code is take from trace module and fixed to work with new-style classes + code = frame.f_code + filename = code.co_filename + if filename: + modulename = _modname(filename) + else: + modulename = None + + funcname = code.co_name + clsname = None + if code in self._caller_cache: + if self._caller_cache[code] is not None: + clsname = self._caller_cache[code] + else: + self._caller_cache[code] = None + clsname = get_clsname_for_code(code, frame) + if clsname is not None: + # cache the result - assumption is that new.* is + # not called later to disturb this relationship + # _caller_cache could be flushed if functions in + # the new module get called. + self._caller_cache[code] = clsname + + if clsname is not None: + funcname = "%s.%s" % (clsname, funcname) + + return filename, modulename, funcname + + +def get_signature_info(signature): + return signature.file, signature.name, " ".join([arg[1] for arg in signature.args]) + + +def get_frame_info(frame): + co = frame.f_code + return co.co_name, frame.f_lineno, co.co_filename + + +class CallSignatureCache(object): + def __init__(self): + self.cache = {} + + def add(self, signature): + filename, name, args_type = get_signature_info(signature) + calls_from_file = self.cache.setdefault(filename, {}) + name_calls = calls_from_file.setdefault(name, {}) + name_calls[args_type] = None + + def is_in_cache(self, signature): + filename, name, args_type = get_signature_info(signature) + if args_type in self.cache.get(filename, {}).get(name, {}): + return True + return False + + +def create_signature_message(signature): + cmdTextList = [""] + + cmdTextList.append( + '' + % (pydevd_xml.make_valid_xml_value(signature.file), pydevd_xml.make_valid_xml_value(signature.name)) + ) + + for arg in signature.args: + cmdTextList.append( + '' % (pydevd_xml.make_valid_xml_value(arg[0]), pydevd_xml.make_valid_xml_value(arg[1])) + ) + + if signature.return_type is not None: + cmdTextList.append('' % (pydevd_xml.make_valid_xml_value(signature.return_type))) + + cmdTextList.append("") + cmdText = "".join(cmdTextList) + return NetCommand(CMD_SIGNATURE_CALL_TRACE, 0, cmdText) + + +def send_signature_call_trace(dbg, frame, filename): + if dbg.signature_factory and dbg.in_project_scope(frame): + signature = dbg.signature_factory.create_signature(frame, filename) + if signature is not None: + if dbg.signature_factory.cache is not None: + if not dbg.signature_factory.cache.is_in_cache(signature): + dbg.signature_factory.cache.add(signature) + dbg.writer.add_command(create_signature_message(signature)) + return True + else: + # we don't send signature if it is cached + return False + else: + dbg.writer.add_command(create_signature_message(signature)) + return True + return False + + +def send_signature_return_trace(dbg, frame, filename, return_value): + if dbg.signature_factory and dbg.in_project_scope(frame): + signature = dbg.signature_factory.create_signature(frame, filename, with_args=False) + signature.return_type = get_type_of_value(return_value, recursive=True) + dbg.writer.add_command(create_signature_message(signature)) + return True + + return False diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_source_mapping.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_source_mapping.py new file mode 100644 index 0000000..7e75c82 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_source_mapping.py @@ -0,0 +1,152 @@ +import bisect +from _pydevd_bundle.pydevd_constants import NULL, KeyifyList +import pydevd_file_utils + + +class SourceMappingEntry(object): + __slots__ = ["source_filename", "line", "end_line", "runtime_line", "runtime_source"] + + def __init__(self, line, end_line, runtime_line, runtime_source): + assert isinstance(runtime_source, str) + + self.line = int(line) + self.end_line = int(end_line) + self.runtime_line = int(runtime_line) + self.runtime_source = runtime_source # Something as + + # Should be set after translated to server (absolute_source_filename). + # This is what's sent to the client afterwards (so, its case should not be normalized). + self.source_filename = None + + def contains_line(self, i): + return self.line <= i <= self.end_line + + def contains_runtime_line(self, i): + line_count = self.end_line + self.line + runtime_end_line = self.runtime_line + line_count + return self.runtime_line <= i <= runtime_end_line + + def __str__(self): + return "SourceMappingEntry(%s)" % (", ".join("%s=%r" % (attr, getattr(self, attr)) for attr in self.__slots__)) + + __repr__ = __str__ + + +class SourceMapping(object): + def __init__(self, on_source_mapping_changed=NULL): + self._mappings_to_server = {} # dict(normalized(file.py) to [SourceMappingEntry]) + self._mappings_to_client = {} # dict( to File.py) + self._cache = {} + self._on_source_mapping_changed = on_source_mapping_changed + + def set_source_mapping(self, absolute_filename, mapping): + """ + :param str absolute_filename: + The filename for the source mapping (bytes on py2 and str on py3). + + :param list(SourceMappingEntry) mapping: + A list with the source mapping entries to be applied to the given filename. + + :return str: + An error message if it was not possible to set the mapping or an empty string if + everything is ok. + """ + # Let's first validate if it's ok to apply that mapping. + # File mappings must be 1:N, not M:N (i.e.: if there's a mapping from file1.py to , + # there can be no other mapping from any other file to ). + # This is a limitation to make it easier to remove existing breakpoints when new breakpoints are + # set to a file (so, any file matching that breakpoint can be removed instead of needing to check + # which lines are corresponding to that file). + for map_entry in mapping: + existing_source_filename = self._mappings_to_client.get(map_entry.runtime_source) + if existing_source_filename and existing_source_filename != absolute_filename: + return "Cannot apply mapping from %s to %s (it conflicts with mapping: %s to %s)" % ( + absolute_filename, + map_entry.runtime_source, + existing_source_filename, + map_entry.runtime_source, + ) + + try: + absolute_normalized_filename = pydevd_file_utils.normcase(absolute_filename) + current_mapping = self._mappings_to_server.get(absolute_normalized_filename, []) + for map_entry in current_mapping: + del self._mappings_to_client[map_entry.runtime_source] + + self._mappings_to_server[absolute_normalized_filename] = sorted(mapping, key=lambda entry: entry.line) + + for map_entry in mapping: + self._mappings_to_client[map_entry.runtime_source] = absolute_filename + finally: + self._cache.clear() + self._on_source_mapping_changed() + return "" + + def map_to_client(self, runtime_source_filename, lineno): + key = (lineno, "client", runtime_source_filename) + try: + return self._cache[key] + except KeyError: + for _, mapping in list(self._mappings_to_server.items()): + for map_entry in mapping: + if map_entry.runtime_source == runtime_source_filename: # + if map_entry.contains_runtime_line(lineno): # matches line range + self._cache[key] = (map_entry.source_filename, map_entry.line + (lineno - map_entry.runtime_line), True) + return self._cache[key] + + self._cache[key] = (runtime_source_filename, lineno, False) # Mark that no translation happened in the cache. + return self._cache[key] + + def has_mapping_entry(self, runtime_source_filename): + """ + :param runtime_source_filename: + Something as + """ + # Note that we're not interested in the line here, just on knowing if a given filename + # (from the server) has a mapping for it. + key = ("has_entry", runtime_source_filename) + try: + return self._cache[key] + except KeyError: + for _absolute_normalized_filename, mapping in list(self._mappings_to_server.items()): + for map_entry in mapping: + if map_entry.runtime_source == runtime_source_filename: + self._cache[key] = True + return self._cache[key] + + self._cache[key] = False + return self._cache[key] + + def map_to_server(self, absolute_filename, lineno): + """ + Convert something as 'file1.py' at line 10 to '' at line 2. + + Note that the name should be already normalized at this point. + """ + absolute_normalized_filename = pydevd_file_utils.normcase(absolute_filename) + + changed = False + mappings = self._mappings_to_server.get(absolute_normalized_filename) + if mappings: + i = bisect.bisect(KeyifyList(mappings, lambda entry: entry.line), lineno) + if i >= len(mappings): + i -= 1 + + if i == 0: + entry = mappings[i] + + else: + entry = mappings[i - 1] + + if not entry.contains_line(lineno): + entry = mappings[i] + if not entry.contains_line(lineno): + entry = None + + if entry is not None: + lineno = entry.runtime_line + (lineno - entry.line) + + absolute_filename = entry.runtime_source + changed = True + + return absolute_filename, lineno, changed diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_stackless.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_stackless.py new file mode 100644 index 0000000..ba574e9 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_stackless.py @@ -0,0 +1,412 @@ +from __future__ import nested_scopes + +import weakref +import sys + +from _pydevd_bundle.pydevd_comm import get_global_debugger +from _pydevd_bundle.pydevd_constants import call_only_once +from _pydev_bundle._pydev_saved_modules import threading +from _pydevd_bundle.pydevd_custom_frames import update_custom_frame, remove_custom_frame, add_custom_frame +import stackless # @UnresolvedImport +from _pydev_bundle import pydev_log + + +# Used so that we don't loose the id (because we'll remove when it's not alive and would generate a new id for the +# same tasklet). +class TaskletToLastId: + """ + So, why not a WeakKeyDictionary? + The problem is that removals from the WeakKeyDictionary will create a new tasklet (as it adds a callback to + remove the key when it's garbage-collected), so, we can get into a recursion. + """ + + def __init__(self): + self.tasklet_ref_to_last_id = {} + self._i = 0 + + def get(self, tasklet): + return self.tasklet_ref_to_last_id.get(weakref.ref(tasklet)) + + def __setitem__(self, tasklet, last_id): + self.tasklet_ref_to_last_id[weakref.ref(tasklet)] = last_id + self._i += 1 + if self._i % 100 == 0: # Collect at each 100 additions to the dict (no need to rush). + for tasklet_ref in list(self.tasklet_ref_to_last_id.keys()): + if tasklet_ref() is None: + del self.tasklet_ref_to_last_id[tasklet_ref] + + +_tasklet_to_last_id = TaskletToLastId() + + +# ======================================================================================================================= +# _TaskletInfo +# ======================================================================================================================= +class _TaskletInfo: + _last_id = 0 + + def __init__(self, tasklet_weakref, tasklet): + self.frame_id = None + self.tasklet_weakref = tasklet_weakref + + last_id = _tasklet_to_last_id.get(tasklet) + if last_id is None: + _TaskletInfo._last_id += 1 + last_id = _TaskletInfo._last_id + _tasklet_to_last_id[tasklet] = last_id + + self._tasklet_id = last_id + + self.update_name() + + def update_name(self): + tasklet = self.tasklet_weakref() + if tasklet: + if tasklet.blocked: + state = "blocked" + elif tasklet.paused: + state = "paused" + elif tasklet.scheduled: + state = "scheduled" + else: + state = "" + + try: + name = tasklet.name + except AttributeError: + if tasklet.is_main: + name = "MainTasklet" + else: + name = "Tasklet-%s" % (self._tasklet_id,) + + thread_id = tasklet.thread_id + if thread_id != -1: + for thread in threading.enumerate(): + if thread.ident == thread_id: + if thread.name: + thread_name = "of %s" % (thread.name,) + else: + thread_name = "of Thread-%s" % (thread.name or str(thread_id),) + break + else: + # should not happen. + thread_name = "of Thread-%s" % (str(thread_id),) + thread = None + else: + # tasklet is no longer bound to a thread, because its thread ended + thread_name = "without thread" + + tid = id(tasklet) + tasklet = None + else: + state = "dead" + name = "Tasklet-%s" % (self._tasklet_id,) + thread_name = "" + tid = "-" + self.tasklet_name = "%s %s %s (%s)" % (state, name, thread_name, tid) + + if not hasattr(stackless.tasklet, "trace_function"): + # bug https://bitbucket.org/stackless-dev/stackless/issue/42 + # is not fixed. Stackless releases before 2014 + def update_name(self): + tasklet = self.tasklet_weakref() + if tasklet: + try: + name = tasklet.name + except AttributeError: + if tasklet.is_main: + name = "MainTasklet" + else: + name = "Tasklet-%s" % (self._tasklet_id,) + + thread_id = tasklet.thread_id + for thread in threading.enumerate(): + if thread.ident == thread_id: + if thread.name: + thread_name = "of %s" % (thread.name,) + else: + thread_name = "of Thread-%s" % (thread.name or str(thread_id),) + break + else: + # should not happen. + thread_name = "of Thread-%s" % (str(thread_id),) + thread = None + + tid = id(tasklet) + tasklet = None + else: + name = "Tasklet-%s" % (self._tasklet_id,) + thread_name = "" + tid = "-" + self.tasklet_name = "%s %s (%s)" % (name, thread_name, tid) + + +_weak_tasklet_registered_to_info = {} + + +# ======================================================================================================================= +# get_tasklet_info +# ======================================================================================================================= +def get_tasklet_info(tasklet): + return register_tasklet_info(tasklet) + + +# ======================================================================================================================= +# register_tasklet_info +# ======================================================================================================================= +def register_tasklet_info(tasklet): + r = weakref.ref(tasklet) + info = _weak_tasklet_registered_to_info.get(r) + if info is None: + info = _weak_tasklet_registered_to_info[r] = _TaskletInfo(r, tasklet) + + return info + + +_application_set_schedule_callback = None + + +# ======================================================================================================================= +# _schedule_callback +# ======================================================================================================================= +def _schedule_callback(prev, next): + """ + Called when a context is stopped or a new context is made runnable. + """ + try: + if not prev and not next: + return + + current_frame = sys._getframe() + + if next: + register_tasklet_info(next) + + # Ok, making next runnable: set the tracing facility in it. + debugger = get_global_debugger() + if debugger is not None: + next.trace_function = debugger.get_thread_local_trace_func() + frame = next.frame + if frame is current_frame: + frame = frame.f_back + if hasattr(frame, "f_trace"): # Note: can be None (but hasattr should cover for that too). + frame.f_trace = debugger.get_thread_local_trace_func() + + debugger = None + + if prev: + register_tasklet_info(prev) + + try: + for tasklet_ref, tasklet_info in list(_weak_tasklet_registered_to_info.items()): # Make sure it's a copy! + tasklet = tasklet_ref() + if tasklet is None or not tasklet.alive: + # Garbage-collected already! + try: + del _weak_tasklet_registered_to_info[tasklet_ref] + except KeyError: + pass + if tasklet_info.frame_id is not None: + remove_custom_frame(tasklet_info.frame_id) + else: + is_running = stackless.get_thread_info(tasklet.thread_id)[1] is tasklet + if tasklet is prev or (tasklet is not next and not is_running): + # the tasklet won't run after this scheduler action: + # - the tasklet is the previous tasklet + # - it is not the next tasklet and it is not an already running tasklet + frame = tasklet.frame + if frame is current_frame: + frame = frame.f_back + if frame is not None: + # print >>sys.stderr, "SchedCB: %r, %d, '%s', '%s'" % (tasklet, frame.f_lineno, _filename, base) + debugger = get_global_debugger() + if debugger is not None and debugger.get_file_type(frame) is None: + tasklet_info.update_name() + if tasklet_info.frame_id is None: + tasklet_info.frame_id = add_custom_frame(frame, tasklet_info.tasklet_name, tasklet.thread_id) + else: + update_custom_frame(tasklet_info.frame_id, frame, tasklet.thread_id, name=tasklet_info.tasklet_name) + debugger = None + + elif tasklet is next or is_running: + if tasklet_info.frame_id is not None: + # Remove info about stackless suspended when it starts to run. + remove_custom_frame(tasklet_info.frame_id) + tasklet_info.frame_id = None + + finally: + tasklet = None + tasklet_info = None + frame = None + + except: + pydev_log.exception() + + if _application_set_schedule_callback is not None: + return _application_set_schedule_callback(prev, next) + + +if not hasattr(stackless.tasklet, "trace_function"): + # Older versions of Stackless, released before 2014 + # This code does not work reliable! It is affected by several + # stackless bugs: Stackless issues #44, #42, #40 + def _schedule_callback(prev, next): + """ + Called when a context is stopped or a new context is made runnable. + """ + try: + if not prev and not next: + return + + if next: + register_tasklet_info(next) + + # Ok, making next runnable: set the tracing facility in it. + debugger = get_global_debugger() + if debugger is not None and next.frame: + if hasattr(next.frame, "f_trace"): + next.frame.f_trace = debugger.get_thread_local_trace_func() + debugger = None + + if prev: + register_tasklet_info(prev) + + try: + for tasklet_ref, tasklet_info in list(_weak_tasklet_registered_to_info.items()): # Make sure it's a copy! + tasklet = tasklet_ref() + if tasklet is None or not tasklet.alive: + # Garbage-collected already! + try: + del _weak_tasklet_registered_to_info[tasklet_ref] + except KeyError: + pass + if tasklet_info.frame_id is not None: + remove_custom_frame(tasklet_info.frame_id) + else: + if tasklet.paused or tasklet.blocked or tasklet.scheduled: + if tasklet.frame and tasklet.frame.f_back: + f_back = tasklet.frame.f_back + debugger = get_global_debugger() + if debugger is not None and debugger.get_file_type(f_back) is None: + if tasklet_info.frame_id is None: + tasklet_info.frame_id = add_custom_frame(f_back, tasklet_info.tasklet_name, tasklet.thread_id) + else: + update_custom_frame(tasklet_info.frame_id, f_back, tasklet.thread_id) + debugger = None + + elif tasklet.is_current: + if tasklet_info.frame_id is not None: + # Remove info about stackless suspended when it starts to run. + remove_custom_frame(tasklet_info.frame_id) + tasklet_info.frame_id = None + + finally: + tasklet = None + tasklet_info = None + f_back = None + + except: + pydev_log.exception() + + if _application_set_schedule_callback is not None: + return _application_set_schedule_callback(prev, next) + + _original_setup = stackless.tasklet.setup + + # ======================================================================================================================= + # setup + # ======================================================================================================================= + def setup(self, *args, **kwargs): + """ + Called to run a new tasklet: rebind the creation so that we can trace it. + """ + + f = self.tempval + + def new_f(old_f, args, kwargs): + debugger = get_global_debugger() + if debugger is not None: + debugger.enable_tracing() + + debugger = None + + # Remove our own traces :) + self.tempval = old_f + register_tasklet_info(self) + + # Hover old_f to see the stackless being created and *args and **kwargs to see its parameters. + return old_f(*args, **kwargs) + + # This is the way to tell stackless that the function it should execute is our function, not the original one. Note: + # setting tempval is the same as calling bind(new_f), but it seems that there's no other way to get the currently + # bound function, so, keeping on using tempval instead of calling bind (which is actually the same thing in a better + # API). + + self.tempval = new_f + + return _original_setup(self, f, args, kwargs) + + # ======================================================================================================================= + # __call__ + # ======================================================================================================================= + def __call__(self, *args, **kwargs): + """ + Called to run a new tasklet: rebind the creation so that we can trace it. + """ + + return setup(self, *args, **kwargs) + + _original_run = stackless.run + + # ======================================================================================================================= + # run + # ======================================================================================================================= + def run(*args, **kwargs): + debugger = get_global_debugger() + if debugger is not None: + debugger.enable_tracing() + debugger = None + + return _original_run(*args, **kwargs) + + +# ======================================================================================================================= +# patch_stackless +# ======================================================================================================================= +def patch_stackless(): + """ + This function should be called to patch the stackless module so that new tasklets are properly tracked in the + debugger. + """ + global _application_set_schedule_callback + _application_set_schedule_callback = stackless.set_schedule_callback(_schedule_callback) + + def set_schedule_callback(callable): + global _application_set_schedule_callback + old = _application_set_schedule_callback + _application_set_schedule_callback = callable + return old + + def get_schedule_callback(): + global _application_set_schedule_callback + return _application_set_schedule_callback + + set_schedule_callback.__doc__ = stackless.set_schedule_callback.__doc__ + if hasattr(stackless, "get_schedule_callback"): + get_schedule_callback.__doc__ = stackless.get_schedule_callback.__doc__ + stackless.set_schedule_callback = set_schedule_callback + stackless.get_schedule_callback = get_schedule_callback + + if not hasattr(stackless.tasklet, "trace_function"): + # Older versions of Stackless, released before 2014 + __call__.__doc__ = stackless.tasklet.__call__.__doc__ + stackless.tasklet.__call__ = __call__ + + setup.__doc__ = stackless.tasklet.setup.__doc__ + stackless.tasklet.setup = setup + + run.__doc__ = stackless.run.__doc__ + stackless.run = run + + +patch_stackless = call_only_once(patch_stackless) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py new file mode 100644 index 0000000..b828232 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py @@ -0,0 +1,544 @@ +from contextlib import contextmanager +import sys + +from _pydevd_bundle.pydevd_constants import get_frame, RETURN_VALUES_DICT, ForkSafeLock, GENERATED_LEN_ATTR_NAME, silence_warnings_decorator +from _pydevd_bundle.pydevd_xml import get_variable_details, get_type +from _pydev_bundle.pydev_override import overrides +from _pydevd_bundle.pydevd_resolver import sorted_attributes_key, TOO_LARGE_ATTR, get_var_scope +from _pydevd_bundle.pydevd_safe_repr import SafeRepr +from _pydev_bundle import pydev_log +from _pydevd_bundle import pydevd_vars +from _pydev_bundle.pydev_imports import Exec +from _pydevd_bundle.pydevd_frame_utils import FramesList +from _pydevd_bundle.pydevd_utils import ScopeRequest, DAPGrouper, Timer +from typing import Optional + + +class _AbstractVariable(object): + # Default attributes in class, set in instance. + + name = None + value = None + evaluate_name = None + + def __init__(self, py_db): + assert py_db is not None + self.py_db = py_db + + def get_name(self): + return self.name + + def get_value(self): + return self.value + + def get_variable_reference(self): + return id(self.value) + + def get_var_data(self, fmt: Optional[dict] = None, context: Optional[str] = None, **safe_repr_custom_attrs): + """ + :param dict fmt: + Format expected by the DAP (keys: 'hex': bool, 'rawString': bool) + + :param context: + This is the context in which the variable is being requested. Valid values: + "watch", + "repl", + "hover", + "clipboard" + """ + timer = Timer() + safe_repr = SafeRepr() + if fmt is not None: + safe_repr.convert_to_hex = fmt.get("hex", False) + safe_repr.raw_value = fmt.get("rawString", False) + for key, val in safe_repr_custom_attrs.items(): + setattr(safe_repr, key, val) + + type_name, _type_qualifier, _is_exception_on_eval, resolver, value = get_variable_details( + self.value, to_string=safe_repr, context=context + ) + + is_raw_string = type_name in ("str", "bytes", "bytearray") + + attributes = [] + + if is_raw_string: + attributes.append("rawString") + + name = self.name + + if self._is_return_value: + attributes.append("readOnly") + name = "(return) %s" % (name,) + + elif name in (TOO_LARGE_ATTR, GENERATED_LEN_ATTR_NAME): + attributes.append("readOnly") + + try: + if self.value.__class__ == DAPGrouper: + type_name = "" + except: + pass # Ignore errors accessing __class__. + + var_data = { + "name": name, + "value": value, + "type": type_name, + } + + if self.evaluate_name is not None: + var_data["evaluateName"] = self.evaluate_name + + if resolver is not None: # I.e.: it's a container + var_data["variablesReference"] = self.get_variable_reference() + else: + var_data["variablesReference"] = 0 # It's mandatory (although if == 0 it doesn't have children). + + if len(attributes) > 0: + var_data["presentationHint"] = {"attributes": attributes} + + timer.report_if_compute_repr_attr_slow("", name, type_name) + return var_data + + def get_children_variables(self, fmt=None, scope=None): + raise NotImplementedError() + + def get_child_variable_named(self, name, fmt=None, scope=None): + for child_var in self.get_children_variables(fmt=fmt, scope=scope): + if child_var.get_name() == name: + return child_var + return None + + def _group_entries(self, lst, handle_return_values): + scope_to_grouper = {} + + group_entries = [] + if isinstance(self.value, DAPGrouper): + new_lst = lst + else: + new_lst = [] + get_presentation = self.py_db.variable_presentation.get_presentation + # Now that we have the contents, group items. + for attr_name, attr_value, evaluate_name in lst: + scope = get_var_scope(attr_name, attr_value, evaluate_name, handle_return_values) + + entry = (attr_name, attr_value, evaluate_name) + if scope: + presentation = get_presentation(scope) + if presentation == "hide": + continue + + elif presentation == "inline": + new_lst.append(entry) + + else: # group + if scope not in scope_to_grouper: + grouper = DAPGrouper(scope) + scope_to_grouper[scope] = grouper + else: + grouper = scope_to_grouper[scope] + + grouper.contents_debug_adapter_protocol.append(entry) + + else: + new_lst.append(entry) + + for scope in DAPGrouper.SCOPES_SORTED: + grouper = scope_to_grouper.get(scope) + if grouper is not None: + group_entries.append((scope, grouper, None)) + + return new_lst, group_entries + + +class _ObjectVariable(_AbstractVariable): + def __init__(self, py_db, name, value, register_variable, is_return_value=False, evaluate_name=None, frame=None): + _AbstractVariable.__init__(self, py_db) + self.frame = frame + self.name = name + self.value = value + self._register_variable = register_variable + self._register_variable(self) + self._is_return_value = is_return_value + self.evaluate_name = evaluate_name + + @silence_warnings_decorator + @overrides(_AbstractVariable.get_children_variables) + def get_children_variables(self, fmt=None, scope=None): + _type, _type_name, resolver = get_type(self.value) + + children_variables = [] + if resolver is not None: # i.e.: it's a container. + if hasattr(resolver, "get_contents_debug_adapter_protocol"): + # The get_contents_debug_adapter_protocol needs to return sorted. + lst = resolver.get_contents_debug_adapter_protocol(self.value, fmt=fmt) + else: + # If there's no special implementation, the default is sorting the keys. + dct = resolver.get_dictionary(self.value) + lst = sorted(dct.items(), key=lambda tup: sorted_attributes_key(tup[0])) + # No evaluate name in this case. + lst = [(key, value, None) for (key, value) in lst] + + lst, group_entries = self._group_entries(lst, handle_return_values=False) + if group_entries: + lst = group_entries + lst + parent_evaluate_name = self.evaluate_name + if parent_evaluate_name: + for key, val, evaluate_name in lst: + if evaluate_name is not None: + if callable(evaluate_name): + evaluate_name = evaluate_name(parent_evaluate_name) + else: + evaluate_name = parent_evaluate_name + evaluate_name + variable = _ObjectVariable(self.py_db, key, val, self._register_variable, evaluate_name=evaluate_name, frame=self.frame) + children_variables.append(variable) + else: + for key, val, evaluate_name in lst: + # No evaluate name + variable = _ObjectVariable(self.py_db, key, val, self._register_variable, frame=self.frame) + children_variables.append(variable) + + return children_variables + + def change_variable(self, name, value, py_db, fmt=None): + children_variable = self.get_child_variable_named(name) + if children_variable is None: + return None + + var_data = children_variable.get_var_data() + evaluate_name = var_data.get("evaluateName") + + if not evaluate_name: + # Note: right now we only pass control to the resolver in the cases where + # there's no evaluate name (the idea being that if we can evaluate it, + # we can use that evaluation to set the value too -- if in the future + # a case where this isn't true is found this logic may need to be changed). + _type, _type_name, container_resolver = get_type(self.value) + if hasattr(container_resolver, "change_var_from_name"): + try: + new_value = eval(value) + except: + return None + new_key = container_resolver.change_var_from_name(self.value, name, new_value) + if new_key is not None: + return _ObjectVariable(self.py_db, new_key, new_value, self._register_variable, evaluate_name=None, frame=self.frame) + + return None + else: + return None + + frame = self.frame + if frame is None: + return None + + try: + # This handles the simple cases (such as dict, list, object) + Exec("%s=%s" % (evaluate_name, value), frame.f_globals, frame.f_locals) + except: + return None + + return self.get_child_variable_named(name, fmt=fmt) + + +def sorted_variables_key(obj): + return sorted_attributes_key(obj.name) + + +class _FrameVariable(_AbstractVariable): + def __init__(self, py_db, frame, register_variable): + _AbstractVariable.__init__(self, py_db) + self.frame = frame + + self.name = self.frame.f_code.co_name + self.value = frame + + self._register_variable = register_variable + self._register_variable(self) + + def change_variable(self, name, value, py_db, fmt=None): + frame = self.frame + + pydevd_vars.change_attr_expression(frame, name, value, py_db) + + return self.get_child_variable_named(name, fmt=fmt) + + @silence_warnings_decorator + @overrides(_AbstractVariable.get_children_variables) + def get_children_variables(self, fmt=None, scope=None): + children_variables = [] + if scope is not None: + assert isinstance(scope, ScopeRequest) + scope = scope.scope + + if scope in ("locals", None): + dct = self.frame.f_locals + elif scope == "globals": + dct = self.frame.f_globals + else: + raise AssertionError("Unexpected scope: %s" % (scope,)) + + lst, group_entries = self._group_entries( + [(x[0], x[1], None) for x in list(dct.items()) if x[0] != "_pydev_stop_at_break"], handle_return_values=True + ) + group_variables = [] + + for key, val, _ in group_entries: + # Make sure that the contents in the group are also sorted. + val.contents_debug_adapter_protocol.sort(key=lambda v: sorted_attributes_key(v[0])) + variable = _ObjectVariable(self.py_db, key, val, self._register_variable, False, key, frame=self.frame) + group_variables.append(variable) + + for key, val, _ in lst: + is_return_value = key == RETURN_VALUES_DICT + if is_return_value: + for return_key, return_value in val.items(): + variable = _ObjectVariable( + self.py_db, + return_key, + return_value, + self._register_variable, + is_return_value, + "%s[%r]" % (key, return_key), + frame=self.frame, + ) + children_variables.append(variable) + else: + variable = _ObjectVariable(self.py_db, key, val, self._register_variable, is_return_value, key, frame=self.frame) + children_variables.append(variable) + + # Frame variables always sorted. + children_variables.sort(key=sorted_variables_key) + if group_variables: + # Groups have priority over other variables. + children_variables = group_variables + children_variables + + return children_variables + + +class _FramesTracker(object): + """ + This is a helper class to be used to track frames when a thread becomes suspended. + """ + + def __init__(self, suspended_frames_manager, py_db): + self._suspended_frames_manager = suspended_frames_manager + self.py_db = py_db + self._frame_id_to_frame = {} + + # Note that a given frame may appear in multiple threads when we have custom + # frames added, but as those are coroutines, this map will point to the actual + # main thread (which is the one that needs to be suspended for us to get the + # variables). + self._frame_id_to_main_thread_id = {} + + # A map of the suspended thread id -> list(frames ids) -- note that + # frame ids are kept in order (the first one is the suspended frame). + self._thread_id_to_frame_ids = {} + + self._thread_id_to_frames_list = {} + + # The main suspended thread (if this is a coroutine this isn't the id of the + # coroutine thread, it's the id of the actual suspended thread). + self._main_thread_id = None + + # Helper to know if it was already untracked. + self._untracked = False + + # We need to be thread-safe! + self._lock = ForkSafeLock(rlock=True) + + self._variable_reference_to_variable = {} + + def _register_variable(self, variable): + variable_reference = variable.get_variable_reference() + self._variable_reference_to_variable[variable_reference] = variable + + def obtain_as_variable(self, name, value, evaluate_name=None, frame=None): + if evaluate_name is None: + evaluate_name = name + + variable_reference = id(value) + variable = self._variable_reference_to_variable.get(variable_reference) + if variable is not None: + return variable + + # Still not created, let's do it now. + return _ObjectVariable( + self.py_db, name, value, self._register_variable, is_return_value=False, evaluate_name=evaluate_name, frame=frame + ) + + def get_main_thread_id(self): + return self._main_thread_id + + def get_variable(self, variable_reference): + return self._variable_reference_to_variable[variable_reference] + + def track(self, thread_id, frames_list, frame_custom_thread_id=None): + """ + :param thread_id: + The thread id to be used for this frame. + + :param FramesList frames_list: + A list of frames to be tracked (the first is the topmost frame which is suspended at the given thread). + + :param frame_custom_thread_id: + If None this this is the id of the thread id for the custom frame (i.e.: coroutine). + """ + assert frames_list.__class__ == FramesList + with self._lock: + coroutine_or_main_thread_id = frame_custom_thread_id or thread_id + + if coroutine_or_main_thread_id in self._suspended_frames_manager._thread_id_to_tracker: + sys.stderr.write("pydevd: Something is wrong. Tracker being added twice to the same thread id.\n") + + self._suspended_frames_manager._thread_id_to_tracker[coroutine_or_main_thread_id] = self + self._main_thread_id = thread_id + + frame_ids_from_thread = self._thread_id_to_frame_ids.setdefault(coroutine_or_main_thread_id, []) + + self._thread_id_to_frames_list[coroutine_or_main_thread_id] = frames_list + for frame in frames_list: + frame_id = id(frame) + self._frame_id_to_frame[frame_id] = frame + _FrameVariable(self.py_db, frame, self._register_variable) # Instancing is enough to register. + self._suspended_frames_manager._variable_reference_to_frames_tracker[frame_id] = self + frame_ids_from_thread.append(frame_id) + + self._frame_id_to_main_thread_id[frame_id] = thread_id + + frame = None + + def untrack_all(self): + with self._lock: + if self._untracked: + # Calling multiple times is expected for the set next statement. + return + self._untracked = True + for thread_id in self._thread_id_to_frame_ids: + self._suspended_frames_manager._thread_id_to_tracker.pop(thread_id, None) + + for frame_id in self._frame_id_to_frame: + del self._suspended_frames_manager._variable_reference_to_frames_tracker[frame_id] + + self._frame_id_to_frame.clear() + self._frame_id_to_main_thread_id.clear() + self._thread_id_to_frame_ids.clear() + self._thread_id_to_frames_list.clear() + self._main_thread_id = None + self._suspended_frames_manager = None + self._variable_reference_to_variable.clear() + + def get_frames_list(self, thread_id): + with self._lock: + return self._thread_id_to_frames_list.get(thread_id) + + def find_frame(self, thread_id, frame_id): + with self._lock: + return self._frame_id_to_frame.get(frame_id) + + def create_thread_suspend_command(self, thread_id, stop_reason, message, trace_suspend_type, thread, additional_info): + with self._lock: + # First one is topmost frame suspended. + frames_list = self._thread_id_to_frames_list[thread_id] + + cmd = self.py_db.cmd_factory.make_thread_suspend_message( + self.py_db, thread_id, frames_list, stop_reason, message, trace_suspend_type, thread, additional_info + ) + + frames_list = None + return cmd + + +class SuspendedFramesManager(object): + def __init__(self): + self._thread_id_to_fake_frames = {} + self._thread_id_to_tracker = {} + + # Mappings + self._variable_reference_to_frames_tracker = {} + + def _get_tracker_for_variable_reference(self, variable_reference): + tracker = self._variable_reference_to_frames_tracker.get(variable_reference) + if tracker is not None: + return tracker + + for _thread_id, tracker in self._thread_id_to_tracker.items(): + try: + tracker.get_variable(variable_reference) + except KeyError: + pass + else: + return tracker + + return None + + def get_thread_id_for_variable_reference(self, variable_reference): + """ + We can't evaluate variable references values on any thread, only in the suspended + thread (the main reason for this is that in UI frameworks inspecting a UI object + from a different thread can potentially crash the application). + + :param int variable_reference: + The variable reference (can be either a frame id or a reference to a previously + gotten variable). + + :return str: + The thread id for the thread to be used to inspect the given variable reference or + None if the thread was already resumed. + """ + frames_tracker = self._get_tracker_for_variable_reference(variable_reference) + if frames_tracker is not None: + return frames_tracker.get_main_thread_id() + return None + + def get_frame_tracker(self, thread_id): + return self._thread_id_to_tracker.get(thread_id) + + def get_variable(self, variable_reference): + """ + :raises KeyError + """ + frames_tracker = self._get_tracker_for_variable_reference(variable_reference) + if frames_tracker is None: + raise KeyError() + return frames_tracker.get_variable(variable_reference) + + def get_frames_list(self, thread_id): + tracker = self._thread_id_to_tracker.get(thread_id) + if tracker is None: + return None + return tracker.get_frames_list(thread_id) + + @contextmanager + def track_frames(self, py_db): + tracker = _FramesTracker(self, py_db) + try: + yield tracker + finally: + tracker.untrack_all() + + def add_fake_frame(self, thread_id, frame_id, frame): + self._thread_id_to_fake_frames.setdefault(thread_id, {})[int(frame_id)] = frame + + def find_frame(self, thread_id, frame_id): + try: + if frame_id == "*": + return get_frame() # any frame is specified with "*" + frame_id = int(frame_id) + + fake_frames = self._thread_id_to_fake_frames.get(thread_id) + if fake_frames is not None: + frame = fake_frames.get(frame_id) + if frame is not None: + return frame + + frames_tracker = self._thread_id_to_tracker.get(thread_id) + if frames_tracker is not None: + frame = frames_tracker.find_frame(thread_id, frame_id) + if frame is not None: + return frame + + return None + except: + pydev_log.exception() + return None diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py new file mode 100644 index 0000000..2d205c1 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py @@ -0,0 +1,106 @@ +from _pydevd_bundle import pydevd_utils +from _pydevd_bundle.pydevd_additional_thread_info import set_additional_thread_info +from _pydevd_bundle.pydevd_comm_constants import CMD_STEP_INTO, CMD_THREAD_SUSPEND +from _pydevd_bundle.pydevd_constants import PYTHON_SUSPEND, STATE_SUSPEND, get_thread_id, STATE_RUN, PYDEVD_USE_SYS_MONITORING +from _pydev_bundle._pydev_saved_modules import threading +from _pydev_bundle import pydev_log +import sys +from _pydevd_sys_monitoring import pydevd_sys_monitoring + + +def pydevd_find_thread_by_id(thread_id): + try: + threads = threading.enumerate() + for i in threads: + tid = get_thread_id(i) + if thread_id == tid or thread_id.endswith("|" + tid): + return i + + # This can happen when a request comes for a thread which was previously removed. + pydev_log.info("Could not find thread %s.", thread_id) + pydev_log.info("Available: %s.", ([get_thread_id(t) for t in threads],)) + except: + pydev_log.exception() + + return None + + +def mark_thread_suspended(thread, stop_reason: int, original_step_cmd: int = -1): + info = set_additional_thread_info(thread) + info.suspend_type = PYTHON_SUSPEND + if original_step_cmd != -1: + stop_reason = original_step_cmd + thread.stop_reason = stop_reason + + # Note: don't set the 'pydev_original_step_cmd' here if unset. + + if info.pydev_step_cmd == -1: + # If the step command is not specified, set it to step into + # to make sure it'll break as soon as possible. + info.pydev_step_cmd = CMD_STEP_INTO + info.pydev_step_stop = None + + # Mark as suspended as the last thing. + info.pydev_state = STATE_SUSPEND + info.update_stepping_info() + return info + + +def internal_run_thread(thread, set_additional_thread_info): + info = set_additional_thread_info(thread) + info.pydev_original_step_cmd = -1 + info.pydev_step_cmd = -1 + info.pydev_step_stop = None + info.pydev_state = STATE_RUN + info.update_stepping_info() + + +def resume_threads(thread_id, except_thread=None): + pydev_log.info("Resuming threads: %s (except thread: %s)", thread_id, except_thread) + threads = [] + if thread_id == "*": + threads = pydevd_utils.get_non_pydevd_threads() + + elif thread_id.startswith("__frame__:"): + pydev_log.critical("Can't make tasklet run: %s", thread_id) + + else: + threads = [pydevd_find_thread_by_id(thread_id)] + + for t in threads: + if t is None or t is except_thread: + pydev_log.info("Skipped resuming thread: %s", t) + continue + + internal_run_thread(t, set_additional_thread_info=set_additional_thread_info) + + +def suspend_all_threads(py_db, except_thread): + """ + Suspend all except the one passed as a parameter. + :param except_thread: + """ + if PYDEVD_USE_SYS_MONITORING: + pydevd_sys_monitoring.update_monitor_events(suspend_requested=True) + + pydev_log.info("Suspending all threads except: %s", except_thread) + all_threads = pydevd_utils.get_non_pydevd_threads() + for t in all_threads: + if getattr(t, "pydev_do_not_trace", None): + pass # skip some other threads, i.e. ipython history saving thread from debug console + else: + if t is except_thread: + continue + info = mark_thread_suspended(t, CMD_THREAD_SUSPEND) + frame = info.get_topmost_frame(t) + + # Reset the tracing as in this case as it could've set scopes to be untraced. + if frame is not None: + try: + py_db.set_trace_for_frame_and_parents(t.ident, frame) + finally: + frame = None + + if PYDEVD_USE_SYS_MONITORING: + # After suspending the frames we need the monitoring to be reset. + pydevd_sys_monitoring.restart_events() diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py new file mode 100644 index 0000000..e9c30bc --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py @@ -0,0 +1,237 @@ +from _pydev_bundle._pydev_saved_modules import ThreadingEvent, ThreadingLock, threading_current_thread +from _pydevd_bundle.pydevd_daemon_thread import PyDBDaemonThread +from _pydevd_bundle.pydevd_constants import thread_get_ident, IS_CPYTHON, NULL +import ctypes +import time +from _pydev_bundle import pydev_log +import weakref +from _pydevd_bundle.pydevd_utils import is_current_thread_main_thread +from _pydevd_bundle import pydevd_utils + +_DEBUG = False # Default should be False as this can be very verbose. + + +class _TimeoutThread(PyDBDaemonThread): + """ + The idea in this class is that it should be usually stopped waiting + for the next event to be called (paused in a threading.Event.wait). + + When a new handle is added it sets the event so that it processes the handles and + then keeps on waiting as needed again. + + This is done so that it's a bit more optimized than creating many Timer threads. + """ + + def __init__(self, py_db): + PyDBDaemonThread.__init__(self, py_db) + self._event = ThreadingEvent() + self._handles = [] + + # We could probably do things valid without this lock so that it's possible to add + # handles while processing, but the implementation would also be harder to follow, + # so, for now, we're either processing or adding handles, not both at the same time. + self._lock = ThreadingLock() + + def _on_run(self): + wait_time = None + while not self._kill_received: + if _DEBUG: + if wait_time is None: + pydev_log.critical("pydevd_timeout: Wait until a new handle is added.") + else: + pydev_log.critical("pydevd_timeout: Next wait time: %s.", wait_time) + self._event.wait(wait_time) + + if self._kill_received: + self._handles = [] + return + + wait_time = self.process_handles() + + def process_handles(self): + """ + :return int: + Returns the time we should be waiting for to process the next event properly. + """ + with self._lock: + if _DEBUG: + pydev_log.critical("pydevd_timeout: Processing handles") + self._event.clear() + handles = self._handles + new_handles = self._handles = [] + + # Do all the processing based on this time (we want to consider snapshots + # of processing time -- anything not processed now may be processed at the + # next snapshot). + curtime = time.time() + + min_handle_timeout = None + + for handle in handles: + if curtime < handle.abs_timeout and not handle.disposed: + # It still didn't time out. + if _DEBUG: + pydev_log.critical("pydevd_timeout: Handle NOT processed: %s", handle) + new_handles.append(handle) + if min_handle_timeout is None: + min_handle_timeout = handle.abs_timeout + + elif handle.abs_timeout < min_handle_timeout: + min_handle_timeout = handle.abs_timeout + + else: + if _DEBUG: + pydev_log.critical("pydevd_timeout: Handle processed: %s", handle) + # Timed out (or disposed), so, let's execute it (should be no-op if disposed). + handle.exec_on_timeout() + + if min_handle_timeout is None: + return None + else: + timeout = min_handle_timeout - curtime + if timeout <= 0: + pydev_log.critical("pydevd_timeout: Expected timeout to be > 0. Found: %s", timeout) + + return timeout + + def do_kill_pydev_thread(self): + PyDBDaemonThread.do_kill_pydev_thread(self) + with self._lock: + self._event.set() + + def add_on_timeout_handle(self, handle): + with self._lock: + self._handles.append(handle) + self._event.set() + + +class _OnTimeoutHandle(object): + def __init__(self, tracker, abs_timeout, on_timeout, kwargs): + self._str = "_OnTimeoutHandle(%s)" % (on_timeout,) + + self._tracker = weakref.ref(tracker) + self.abs_timeout = abs_timeout + self.on_timeout = on_timeout + if kwargs is None: + kwargs = {} + self.kwargs = kwargs + self.disposed = False + + def exec_on_timeout(self): + # Note: lock should already be obtained when executing this function. + kwargs = self.kwargs + on_timeout = self.on_timeout + + if not self.disposed: + self.disposed = True + self.kwargs = None + self.on_timeout = None + + try: + if _DEBUG: + pydev_log.critical("pydevd_timeout: Calling on timeout: %s with kwargs: %s", on_timeout, kwargs) + + on_timeout(**kwargs) + except Exception: + pydev_log.exception("pydevd_timeout: Exception on callback timeout.") + + def __enter__(self): + pass + + def __exit__(self, exc_type, exc_val, exc_tb): + tracker = self._tracker() + + if tracker is None: + lock = NULL + else: + lock = tracker._lock + + with lock: + self.disposed = True + self.kwargs = None + self.on_timeout = None + + def __str__(self): + return self._str + + __repr__ = __str__ + + +class TimeoutTracker(object): + """ + This is a helper class to track the timeout of something. + """ + + def __init__(self, py_db): + self._thread = None + self._lock = ThreadingLock() + self._py_db = weakref.ref(py_db) + + def call_on_timeout(self, timeout, on_timeout, kwargs=None): + """ + This can be called regularly to always execute the given function after a given timeout: + + call_on_timeout(py_db, 10, on_timeout) + + + Or as a context manager to stop the method from being called if it finishes before the timeout + elapses: + + with call_on_timeout(py_db, 10, on_timeout): + ... + + Note: the callback will be called from a PyDBDaemonThread. + """ + with self._lock: + if self._thread is None: + if _DEBUG: + pydev_log.critical("pydevd_timeout: Created _TimeoutThread.") + + self._thread = _TimeoutThread(self._py_db()) + self._thread.start() + + curtime = time.time() + handle = _OnTimeoutHandle(self, curtime + timeout, on_timeout, kwargs) + if _DEBUG: + pydev_log.critical("pydevd_timeout: Added handle: %s.", handle) + self._thread.add_on_timeout_handle(handle) + return handle + + +def create_interrupt_this_thread_callback(): + """ + The idea here is returning a callback that when called will generate a KeyboardInterrupt + in the thread that called this function. + + If this is the main thread, this means that it'll emulate a Ctrl+C (which may stop I/O + and sleep operations). + + For other threads, this will call PyThreadState_SetAsyncExc to raise + a KeyboardInterrupt before the next instruction (so, it won't really interrupt I/O or + sleep operations). + + :return callable: + Returns a callback that will interrupt the current thread (this may be called + from an auxiliary thread). + """ + tid = thread_get_ident() + + if is_current_thread_main_thread(): + main_thread = threading_current_thread() + + def raise_on_this_thread(): + pydev_log.debug("Callback to interrupt main thread.") + pydevd_utils.interrupt_main_thread(main_thread) + + else: + # Note: this works in the sense that it can stop some cpu-intensive slow operation, + # but we can't really interrupt the thread out of some sleep or I/O operation + # (this will only be raised when Python is about to execute the next instruction). + def raise_on_this_thread(): + if IS_CPYTHON: + pydev_log.debug("Interrupt thread: %s", tid) + ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid), ctypes.py_object(KeyboardInterrupt)) + else: + pydev_log.debug("It is only possible to interrupt non-main threads in CPython.") + + return raise_on_this_thread diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py new file mode 100644 index 0000000..19b83e3 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py @@ -0,0 +1,92 @@ +# Defines which version of the trace_dispatch we'll use. +# Should give warning only here if cython is not available but supported. + +import os +from _pydevd_bundle.pydevd_constants import USE_CYTHON_FLAG, ENV_TRUE_LOWER_VALUES, ENV_FALSE_LOWER_VALUES +from _pydev_bundle import pydev_log + +dirname = os.path.dirname(os.path.dirname(__file__)) +USING_CYTHON = False + + +def delete_old_compiled_extensions(): + import _pydevd_bundle + + cython_extensions_dir = os.path.dirname(os.path.dirname(_pydevd_bundle.__file__)) + _pydevd_bundle_ext_dir = os.path.dirname(_pydevd_bundle.__file__) + _pydevd_frame_eval_ext_dir = os.path.join(cython_extensions_dir, "_pydevd_frame_eval_ext") + try: + import shutil + + for file in os.listdir(_pydevd_bundle_ext_dir): + if file.startswith("pydevd") and file.endswith(".so"): + os.remove(os.path.join(_pydevd_bundle_ext_dir, file)) + for file in os.listdir(_pydevd_frame_eval_ext_dir): + if file.startswith("pydevd") and file.endswith(".so"): + os.remove(os.path.join(_pydevd_frame_eval_ext_dir, file)) + build_dir = os.path.join(cython_extensions_dir, "build") + if os.path.exists(build_dir): + shutil.rmtree(os.path.join(cython_extensions_dir, "build")) + except OSError: + pydev_log.error_once( + "warning: failed to delete old cython speedups. Please delete all *.so files from the directories " + '"%s" and "%s"' % (_pydevd_bundle_ext_dir, _pydevd_frame_eval_ext_dir) + ) + + +if USE_CYTHON_FLAG in ENV_TRUE_LOWER_VALUES: + # We must import the cython version if forcing cython + from _pydevd_bundle.pydevd_cython_wrapper import ( + trace_dispatch, + global_cache_skips, + global_cache_frame_skips, + fix_top_level_trace_and_get_trace_func, + ) + from _pydevd_bundle.pydevd_cython_wrapper import should_stop_on_exception, handle_exception, is_unhandled_exception + + USING_CYTHON = True + +elif USE_CYTHON_FLAG in ENV_FALSE_LOWER_VALUES: + # Use the regular version if not forcing cython + from _pydevd_bundle.pydevd_trace_dispatch_regular import ( + trace_dispatch, + global_cache_skips, + global_cache_frame_skips, + fix_top_level_trace_and_get_trace_func, + ) # @UnusedImport + from .pydevd_frame import should_stop_on_exception, handle_exception, is_unhandled_exception + +else: + # Regular: use fallback if not found and give message to user + try: + from _pydevd_bundle.pydevd_cython_wrapper import ( + trace_dispatch, + global_cache_skips, + global_cache_frame_skips, + fix_top_level_trace_and_get_trace_func, + ) + from _pydevd_bundle.pydevd_cython_wrapper import should_stop_on_exception, handle_exception, is_unhandled_exception + + # This version number is always available + from _pydevd_bundle.pydevd_additional_thread_info_regular import version as regular_version + + # This version number from the already compiled cython extension + from _pydevd_bundle.pydevd_cython_wrapper import version as cython_version + + if cython_version != regular_version: + # delete_old_compiled_extensions() -- would be ok in dev mode but we don't want to erase + # files from other python versions on release, so, just raise import error here. + raise ImportError("Cython version of speedups does not match.") + else: + USING_CYTHON = True + + except ImportError: + from _pydevd_bundle.pydevd_trace_dispatch_regular import ( + trace_dispatch, + global_cache_skips, + global_cache_frame_skips, + fix_top_level_trace_and_get_trace_func, + ) # @UnusedImport + from .pydevd_frame import should_stop_on_exception, handle_exception, is_unhandled_exception + + pydev_log.show_compile_cython_command_line() diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch_regular.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch_regular.py new file mode 100644 index 0000000..091149c --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch_regular.py @@ -0,0 +1,550 @@ +from _pydev_bundle.pydev_is_thread_alive import is_thread_alive +from _pydev_bundle.pydev_log import exception as pydev_log_exception +from _pydev_bundle._pydev_saved_modules import threading +from _pydevd_bundle.pydevd_constants import ( + get_current_thread_id, + NO_FTRACE, + USE_CUSTOM_SYS_CURRENT_FRAMES_MAP, + ForkSafeLock, + PYDEVD_USE_SYS_MONITORING, +) +from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER + +# fmt: off +# IFDEF CYTHON +# from cpython.object cimport PyObject +# from cpython.ref cimport Py_INCREF, Py_XDECREF +# ELSE +from _pydevd_bundle.pydevd_frame import PyDBFrame, is_unhandled_exception +# ENDIF +# fmt: on + +# fmt: off +# IFDEF CYTHON +# cdef dict _global_notify_skipped_step_in +# cython_inline_constant: CMD_STEP_INTO = 107 +# cython_inline_constant: CMD_STEP_INTO_MY_CODE = 144 +# cython_inline_constant: CMD_STEP_RETURN = 109 +# cython_inline_constant: CMD_STEP_RETURN_MY_CODE = 160 +# ELSE +# Note: those are now inlined on cython. +CMD_STEP_INTO = 107 +CMD_STEP_INTO_MY_CODE = 144 +CMD_STEP_RETURN = 109 +CMD_STEP_RETURN_MY_CODE = 160 +# ENDIF +# fmt: on + +# Cache where we should keep that we completely skipped entering some context. +# It needs to be invalidated when: +# - Breakpoints are changed +# It can be used when running regularly (without step over/step in/step return) +global_cache_skips = {} +global_cache_frame_skips = {} + +_global_notify_skipped_step_in = False +_global_notify_skipped_step_in_lock = ForkSafeLock() + + +def notify_skipped_step_in_because_of_filters(py_db, frame): + global _global_notify_skipped_step_in + + with _global_notify_skipped_step_in_lock: + if _global_notify_skipped_step_in: + # Check with lock in place (callers should actually have checked + # before without the lock in place due to performance). + return + _global_notify_skipped_step_in = True + py_db.notify_skipped_step_in_because_of_filters(frame) + + +# fmt: off +# IFDEF CYTHON +# cdef class SafeCallWrapper: +# cdef method_object +# def __init__(self, method_object): +# self.method_object = method_object +# def __call__(self, *args): +# #Cannot use 'self' once inside the delegate call since we are borrowing the self reference f_trace field +# #in the frame, and that reference might get destroyed by set trace on frame and parents +# cdef PyObject* method_obj = self.method_object +# Py_INCREF(method_obj) +# ret = (method_obj)(*args) +# Py_XDECREF (method_obj) +# return SafeCallWrapper(ret) if ret is not None else None +# def get_method_object(self): +# return self.method_object +# ELSE +# ENDIF +# fmt: on + + +def fix_top_level_trace_and_get_trace_func(py_db, frame): + # fmt: off + # IFDEF CYTHON + # cdef str filename; + # cdef str name; + # cdef tuple args; + # ENDIF + # fmt: on + + # Note: this is always the first entry-point in the tracing for any thread. + # After entering here we'll set a new tracing function for this thread + # where more information is cached (and will also setup the tracing for + # frames where we should deal with unhandled exceptions). + thread = None + # Cache the frame which should be traced to deal with unhandled exceptions. + # (i.e.: thread entry-points). + + f_unhandled = frame + # print('called at', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) + force_only_unhandled_tracer = False + while f_unhandled is not None: + # name = splitext(basename(f_unhandled.f_code.co_filename))[0] + + name = f_unhandled.f_code.co_filename + # basename + i = name.rfind("/") + j = name.rfind("\\") + if j > i: + i = j + if i >= 0: + name = name[i + 1 :] + # remove ext + i = name.rfind(".") + if i >= 0: + name = name[:i] + + if name == "threading": + if f_unhandled.f_code.co_name in ("__bootstrap", "_bootstrap"): + # We need __bootstrap_inner, not __bootstrap. + return None, False + + elif f_unhandled.f_code.co_name in ("__bootstrap_inner", "_bootstrap_inner"): + # Note: be careful not to use threading.currentThread to avoid creating a dummy thread. + t = f_unhandled.f_locals.get("self") + force_only_unhandled_tracer = True + if t is not None and isinstance(t, threading.Thread): + thread = t + break + + elif name == "pydev_monkey": + if f_unhandled.f_code.co_name == "__call__": + force_only_unhandled_tracer = True + break + + elif name == "pydevd": + if f_unhandled.f_code.co_name in ("run", "main"): + # We need to get to _exec + return None, False + + if f_unhandled.f_code.co_name == "_exec": + force_only_unhandled_tracer = True + break + + elif name == "pydevd_tracing": + return None, False + + elif f_unhandled.f_back is None: + break + + f_unhandled = f_unhandled.f_back + + if thread is None: + # Important: don't call threadingCurrentThread if we're in the threading module + # to avoid creating dummy threads. + if py_db.threading_get_ident is not None: + thread = py_db.threading_active.get(py_db.threading_get_ident()) + if thread is None: + return None, False + else: + # Jython does not have threading.get_ident(). + thread = py_db.threading_current_thread() + + if getattr(thread, "pydev_do_not_trace", None): + py_db.disable_tracing() + return None, False + + try: + additional_info = thread.additional_info + if additional_info is None: + raise AttributeError() + except: + additional_info = py_db.set_additional_thread_info(thread) + + # print('enter thread tracer', thread, get_current_thread_id(thread)) + args = (py_db, thread, additional_info, global_cache_skips, global_cache_frame_skips) + + if f_unhandled is not None: + if f_unhandled.f_back is None and not force_only_unhandled_tracer: + # Happens when we attach to a running program (cannot reuse instance because it's mutable). + top_level_thread_tracer = TopLevelThreadTracerNoBackFrame(ThreadTracer(args), args) + additional_info.top_level_thread_tracer_no_back_frames.append( + top_level_thread_tracer + ) # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). + else: + top_level_thread_tracer = additional_info.top_level_thread_tracer_unhandled + if top_level_thread_tracer is None: + # Stop in some internal place to report about unhandled exceptions + top_level_thread_tracer = TopLevelThreadTracerOnlyUnhandledExceptions(args) + additional_info.top_level_thread_tracer_unhandled = top_level_thread_tracer # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). + + # print(' --> found to trace unhandled', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno) + f_trace = top_level_thread_tracer.get_trace_dispatch_func() + # fmt: off + # IFDEF CYTHON + # f_trace = SafeCallWrapper(f_trace) + # ENDIF + # fmt: on + f_unhandled.f_trace = f_trace + + if frame is f_unhandled: + return f_trace, False + + thread_tracer = additional_info.thread_tracer + if thread_tracer is None or thread_tracer._args[0] is not py_db: + thread_tracer = ThreadTracer(args) + additional_info.thread_tracer = thread_tracer + + # fmt: off + # IFDEF CYTHON + # return SafeCallWrapper(thread_tracer), True + # ELSE + return thread_tracer, True + # ENDIF + # fmt: on + + +def trace_dispatch(py_db, frame, event, arg): + thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame) + if thread_trace_func is None: + return None if event == "call" else NO_FTRACE + if apply_to_settrace: + py_db.enable_tracing(thread_trace_func) + return thread_trace_func(frame, event, arg) + + +# fmt: off +# IFDEF CYTHON +# cdef class TopLevelThreadTracerOnlyUnhandledExceptions: +# cdef public tuple _args; +# def __init__(self, tuple args): +# self._args = args +# ELSE +class TopLevelThreadTracerOnlyUnhandledExceptions(object): + def __init__(self, args): + self._args = args + +# ENDIF +# fmt: on + + def trace_unhandled_exceptions(self, frame, event, arg): + # Note that we ignore the frame as this tracing method should only be put in topmost frames already. + # print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno) + if event == "exception" and arg is not None: + py_db, t, additional_info = self._args[0:3] + if arg is not None: + if not additional_info.suspended_at_unhandled: + additional_info.suspended_at_unhandled = True + + py_db.stop_on_unhandled_exception(py_db, t, additional_info, arg) + + # No need to reset frame.f_trace to keep the same trace function. + return self.trace_unhandled_exceptions + + def get_trace_dispatch_func(self): + return self.trace_unhandled_exceptions + +# fmt: off +# IFDEF CYTHON +# cdef class TopLevelThreadTracerNoBackFrame: +# +# cdef public object _frame_trace_dispatch; +# cdef public tuple _args; +# cdef public object try_except_infos; +# cdef public object _last_exc_arg; +# cdef public set _raise_lines; +# cdef public int _last_raise_line; +# +# def __init__(self, frame_trace_dispatch, tuple args): +# self._frame_trace_dispatch = frame_trace_dispatch +# self._args = args +# self.try_except_infos = None +# self._last_exc_arg = None +# self._raise_lines = set() +# self._last_raise_line = -1 +# ELSE +class TopLevelThreadTracerNoBackFrame(object): + """ + This tracer is pretty special in that it's dealing with a frame without f_back (i.e.: top frame + on remote attach or QThread). + + This means that we have to carefully inspect exceptions to discover whether the exception will + be unhandled or not (if we're dealing with an unhandled exception we need to stop as unhandled, + otherwise we need to use the regular tracer -- unfortunately the debugger has little info to + work with in the tracing -- see: https://bugs.python.org/issue34099, so, we inspect bytecode to + determine if some exception will be traced or not... note that if this is not available -- such + as on Jython -- we consider any top-level exception to be unnhandled). + """ + + def __init__(self, frame_trace_dispatch, args): + self._frame_trace_dispatch = frame_trace_dispatch + self._args = args + self.try_except_infos = None + self._last_exc_arg = None + self._raise_lines = set() + self._last_raise_line = -1 + +# ENDIF +# fmt: on + + def trace_dispatch_and_unhandled_exceptions(self, frame, event, arg): + # DEBUG = 'code_to_debug' in frame.f_code.co_filename + # if DEBUG: print('trace_dispatch_and_unhandled_exceptions: %s %s %s %s %s %s' % (event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno, self._frame_trace_dispatch, frame.f_lineno)) + frame_trace_dispatch = self._frame_trace_dispatch + if frame_trace_dispatch is not None: + self._frame_trace_dispatch = frame_trace_dispatch(frame, event, arg) + + if event == "exception": + self._last_exc_arg = arg + self._raise_lines.add(frame.f_lineno) + self._last_raise_line = frame.f_lineno + + elif event == "return" and self._last_exc_arg is not None: + # For unhandled exceptions we actually track the return when at the topmost level. + try: + py_db, t, additional_info = self._args[0:3] + if not additional_info.suspended_at_unhandled: # Note: only check it here, don't set. + if is_unhandled_exception(self, py_db, frame, self._last_raise_line, self._raise_lines): + py_db.stop_on_unhandled_exception(py_db, t, additional_info, self._last_exc_arg) + finally: + # Remove reference to exception after handling it. + self._last_exc_arg = None + + ret = self.trace_dispatch_and_unhandled_exceptions + + # Need to reset (the call to _frame_trace_dispatch may have changed it). + # fmt: off + # IFDEF CYTHON + # frame.f_trace = SafeCallWrapper(ret) + # ELSE + frame.f_trace = ret + # ENDIF + # fmt: on + return ret + + def get_trace_dispatch_func(self): + return self.trace_dispatch_and_unhandled_exceptions + + +# fmt: off +# IFDEF CYTHON +# cdef class ThreadTracer: +# cdef public tuple _args; +# def __init__(self, tuple args): +# self._args = args +# ELSE +class ThreadTracer(object): + def __init__(self, args): + self._args = args + +# ENDIF +# fmt: on + + def __call__(self, frame, event, arg): + """This is the callback used when we enter some context in the debugger. + + We also decorate the thread we are in with info about the debugging. + The attributes added are: + pydev_state + pydev_step_stop + pydev_step_cmd + pydev_notify_kill + + :param PyDB py_db: + This is the global debugger (this method should actually be added as a method to it). + """ + # fmt: off + # IFDEF CYTHON + # cdef str filename; + # cdef str base; + # cdef int pydev_step_cmd; + # cdef object frame_cache_key; + # cdef dict cache_skips; + # cdef bint is_stepping; + # cdef tuple abs_path_canonical_path_and_base; + # cdef PyDBAdditionalThreadInfo additional_info; + # ENDIF + # fmt: on + + # DEBUG = 'code_to_debug' in frame.f_code.co_filename + # if DEBUG: print('ENTER: trace_dispatch: %s %s %s %s' % (frame.f_code.co_filename, frame.f_lineno, event, frame.f_code.co_name)) + py_db, t, additional_info, cache_skips, frame_skips_cache = self._args + if additional_info.is_tracing: + return None if event == "call" else NO_FTRACE # we don't wan't to trace code invoked from pydevd_frame.trace_dispatch + + additional_info.is_tracing += 1 + try: + pydev_step_cmd = additional_info.pydev_step_cmd + is_stepping = pydev_step_cmd != -1 + if py_db.pydb_disposed: + return None if event == "call" else NO_FTRACE + + # if thread is not alive, cancel trace_dispatch processing + if not is_thread_alive(t): + py_db.notify_thread_not_alive(get_current_thread_id(t)) + return None if event == "call" else NO_FTRACE + + # Note: it's important that the context name is also given because we may hit something once + # in the global context and another in the local context. + frame_cache_key = frame.f_code + if frame_cache_key in cache_skips: + if not is_stepping: + # if DEBUG: print('skipped: trace_dispatch (cache hit)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + return None if event == "call" else NO_FTRACE + else: + # When stepping we can't take into account caching based on the breakpoints (only global filtering). + if cache_skips.get(frame_cache_key) == 1: + if ( + additional_info.pydev_original_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE) + and not _global_notify_skipped_step_in + ): + notify_skipped_step_in_because_of_filters(py_db, frame) + + back_frame = frame.f_back + if back_frame is not None and pydev_step_cmd in ( + CMD_STEP_INTO, + CMD_STEP_INTO_MY_CODE, + CMD_STEP_RETURN, + CMD_STEP_RETURN_MY_CODE, + ): + back_frame_cache_key = back_frame.f_code + if cache_skips.get(back_frame_cache_key) == 1: + # if DEBUG: print('skipped: trace_dispatch (cache hit: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + return None if event == "call" else NO_FTRACE + else: + # if DEBUG: print('skipped: trace_dispatch (cache hit: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + return None if event == "call" else NO_FTRACE + + try: + # Make fast path faster! + abs_path_canonical_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] + except: + abs_path_canonical_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) + + file_type = py_db.get_file_type( + frame, abs_path_canonical_path_and_base + ) # we don't want to debug threading or anything related to pydevd + + if file_type is not None: + if file_type == 1: # inlining LIB_FILE = 1 + if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]): + # if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + cache_skips[frame_cache_key] = 1 + return None if event == "call" else NO_FTRACE + else: + # if DEBUG: print('skipped: trace_dispatch', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type) + cache_skips[frame_cache_key] = 1 + return None if event == "call" else NO_FTRACE + + if py_db.is_files_filter_enabled: + if py_db.apply_files_filter(frame, abs_path_canonical_path_and_base[0], False): + cache_skips[frame_cache_key] = 1 + + if ( + is_stepping + and additional_info.pydev_original_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE) + and not _global_notify_skipped_step_in + ): + notify_skipped_step_in_because_of_filters(py_db, frame) + + # A little gotcha, sometimes when we're stepping in we have to stop in a + # return event showing the back frame as the current frame, so, we need + # to check not only the current frame but the back frame too. + back_frame = frame.f_back + if back_frame is not None and pydev_step_cmd in ( + CMD_STEP_INTO, + CMD_STEP_INTO_MY_CODE, + CMD_STEP_RETURN, + CMD_STEP_RETURN_MY_CODE, + ): + if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False): + back_frame_cache_key = back_frame.f_code + cache_skips[back_frame_cache_key] = 1 + # if DEBUG: print('skipped: trace_dispatch (filtered out: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + return None if event == "call" else NO_FTRACE + else: + # if DEBUG: print('skipped: trace_dispatch (filtered out: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name) + return None if event == "call" else NO_FTRACE + + # if DEBUG: print('trace_dispatch', filename, frame.f_lineno, event, frame.f_code.co_name, file_type) + + # Just create PyDBFrame directly (removed support for Python versions < 2.5, which required keeping a weak + # reference to the frame). + ret = PyDBFrame( + ( + py_db, + abs_path_canonical_path_and_base, + additional_info, + t, + frame_skips_cache, + frame_cache_key, + ) + ).trace_dispatch(frame, event, arg) + if ret is None: + # 1 means skipped because of filters. + # 2 means skipped because no breakpoints were hit. + cache_skips[frame_cache_key] = 2 + return None if event == "call" else NO_FTRACE + + # fmt: off + # IFDEF CYTHON + # frame.f_trace = SafeCallWrapper(ret) # Make sure we keep the returned tracer. + # ELSE + frame.f_trace = ret # Make sure we keep the returned tracer. + # ENDIF + # fmt: on + return ret + + except SystemExit: + return None if event == "call" else NO_FTRACE + + except Exception: + if py_db.pydb_disposed: + return None if event == "call" else NO_FTRACE # Don't log errors when we're shutting down. + # Log it + try: + if pydev_log_exception is not None: + # This can actually happen during the interpreter shutdown in Python 2.7 + pydev_log_exception() + except: + # Error logging? We're really in the interpreter shutdown... + # (https://github.com/fabioz/PyDev.Debugger/issues/8) + pass + return None if event == "call" else NO_FTRACE + finally: + additional_info.is_tracing -= 1 + + +if USE_CUSTOM_SYS_CURRENT_FRAMES_MAP: + # This is far from ideal, as we'll leak frames (we'll always have the last created frame, not really + # the last topmost frame saved -- this should be Ok for our usage, but it may leak frames and things + # may live longer... as IronPython is garbage-collected, things should live longer anyways, so, it + # shouldn't be an issue as big as it's in CPython -- it may still be annoying, but this should + # be a reasonable workaround until IronPython itself is able to provide that functionality). + # + # See: https://github.com/IronLanguages/main/issues/1630 + from _pydevd_bundle.pydevd_constants import constructed_tid_to_last_frame + + _original_call = ThreadTracer.__call__ + + def __call__(self, frame, event, arg): + constructed_tid_to_last_frame[self._args[1].ident] = frame + return _original_call(self, frame, event, arg) + + ThreadTracer.__call__ = __call__ + +if PYDEVD_USE_SYS_MONITORING: + + def fix_top_level_trace_and_get_trace_func(*args, **kwargs): + raise RuntimeError("Not used in sys.monitoring mode.") diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_traceproperty.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_traceproperty.py new file mode 100644 index 0000000..c07e953 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_traceproperty.py @@ -0,0 +1,89 @@ +"""For debug purpose we are replacing actual builtin property by the debug property +""" +from _pydevd_bundle.pydevd_comm import get_global_debugger +from _pydev_bundle import pydev_log + + +# ======================================================================================================================= +# replace_builtin_property +# ======================================================================================================================= +def replace_builtin_property(new_property=None): + if new_property is None: + new_property = DebugProperty + original = property + try: + import builtins + + builtins.__dict__["property"] = new_property + except: + pydev_log.exception() # @Reimport + return original + + +# ======================================================================================================================= +# DebugProperty +# ======================================================================================================================= +class DebugProperty(object): + """A custom property which allows python property to get + controlled by the debugger and selectively disable/re-enable + the tracing. + """ + + def __init__(self, fget=None, fset=None, fdel=None, doc=None): + self.fget = fget + self.fset = fset + self.fdel = fdel + self.__doc__ = doc + + def __get__(self, obj, objtype=None): + if obj is None: + return self + global_debugger = get_global_debugger() + try: + if global_debugger is not None and global_debugger.disable_property_getter_trace: + global_debugger.disable_tracing() + if self.fget is None: + raise AttributeError("unreadable attribute") + return self.fget(obj) + finally: + if global_debugger is not None: + global_debugger.enable_tracing() + + def __set__(self, obj, value): + global_debugger = get_global_debugger() + try: + if global_debugger is not None and global_debugger.disable_property_setter_trace: + global_debugger.disable_tracing() + if self.fset is None: + raise AttributeError("can't set attribute") + self.fset(obj, value) + finally: + if global_debugger is not None: + global_debugger.enable_tracing() + + def __delete__(self, obj): + global_debugger = get_global_debugger() + try: + if global_debugger is not None and global_debugger.disable_property_deleter_trace: + global_debugger.disable_tracing() + if self.fdel is None: + raise AttributeError("can't delete attribute") + self.fdel(obj) + finally: + if global_debugger is not None: + global_debugger.enable_tracing() + + def getter(self, fget): + """Overriding getter decorator for the property""" + self.fget = fget + return self + + def setter(self, fset): + """Overriding setter decorator for the property""" + self.fset = fset + return self + + def deleter(self, fdel): + """Overriding deleter decorator for the property""" + self.fdel = fdel + return self diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py new file mode 100644 index 0000000..4ac447d --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py @@ -0,0 +1,517 @@ +from __future__ import nested_scopes +import traceback +import warnings +from _pydev_bundle import pydev_log +from _pydev_bundle._pydev_saved_modules import thread, threading +from _pydev_bundle import _pydev_saved_modules +import signal +import os +import ctypes +from importlib import import_module +from importlib.util import module_from_spec, spec_from_file_location +from urllib.parse import quote # @UnresolvedImport +import time +import inspect +import sys +from _pydevd_bundle.pydevd_constants import ( + USE_CUSTOM_SYS_CURRENT_FRAMES, + IS_PYPY, + SUPPORT_GEVENT, + GEVENT_SUPPORT_NOT_SET_MSG, + GENERATED_LEN_ATTR_NAME, + PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT, + get_global_debugger, +) + + +def save_main_module(file, module_name): + # patch provided by: Scott Schlesier - when script is run, it does not + # use globals from pydevd: + # This will prevent the pydevd script from contaminating the namespace for the script to be debugged + # pretend pydevd is not the main module, and + # convince the file to be debugged that it was loaded as main + m = sys.modules[module_name] = sys.modules["__main__"] + m.__name__ = module_name + loader = m.__loader__ if hasattr(m, "__loader__") else None + spec = spec_from_file_location("__main__", file, loader=loader) + m = module_from_spec(spec) + sys.modules["__main__"] = m + return m + + +def is_current_thread_main_thread(): + if hasattr(threading, "main_thread"): + return threading.current_thread() is threading.main_thread() + else: + return isinstance(threading.current_thread(), threading._MainThread) + + +def get_main_thread(): + if hasattr(threading, "main_thread"): + return threading.main_thread() + else: + for t in threading.enumerate(): + if isinstance(t, threading._MainThread): + return t + return None + + +def to_number(x): + if is_string(x): + try: + n = float(x) + return n + except ValueError: + pass + + l = x.find("(") + if l != -1: + y = x[0 : l - 1] + # print y + try: + n = float(y) + return n + except ValueError: + pass + return None + + +def compare_object_attrs_key(x): + if GENERATED_LEN_ATTR_NAME == x: + as_number = to_number(x) + if as_number is None: + as_number = 99999999 + # len() should appear after other attributes in a list. + return (1, as_number) + else: + return (-1, to_string(x)) + + +def is_string(x): + return isinstance(x, str) + + +def to_string(x): + if isinstance(x, str): + return x + else: + return str(x) + + +def print_exc(): + if traceback: + traceback.print_exc() + + +def quote_smart(s, safe="/"): + return quote(s, safe) + + +def get_clsname_for_code(code, frame): + clsname = None + if len(code.co_varnames) > 0: + # We are checking the first argument of the function + # (`self` or `cls` for methods). + first_arg_name = code.co_varnames[0] + if first_arg_name in frame.f_locals: + first_arg_obj = frame.f_locals[first_arg_name] + if inspect.isclass(first_arg_obj): # class method + first_arg_class = first_arg_obj + else: # instance method + if hasattr(first_arg_obj, "__class__"): + first_arg_class = first_arg_obj.__class__ + else: # old style class, fall back on type + first_arg_class = type(first_arg_obj) + func_name = code.co_name + if hasattr(first_arg_class, func_name): + method = getattr(first_arg_class, func_name) + func_code = None + if hasattr(method, "func_code"): # Python2 + func_code = method.func_code + elif hasattr(method, "__code__"): # Python3 + func_code = method.__code__ + if func_code and func_code == code: + clsname = first_arg_class.__name__ + + return clsname + + +def get_non_pydevd_threads(): + threads = threading.enumerate() + return [t for t in threads if t and not getattr(t, "is_pydev_daemon_thread", False)] + + +if USE_CUSTOM_SYS_CURRENT_FRAMES and IS_PYPY: + # On PyPy we can use its fake_frames to get the traceback + # (instead of the actual real frames that need the tracing to be correct). + _tid_to_frame_for_dump_threads = sys._current_frames +else: + from _pydevd_bundle.pydevd_constants import _current_frames as _tid_to_frame_for_dump_threads + + +def dump_threads(stream=None, show_pydevd_threads=True): + """ + Helper to dump thread info. + """ + if stream is None: + stream = sys.stderr + thread_id_to_name_and_is_pydevd_thread = {} + try: + threading_enumerate = _pydev_saved_modules.pydevd_saved_threading_enumerate + if threading_enumerate is None: + threading_enumerate = threading.enumerate + + for t in threading_enumerate(): + is_pydevd_thread = getattr(t, "is_pydev_daemon_thread", False) + thread_id_to_name_and_is_pydevd_thread[t.ident] = ( + "%s (daemon: %s, pydevd thread: %s)" % (t.name, t.daemon, is_pydevd_thread), + is_pydevd_thread, + ) + except: + pass + + stream.write("===============================================================================\n") + stream.write("Threads running\n") + stream.write("================================= Thread Dump =================================\n") + stream.flush() + + for thread_id, frame in _tid_to_frame_for_dump_threads().items(): + name, is_pydevd_thread = thread_id_to_name_and_is_pydevd_thread.get(thread_id, (thread_id, False)) + if not show_pydevd_threads and is_pydevd_thread: + continue + + stream.write("\n-------------------------------------------------------------------------------\n") + stream.write(" Thread %s" % (name,)) + stream.write("\n\n") + + for i, (filename, lineno, name, line) in enumerate(traceback.extract_stack(frame)): + stream.write(' File "%s", line %d, in %s\n' % (filename, lineno, name)) + if line: + stream.write(" %s\n" % (line.strip())) + + if i == 0 and "self" in frame.f_locals: + stream.write(" self: ") + try: + stream.write(str(frame.f_locals["self"])) + except: + stream.write("Unable to get str of: %s" % (type(frame.f_locals["self"]),)) + stream.write("\n") + stream.flush() + + stream.write("\n=============================== END Thread Dump ===============================") + stream.flush() + + +def _extract_variable_nested_braces(char_iter): + expression = [] + level = 0 + for c in char_iter: + if c == "{": + level += 1 + if c == "}": + level -= 1 + if level == -1: + return "".join(expression).strip() + expression.append(c) + raise SyntaxError("Unbalanced braces in expression.") + + +def _extract_expression_list(log_message): + # Note: not using re because of nested braces. + expression = [] + expression_vars = [] + char_iter = iter(log_message) + for c in char_iter: + if c == "{": + expression_var = _extract_variable_nested_braces(char_iter) + if expression_var: + expression.append("%s") + expression_vars.append(expression_var) + else: + expression.append(c) + + expression = "".join(expression) + return expression, expression_vars + + +def convert_dap_log_message_to_expression(log_message): + try: + expression, expression_vars = _extract_expression_list(log_message) + except SyntaxError: + return repr("Unbalanced braces in: %s" % (log_message)) + if not expression_vars: + return repr(expression) + # Note: use '%' to be compatible with Python 2.6. + return repr(expression) + " % (" + ", ".join(str(x) for x in expression_vars) + ",)" + + +def notify_about_gevent_if_needed(stream=None): + """ + When debugging with gevent check that the gevent flag is used if the user uses the gevent + monkey-patching. + + :return bool: + Returns True if a message had to be shown to the user and False otherwise. + """ + stream = stream if stream is not None else sys.stderr + if not SUPPORT_GEVENT: + gevent_monkey = sys.modules.get("gevent.monkey") + if gevent_monkey is not None: + try: + saved = gevent_monkey.saved + except AttributeError: + pydev_log.exception_once("Error checking for gevent monkey-patching.") + return False + + if saved: + # Note: print to stderr as it may deadlock the debugger. + sys.stderr.write("%s\n" % (GEVENT_SUPPORT_NOT_SET_MSG,)) + return True + + return False + + +def hasattr_checked(obj, name): + try: + getattr(obj, name) + except: + # i.e.: Handle any exception, not only AttributeError. + return False + else: + return True + + +def getattr_checked(obj, name): + try: + return getattr(obj, name) + except: + # i.e.: Handle any exception, not only AttributeError. + return None + + +def dir_checked(obj): + try: + return dir(obj) + except: + return [] + + +def isinstance_checked(obj, cls): + try: + return isinstance(obj, cls) + except: + return False + + +class ScopeRequest(object): + __slots__ = ["variable_reference", "scope"] + + def __init__(self, variable_reference, scope): + assert scope in ("globals", "locals") + self.variable_reference = variable_reference + self.scope = scope + + def __eq__(self, o): + if isinstance(o, ScopeRequest): + return self.variable_reference == o.variable_reference and self.scope == o.scope + + return False + + def __ne__(self, o): + return not self == o + + def __hash__(self): + return hash((self.variable_reference, self.scope)) + + +class DAPGrouper(object): + """ + Note: this is a helper class to group variables on the debug adapter protocol (DAP). For + the xml protocol the type is just added to each variable and the UI can group/hide it as needed. + """ + + SCOPE_SPECIAL_VARS = "special variables" + SCOPE_PROTECTED_VARS = "protected variables" + SCOPE_FUNCTION_VARS = "function variables" + SCOPE_CLASS_VARS = "class variables" + + SCOPES_SORTED = [ + SCOPE_SPECIAL_VARS, + SCOPE_PROTECTED_VARS, + SCOPE_FUNCTION_VARS, + SCOPE_CLASS_VARS, + ] + + __slots__ = ["variable_reference", "scope", "contents_debug_adapter_protocol"] + + def __init__(self, scope): + self.variable_reference = id(self) + self.scope = scope + self.contents_debug_adapter_protocol = [] + + def get_contents_debug_adapter_protocol(self): + return self.contents_debug_adapter_protocol[:] + + def __eq__(self, o): + if isinstance(o, ScopeRequest): + return self.variable_reference == o.variable_reference and self.scope == o.scope + + return False + + def __ne__(self, o): + return not self == o + + def __hash__(self): + return hash((self.variable_reference, self.scope)) + + def __repr__(self): + return "" + + def __str__(self): + return "" + + +def interrupt_main_thread(main_thread=None): + """ + Generates a KeyboardInterrupt in the main thread by sending a Ctrl+C + or by calling thread.interrupt_main(). + + :param main_thread: + Needed because Jython needs main_thread._thread.interrupt() to be called. + + Note: if unable to send a Ctrl+C, the KeyboardInterrupt will only be raised + when the next Python instruction is about to be executed (so, it won't interrupt + a sleep(1000)). + """ + if main_thread is None: + main_thread = threading.main_thread() + + pydev_log.debug("Interrupt main thread.") + called = False + try: + if os.name == "posix": + # On Linux we can't interrupt 0 as in Windows because it's + # actually owned by a process -- on the good side, signals + # work much better on Linux! + os.kill(os.getpid(), signal.SIGINT) + called = True + + elif os.name == "nt": + # This generates a Ctrl+C only for the current process and not + # to the process group! + # Note: there doesn't seem to be any public documentation for this + # function (although it seems to be present from Windows Server 2003 SP1 onwards + # according to: https://www.geoffchappell.com/studies/windows/win32/kernel32/api/index.htm) + ctypes.windll.kernel32.CtrlRoutine(0) + + # The code below is deprecated because it actually sends a Ctrl+C + # to the process group, so, if this was a process created without + # passing `CREATE_NEW_PROCESS_GROUP` the signal may be sent to the + # parent process and to sub-processes too (which is not ideal -- + # for instance, when using pytest-xdist, it'll actually stop the + # testing, even when called in the subprocess). + + # if hasattr_checked(signal, 'CTRL_C_EVENT'): + # os.kill(0, signal.CTRL_C_EVENT) + # else: + # # Python 2.6 + # ctypes.windll.kernel32.GenerateConsoleCtrlEvent(0, 0) + called = True + + except: + # If something went wrong, fallback to interrupting when the next + # Python instruction is being called. + pydev_log.exception("Error interrupting main thread (using fallback).") + + if not called: + try: + # In this case, we don't really interrupt a sleep() nor IO operations + # (this makes the KeyboardInterrupt be sent only when the next Python + # instruction is about to be executed). + if hasattr(thread, "interrupt_main"): + thread.interrupt_main() + else: + main_thread._thread.interrupt() # Jython + except: + pydev_log.exception("Error on interrupt main thread fallback.") + + +class Timer(object): + def __init__(self, min_diff=PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT): + self.min_diff = min_diff + self._curr_time = time.time() + + def print_time(self, msg="Elapsed:"): + old = self._curr_time + new = self._curr_time = time.time() + diff = new - old + if diff >= self.min_diff: + print("%s: %.2fs" % (msg, diff)) + + def _report_slow(self, compute_msg, *args): + old = self._curr_time + new = self._curr_time = time.time() + diff = new - old + if diff >= self.min_diff: + py_db = get_global_debugger() + if py_db is not None: + msg = compute_msg(diff, *args) + py_db.writer.add_command(py_db.cmd_factory.make_warning_message(msg)) + + def report_if_compute_repr_attr_slow(self, attrs_tab_separated, attr_name, attr_type): + self._report_slow(self._compute_repr_slow, attrs_tab_separated, attr_name, attr_type) + + def _compute_repr_slow(self, diff, attrs_tab_separated, attr_name, attr_type): + try: + attr_type = attr_type.__name__ + except: + pass + if attrs_tab_separated: + return ( + "pydevd warning: Computing repr of %s.%s (%s) was slow (took %.2fs).\n" + "Customize report timeout by setting the `PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT` environment variable to a higher timeout (default is: %ss)\n" + ) % (attrs_tab_separated.replace("\t", "."), attr_name, attr_type, diff, PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT) + else: + return ( + "pydevd warning: Computing repr of %s (%s) was slow (took %.2fs)\n" + "Customize report timeout by setting the `PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT` environment variable to a higher timeout (default is: %ss)\n" + ) % (attr_name, attr_type, diff, PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT) + + def report_if_getting_attr_slow(self, cls, attr_name): + self._report_slow(self._compute_get_attr_slow, cls, attr_name) + + def _compute_get_attr_slow(self, diff, cls, attr_name): + try: + cls = cls.__name__ + except: + pass + return ( + "pydevd warning: Getting attribute %s.%s was slow (took %.2fs)\n" + "Customize report timeout by setting the `PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT` environment variable to a higher timeout (default is: %ss)\n" + ) % (cls, attr_name, diff, PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT) + + +def import_attr_from_module(import_with_attr_access): + if "." not in import_with_attr_access: + # We need at least one '.' (we don't support just the module import, we need the attribute access too). + raise ImportError("Unable to import module with attr access: %s" % (import_with_attr_access,)) + + module_name, attr_name = import_with_attr_access.rsplit(".", 1) + + while True: + try: + mod = import_module(module_name) + except ImportError: + if "." not in module_name: + raise ImportError("Unable to import module with attr access: %s" % (import_with_attr_access,)) + + module_name, new_attr_part = module_name.rsplit(".", 1) + attr_name = new_attr_part + "." + attr_name + else: + # Ok, we got the base module, now, get the attribute we need. + try: + for attr in attr_name.split("."): + mod = getattr(mod, attr) + return mod + except: + raise ImportError("Unable to import module with attr access: %s" % (import_with_attr_access,)) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py new file mode 100644 index 0000000..8ec4dec --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py @@ -0,0 +1,852 @@ +""" pydevd_vars deals with variables: + resolution/conversion to XML. +""" +import pickle +from _pydevd_bundle.pydevd_constants import get_frame, get_current_thread_id, iter_chars, silence_warnings_decorator, get_global_debugger + +from _pydevd_bundle.pydevd_xml import ExceptionOnEvaluate, get_type, var_to_xml +from _pydev_bundle import pydev_log +import functools +from _pydevd_bundle.pydevd_thread_lifecycle import resume_threads, mark_thread_suspended, suspend_all_threads +from _pydevd_bundle.pydevd_comm_constants import CMD_SET_BREAK + +import sys # @Reimport + +from _pydev_bundle._pydev_saved_modules import threading +from _pydevd_bundle import pydevd_save_locals, pydevd_timeout, pydevd_constants +from _pydev_bundle.pydev_imports import Exec, execfile +from _pydevd_bundle.pydevd_utils import to_string +import inspect +from _pydevd_bundle.pydevd_daemon_thread import PyDBDaemonThread +from _pydevd_bundle.pydevd_save_locals import update_globals_and_locals +from functools import lru_cache + +SENTINEL_VALUE = [] + + +class VariableError(RuntimeError): + pass + + +def iter_frames(frame): + while frame is not None: + yield frame + frame = frame.f_back + frame = None + + +def dump_frames(thread_id): + sys.stdout.write("dumping frames\n") + if thread_id != get_current_thread_id(threading.current_thread()): + raise VariableError("find_frame: must execute on same thread") + + frame = get_frame() + for frame in iter_frames(frame): + sys.stdout.write("%s\n" % pickle.dumps(frame)) + + +@silence_warnings_decorator +def getVariable(dbg, thread_id, frame_id, scope, locator): + """ + returns the value of a variable + + :scope: can be BY_ID, EXPRESSION, GLOBAL, LOCAL, FRAME + + BY_ID means we'll traverse the list of all objects alive to get the object. + + :locator: after reaching the proper scope, we have to get the attributes until we find + the proper location (i.e.: obj\tattr1\tattr2) + + :note: when BY_ID is used, the frame_id is considered the id of the object to find and + not the frame (as we don't care about the frame in this case). + """ + if scope == "BY_ID": + if thread_id != get_current_thread_id(threading.current_thread()): + raise VariableError("getVariable: must execute on same thread") + + try: + import gc + + objects = gc.get_objects() + except: + pass # Not all python variants have it. + else: + frame_id = int(frame_id) + for var in objects: + if id(var) == frame_id: + if locator is not None: + locator_parts = locator.split("\t") + for k in locator_parts: + _type, _type_name, resolver = get_type(var) + var = resolver.resolve(var, k) + + return var + + # If it didn't return previously, we coudn't find it by id (i.e.: already garbage collected). + sys.stderr.write("Unable to find object with id: %s\n" % (frame_id,)) + return None + + frame = dbg.find_frame(thread_id, frame_id) + if frame is None: + return {} + + if locator is not None: + locator_parts = locator.split("\t") + else: + locator_parts = [] + + for attr in locator_parts: + attr.replace("@_@TAB_CHAR@_@", "\t") + + if scope == "EXPRESSION": + for count in range(len(locator_parts)): + if count == 0: + # An Expression can be in any scope (globals/locals), therefore it needs to evaluated as an expression + var = evaluate_expression(dbg, frame, locator_parts[count], False) + else: + _type, _type_name, resolver = get_type(var) + var = resolver.resolve(var, locator_parts[count]) + else: + if scope == "GLOBAL": + var = frame.f_globals + del locator_parts[0] # globals are special, and they get a single dummy unused attribute + else: + # in a frame access both locals and globals as Python does + var = {} + var.update(frame.f_globals) + var.update(frame.f_locals) + + for k in locator_parts: + _type, _type_name, resolver = get_type(var) + var = resolver.resolve(var, k) + + return var + + +def resolve_compound_variable_fields(dbg, thread_id, frame_id, scope, attrs): + """ + Resolve compound variable in debugger scopes by its name and attributes + + :param thread_id: id of the variable's thread + :param frame_id: id of the variable's frame + :param scope: can be BY_ID, EXPRESSION, GLOBAL, LOCAL, FRAME + :param attrs: after reaching the proper scope, we have to get the attributes until we find + the proper location (i.e.: obj\tattr1\tattr2) + :return: a dictionary of variables's fields + """ + + var = getVariable(dbg, thread_id, frame_id, scope, attrs) + + try: + _type, type_name, resolver = get_type(var) + return type_name, resolver.get_dictionary(var) + except: + pydev_log.exception("Error evaluating: thread_id: %s\nframe_id: %s\nscope: %s\nattrs: %s.", thread_id, frame_id, scope, attrs) + + +def resolve_var_object(var, attrs): + """ + Resolve variable's attribute + + :param var: an object of variable + :param attrs: a sequence of variable's attributes separated by \t (i.e.: obj\tattr1\tattr2) + :return: a value of resolved variable's attribute + """ + if attrs is not None: + attr_list = attrs.split("\t") + else: + attr_list = [] + for k in attr_list: + type, _type_name, resolver = get_type(var) + var = resolver.resolve(var, k) + return var + + +def resolve_compound_var_object_fields(var, attrs): + """ + Resolve compound variable by its object and attributes + + :param var: an object of variable + :param attrs: a sequence of variable's attributes separated by \t (i.e.: obj\tattr1\tattr2) + :return: a dictionary of variables's fields + """ + attr_list = attrs.split("\t") + + for k in attr_list: + type, _type_name, resolver = get_type(var) + var = resolver.resolve(var, k) + + try: + type, _type_name, resolver = get_type(var) + return resolver.get_dictionary(var) + except: + pydev_log.exception() + + +def custom_operation(dbg, thread_id, frame_id, scope, attrs, style, code_or_file, operation_fn_name): + """ + We'll execute the code_or_file and then search in the namespace the operation_fn_name to execute with the given var. + + code_or_file: either some code (i.e.: from pprint import pprint) or a file to be executed. + operation_fn_name: the name of the operation to execute after the exec (i.e.: pprint) + """ + expressionValue = getVariable(dbg, thread_id, frame_id, scope, attrs) + + try: + namespace = {"__name__": ""} + if style == "EXECFILE": + namespace["__file__"] = code_or_file + execfile(code_or_file, namespace, namespace) + else: # style == EXEC + namespace["__file__"] = "" + Exec(code_or_file, namespace, namespace) + + return str(namespace[operation_fn_name](expressionValue)) + except: + pydev_log.exception() + + +@lru_cache(3) +def _expression_to_evaluate(expression): + keepends = True + lines = expression.splitlines(keepends) + # find first non-empty line + chars_to_strip = 0 + for line in lines: + if line.strip(): # i.e.: check first non-empty line + for c in iter_chars(line): + if c.isspace(): + chars_to_strip += 1 + else: + break + break + + if chars_to_strip: + # I.e.: check that the chars we'll remove are really only whitespaces. + proceed = True + new_lines = [] + for line in lines: + if not proceed: + break + for c in iter_chars(line[:chars_to_strip]): + if not c.isspace(): + proceed = False + break + + new_lines.append(line[chars_to_strip:]) + + if proceed: + if isinstance(expression, bytes): + expression = b"".join(new_lines) + else: + expression = "".join(new_lines) + + return expression + + +def eval_in_context(expression, global_vars, local_vars, py_db=None): + result = None + try: + compiled = compile_as_eval(expression) + is_async = inspect.CO_COROUTINE & compiled.co_flags == inspect.CO_COROUTINE + + if is_async: + if py_db is None: + py_db = get_global_debugger() + if py_db is None: + raise RuntimeError("Cannot evaluate async without py_db.") + t = _EvalAwaitInNewEventLoop(py_db, compiled, global_vars, local_vars) + t.start() + t.join() + + if t.exc: + raise t.exc[1].with_traceback(t.exc[2]) + else: + result = t.evaluated_value + else: + result = eval(compiled, global_vars, local_vars) + except (Exception, KeyboardInterrupt): + etype, result, tb = sys.exc_info() + result = ExceptionOnEvaluate(result, etype, tb) + + # Ok, we have the initial error message, but let's see if we're dealing with a name mangling error... + try: + if ".__" in expression: + # Try to handle '__' name mangling (for simple cases such as self.__variable.__another_var). + split = expression.split(".") + entry = split[0] + + if local_vars is None: + local_vars = global_vars + curr = local_vars[entry] # Note: we want the KeyError if it's not there. + for entry in split[1:]: + if entry.startswith("__") and not hasattr(curr, entry): + entry = "_%s%s" % (curr.__class__.__name__, entry) + curr = getattr(curr, entry) + + result = curr + except: + pass + return result + + +def _run_with_interrupt_thread(original_func, py_db, curr_thread, frame, expression, is_exec): + on_interrupt_threads = None + timeout_tracker = py_db.timeout_tracker # : :type timeout_tracker: TimeoutTracker + + interrupt_thread_timeout = pydevd_constants.PYDEVD_INTERRUPT_THREAD_TIMEOUT + + if interrupt_thread_timeout > 0: + on_interrupt_threads = pydevd_timeout.create_interrupt_this_thread_callback() + pydev_log.info("Doing evaluate with interrupt threads timeout: %s.", interrupt_thread_timeout) + + if on_interrupt_threads is None: + return original_func(py_db, frame, expression, is_exec) + else: + with timeout_tracker.call_on_timeout(interrupt_thread_timeout, on_interrupt_threads): + return original_func(py_db, frame, expression, is_exec) + + +def _run_with_unblock_threads(original_func, py_db, curr_thread, frame, expression, is_exec): + on_timeout_unblock_threads = None + timeout_tracker = py_db.timeout_tracker # : :type timeout_tracker: TimeoutTracker + + if py_db.multi_threads_single_notification: + unblock_threads_timeout = pydevd_constants.PYDEVD_UNBLOCK_THREADS_TIMEOUT + else: + unblock_threads_timeout = -1 # Don't use this if threads are managed individually. + + if unblock_threads_timeout >= 0: + pydev_log.info("Doing evaluate with unblock threads timeout: %s.", unblock_threads_timeout) + tid = get_current_thread_id(curr_thread) + + def on_timeout_unblock_threads(): + on_timeout_unblock_threads.called = True + pydev_log.info("Resuming threads after evaluate timeout.") + resume_threads("*", except_thread=curr_thread) + py_db.threads_suspended_single_notification.on_thread_resume(tid, curr_thread) + + on_timeout_unblock_threads.called = False + + try: + if on_timeout_unblock_threads is None: + return _run_with_interrupt_thread(original_func, py_db, curr_thread, frame, expression, is_exec) + else: + with timeout_tracker.call_on_timeout(unblock_threads_timeout, on_timeout_unblock_threads): + return _run_with_interrupt_thread(original_func, py_db, curr_thread, frame, expression, is_exec) + + finally: + if on_timeout_unblock_threads is not None and on_timeout_unblock_threads.called: + mark_thread_suspended(curr_thread, CMD_SET_BREAK) + py_db.threads_suspended_single_notification.increment_suspend_time() + suspend_all_threads(py_db, except_thread=curr_thread) + py_db.threads_suspended_single_notification.on_thread_suspend(tid, curr_thread, CMD_SET_BREAK) + + +def _evaluate_with_timeouts(original_func): + """ + Provides a decorator that wraps the original evaluate to deal with slow evaluates. + + If some evaluation is too slow, we may show a message, resume threads or interrupt them + as needed (based on the related configurations). + """ + + @functools.wraps(original_func) + def new_func(py_db, frame, expression, is_exec): + if py_db is None: + # Only for testing... + pydev_log.critical("_evaluate_with_timeouts called without py_db!") + return original_func(py_db, frame, expression, is_exec) + warn_evaluation_timeout = pydevd_constants.PYDEVD_WARN_EVALUATION_TIMEOUT + curr_thread = threading.current_thread() + + def on_warn_evaluation_timeout(): + py_db.writer.add_command(py_db.cmd_factory.make_evaluation_timeout_msg(py_db, expression, curr_thread)) + + timeout_tracker = py_db.timeout_tracker # : :type timeout_tracker: TimeoutTracker + with timeout_tracker.call_on_timeout(warn_evaluation_timeout, on_warn_evaluation_timeout): + return _run_with_unblock_threads(original_func, py_db, curr_thread, frame, expression, is_exec) + + return new_func + + +_ASYNC_COMPILE_FLAGS = None +try: + from ast import PyCF_ALLOW_TOP_LEVEL_AWAIT + + _ASYNC_COMPILE_FLAGS = PyCF_ALLOW_TOP_LEVEL_AWAIT +except: + pass + + +def compile_as_eval(expression): + """ + + :param expression: + The expression to be _compiled. + + :return: code object + + :raises Exception if the expression cannot be evaluated. + """ + expression_to_evaluate = _expression_to_evaluate(expression) + if _ASYNC_COMPILE_FLAGS is not None: + return compile(expression_to_evaluate, "", "eval", _ASYNC_COMPILE_FLAGS) + else: + return compile(expression_to_evaluate, "", "eval") + + +def _compile_as_exec(expression): + """ + + :param expression: + The expression to be _compiled. + + :return: code object + + :raises Exception if the expression cannot be evaluated. + """ + expression_to_evaluate = _expression_to_evaluate(expression) + if _ASYNC_COMPILE_FLAGS is not None: + return compile(expression_to_evaluate, "", "exec", _ASYNC_COMPILE_FLAGS) + else: + return compile(expression_to_evaluate, "", "exec") + + +class _EvalAwaitInNewEventLoop(PyDBDaemonThread): + def __init__(self, py_db, compiled, updated_globals, updated_locals): + PyDBDaemonThread.__init__(self, py_db) + self._compiled = compiled + self._updated_globals = updated_globals + self._updated_locals = updated_locals + + # Output + self.evaluated_value = None + self.exc = None + + async def _async_func(self): + return await eval(self._compiled, self._updated_locals, self._updated_globals) + + def _on_run(self): + try: + import asyncio + + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) + self.evaluated_value = asyncio.run(self._async_func()) + except: + self.exc = sys.exc_info() + + +@_evaluate_with_timeouts +def evaluate_expression(py_db, frame, expression, is_exec): + """ + :param str expression: + The expression to be evaluated. + + Note that if the expression is indented it's automatically dedented (based on the indentation + found on the first non-empty line). + + i.e.: something as: + + ` + def method(): + a = 1 + ` + + becomes: + + ` + def method(): + a = 1 + ` + + Also, it's possible to evaluate calls with a top-level await (currently this is done by + creating a new event loop in a new thread and making the evaluate at that thread -- note + that this is still done synchronously so the evaluation has to finish before this + function returns). + + :param is_exec: determines if we should do an exec or an eval. + There are some changes in this function depending on whether it's an exec or an eval. + + When it's an exec (i.e.: is_exec==True): + This function returns None. + Any exception that happens during the evaluation is reraised. + If the expression could actually be evaluated, the variable is printed to the console if not None. + + When it's an eval (i.e.: is_exec==False): + This function returns the result from the evaluation. + If some exception happens in this case, the exception is caught and a ExceptionOnEvaluate is returned. + Also, in this case we try to resolve name-mangling (i.e.: to be able to add a self.__my_var watch). + + :param py_db: + The debugger. Only needed if some top-level await is detected (for creating a + PyDBDaemonThread). + """ + if frame is None: + return + + # This is very tricky. Some statements can change locals and use them in the same + # call (see https://github.com/microsoft/debugpy/issues/815), also, if locals and globals are + # passed separately, it's possible that one gets updated but apparently Python will still + # try to load from the other, so, what's done is that we merge all in a single dict and + # then go on and update the frame with the results afterwards. + + # -- see tests in test_evaluate_expression.py + + # This doesn't work because the variables aren't updated in the locals in case the + # evaluation tries to set a variable and use it in the same expression. + # updated_globals = frame.f_globals + # updated_locals = frame.f_locals + + # This doesn't work because the variables aren't updated in the locals in case the + # evaluation tries to set a variable and use it in the same expression. + # updated_globals = {} + # updated_globals.update(frame.f_globals) + # updated_globals.update(frame.f_locals) + # + # updated_locals = frame.f_locals + + # This doesn't work either in the case where the evaluation tries to set a variable and use + # it in the same expression (I really don't know why as it seems like this *should* work + # in theory but doesn't in practice). + # updated_globals = {} + # updated_globals.update(frame.f_globals) + # + # updated_locals = {} + # updated_globals.update(frame.f_locals) + + # This is the only case that worked consistently to run the tests in test_evaluate_expression.py + # It's a bit unfortunate because although the exec works in this case, we have to manually + # put the updates in the frame locals afterwards. + updated_globals = {} + updated_globals.update(frame.f_globals) + updated_globals.update(frame.f_locals) + if "globals" not in updated_globals: + # If the user explicitly uses 'globals()' then we provide the + # frame globals (unless he has shadowed it already). + updated_globals["globals"] = lambda: frame.f_globals + + initial_globals = updated_globals.copy() + + updated_locals = None + + try: + expression = expression.replace("@LINE@", "\n") + + if is_exec: + try: + # Try to make it an eval (if it is an eval we can print it, otherwise we'll exec it and + # it will have whatever the user actually did) + compiled = compile_as_eval(expression) + except Exception: + compiled = None + + if compiled is None: + try: + compiled = _compile_as_exec(expression) + is_async = inspect.CO_COROUTINE & compiled.co_flags == inspect.CO_COROUTINE + if is_async: + t = _EvalAwaitInNewEventLoop(py_db, compiled, updated_globals, updated_locals) + t.start() + t.join() + + if t.exc: + raise t.exc[1].with_traceback(t.exc[2]) + else: + Exec(compiled, updated_globals, updated_locals) + finally: + # Update the globals even if it errored as it may have partially worked. + update_globals_and_locals(updated_globals, initial_globals, frame) + else: + is_async = inspect.CO_COROUTINE & compiled.co_flags == inspect.CO_COROUTINE + if is_async: + t = _EvalAwaitInNewEventLoop(py_db, compiled, updated_globals, updated_locals) + t.start() + t.join() + + if t.exc: + raise t.exc[1].with_traceback(t.exc[2]) + else: + result = t.evaluated_value + else: + result = eval(compiled, updated_globals, updated_locals) + if result is not None: # Only print if it's not None (as python does) + sys.stdout.write("%s\n" % (result,)) + return + + else: + ret = eval_in_context(expression, updated_globals, updated_locals, py_db) + try: + is_exception_returned = ret.__class__ == ExceptionOnEvaluate + except: + pass + else: + if not is_exception_returned: + # i.e.: by using a walrus assignment (:=), expressions can change the locals, + # so, make sure that we save the locals back to the frame. + update_globals_and_locals(updated_globals, initial_globals, frame) + return ret + finally: + # Should not be kept alive if an exception happens and this frame is kept in the stack. + del updated_globals + del updated_locals + del initial_globals + del frame + + +def change_attr_expression(frame, attr, expression, dbg, value=SENTINEL_VALUE): + """Changes some attribute in a given frame.""" + if frame is None: + return + + try: + expression = expression.replace("@LINE@", "\n") + + if dbg.plugin and value is SENTINEL_VALUE: + result = dbg.plugin.change_variable(frame, attr, expression) + if result is not dbg.plugin.EMPTY_SENTINEL: + return result + + if attr[:7] == "Globals": + attr = attr[8:] + if attr in frame.f_globals: + if value is SENTINEL_VALUE: + value = eval(expression, frame.f_globals, frame.f_locals) + frame.f_globals[attr] = value + return frame.f_globals[attr] + else: + if "." not in attr: # i.e.: if we have a '.', we're changing some attribute of a local var. + if pydevd_save_locals.is_save_locals_available(): + if value is SENTINEL_VALUE: + value = eval(expression, frame.f_globals, frame.f_locals) + frame.f_locals[attr] = value + pydevd_save_locals.save_locals(frame) + return frame.f_locals[attr] + + # i.e.: case with '.' or save locals not available (just exec the assignment in the frame). + if value is SENTINEL_VALUE: + value = eval(expression, frame.f_globals, frame.f_locals) + result = value + Exec("%s=%s" % (attr, expression), frame.f_globals, frame.f_locals) + return result + + except Exception: + pydev_log.exception() + + +MAXIMUM_ARRAY_SIZE = 100 +MAX_SLICE_SIZE = 1000 + + +def table_like_struct_to_xml(array, name, roffset, coffset, rows, cols, format): + _, type_name, _ = get_type(array) + if type_name == "ndarray": + array, metaxml, r, c, f = array_to_meta_xml(array, name, format) + xml = metaxml + format = "%" + f + if rows == -1 and cols == -1: + rows = r + cols = c + xml += array_to_xml(array, roffset, coffset, rows, cols, format) + elif type_name == "DataFrame": + xml = dataframe_to_xml(array, name, roffset, coffset, rows, cols, format) + else: + raise VariableError("Do not know how to convert type %s to table" % (type_name)) + + return "%s" % xml + + +def array_to_xml(array, roffset, coffset, rows, cols, format): + xml = "" + rows = min(rows, MAXIMUM_ARRAY_SIZE) + cols = min(cols, MAXIMUM_ARRAY_SIZE) + + # there is no obvious rule for slicing (at least 5 choices) + if len(array) == 1 and (rows > 1 or cols > 1): + array = array[0] + if array.size > len(array): + array = array[roffset:, coffset:] + rows = min(rows, len(array)) + cols = min(cols, len(array[0])) + if len(array) == 1: + array = array[0] + elif array.size == len(array): + if roffset == 0 and rows == 1: + array = array[coffset:] + cols = min(cols, len(array)) + elif coffset == 0 and cols == 1: + array = array[roffset:] + rows = min(rows, len(array)) + + xml += '' % (rows, cols) + for row in range(rows): + xml += '' % to_string(row) + for col in range(cols): + value = array + if rows == 1 or cols == 1: + if rows == 1 and cols == 1: + value = array[0] + else: + if rows == 1: + dim = col + else: + dim = row + value = array[dim] + if "ndarray" in str(type(value)): + value = value[0] + else: + value = array[row][col] + value = format % value + xml += var_to_xml(value, "") + return xml + + +def array_to_meta_xml(array, name, format): + type = array.dtype.kind + slice = name + l = len(array.shape) + + # initial load, compute slice + if format == "%": + if l > 2: + slice += "[0]" * (l - 2) + for r in range(l - 2): + array = array[0] + if type == "f": + format = ".5f" + elif type == "i" or type == "u": + format = "d" + else: + format = "s" + else: + format = format.replace("%", "") + + l = len(array.shape) + reslice = "" + if l > 2: + raise Exception("%s has more than 2 dimensions." % slice) + elif l == 1: + # special case with 1D arrays arr[i, :] - row, but arr[:, i] - column with equal shape and ndim + # http://stackoverflow.com/questions/16837946/numpy-a-2-rows-1-column-file-loadtxt-returns-1row-2-columns + # explanation: http://stackoverflow.com/questions/15165170/how-do-i-maintain-row-column-orientation-of-vectors-in-numpy?rq=1 + # we use kind of a hack - get information about memory from C_CONTIGUOUS + is_row = array.flags["C_CONTIGUOUS"] + + if is_row: + rows = 1 + cols = min(len(array), MAX_SLICE_SIZE) + if cols < len(array): + reslice = "[0:%s]" % (cols) + array = array[0:cols] + else: + cols = 1 + rows = min(len(array), MAX_SLICE_SIZE) + if rows < len(array): + reslice = "[0:%s]" % (rows) + array = array[0:rows] + elif l == 2: + rows = min(array.shape[-2], MAX_SLICE_SIZE) + cols = min(array.shape[-1], MAX_SLICE_SIZE) + if cols < array.shape[-1] or rows < array.shape[-2]: + reslice = "[0:%s, 0:%s]" % (rows, cols) + array = array[0:rows, 0:cols] + + # avoid slice duplication + if not slice.endswith(reslice): + slice += reslice + + bounds = (0, 0) + if type in "biufc": + bounds = (array.min(), array.max()) + xml = '' % ( + slice, + rows, + cols, + format, + type, + bounds[1], + bounds[0], + ) + return array, xml, rows, cols, format + + +def dataframe_to_xml(df, name, roffset, coffset, rows, cols, format): + """ + :type df: pandas.core.frame.DataFrame + :type name: str + :type coffset: int + :type roffset: int + :type rows: int + :type cols: int + :type format: str + + + """ + num_rows = min(df.shape[0], MAX_SLICE_SIZE) + num_cols = min(df.shape[1], MAX_SLICE_SIZE) + if (num_rows, num_cols) != df.shape: + df = df.iloc[0:num_rows, 0:num_cols] + slice = ".iloc[0:%s, 0:%s]" % (num_rows, num_cols) + else: + slice = "" + slice = name + slice + xml = '\n' % (slice, num_rows, num_cols) + + if (rows, cols) == (-1, -1): + rows, cols = num_rows, num_cols + + rows = min(rows, MAXIMUM_ARRAY_SIZE) + cols = min(min(cols, MAXIMUM_ARRAY_SIZE), num_cols) + # need to precompute column bounds here before slicing! + col_bounds = [None] * cols + for col in range(cols): + dtype = df.dtypes.iloc[coffset + col].kind + if dtype in "biufc": + cvalues = df.iloc[:, coffset + col] + bounds = (cvalues.min(), cvalues.max()) + else: + bounds = (0, 0) + col_bounds[col] = bounds + + df = df.iloc[roffset : roffset + rows, coffset : coffset + cols] + rows, cols = df.shape + + xml += '\n' % (rows, cols) + format = format.replace("%", "") + col_formats = [] + + get_label = lambda label: str(label) if not isinstance(label, tuple) else "/".join(map(str, label)) + + for col in range(cols): + dtype = df.dtypes.iloc[col].kind + if dtype == "f" and format: + fmt = format + elif dtype == "f": + fmt = ".5f" + elif dtype == "i" or dtype == "u": + fmt = "d" + else: + fmt = "s" + col_formats.append("%" + fmt) + bounds = col_bounds[col] + + xml += '\n' % ( + str(col), + get_label(df.axes[1].values[col]), + dtype, + fmt, + bounds[1], + bounds[0], + ) + for row, label in enumerate(iter(df.axes[0])): + xml += '\n' % (str(row), get_label(label)) + xml += "\n" + xml += '\n' % (rows, cols) + for row in range(rows): + xml += '\n' % str(row) + for col in range(cols): + value = df.iat[row, col] + value = col_formats[col] % value + xml += var_to_xml(value, "") + return xml diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py new file mode 100644 index 0000000..aaca38e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py @@ -0,0 +1,40 @@ +import sys + + +# ======================================================================================================================= +# PydevdVmType +# ======================================================================================================================= +class PydevdVmType: + PYTHON = "python" + JYTHON = "jython" + vm_type = None + + +# ======================================================================================================================= +# set_vm_type +# ======================================================================================================================= +def set_vm_type(vm_type): + PydevdVmType.vm_type = vm_type + + +# ======================================================================================================================= +# get_vm_type +# ======================================================================================================================= +def get_vm_type(): + if PydevdVmType.vm_type is None: + setup_type() + return PydevdVmType.vm_type + + +# ======================================================================================================================= +# setup_type +# ======================================================================================================================= +def setup_type(str=None): + if str is not None: + PydevdVmType.vm_type = str + return + + if sys.platform.startswith("java"): + PydevdVmType.vm_type = PydevdVmType.JYTHON + else: + PydevdVmType.vm_type = PydevdVmType.PYTHON diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_xml.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_xml.py new file mode 100644 index 0000000..af8ad0f --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_xml.py @@ -0,0 +1,434 @@ +from _pydev_bundle import pydev_log +from _pydevd_bundle import pydevd_extension_utils +from _pydevd_bundle import pydevd_resolver +import sys +from _pydevd_bundle.pydevd_constants import ( + BUILTINS_MODULE_NAME, + MAXIMUM_VARIABLE_REPRESENTATION_SIZE, + RETURN_VALUES_DICT, + LOAD_VALUES_ASYNC, + DEFAULT_VALUE, +) +from _pydev_bundle.pydev_imports import quote +from _pydevd_bundle.pydevd_extension_api import TypeResolveProvider, StrPresentationProvider +from _pydevd_bundle.pydevd_utils import isinstance_checked, hasattr_checked, DAPGrouper +from _pydevd_bundle.pydevd_resolver import get_var_scope, MoreItems, MoreItemsRange +from typing import Optional + +try: + import types + + frame_type = types.FrameType +except: + frame_type = None + + +def make_valid_xml_value(s): + # Same thing as xml.sax.saxutils.escape but also escaping double quotes. + return s.replace("&", "&").replace("<", "<").replace(">", ">").replace('"', """) + + +class ExceptionOnEvaluate: + def __init__(self, result, etype, tb): + self.result = result + self.etype = etype + self.tb = tb + + +_IS_JYTHON = sys.platform.startswith("java") + + +def _create_default_type_map(): + default_type_map = [ + # None means that it should not be treated as a compound variable + # isintance does not accept a tuple on some versions of python, so, we must declare it expanded + ( + type(None), + None, + ), + (int, None), + (float, None), + (complex, None), + (str, None), + (tuple, pydevd_resolver.tupleResolver), + (list, pydevd_resolver.tupleResolver), + (dict, pydevd_resolver.dictResolver), + ] + try: + from collections import OrderedDict + + default_type_map.insert(0, (OrderedDict, pydevd_resolver.orderedDictResolver)) + # we should put it before dict + except: + pass + + try: + default_type_map.append((long, None)) # @UndefinedVariable + except: + pass # not available on all python versions + + default_type_map.append((DAPGrouper, pydevd_resolver.dapGrouperResolver)) + default_type_map.append((MoreItems, pydevd_resolver.forwardInternalResolverToObject)) + default_type_map.append((MoreItemsRange, pydevd_resolver.forwardInternalResolverToObject)) + + try: + default_type_map.append((set, pydevd_resolver.setResolver)) + except: + pass # not available on all python versions + + try: + default_type_map.append((frozenset, pydevd_resolver.setResolver)) + except: + pass # not available on all python versions + + try: + from django.utils.datastructures import MultiValueDict + + default_type_map.insert(0, (MultiValueDict, pydevd_resolver.multiValueDictResolver)) + # we should put it before dict + except: + pass # django may not be installed + + try: + from django.forms import BaseForm + + default_type_map.insert(0, (BaseForm, pydevd_resolver.djangoFormResolver)) + # we should put it before instance resolver + except: + pass # django may not be installed + + try: + from collections import deque + + default_type_map.append((deque, pydevd_resolver.dequeResolver)) + except: + pass + + try: + from ctypes import Array + + default_type_map.append((Array, pydevd_resolver.tupleResolver)) + except: + pass + + if frame_type is not None: + default_type_map.append((frame_type, pydevd_resolver.frameResolver)) + + if _IS_JYTHON: + from org.python import core # @UnresolvedImport + + default_type_map.append((core.PyNone, None)) + default_type_map.append((core.PyInteger, None)) + default_type_map.append((core.PyLong, None)) + default_type_map.append((core.PyFloat, None)) + default_type_map.append((core.PyComplex, None)) + default_type_map.append((core.PyString, None)) + default_type_map.append((core.PyTuple, pydevd_resolver.tupleResolver)) + default_type_map.append((core.PyList, pydevd_resolver.tupleResolver)) + default_type_map.append((core.PyDictionary, pydevd_resolver.dictResolver)) + default_type_map.append((core.PyStringMap, pydevd_resolver.dictResolver)) + + if hasattr(core, "PyJavaInstance"): + # Jython 2.5b3 removed it. + default_type_map.append((core.PyJavaInstance, pydevd_resolver.instanceResolver)) + + return default_type_map + + +class TypeResolveHandler(object): + NO_PROVIDER = [] # Sentinel value (any mutable object to be used as a constant would be valid). + + def __init__(self): + # Note: don't initialize with the types we already know about so that the extensions can override + # the default resolvers that are already available if they want. + self._type_to_resolver_cache = {} + self._type_to_str_provider_cache = {} + self._initialized = False + + def _initialize(self): + self._default_type_map = _create_default_type_map() + self._resolve_providers = pydevd_extension_utils.extensions_of_type(TypeResolveProvider) + self._str_providers = pydevd_extension_utils.extensions_of_type(StrPresentationProvider) + self._initialized = True + + def get_type(self, o): + try: + try: + # Faster than type(o) as we don't need the function call. + type_object = o.__class__ # could fail here + type_name = type_object.__name__ + return self._get_type(o, type_object, type_name) # could fail here + except: + # Not all objects have __class__ (i.e.: there are bad bindings around). + type_object = type(o) + type_name = type_object.__name__ + + try: + return self._get_type(o, type_object, type_name) + except: + if isinstance(type_object, type): + # If it's still something manageable, use the default resolver, otherwise + # fallback to saying that it wasn't possible to get any info on it. + return type_object, str(type_name), pydevd_resolver.defaultResolver + + return "Unable to get Type", "Unable to get Type", None + except: + # This happens for org.python.core.InitModule + return "Unable to get Type", "Unable to get Type", None + + def _get_type(self, o, type_object, type_name): + # Note: we could have an exception here if the type_object is not hashable... + resolver = self._type_to_resolver_cache.get(type_object) + if resolver is not None: + return type_object, type_name, resolver + + if not self._initialized: + self._initialize() + + try: + for resolver in self._resolve_providers: + if resolver.can_provide(type_object, type_name): + # Cache it + self._type_to_resolver_cache[type_object] = resolver + return type_object, type_name, resolver + + for t in self._default_type_map: + if isinstance_checked(o, t[0]): + # Cache it + resolver = t[1] + self._type_to_resolver_cache[type_object] = resolver + return (type_object, type_name, resolver) + except: + pydev_log.exception() + + # No match return default (and cache it). + resolver = pydevd_resolver.defaultResolver + self._type_to_resolver_cache[type_object] = resolver + return type_object, type_name, resolver + + if _IS_JYTHON: + _base_get_type = _get_type + + def _get_type(self, o, type_object, type_name): + if type_name == "org.python.core.PyJavaInstance": + return type_object, type_name, pydevd_resolver.instanceResolver + + if type_name == "org.python.core.PyArray": + return type_object, type_name, pydevd_resolver.jyArrayResolver + + return self._base_get_type(o, type_object, type_name) + + def _get_str_from_provider(self, provider, o, context: Optional[str] = None): + if context is not None: + get_str_in_context = getattr(provider, "get_str_in_context", None) + if get_str_in_context is not None: + return get_str_in_context(o, context) + + return provider.get_str(o) + + def str_from_providers(self, o, type_object, type_name, context: Optional[str] = None): + provider = self._type_to_str_provider_cache.get(type_object) + + if provider is self.NO_PROVIDER: + return None + + if provider is not None: + return self._get_str_from_provider(provider, o, context) + + if not self._initialized: + self._initialize() + + for provider in self._str_providers: + if provider.can_provide(type_object, type_name): + self._type_to_str_provider_cache[type_object] = provider + try: + return self._get_str_from_provider(provider, o, context) + except: + pydev_log.exception("Error when getting str with custom provider: %s." % (provider,)) + + self._type_to_str_provider_cache[type_object] = self.NO_PROVIDER + return None + + +_TYPE_RESOLVE_HANDLER = TypeResolveHandler() + +""" +def get_type(o): + Receives object and returns a triple (type_object, type_string, resolver). + + resolver != None means that variable is a container, and should be displayed as a hierarchy. + + Use the resolver to get its attributes. + + All container objects (i.e.: dict, list, tuple, object, etc) should have a resolver. +""" +get_type = _TYPE_RESOLVE_HANDLER.get_type + +_str_from_providers = _TYPE_RESOLVE_HANDLER.str_from_providers + + +def is_builtin(x): + return getattr(x, "__module__", None) == BUILTINS_MODULE_NAME + + +def should_evaluate_full_value(val): + return not LOAD_VALUES_ASYNC or (is_builtin(type(val)) and not isinstance_checked(val, (list, tuple, dict))) + + +def return_values_from_dict_to_xml(return_dict): + res = [] + for name, val in return_dict.items(): + res.append(var_to_xml(val, name, additional_in_xml=' isRetVal="True"')) + return "".join(res) + + +def frame_vars_to_xml(frame_f_locals, hidden_ns=None): + """dumps frame variables to XML + + """ + xml = [] + + keys = sorted(frame_f_locals) + + return_values_xml = [] + + for k in keys: + try: + v = frame_f_locals[k] + eval_full_val = should_evaluate_full_value(v) + + if k == "_pydev_stop_at_break": + continue + + if k == RETURN_VALUES_DICT: + for name, val in v.items(): + return_values_xml.append(var_to_xml(val, name, additional_in_xml=' isRetVal="True"')) + + else: + if hidden_ns is not None and k in hidden_ns: + xml.append(var_to_xml(v, str(k), additional_in_xml=' isIPythonHidden="True"', evaluate_full_value=eval_full_val)) + else: + xml.append(var_to_xml(v, str(k), evaluate_full_value=eval_full_val)) + except Exception: + pydev_log.exception("Unexpected error, recovered safely.") + + # Show return values as the first entry. + return_values_xml.extend(xml) + return "".join(return_values_xml) + + +def get_variable_details(val, evaluate_full_value=True, to_string=None, context: Optional[str] = None): + """ + :param context: + This is the context in which the variable is being requested. Valid values: + "watch", + "repl", + "hover", + "clipboard" + """ + try: + # This should be faster than isinstance (but we have to protect against not having a '__class__' attribute). + is_exception_on_eval = val.__class__ == ExceptionOnEvaluate + except: + is_exception_on_eval = False + + if is_exception_on_eval: + v = val.result + else: + v = val + + _type, type_name, resolver = get_type(v) + type_qualifier = getattr(_type, "__module__", "") + if not evaluate_full_value: + value = DEFAULT_VALUE + else: + try: + str_from_provider = _str_from_providers(v, _type, type_name, context) + if str_from_provider is not None: + value = str_from_provider + + elif to_string is not None: + value = to_string(v) + + elif hasattr_checked(v, "__class__"): + if v.__class__ == frame_type: + value = pydevd_resolver.frameResolver.get_frame_name(v) + + elif v.__class__ in (list, tuple): + if len(v) > 300: + value = "%s: %s" % (str(v.__class__), "" % (len(v),)) + else: + value = "%s: %s" % (str(v.__class__), v) + else: + try: + cName = str(v.__class__) + if cName.find(".") != -1: + cName = cName.split(".")[-1] + + elif cName.find("'") != -1: # does not have '.' (could be something like ) + cName = cName[cName.index("'") + 1 :] + + if cName.endswith("'>"): + cName = cName[:-2] + except: + cName = str(v.__class__) + + value = "%s: %s" % (cName, v) + else: + value = str(v) + except: + try: + value = repr(v) + except: + value = "Unable to get repr for %s" % v.__class__ + + # fix to work with unicode values + try: + if value.__class__ == bytes: + value = value.decode("utf-8", "replace") + except TypeError: + pass + + return type_name, type_qualifier, is_exception_on_eval, resolver, value + + +def var_to_xml(val, name, trim_if_too_big=True, additional_in_xml="", evaluate_full_value=True): + """single variable or dictionary to xml representation""" + + type_name, type_qualifier, is_exception_on_eval, resolver, value = get_variable_details(val, evaluate_full_value) + + scope = get_var_scope(name, val, "", True) + try: + name = quote(name, "/>_= ") # TODO: Fix PY-5834 without using quote + except: + pass + + xml = ' MAXIMUM_VARIABLE_REPRESENTATION_SIZE and trim_if_too_big: + value = value[0:MAXIMUM_VARIABLE_REPRESENTATION_SIZE] + value += "..." + + xml_value = ' value="%s"' % (make_valid_xml_value(quote(value, "/>_= "))) + else: + xml_value = "" + + if is_exception_on_eval: + xml_container = ' isErrorOnEval="True"' + else: + if resolver is not None: + xml_container = ' isContainer="True"' + else: + xml_container = "" + + if scope: + return "".join((xml, xml_qualifier, xml_value, xml_container, additional_in_xml, ' scope="', scope, '"', " />\n")) + else: + return "".join((xml, xml_qualifier, xml_value, xml_container, additional_in_xml, " />\n")) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/.gitignore b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/.gitignore new file mode 100644 index 0000000..b1a6718 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/.gitignore @@ -0,0 +1,3 @@ +/pydevd_frame_evaluator.*.so +/pydevd_frame_evaluator.*.pyd +/pydevd_frame_evaluator.pyx diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__init__.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..bfc52da Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_frame_eval_cython_wrapper.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_frame_eval_cython_wrapper.cpython-312.pyc new file mode 100644 index 0000000..080ab0b Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_frame_eval_cython_wrapper.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_frame_eval_main.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_frame_eval_main.cpython-312.pyc new file mode 100644 index 0000000..b1a3cc8 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_frame_eval_main.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_frame_tracing.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_frame_tracing.cpython-312.pyc new file mode 100644 index 0000000..c6c4f2e Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_frame_tracing.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_modify_bytecode.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_modify_bytecode.cpython-312.pyc new file mode 100644 index 0000000..47c96c6 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/__pycache__/pydevd_modify_bytecode.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_cython_wrapper.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_cython_wrapper.py new file mode 100644 index 0000000..7b7effc --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_cython_wrapper.py @@ -0,0 +1,43 @@ +try: + try: + from _pydevd_frame_eval_ext import pydevd_frame_evaluator as mod + except ImportError: + from _pydevd_frame_eval import pydevd_frame_evaluator as mod + +except ImportError: + try: + import sys + + try: + is_64bits = sys.maxsize > 2**32 + except: + # In Jython this call fails, but this is Ok, we don't support Jython for speedups anyways. + raise ImportError + plat = "32" + if is_64bits: + plat = "64" + + # We also accept things as: + # + # _pydevd_frame_eval.pydevd_frame_evaluator_win32_27_32 + # _pydevd_frame_eval.pydevd_frame_evaluator_win32_34_64 + # + # to have multiple pre-compiled pyds distributed along the IDE + # (generated by build_tools/build_binaries_windows.py). + + mod_name = "pydevd_frame_evaluator_%s_%s%s_%s" % (sys.platform, sys.version_info[0], sys.version_info[1], plat) + check_name = "_pydevd_frame_eval.%s" % (mod_name,) + mod = __import__(check_name) + mod = getattr(mod, mod_name) + except ImportError: + raise + +frame_eval_func = mod.frame_eval_func + +stop_frame_eval = mod.stop_frame_eval + +dummy_trace_dispatch = mod.dummy_trace_dispatch + +get_thread_info_py = mod.get_thread_info_py + +clear_thread_local_info = mod.clear_thread_local_info diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py new file mode 100644 index 0000000..1049be0 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py @@ -0,0 +1,71 @@ +import os + +from _pydev_bundle import pydev_log +from _pydevd_bundle.pydevd_trace_dispatch import USING_CYTHON +from _pydevd_bundle.pydevd_constants import ( + USE_CYTHON_FLAG, + ENV_FALSE_LOWER_VALUES, + ENV_TRUE_LOWER_VALUES, + IS_PY36_OR_GREATER, + IS_PY38_OR_GREATER, + SUPPORT_GEVENT, + IS_PYTHON_STACKLESS, + PYDEVD_USE_FRAME_EVAL, + PYDEVD_IPYTHON_COMPATIBLE_DEBUGGING, + IS_PY311_OR_GREATER, +) + +frame_eval_func = None +stop_frame_eval = None +dummy_trace_dispatch = None +clear_thread_local_info = None + +# "NO" means we should not use frame evaluation, 'YES' we should use it (and fail if not there) and unspecified uses if possible. +if ( + PYDEVD_USE_FRAME_EVAL in ENV_FALSE_LOWER_VALUES + or USE_CYTHON_FLAG in ENV_FALSE_LOWER_VALUES + or not USING_CYTHON + or + # Frame eval mode does not work with ipython compatible debugging (this happens because the + # way that frame eval works is run untraced and set tracing only for the frames with + # breakpoints, but ipython compatible debugging creates separate frames for what's logically + # the same frame). + PYDEVD_IPYTHON_COMPATIBLE_DEBUGGING +): + USING_FRAME_EVAL = False + +elif SUPPORT_GEVENT or (IS_PYTHON_STACKLESS and not IS_PY38_OR_GREATER): + USING_FRAME_EVAL = False + # i.e gevent and frame eval mode don't get along very well. + # https://github.com/microsoft/debugpy/issues/189 + # Same problem with Stackless. + # https://github.com/stackless-dev/stackless/issues/240 + +elif PYDEVD_USE_FRAME_EVAL in ENV_TRUE_LOWER_VALUES and not IS_PY311_OR_GREATER: + # Python 3.11 onwards doesn't have frame eval mode implemented + # Fail if unable to use + from _pydevd_frame_eval.pydevd_frame_eval_cython_wrapper import ( + frame_eval_func, + stop_frame_eval, + dummy_trace_dispatch, + clear_thread_local_info, + ) + + USING_FRAME_EVAL = True + +else: + USING_FRAME_EVAL = False + # Try to use if possible + if IS_PY36_OR_GREATER and not IS_PY311_OR_GREATER: + # Python 3.11 onwards doesn't have frame eval mode implemented + try: + from _pydevd_frame_eval.pydevd_frame_eval_cython_wrapper import ( + frame_eval_func, + stop_frame_eval, + dummy_trace_dispatch, + clear_thread_local_info, + ) + + USING_FRAME_EVAL = True + except ImportError: + pydev_log.show_compile_cython_command_line() diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c new file mode 100644 index 0000000..aebeeab --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c @@ -0,0 +1,26454 @@ +/* Generated by Cython 3.0.11 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "_pydevd_frame_eval/release_mem.h" + ], + "include_dirs": [ + "_pydevd_frame_eval" + ], + "name": "_pydevd_frame_eval.pydevd_frame_evaluator", + "sources": [ + "_pydevd_frame_eval/pydevd_frame_evaluator.pyx" + ] + }, + "module_name": "_pydevd_frame_eval.pydevd_frame_evaluator" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +#if defined(CYTHON_LIMITED_API) && 0 + #ifndef Py_LIMITED_API + #if CYTHON_LIMITED_API+0 > 0x03030000 + #define Py_LIMITED_API CYTHON_LIMITED_API + #else + #define Py_LIMITED_API 0x03030000 + #endif + #endif +#endif + +#include "Python.h" +#if PY_VERSION_HEX >= 0x03090000 +#include "internal/pycore_gc.h" +#include "internal/pycore_interp.h" +#endif + +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.7+ or Python 3.3+. +#else +#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API +#define __PYX_EXTRA_ABI_MODULE_NAME "limited" +#else +#define __PYX_EXTRA_ABI_MODULE_NAME "" +#endif +#define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." +#define CYTHON_HEX_VERSION 0x03000BF0 +#define CYTHON_FUTURE_DIVISION 1 +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_NOGIL 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_NOGIL 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_NOGIL 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 1 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_NOGIL 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #ifndef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #endif +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_NOGIL 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #if PY_VERSION_HEX < 0x030400a1 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #elif !defined(CYTHON_USE_TP_FINALIZE) + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #if PY_VERSION_HEX < 0x030600B1 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) + #endif + #if PY_VERSION_HEX < 0x030700A3 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #elif !defined(CYTHON_USE_EXC_INFO_STACK) + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if !defined(CYTHON_VECTORCALL) +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_MAJOR_VERSION < 3 + #include "longintrepr.h" + #endif + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_DefaultClassType PyClass_Type + #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" + #define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } + #ifndef CO_OPTIMIZED + #define CO_OPTIMIZED 0x0001 + #endif + #ifndef CO_NEWLOCALS + #define CO_NEWLOCALS 0x0002 + #endif + #ifndef CO_VARARGS + #define CO_VARARGS 0x0004 + #endif + #ifndef CO_VARKEYWORDS + #define CO_VARKEYWORDS 0x0008 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x0200 + #endif + #ifndef CO_GENERATOR + #define CO_GENERATOR 0x0020 + #endif + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x0080 + #endif +#elif PY_VERSION_HEX >= 0x030B0000 + static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); + if (!empty_bytes) return NULL; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes); + Py_DECREF(empty_bytes); + return result; + } +#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +#endif +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 +#endif +#ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_MAJOR_VERSION >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x030900B1 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif +#if PY_MAJOR_VERSION < 3 + #if CYTHON_COMPILING_IN_PYPY + #if PYPY_VERSION_NUM < 0x07030600 + #if defined(__cplusplus) && __cplusplus >= 201402L + [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]] + #elif defined(__GNUC__) || defined(__clang__) + __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))) + #elif defined(_MSC_VER) + __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")) + #endif + static CYTHON_INLINE int PyGILState_Check(void) { + return 0; + } + #else // PYPY_VERSION_NUM < 0x07030600 + #endif // PYPY_VERSION_NUM < 0x07030600 + #else + static CYTHON_INLINE int PyGILState_Check(void) { + PyThreadState * tstate = _PyThreadState_Current; + return tstate && (tstate == PyGILState_GetThisThreadState()); + } + #endif +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) + #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) + #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v) +#else + #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v) +#endif +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define CYTHON_PEP393_ENABLED 1 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) + #undef PyUnicode_Contains + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode + #define PyObject_Unicode PyObject_Str +#endif +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define __Pyx_Py3Int_Check(op) PyLong_Check(op) + #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#else + #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) + #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #if !defined(_USE_MATH_DEFINES) + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE___pydevd_frame_eval__pydevd_frame_evaluator +#define __PYX_HAVE_API___pydevd_frame_eval__pydevd_frame_evaluator +/* Early includes */ +#include "frameobject.h" +#include "release_mem.h" +#include "code.h" +#include "pystate.h" +#if PY_VERSION_HEX >= 0x03080000 +#include "internal/pycore_pystate.h" +#endif + +#include "ceval.h" + +#if PY_VERSION_HEX >= 0x03090000 +PyObject * noop(PyFrameObject *frame, int exc) { + return NULL; +} +#define CALL_EvalFrameDefault_38(a, b) noop(a, b) +#define CALL_EvalFrameDefault_39(a, b, c) _PyEval_EvalFrameDefault(a, b, c) +#else +PyObject * noop(PyThreadState* tstate, PyFrameObject *frame, int exc) { + return NULL; +} +#define CALL_EvalFrameDefault_39(a, b, c) noop(a, b, c) +#define CALL_EvalFrameDefault_38(a, b) _PyEval_EvalFrameDefault(a, b) +#endif + +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +#include +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = (char) c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#include +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char *__pyx_f[] = { + "_pydevd_frame_eval\\\\pydevd_frame_evaluator.pyx", + "", + "_pydevd_bundle\\\\pydevd_cython.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo; +struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo; +struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo; +struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo; +struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue; + +/* "_pydevd_bundle/pydevd_cython.pxd":1 + * cdef class PyDBAdditionalThreadInfo: # <<<<<<<<<<<<<< + * cdef public int pydev_state + * cdef public object pydev_step_stop # Actually, it's a frame or None + */ +struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo { + PyObject_HEAD + struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_vtab; + int pydev_state; + PyObject *pydev_step_stop; + int pydev_original_step_cmd; + int pydev_step_cmd; + int pydev_notify_kill; + PyObject *pydev_smart_step_stop; + int pydev_django_resolve_frame; + PyObject *pydev_call_from_jinja2; + PyObject *pydev_call_inside_jinja2; + int is_tracing; + PyObject *conditional_breakpoint_exception; + PyObject *pydev_message; + int suspend_type; + int pydev_next_line; + PyObject *pydev_func_name; + int suspended_at_unhandled; + PyObject *trace_suspend_type; + PyObject *top_level_thread_tracer_no_back_frames; + PyObject *top_level_thread_tracer_unhandled; + PyObject *thread_tracer; + PyObject *step_in_initial_location; + int pydev_smart_parent_offset; + int pydev_smart_child_offset; + PyObject *pydev_smart_step_into_variants; + PyObject *target_id_to_smart_step_into_variant; + int pydev_use_scoped_step_frame; + PyObject *weak_thread; + int is_in_wait_loop; +}; + + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":24 + * + * + * cdef class ThreadInfo: # <<<<<<<<<<<<<< + * + * cdef public PyDBAdditionalThreadInfo additional_info + */ +struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo { + PyObject_HEAD + struct __pyx_vtabstruct_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_vtab; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *additional_info; + int is_pydevd_thread; + int inside_frame_eval; + int fully_initialized; + PyObject *thread_trace_func; + int _can_create_dummy_thread; + int force_stay_in_untraced_mode; +}; + + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":125 + * + * + * cdef class FuncCodeInfo: # <<<<<<<<<<<<<< + * + * cdef public str co_filename + */ +struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo { + PyObject_HEAD + PyObject *co_filename; + PyObject *co_name; + PyObject *canonical_normalized_filename; + int always_skip_code; + int breakpoint_found; + PyObject *new_code; + int breakpoints_mtime; +}; + + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":316 + * + * + * cdef class _CodeLineInfo: # <<<<<<<<<<<<<< + * + * cdef public dict line_to_offset + */ +struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo { + PyObject_HEAD + PyObject *line_to_offset; + int first_line; + int last_line; +}; + + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":361 + * + * + * cdef class _CacheValue(object): # <<<<<<<<<<<<<< + * + * cdef public object code_obj_py + */ +struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue { + PyObject_HEAD + struct __pyx_vtabstruct_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_vtab; + PyObject *code_obj_py; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *code_line_info; + PyObject *breakpoints_hit_at_lines; + PyObject *code_lines_as_set; +}; + + + +/* "_pydevd_bundle/pydevd_cython.pxd":1 + * cdef class PyDBAdditionalThreadInfo: # <<<<<<<<<<<<<< + * cdef public int pydev_state + * cdef public object pydev_step_stop # Actually, it's a frame or None + */ + +struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo { + PyObject *(*get_topmost_frame)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*update_stepping_info)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch); + PyObject *(*_get_related_thread)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch); + int (*_is_stepping)(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo; + + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":24 + * + * + * cdef class ThreadInfo: # <<<<<<<<<<<<<< + * + * cdef public PyDBAdditionalThreadInfo additional_info + */ + +struct __pyx_vtabstruct_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo { + PyObject *(*initialize)(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *, PyFrameObject *); + PyObject *(*initialize_if_possible)(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *); +}; +static struct __pyx_vtabstruct_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_vtabptr_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo; + + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":361 + * + * + * cdef class _CacheValue(object): # <<<<<<<<<<<<<< + * + * cdef public object code_obj_py + */ + +struct __pyx_vtabstruct_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue { + PyObject *(*compute_force_stay_in_untraced_mode)(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_vtabptr_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) + #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() +#endif + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto */ +#include + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) +#else + #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) +#endif +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) + #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) +#else + #define __Pyx_Arg_NewRef_VARARGS(arg) arg + #define __Pyx_Arg_XDECREF_VARARGS(arg) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_Arg_FASTCALL(args, i) args[i] + #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif + #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs + to have the same reference counting */ + #define __Pyx_Arg_XDECREF_FASTCALL(arg) +#else + #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS + #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) + #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) +#else +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (1) +#elif CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000) + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* PyIntBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* SliceObject.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +/* StrEquals.proto */ +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals +#else +#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals +#endif + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* PyObjectCallNoArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* RaiseUnboundLocalError.proto */ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* KeywordStringCheck.proto */ +static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, + PyObject **argnames[], + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, + const char* function_name); + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* DictGetItem.proto */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* RaiseTooManyValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* RaiseNeedMoreValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* IterFinish.proto */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* UnpackItemEndCheck.proto */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + +/* PyObjectCallMethod0.proto */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* RaiseNoneIterError.proto */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* UnpackTupleError.proto */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto */ +#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\ + (likely(is_tuple || PyTuple_Check(tuple)) ?\ + (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\ + __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\ + (__Pyx_UnpackTupleError(tuple, 2), -1)) :\ + __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* PyDictContains.proto */ +static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { + int result = PyDict_Contains(dict, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* GetAttr.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +/* HasAttr.proto */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); + +/* IncludeStructmemberH.proto */ +#include + +/* FixUpExtensionType.proto */ +#if CYTHON_USE_TYPE_SPECS +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); +#endif + +/* ValidateBasesTuple.proto */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* PyObject_GenericGetAttrNoDict.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr +#endif + +/* PyObject_GenericGetAttr.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr +#endif + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +#if !CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_MergeVtables(PyTypeObject *type); +#endif + +/* SetupReduce.proto */ +#if !CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_setup_reduce(PyObject* type_obj); +#endif + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11 +#define __PYX_HAVE_RT_ImportType_proto_3_0_11 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_0_11 { + __Pyx_ImportType_CheckSize_Error_3_0_11 = 0, + __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size); +#endif + +/* ImportDottedModule.proto */ +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); +#if PY_MAJOR_VERSION >= 3 +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); +#endif + +/* FetchSharedCythonModule.proto */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto */ +#if !CYTHON_USE_TYPE_SPECS +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); +#else +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); +#endif + +/* PyMethodNew.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *typesModule=NULL, *methodType=NULL, *result=NULL; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + typesModule = PyImport_ImportModule("types"); + if (!typesModule) return NULL; + methodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + if (!methodType) return NULL; + result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL); + Py_DECREF(methodType); + return result; +} +#elif PY_MAJOR_VERSION >= 3 +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#else + #define __Pyx_PyMethod_New PyMethod_New +#endif + +/* PyVectorcallFastCallDict.proto */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_BACKPORT_VECTORCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + void *defaults; + int defaults_pyobjects; + size_t defaults_size; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, + size_t size, + int pyobjects); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_BACKPORT_VECTORCALL +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +#if !CYTHON_COMPILING_IN_LIMITED_API +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); +#endif + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#else +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +/* CheckBinaryVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + +/* #### Code section: module_declarations ### */ +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_initialize(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyFrameObject *__pyx_v_frame_obj); /* proto*/ +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_initialize_if_possible(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self); /* proto*/ +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_compute_force_stay_in_untraced_mode(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_breakpoints, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "cpython.mem" */ + +/* Module declarations from "_pydevd_bundle.pydevd_cython" */ + +/* Module declarations from "_pydevd_frame_eval.pydevd_frame_evaluator" */ +static int __pyx_v_18_pydevd_frame_eval_22pydevd_frame_evaluator__code_extra_index; +static int __pyx_v_18_pydevd_frame_eval_22pydevd_frame_evaluator_IS_PY_39_OWNARDS; +static struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_thread_info(PyFrameObject *); /*proto*/ +static struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_func_code_info(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *, PyFrameObject *, PyCodeObject *); /*proto*/ +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_generate_code_with_breakpoints(PyObject *, PyObject *); /*proto*/ +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytecode_while_frame_eval_38(PyFrameObject *, int); /*proto*/ +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytecode_while_frame_eval_39(PyThreadState *, PyFrameObject *, int); /*proto*/ +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle_ThreadInfo__set_state(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *, PyObject *); /*proto*/ +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle_FuncCodeInfo__set_state(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *, PyObject *); /*proto*/ +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle__CodeLineInfo__set_state(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *, PyObject *); /*proto*/ +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle__CacheValue__set_state(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "_pydevd_frame_eval.pydevd_frame_evaluator" +extern int __pyx_module_is_main__pydevd_frame_eval__pydevd_frame_evaluator; +int __pyx_module_is_main__pydevd_frame_eval__pydevd_frame_evaluator = 0; + +/* Implementation of "_pydevd_frame_eval.pydevd_frame_evaluator" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_AssertionError; +static PyObject *__pyx_builtin_AttributeError; +static PyObject *__pyx_builtin_min; +static PyObject *__pyx_builtin_max; +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "/"; +static const char __pyx_k__2[] = "\\"; +static const char __pyx_k__3[] = "."; +static const char __pyx_k__5[] = ""; +static const char __pyx_k_gc[] = "gc"; +static const char __pyx_k__10[] = "*"; +static const char __pyx_k__47[] = "?"; +static const char __pyx_k_arg[] = "arg"; +static const char __pyx_k_dis[] = "dis"; +static const char __pyx_k_get[] = "get"; +static const char __pyx_k_max[] = "max"; +static const char __pyx_k_min[] = "min"; +static const char __pyx_k_new[] = "__new__"; +static const char __pyx_k_obj[] = "obj"; +static const char __pyx_k_run[] = "run"; +static const char __pyx_k_sys[] = "sys"; +static const char __pyx_k_call[] = "__call__"; +static const char __pyx_k_dict[] = "__dict__"; +static const char __pyx_k_exec[] = "_exec"; +static const char __pyx_k_exit[] = "__exit__"; +static const char __pyx_k_line[] = "line"; +static const char __pyx_k_main[] = "main"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_self[] = "self"; +static const char __pyx_k_spec[] = "__spec__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_cache[] = "_cache"; +static const char __pyx_k_enter[] = "__enter__"; +static const char __pyx_k_event[] = "event"; +static const char __pyx_k_frame[] = "frame"; +static const char __pyx_k_local[] = "local"; +static const char __pyx_k_mtime[] = "mtime"; +static const char __pyx_k_rfind[] = "rfind"; +static const char __pyx_k_state[] = "state"; +static const char __pyx_k_active[] = "_active"; +static const char __pyx_k_call_2[] = "call"; +static const char __pyx_k_dict_2[] = "_dict"; +static const char __pyx_k_enable[] = "enable"; +static const char __pyx_k_f_back[] = "f_back"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_main_2[] = "__main__"; +static const char __pyx_k_offset[] = "offset"; +static const char __pyx_k_pickle[] = "pickle"; +static const char __pyx_k_plugin[] = "plugin"; +static const char __pyx_k_pydevd[] = "pydevd"; +static const char __pyx_k_reduce[] = "__reduce__"; +static const char __pyx_k_return[] = "return"; +static const char __pyx_k_thread[] = "thread"; +static const char __pyx_k_update[] = "update"; +static const char __pyx_k_disable[] = "disable"; +static const char __pyx_k_f_trace[] = "f_trace"; +static const char __pyx_k_SetTrace[] = "SetTrace"; +static const char __pyx_k_can_skip[] = "can_skip"; +static const char __pyx_k_code_obj[] = "code_obj"; +static const char __pyx_k_getstate[] = "__getstate__"; +static const char __pyx_k_pyx_type[] = "__pyx_type"; +static const char __pyx_k_setstate[] = "__setstate__"; +static const char __pyx_k_bootstrap[] = "__bootstrap"; +static const char __pyx_k_decref_py[] = "decref_py"; +static const char __pyx_k_get_ident[] = "_get_ident"; +static const char __pyx_k_isenabled[] = "isenabled"; +static const char __pyx_k_last_line[] = "last_line"; +static const char __pyx_k_pyx_state[] = "__pyx_state"; +static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; +static const char __pyx_k_threading[] = "threading"; +static const char __pyx_k_CacheValue[] = "_CacheValue"; +static const char __pyx_k_ThreadInfo[] = "ThreadInfo"; +static const char __pyx_k_first_line[] = "first_line"; +static const char __pyx_k_global_dbg[] = "global_dbg"; +static const char __pyx_k_issuperset[] = "issuperset"; +static const char __pyx_k_pyx_result[] = "__pyx_result"; +static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; +static const char __pyx_k_DebugHelper[] = "DebugHelper"; +static const char __pyx_k_PickleError[] = "PickleError"; +static const char __pyx_k_bootstrap_2[] = "_bootstrap"; +static const char __pyx_k_breakpoints[] = "breakpoints"; +static const char __pyx_k_code_obj_py[] = "code_obj_py"; +static const char __pyx_k_get_ident_2[] = "get_ident"; +static const char __pyx_k_thread_info[] = "thread_info"; +static const char __pyx_k_CodeLineInfo[] = "_CodeLineInfo"; +static const char __pyx_k_FuncCodeInfo[] = "FuncCodeInfo"; +static const char __pyx_k_initializing[] = "_initializing"; +static const char __pyx_k_intersection[] = "intersection"; +static const char __pyx_k_is_coroutine[] = "_is_coroutine"; +static const char __pyx_k_pydev_monkey[] = "pydev_monkey"; +static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; +static const char __pyx_k_stringsource[] = ""; +static const char __pyx_k_use_setstate[] = "use_setstate"; +static const char __pyx_k_version_info[] = "version_info"; +static const char __pyx_k_get_file_type[] = "get_file_type"; +static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; +static const char __pyx_k_thread_active[] = "_thread_active"; +static const char __pyx_k_AssertionError[] = "AssertionError"; +static const char __pyx_k_AttributeError[] = "AttributeError"; +static const char __pyx_k_code_line_info[] = "code_line_info"; +static const char __pyx_k_current_thread[] = "current_thread"; +static const char __pyx_k_findlinestarts[] = "findlinestarts"; +static const char __pyx_k_line_to_offset[] = "line_to_offset"; +static const char __pyx_k_pydevd_tracing[] = "pydevd_tracing"; +static const char __pyx_k_set_trace_func[] = "set_trace_func"; +static const char __pyx_k_trace_dispatch[] = "trace_dispatch"; +static const char __pyx_k_additional_info[] = "additional_info"; +static const char __pyx_k_bootstrap_inner[] = "__bootstrap_inner"; +static const char __pyx_k_frame_eval_func[] = "frame_eval_func"; +static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; +static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; +static const char __pyx_k_stop_frame_eval[] = "stop_frame_eval"; +static const char __pyx_k_bootstrap_inner_2[] = "_bootstrap_inner"; +static const char __pyx_k_pydevd_file_utils[] = "pydevd_file_utils"; +static const char __pyx_k_signature_factory[] = "signature_factory"; +static const char __pyx_k_thread_local_info[] = "_thread_local_info"; +static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_get_code_line_info[] = "_get_code_line_info"; +static const char __pyx_k_get_thread_info_py[] = "get_thread_info_py"; +static const char __pyx_k_show_return_values[] = "show_return_values"; +static const char __pyx_k_get_cache_file_type[] = "get_cache_file_type"; +static const char __pyx_k_update_globals_dict[] = "update_globals_dict"; +static const char __pyx_k_GlobalDebuggerHolder[] = "GlobalDebuggerHolder"; +static const char __pyx_k_dummy_trace_dispatch[] = "dummy_trace_dispatch"; +static const char __pyx_k_dummy_tracing_holder[] = "dummy_tracing_holder"; +static const char __pyx_k_insert_pydevd_breaks[] = "insert_pydevd_breaks"; +static const char __pyx_k_get_func_code_info_py[] = "get_func_code_info_py"; +static const char __pyx_k_has_plugin_line_breaks[] = "has_plugin_line_breaks"; +static const char __pyx_k_is_pydev_daemon_thread[] = "is_pydev_daemon_thread"; +static const char __pyx_k_clear_thread_local_info[] = "clear_thread_local_info"; +static const char __pyx_k_pyx_unpickle_ThreadInfo[] = "__pyx_unpickle_ThreadInfo"; +static const char __pyx_k_breakpoints_hit_at_lines[] = "breakpoints_hit_at_lines"; +static const char __pyx_k_pyx_unpickle__CacheValue[] = "__pyx_unpickle__CacheValue"; +static const char __pyx_k_pyx_unpickle_FuncCodeInfo[] = "__pyx_unpickle_FuncCodeInfo"; +static const char __pyx_k_CacheValue___reduce_cython[] = "_CacheValue.__reduce_cython__"; +static const char __pyx_k_ThreadInfo___reduce_cython[] = "ThreadInfo.__reduce_cython__"; +static const char __pyx_k_break_on_caught_exceptions[] = "break_on_caught_exceptions"; +static const char __pyx_k_pyx_unpickle__CodeLineInfo[] = "__pyx_unpickle__CodeLineInfo"; +static const char __pyx_k_get_cached_code_obj_info_py[] = "get_cached_code_obj_info_py"; +static const char __pyx_k_has_plugin_exception_breaks[] = "has_plugin_exception_breaks"; +static const char __pyx_k_CacheValue___setstate_cython[] = "_CacheValue.__setstate_cython__"; +static const char __pyx_k_CodeLineInfo___reduce_cython[] = "_CodeLineInfo.__reduce_cython__"; +static const char __pyx_k_FuncCodeInfo___reduce_cython[] = "FuncCodeInfo.__reduce_cython__"; +static const char __pyx_k_ThreadInfo___setstate_cython[] = "ThreadInfo.__setstate_cython__"; +static const char __pyx_k_NORM_PATHS_AND_BASE_CONTAINER[] = "NORM_PATHS_AND_BASE_CONTAINER"; +static const char __pyx_k_CodeLineInfo___setstate_cython[] = "_CodeLineInfo.__setstate_cython__"; +static const char __pyx_k_FuncCodeInfo___setstate_cython[] = "FuncCodeInfo.__setstate_cython__"; +static const char __pyx_k_pydevd_bundle_pydevd_constants[] = "_pydevd_bundle.pydevd_constants"; +static const char __pyx_k_pydevd_frame_eval_pydevd_frame[] = "_pydevd_frame_eval.pydevd_frame_tracing"; +static const char __pyx_k_CacheValue_compute_force_stay_i[] = "_CacheValue.compute_force_stay_in_untraced_mode"; +static const char __pyx_k_If_a_code_object_is_cached_that[] = "If a code object is cached, that same code object must be reused."; +static const char __pyx_k_get_abs_path_real_path_and_base[] = "get_abs_path_real_path_and_base_from_frame"; +static const char __pyx_k_pydev_bundle__pydev_saved_modul[] = "_pydev_bundle._pydev_saved_modules"; +static const char __pyx_k_pydevd_bundle_pydevd_additional[] = "_pydevd_bundle.pydevd_additional_thread_info"; +static const char __pyx_k_pydevd_bundle_pydevd_trace_disp[] = "_pydevd_bundle.pydevd_trace_dispatch"; +static const char __pyx_k_pydevd_frame_eval_pydevd_modify[] = "_pydevd_frame_eval.pydevd_modify_bytecode"; +static const char __pyx_k_set_additional_thread_info_lock[] = "_set_additional_thread_info_lock"; +static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xe535b68, 0xb8148ba, 0x0af4089) = (_can_create_dummy_thread, additional_info, force_stay_in_untraced_mode, fully_initialized, inside_frame_eval, is_pydevd_thread, thread_trace_func))"; +static const char __pyx_k_break_on_user_uncaught_exception[] = "break_on_user_uncaught_exceptions"; +static const char __pyx_k_compute_force_stay_in_untraced_m[] = "compute_force_stay_in_untraced_mode"; +static const char __pyx_k_fix_top_level_trace_and_get_trac[] = "fix_top_level_trace_and_get_trace_func"; +static const char __pyx_k_function_breakpoint_name_to_brea[] = "function_breakpoint_name_to_breakpoint"; +static const char __pyx_k_generate_code_with_breakpoints_p[] = "generate_code_with_breakpoints_py"; +static const char __pyx_k_pydevd_frame_eval_pydevd_frame_2[] = "_pydevd_frame_eval/pydevd_frame_evaluator.pyx"; +static const char __pyx_k_pydevd_frame_eval_pydevd_frame_3[] = "_pydevd_frame_eval.pydevd_frame_evaluator"; +static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] = "Incompatible checksums (0x%x vs (0x450d2d6, 0x956dcaa, 0xb3ee05d) = (always_skip_code, breakpoint_found, breakpoints_mtime, canonical_normalized_filename, co_filename, co_name, new_code))"; +static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_3[] = "Incompatible checksums (0x%x vs (0x5a9bcd5, 0x0267473, 0x3fbbd02) = (first_line, last_line, line_to_offset))"; +static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_4[] = "Incompatible checksums (0x%x vs (0xac42a46, 0xedff7c3, 0x3d481b9) = (breakpoints_hit_at_lines, code_line_info, code_lines_as_set, code_obj_py))"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_clear_thread_local_info(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_16is_pydevd_thread___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_16is_pydevd_thread_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17inside_frame_eval___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17inside_frame_eval_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17fully_initialized___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17fully_initialized_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_27force_stay_in_untraced_mode___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_27force_stay_in_untraced_mode_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo___reduce_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_2__setstate_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo___init__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_16breakpoint_found___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_16breakpoint_found_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_17breakpoints_mtime___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_17breakpoints_mtime_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_2__reduce_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_4__setstate_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_2dummy_trace_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ +static struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_4get_thread_info_py(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_6decref_py(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ +static struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_8get_func_code_info_py(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_thread_info, PyObject *__pyx_v_frame, PyObject *__pyx_v_code_obj); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo___init__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self, PyObject *__pyx_v_line_to_offset, int __pyx_v_first_line, int __pyx_v_last_line); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_10first_line___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_10first_line_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_9last_line___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_9last_line_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_2__reduce_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_4__setstate_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10_get_code_line_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code_obj); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12get_cached_code_obj_info_py(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code_obj_py); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue___init__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_code_obj_py, struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_code_line_info, PyObject *__pyx_v_breakpoints_hit_at_lines); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_2compute_force_stay_in_untraced_mode(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_breakpoints); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_4__reduce_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_6__setstate_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_14generate_code_with_breakpoints_py(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code_obj_py, PyObject *__pyx_v_breakpoints); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_16frame_eval_func(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_18stop_frame_eval(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_20__pyx_unpickle_ThreadInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_22__pyx_unpickle_FuncCodeInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_24__pyx_unpickle__CodeLineInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_26__pyx_unpickle__CacheValue(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + #if CYTHON_USE_MODULE_STATE + #endif + #if CYTHON_USE_MODULE_STATE + #endif + PyTypeObject *__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo; + #if CYTHON_USE_MODULE_STATE + PyObject *__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo; + PyObject *__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo; + PyObject *__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo; + PyObject *__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue; + #endif + PyTypeObject *__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo; + PyTypeObject *__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo; + PyTypeObject *__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo; + PyTypeObject *__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue; + PyObject *__pyx_kp_s_; + PyObject *__pyx_n_s_AssertionError; + PyObject *__pyx_n_s_AttributeError; + PyObject *__pyx_n_s_CacheValue; + PyObject *__pyx_n_s_CacheValue___reduce_cython; + PyObject *__pyx_n_s_CacheValue___setstate_cython; + PyObject *__pyx_n_s_CacheValue_compute_force_stay_i; + PyObject *__pyx_n_s_CodeLineInfo; + PyObject *__pyx_n_s_CodeLineInfo___reduce_cython; + PyObject *__pyx_n_s_CodeLineInfo___setstate_cython; + PyObject *__pyx_n_s_DebugHelper; + PyObject *__pyx_n_s_FuncCodeInfo; + PyObject *__pyx_n_s_FuncCodeInfo___reduce_cython; + PyObject *__pyx_n_s_FuncCodeInfo___setstate_cython; + PyObject *__pyx_n_s_GlobalDebuggerHolder; + PyObject *__pyx_kp_s_If_a_code_object_is_cached_that; + PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0; + PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2; + PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3; + PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4; + PyObject *__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER; + PyObject *__pyx_n_s_PickleError; + PyObject *__pyx_n_s_SetTrace; + PyObject *__pyx_n_s_ThreadInfo; + PyObject *__pyx_n_s_ThreadInfo___reduce_cython; + PyObject *__pyx_n_s_ThreadInfo___setstate_cython; + PyObject *__pyx_n_s__10; + PyObject *__pyx_kp_s__2; + PyObject *__pyx_kp_s__3; + PyObject *__pyx_kp_u__3; + PyObject *__pyx_n_s__47; + PyObject *__pyx_kp_s__5; + PyObject *__pyx_n_s_active; + PyObject *__pyx_n_s_additional_info; + PyObject *__pyx_n_s_arg; + PyObject *__pyx_n_s_asyncio_coroutines; + PyObject *__pyx_n_s_bootstrap; + PyObject *__pyx_n_s_bootstrap_2; + PyObject *__pyx_n_s_bootstrap_inner; + PyObject *__pyx_n_s_bootstrap_inner_2; + PyObject *__pyx_n_s_break_on_caught_exceptions; + PyObject *__pyx_n_s_break_on_user_uncaught_exception; + PyObject *__pyx_n_s_breakpoints; + PyObject *__pyx_n_s_breakpoints_hit_at_lines; + PyObject *__pyx_n_s_cache; + PyObject *__pyx_n_s_call; + PyObject *__pyx_n_s_call_2; + PyObject *__pyx_n_s_can_skip; + PyObject *__pyx_n_s_clear_thread_local_info; + PyObject *__pyx_n_s_cline_in_traceback; + PyObject *__pyx_n_s_code_line_info; + PyObject *__pyx_n_s_code_obj; + PyObject *__pyx_n_s_code_obj_py; + PyObject *__pyx_n_s_compute_force_stay_in_untraced_m; + PyObject *__pyx_n_s_current_thread; + PyObject *__pyx_n_s_decref_py; + PyObject *__pyx_n_s_dict; + PyObject *__pyx_n_s_dict_2; + PyObject *__pyx_n_s_dis; + PyObject *__pyx_kp_u_disable; + PyObject *__pyx_n_s_dummy_trace_dispatch; + PyObject *__pyx_n_s_dummy_tracing_holder; + PyObject *__pyx_kp_u_enable; + PyObject *__pyx_n_s_enter; + PyObject *__pyx_n_s_event; + PyObject *__pyx_n_s_exec; + PyObject *__pyx_n_s_exit; + PyObject *__pyx_n_s_f_back; + PyObject *__pyx_n_s_f_trace; + PyObject *__pyx_n_s_findlinestarts; + PyObject *__pyx_n_s_first_line; + PyObject *__pyx_n_s_fix_top_level_trace_and_get_trac; + PyObject *__pyx_n_s_frame; + PyObject *__pyx_n_s_frame_eval_func; + PyObject *__pyx_n_s_function_breakpoint_name_to_brea; + PyObject *__pyx_kp_u_gc; + PyObject *__pyx_n_s_generate_code_with_breakpoints_p; + PyObject *__pyx_n_s_get; + PyObject *__pyx_n_s_get_abs_path_real_path_and_base; + PyObject *__pyx_n_s_get_cache_file_type; + PyObject *__pyx_n_s_get_cached_code_obj_info_py; + PyObject *__pyx_n_s_get_code_line_info; + PyObject *__pyx_n_s_get_file_type; + PyObject *__pyx_n_s_get_func_code_info_py; + PyObject *__pyx_n_s_get_ident; + PyObject *__pyx_n_s_get_ident_2; + PyObject *__pyx_n_s_get_thread_info_py; + PyObject *__pyx_n_s_getstate; + PyObject *__pyx_n_s_global_dbg; + PyObject *__pyx_n_s_has_plugin_exception_breaks; + PyObject *__pyx_n_s_has_plugin_line_breaks; + PyObject *__pyx_n_s_import; + PyObject *__pyx_n_s_initializing; + PyObject *__pyx_n_s_insert_pydevd_breaks; + PyObject *__pyx_n_s_intersection; + PyObject *__pyx_n_s_is_coroutine; + PyObject *__pyx_n_s_is_pydev_daemon_thread; + PyObject *__pyx_kp_u_isenabled; + PyObject *__pyx_n_s_issuperset; + PyObject *__pyx_n_s_last_line; + PyObject *__pyx_n_s_line; + PyObject *__pyx_n_s_line_to_offset; + PyObject *__pyx_n_s_local; + PyObject *__pyx_n_s_main; + PyObject *__pyx_n_s_main_2; + PyObject *__pyx_n_s_max; + PyObject *__pyx_n_s_min; + PyObject *__pyx_n_s_mtime; + PyObject *__pyx_n_s_name; + PyObject *__pyx_n_s_new; + PyObject *__pyx_n_s_obj; + PyObject *__pyx_n_s_offset; + PyObject *__pyx_n_s_pickle; + PyObject *__pyx_n_s_plugin; + PyObject *__pyx_n_s_pydev_bundle__pydev_saved_modul; + PyObject *__pyx_n_s_pydev_monkey; + PyObject *__pyx_n_s_pydevd; + PyObject *__pyx_n_s_pydevd_bundle_pydevd_additional; + PyObject *__pyx_n_s_pydevd_bundle_pydevd_constants; + PyObject *__pyx_n_s_pydevd_bundle_pydevd_trace_disp; + PyObject *__pyx_n_s_pydevd_file_utils; + PyObject *__pyx_n_s_pydevd_frame_eval_pydevd_frame; + PyObject *__pyx_kp_s_pydevd_frame_eval_pydevd_frame_2; + PyObject *__pyx_n_s_pydevd_frame_eval_pydevd_frame_3; + PyObject *__pyx_n_s_pydevd_frame_eval_pydevd_modify; + PyObject *__pyx_n_s_pydevd_tracing; + PyObject *__pyx_n_s_pyx_PickleError; + PyObject *__pyx_n_s_pyx_checksum; + PyObject *__pyx_n_s_pyx_result; + PyObject *__pyx_n_s_pyx_state; + PyObject *__pyx_n_s_pyx_type; + PyObject *__pyx_n_s_pyx_unpickle_FuncCodeInfo; + PyObject *__pyx_n_s_pyx_unpickle_ThreadInfo; + PyObject *__pyx_n_s_pyx_unpickle__CacheValue; + PyObject *__pyx_n_s_pyx_unpickle__CodeLineInfo; + PyObject *__pyx_n_s_pyx_vtable; + PyObject *__pyx_n_s_reduce; + PyObject *__pyx_n_s_reduce_cython; + PyObject *__pyx_n_s_reduce_ex; + PyObject *__pyx_n_s_return; + PyObject *__pyx_n_s_rfind; + PyObject *__pyx_n_s_run; + PyObject *__pyx_n_s_self; + PyObject *__pyx_n_s_set_additional_thread_info_lock; + PyObject *__pyx_n_s_set_trace_func; + PyObject *__pyx_n_s_setstate; + PyObject *__pyx_n_s_setstate_cython; + PyObject *__pyx_n_s_show_return_values; + PyObject *__pyx_n_s_signature_factory; + PyObject *__pyx_n_s_spec; + PyObject *__pyx_n_s_state; + PyObject *__pyx_n_s_stop_frame_eval; + PyObject *__pyx_kp_s_stringsource; + PyObject *__pyx_n_s_sys; + PyObject *__pyx_n_s_test; + PyObject *__pyx_n_s_thread; + PyObject *__pyx_n_s_thread_active; + PyObject *__pyx_n_s_thread_info; + PyObject *__pyx_n_s_thread_local_info; + PyObject *__pyx_n_s_threading; + PyObject *__pyx_n_s_trace_dispatch; + PyObject *__pyx_n_s_update; + PyObject *__pyx_n_s_update_globals_dict; + PyObject *__pyx_n_s_use_setstate; + PyObject *__pyx_n_s_version_info; + PyObject *__pyx_int_0; + PyObject *__pyx_int_1; + PyObject *__pyx_int_2; + PyObject *__pyx_int_3; + PyObject *__pyx_int_9; + PyObject *__pyx_int_2520179; + PyObject *__pyx_int_11485321; + PyObject *__pyx_int_64258489; + PyObject *__pyx_int_66829570; + PyObject *__pyx_int_72405718; + PyObject *__pyx_int_95010005; + PyObject *__pyx_int_156687530; + PyObject *__pyx_int_180628038; + PyObject *__pyx_int_188670045; + PyObject *__pyx_int_193022138; + PyObject *__pyx_int_240343912; + PyObject *__pyx_int_249558979; + PyObject *__pyx_tuple__4; + PyObject *__pyx_tuple__6; + PyObject *__pyx_tuple__7; + PyObject *__pyx_tuple__8; + PyObject *__pyx_tuple__9; + PyObject *__pyx_slice__37; + PyObject *__pyx_tuple__12; + PyObject *__pyx_tuple__14; + PyObject *__pyx_tuple__18; + PyObject *__pyx_tuple__21; + PyObject *__pyx_tuple__23; + PyObject *__pyx_tuple__27; + PyObject *__pyx_tuple__29; + PyObject *__pyx_tuple__31; + PyObject *__pyx_tuple__35; + PyObject *__pyx_tuple__38; + PyObject *__pyx_tuple__39; + PyObject *__pyx_tuple__42; + PyObject *__pyx_codeobj__11; + PyObject *__pyx_codeobj__13; + PyObject *__pyx_codeobj__15; + PyObject *__pyx_codeobj__16; + PyObject *__pyx_codeobj__17; + PyObject *__pyx_codeobj__19; + PyObject *__pyx_codeobj__20; + PyObject *__pyx_codeobj__22; + PyObject *__pyx_codeobj__24; + PyObject *__pyx_codeobj__25; + PyObject *__pyx_codeobj__26; + PyObject *__pyx_codeobj__28; + PyObject *__pyx_codeobj__30; + PyObject *__pyx_codeobj__32; + PyObject *__pyx_codeobj__33; + PyObject *__pyx_codeobj__34; + PyObject *__pyx_codeobj__36; + PyObject *__pyx_codeobj__40; + PyObject *__pyx_codeobj__41; + PyObject *__pyx_codeobj__43; + PyObject *__pyx_codeobj__44; + PyObject *__pyx_codeobj__45; + PyObject *__pyx_codeobj__46; +} __pyx_mstate; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { + extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o)) + +#define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef))) + +#define __pyx_m (PyState_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstate __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static int __pyx_m_clear(PyObject *m) { + __pyx_mstate *clear_module_state = __pyx_mstate(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo); + Py_CLEAR(clear_module_state->__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo); + Py_CLEAR(clear_module_state->__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo); + Py_CLEAR(clear_module_state->__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue); + Py_CLEAR(clear_module_state->__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue); + Py_CLEAR(clear_module_state->__pyx_kp_s_); + Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError); + Py_CLEAR(clear_module_state->__pyx_n_s_AttributeError); + Py_CLEAR(clear_module_state->__pyx_n_s_CacheValue); + Py_CLEAR(clear_module_state->__pyx_n_s_CacheValue___reduce_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_CacheValue___setstate_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_CacheValue_compute_force_stay_i); + Py_CLEAR(clear_module_state->__pyx_n_s_CodeLineInfo); + Py_CLEAR(clear_module_state->__pyx_n_s_CodeLineInfo___reduce_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_CodeLineInfo___setstate_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_DebugHelper); + Py_CLEAR(clear_module_state->__pyx_n_s_FuncCodeInfo); + Py_CLEAR(clear_module_state->__pyx_n_s_FuncCodeInfo___reduce_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_FuncCodeInfo___setstate_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_GlobalDebuggerHolder); + Py_CLEAR(clear_module_state->__pyx_kp_s_If_a_code_object_is_cached_that); + Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0); + Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2); + Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3); + Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4); + Py_CLEAR(clear_module_state->__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); + Py_CLEAR(clear_module_state->__pyx_n_s_PickleError); + Py_CLEAR(clear_module_state->__pyx_n_s_SetTrace); + Py_CLEAR(clear_module_state->__pyx_n_s_ThreadInfo); + Py_CLEAR(clear_module_state->__pyx_n_s_ThreadInfo___reduce_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_ThreadInfo___setstate_cython); + Py_CLEAR(clear_module_state->__pyx_n_s__10); + Py_CLEAR(clear_module_state->__pyx_kp_s__2); + Py_CLEAR(clear_module_state->__pyx_kp_s__3); + Py_CLEAR(clear_module_state->__pyx_kp_u__3); + Py_CLEAR(clear_module_state->__pyx_n_s__47); + Py_CLEAR(clear_module_state->__pyx_kp_s__5); + Py_CLEAR(clear_module_state->__pyx_n_s_active); + Py_CLEAR(clear_module_state->__pyx_n_s_additional_info); + Py_CLEAR(clear_module_state->__pyx_n_s_arg); + Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines); + Py_CLEAR(clear_module_state->__pyx_n_s_bootstrap); + Py_CLEAR(clear_module_state->__pyx_n_s_bootstrap_2); + Py_CLEAR(clear_module_state->__pyx_n_s_bootstrap_inner); + Py_CLEAR(clear_module_state->__pyx_n_s_bootstrap_inner_2); + Py_CLEAR(clear_module_state->__pyx_n_s_break_on_caught_exceptions); + Py_CLEAR(clear_module_state->__pyx_n_s_break_on_user_uncaught_exception); + Py_CLEAR(clear_module_state->__pyx_n_s_breakpoints); + Py_CLEAR(clear_module_state->__pyx_n_s_breakpoints_hit_at_lines); + Py_CLEAR(clear_module_state->__pyx_n_s_cache); + Py_CLEAR(clear_module_state->__pyx_n_s_call); + Py_CLEAR(clear_module_state->__pyx_n_s_call_2); + Py_CLEAR(clear_module_state->__pyx_n_s_can_skip); + Py_CLEAR(clear_module_state->__pyx_n_s_clear_thread_local_info); + Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); + Py_CLEAR(clear_module_state->__pyx_n_s_code_line_info); + Py_CLEAR(clear_module_state->__pyx_n_s_code_obj); + Py_CLEAR(clear_module_state->__pyx_n_s_code_obj_py); + Py_CLEAR(clear_module_state->__pyx_n_s_compute_force_stay_in_untraced_m); + Py_CLEAR(clear_module_state->__pyx_n_s_current_thread); + Py_CLEAR(clear_module_state->__pyx_n_s_decref_py); + Py_CLEAR(clear_module_state->__pyx_n_s_dict); + Py_CLEAR(clear_module_state->__pyx_n_s_dict_2); + Py_CLEAR(clear_module_state->__pyx_n_s_dis); + Py_CLEAR(clear_module_state->__pyx_kp_u_disable); + Py_CLEAR(clear_module_state->__pyx_n_s_dummy_trace_dispatch); + Py_CLEAR(clear_module_state->__pyx_n_s_dummy_tracing_holder); + Py_CLEAR(clear_module_state->__pyx_kp_u_enable); + Py_CLEAR(clear_module_state->__pyx_n_s_enter); + Py_CLEAR(clear_module_state->__pyx_n_s_event); + Py_CLEAR(clear_module_state->__pyx_n_s_exec); + Py_CLEAR(clear_module_state->__pyx_n_s_exit); + Py_CLEAR(clear_module_state->__pyx_n_s_f_back); + Py_CLEAR(clear_module_state->__pyx_n_s_f_trace); + Py_CLEAR(clear_module_state->__pyx_n_s_findlinestarts); + Py_CLEAR(clear_module_state->__pyx_n_s_first_line); + Py_CLEAR(clear_module_state->__pyx_n_s_fix_top_level_trace_and_get_trac); + Py_CLEAR(clear_module_state->__pyx_n_s_frame); + Py_CLEAR(clear_module_state->__pyx_n_s_frame_eval_func); + Py_CLEAR(clear_module_state->__pyx_n_s_function_breakpoint_name_to_brea); + Py_CLEAR(clear_module_state->__pyx_kp_u_gc); + Py_CLEAR(clear_module_state->__pyx_n_s_generate_code_with_breakpoints_p); + Py_CLEAR(clear_module_state->__pyx_n_s_get); + Py_CLEAR(clear_module_state->__pyx_n_s_get_abs_path_real_path_and_base); + Py_CLEAR(clear_module_state->__pyx_n_s_get_cache_file_type); + Py_CLEAR(clear_module_state->__pyx_n_s_get_cached_code_obj_info_py); + Py_CLEAR(clear_module_state->__pyx_n_s_get_code_line_info); + Py_CLEAR(clear_module_state->__pyx_n_s_get_file_type); + Py_CLEAR(clear_module_state->__pyx_n_s_get_func_code_info_py); + Py_CLEAR(clear_module_state->__pyx_n_s_get_ident); + Py_CLEAR(clear_module_state->__pyx_n_s_get_ident_2); + Py_CLEAR(clear_module_state->__pyx_n_s_get_thread_info_py); + Py_CLEAR(clear_module_state->__pyx_n_s_getstate); + Py_CLEAR(clear_module_state->__pyx_n_s_global_dbg); + Py_CLEAR(clear_module_state->__pyx_n_s_has_plugin_exception_breaks); + Py_CLEAR(clear_module_state->__pyx_n_s_has_plugin_line_breaks); + Py_CLEAR(clear_module_state->__pyx_n_s_import); + Py_CLEAR(clear_module_state->__pyx_n_s_initializing); + Py_CLEAR(clear_module_state->__pyx_n_s_insert_pydevd_breaks); + Py_CLEAR(clear_module_state->__pyx_n_s_intersection); + Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); + Py_CLEAR(clear_module_state->__pyx_n_s_is_pydev_daemon_thread); + Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); + Py_CLEAR(clear_module_state->__pyx_n_s_issuperset); + Py_CLEAR(clear_module_state->__pyx_n_s_last_line); + Py_CLEAR(clear_module_state->__pyx_n_s_line); + Py_CLEAR(clear_module_state->__pyx_n_s_line_to_offset); + Py_CLEAR(clear_module_state->__pyx_n_s_local); + Py_CLEAR(clear_module_state->__pyx_n_s_main); + Py_CLEAR(clear_module_state->__pyx_n_s_main_2); + Py_CLEAR(clear_module_state->__pyx_n_s_max); + Py_CLEAR(clear_module_state->__pyx_n_s_min); + Py_CLEAR(clear_module_state->__pyx_n_s_mtime); + Py_CLEAR(clear_module_state->__pyx_n_s_name); + Py_CLEAR(clear_module_state->__pyx_n_s_new); + Py_CLEAR(clear_module_state->__pyx_n_s_obj); + Py_CLEAR(clear_module_state->__pyx_n_s_offset); + Py_CLEAR(clear_module_state->__pyx_n_s_pickle); + Py_CLEAR(clear_module_state->__pyx_n_s_plugin); + Py_CLEAR(clear_module_state->__pyx_n_s_pydev_bundle__pydev_saved_modul); + Py_CLEAR(clear_module_state->__pyx_n_s_pydev_monkey); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_bundle_pydevd_additional); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_bundle_pydevd_constants); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_bundle_pydevd_trace_disp); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_file_utils); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_frame_eval_pydevd_frame); + Py_CLEAR(clear_module_state->__pyx_kp_s_pydevd_frame_eval_pydevd_frame_2); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_frame_eval_pydevd_frame_3); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_frame_eval_pydevd_modify); + Py_CLEAR(clear_module_state->__pyx_n_s_pydevd_tracing); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_FuncCodeInfo); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_ThreadInfo); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle__CacheValue); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle__CodeLineInfo); + Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable); + Py_CLEAR(clear_module_state->__pyx_n_s_reduce); + Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex); + Py_CLEAR(clear_module_state->__pyx_n_s_return); + Py_CLEAR(clear_module_state->__pyx_n_s_rfind); + Py_CLEAR(clear_module_state->__pyx_n_s_run); + Py_CLEAR(clear_module_state->__pyx_n_s_self); + Py_CLEAR(clear_module_state->__pyx_n_s_set_additional_thread_info_lock); + Py_CLEAR(clear_module_state->__pyx_n_s_set_trace_func); + Py_CLEAR(clear_module_state->__pyx_n_s_setstate); + Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); + Py_CLEAR(clear_module_state->__pyx_n_s_show_return_values); + Py_CLEAR(clear_module_state->__pyx_n_s_signature_factory); + Py_CLEAR(clear_module_state->__pyx_n_s_spec); + Py_CLEAR(clear_module_state->__pyx_n_s_state); + Py_CLEAR(clear_module_state->__pyx_n_s_stop_frame_eval); + Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); + Py_CLEAR(clear_module_state->__pyx_n_s_sys); + Py_CLEAR(clear_module_state->__pyx_n_s_test); + Py_CLEAR(clear_module_state->__pyx_n_s_thread); + Py_CLEAR(clear_module_state->__pyx_n_s_thread_active); + Py_CLEAR(clear_module_state->__pyx_n_s_thread_info); + Py_CLEAR(clear_module_state->__pyx_n_s_thread_local_info); + Py_CLEAR(clear_module_state->__pyx_n_s_threading); + Py_CLEAR(clear_module_state->__pyx_n_s_trace_dispatch); + Py_CLEAR(clear_module_state->__pyx_n_s_update); + Py_CLEAR(clear_module_state->__pyx_n_s_update_globals_dict); + Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate); + Py_CLEAR(clear_module_state->__pyx_n_s_version_info); + Py_CLEAR(clear_module_state->__pyx_int_0); + Py_CLEAR(clear_module_state->__pyx_int_1); + Py_CLEAR(clear_module_state->__pyx_int_2); + Py_CLEAR(clear_module_state->__pyx_int_3); + Py_CLEAR(clear_module_state->__pyx_int_9); + Py_CLEAR(clear_module_state->__pyx_int_2520179); + Py_CLEAR(clear_module_state->__pyx_int_11485321); + Py_CLEAR(clear_module_state->__pyx_int_64258489); + Py_CLEAR(clear_module_state->__pyx_int_66829570); + Py_CLEAR(clear_module_state->__pyx_int_72405718); + Py_CLEAR(clear_module_state->__pyx_int_95010005); + Py_CLEAR(clear_module_state->__pyx_int_156687530); + Py_CLEAR(clear_module_state->__pyx_int_180628038); + Py_CLEAR(clear_module_state->__pyx_int_188670045); + Py_CLEAR(clear_module_state->__pyx_int_193022138); + Py_CLEAR(clear_module_state->__pyx_int_240343912); + Py_CLEAR(clear_module_state->__pyx_int_249558979); + Py_CLEAR(clear_module_state->__pyx_tuple__4); + Py_CLEAR(clear_module_state->__pyx_tuple__6); + Py_CLEAR(clear_module_state->__pyx_tuple__7); + Py_CLEAR(clear_module_state->__pyx_tuple__8); + Py_CLEAR(clear_module_state->__pyx_tuple__9); + Py_CLEAR(clear_module_state->__pyx_slice__37); + Py_CLEAR(clear_module_state->__pyx_tuple__12); + Py_CLEAR(clear_module_state->__pyx_tuple__14); + Py_CLEAR(clear_module_state->__pyx_tuple__18); + Py_CLEAR(clear_module_state->__pyx_tuple__21); + Py_CLEAR(clear_module_state->__pyx_tuple__23); + Py_CLEAR(clear_module_state->__pyx_tuple__27); + Py_CLEAR(clear_module_state->__pyx_tuple__29); + Py_CLEAR(clear_module_state->__pyx_tuple__31); + Py_CLEAR(clear_module_state->__pyx_tuple__35); + Py_CLEAR(clear_module_state->__pyx_tuple__38); + Py_CLEAR(clear_module_state->__pyx_tuple__39); + Py_CLEAR(clear_module_state->__pyx_tuple__42); + Py_CLEAR(clear_module_state->__pyx_codeobj__11); + Py_CLEAR(clear_module_state->__pyx_codeobj__13); + Py_CLEAR(clear_module_state->__pyx_codeobj__15); + Py_CLEAR(clear_module_state->__pyx_codeobj__16); + Py_CLEAR(clear_module_state->__pyx_codeobj__17); + Py_CLEAR(clear_module_state->__pyx_codeobj__19); + Py_CLEAR(clear_module_state->__pyx_codeobj__20); + Py_CLEAR(clear_module_state->__pyx_codeobj__22); + Py_CLEAR(clear_module_state->__pyx_codeobj__24); + Py_CLEAR(clear_module_state->__pyx_codeobj__25); + Py_CLEAR(clear_module_state->__pyx_codeobj__26); + Py_CLEAR(clear_module_state->__pyx_codeobj__28); + Py_CLEAR(clear_module_state->__pyx_codeobj__30); + Py_CLEAR(clear_module_state->__pyx_codeobj__32); + Py_CLEAR(clear_module_state->__pyx_codeobj__33); + Py_CLEAR(clear_module_state->__pyx_codeobj__34); + Py_CLEAR(clear_module_state->__pyx_codeobj__36); + Py_CLEAR(clear_module_state->__pyx_codeobj__40); + Py_CLEAR(clear_module_state->__pyx_codeobj__41); + Py_CLEAR(clear_module_state->__pyx_codeobj__43); + Py_CLEAR(clear_module_state->__pyx_codeobj__44); + Py_CLEAR(clear_module_state->__pyx_codeobj__45); + Py_CLEAR(clear_module_state->__pyx_codeobj__46); + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstate *traverse_module_state = __pyx_mstate(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + Py_VISIT(traverse_module_state->__pyx_empty_tuple); + Py_VISIT(traverse_module_state->__pyx_empty_bytes); + Py_VISIT(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + Py_VISIT(traverse_module_state->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo); + Py_VISIT(traverse_module_state->__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo); + Py_VISIT(traverse_module_state->__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo); + Py_VISIT(traverse_module_state->__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue); + Py_VISIT(traverse_module_state->__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue); + Py_VISIT(traverse_module_state->__pyx_kp_s_); + Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError); + Py_VISIT(traverse_module_state->__pyx_n_s_AttributeError); + Py_VISIT(traverse_module_state->__pyx_n_s_CacheValue); + Py_VISIT(traverse_module_state->__pyx_n_s_CacheValue___reduce_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_CacheValue___setstate_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_CacheValue_compute_force_stay_i); + Py_VISIT(traverse_module_state->__pyx_n_s_CodeLineInfo); + Py_VISIT(traverse_module_state->__pyx_n_s_CodeLineInfo___reduce_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_CodeLineInfo___setstate_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_DebugHelper); + Py_VISIT(traverse_module_state->__pyx_n_s_FuncCodeInfo); + Py_VISIT(traverse_module_state->__pyx_n_s_FuncCodeInfo___reduce_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_FuncCodeInfo___setstate_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_GlobalDebuggerHolder); + Py_VISIT(traverse_module_state->__pyx_kp_s_If_a_code_object_is_cached_that); + Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0); + Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2); + Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3); + Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4); + Py_VISIT(traverse_module_state->__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); + Py_VISIT(traverse_module_state->__pyx_n_s_PickleError); + Py_VISIT(traverse_module_state->__pyx_n_s_SetTrace); + Py_VISIT(traverse_module_state->__pyx_n_s_ThreadInfo); + Py_VISIT(traverse_module_state->__pyx_n_s_ThreadInfo___reduce_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_ThreadInfo___setstate_cython); + Py_VISIT(traverse_module_state->__pyx_n_s__10); + Py_VISIT(traverse_module_state->__pyx_kp_s__2); + Py_VISIT(traverse_module_state->__pyx_kp_s__3); + Py_VISIT(traverse_module_state->__pyx_kp_u__3); + Py_VISIT(traverse_module_state->__pyx_n_s__47); + Py_VISIT(traverse_module_state->__pyx_kp_s__5); + Py_VISIT(traverse_module_state->__pyx_n_s_active); + Py_VISIT(traverse_module_state->__pyx_n_s_additional_info); + Py_VISIT(traverse_module_state->__pyx_n_s_arg); + Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines); + Py_VISIT(traverse_module_state->__pyx_n_s_bootstrap); + Py_VISIT(traverse_module_state->__pyx_n_s_bootstrap_2); + Py_VISIT(traverse_module_state->__pyx_n_s_bootstrap_inner); + Py_VISIT(traverse_module_state->__pyx_n_s_bootstrap_inner_2); + Py_VISIT(traverse_module_state->__pyx_n_s_break_on_caught_exceptions); + Py_VISIT(traverse_module_state->__pyx_n_s_break_on_user_uncaught_exception); + Py_VISIT(traverse_module_state->__pyx_n_s_breakpoints); + Py_VISIT(traverse_module_state->__pyx_n_s_breakpoints_hit_at_lines); + Py_VISIT(traverse_module_state->__pyx_n_s_cache); + Py_VISIT(traverse_module_state->__pyx_n_s_call); + Py_VISIT(traverse_module_state->__pyx_n_s_call_2); + Py_VISIT(traverse_module_state->__pyx_n_s_can_skip); + Py_VISIT(traverse_module_state->__pyx_n_s_clear_thread_local_info); + Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); + Py_VISIT(traverse_module_state->__pyx_n_s_code_line_info); + Py_VISIT(traverse_module_state->__pyx_n_s_code_obj); + Py_VISIT(traverse_module_state->__pyx_n_s_code_obj_py); + Py_VISIT(traverse_module_state->__pyx_n_s_compute_force_stay_in_untraced_m); + Py_VISIT(traverse_module_state->__pyx_n_s_current_thread); + Py_VISIT(traverse_module_state->__pyx_n_s_decref_py); + Py_VISIT(traverse_module_state->__pyx_n_s_dict); + Py_VISIT(traverse_module_state->__pyx_n_s_dict_2); + Py_VISIT(traverse_module_state->__pyx_n_s_dis); + Py_VISIT(traverse_module_state->__pyx_kp_u_disable); + Py_VISIT(traverse_module_state->__pyx_n_s_dummy_trace_dispatch); + Py_VISIT(traverse_module_state->__pyx_n_s_dummy_tracing_holder); + Py_VISIT(traverse_module_state->__pyx_kp_u_enable); + Py_VISIT(traverse_module_state->__pyx_n_s_enter); + Py_VISIT(traverse_module_state->__pyx_n_s_event); + Py_VISIT(traverse_module_state->__pyx_n_s_exec); + Py_VISIT(traverse_module_state->__pyx_n_s_exit); + Py_VISIT(traverse_module_state->__pyx_n_s_f_back); + Py_VISIT(traverse_module_state->__pyx_n_s_f_trace); + Py_VISIT(traverse_module_state->__pyx_n_s_findlinestarts); + Py_VISIT(traverse_module_state->__pyx_n_s_first_line); + Py_VISIT(traverse_module_state->__pyx_n_s_fix_top_level_trace_and_get_trac); + Py_VISIT(traverse_module_state->__pyx_n_s_frame); + Py_VISIT(traverse_module_state->__pyx_n_s_frame_eval_func); + Py_VISIT(traverse_module_state->__pyx_n_s_function_breakpoint_name_to_brea); + Py_VISIT(traverse_module_state->__pyx_kp_u_gc); + Py_VISIT(traverse_module_state->__pyx_n_s_generate_code_with_breakpoints_p); + Py_VISIT(traverse_module_state->__pyx_n_s_get); + Py_VISIT(traverse_module_state->__pyx_n_s_get_abs_path_real_path_and_base); + Py_VISIT(traverse_module_state->__pyx_n_s_get_cache_file_type); + Py_VISIT(traverse_module_state->__pyx_n_s_get_cached_code_obj_info_py); + Py_VISIT(traverse_module_state->__pyx_n_s_get_code_line_info); + Py_VISIT(traverse_module_state->__pyx_n_s_get_file_type); + Py_VISIT(traverse_module_state->__pyx_n_s_get_func_code_info_py); + Py_VISIT(traverse_module_state->__pyx_n_s_get_ident); + Py_VISIT(traverse_module_state->__pyx_n_s_get_ident_2); + Py_VISIT(traverse_module_state->__pyx_n_s_get_thread_info_py); + Py_VISIT(traverse_module_state->__pyx_n_s_getstate); + Py_VISIT(traverse_module_state->__pyx_n_s_global_dbg); + Py_VISIT(traverse_module_state->__pyx_n_s_has_plugin_exception_breaks); + Py_VISIT(traverse_module_state->__pyx_n_s_has_plugin_line_breaks); + Py_VISIT(traverse_module_state->__pyx_n_s_import); + Py_VISIT(traverse_module_state->__pyx_n_s_initializing); + Py_VISIT(traverse_module_state->__pyx_n_s_insert_pydevd_breaks); + Py_VISIT(traverse_module_state->__pyx_n_s_intersection); + Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); + Py_VISIT(traverse_module_state->__pyx_n_s_is_pydev_daemon_thread); + Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); + Py_VISIT(traverse_module_state->__pyx_n_s_issuperset); + Py_VISIT(traverse_module_state->__pyx_n_s_last_line); + Py_VISIT(traverse_module_state->__pyx_n_s_line); + Py_VISIT(traverse_module_state->__pyx_n_s_line_to_offset); + Py_VISIT(traverse_module_state->__pyx_n_s_local); + Py_VISIT(traverse_module_state->__pyx_n_s_main); + Py_VISIT(traverse_module_state->__pyx_n_s_main_2); + Py_VISIT(traverse_module_state->__pyx_n_s_max); + Py_VISIT(traverse_module_state->__pyx_n_s_min); + Py_VISIT(traverse_module_state->__pyx_n_s_mtime); + Py_VISIT(traverse_module_state->__pyx_n_s_name); + Py_VISIT(traverse_module_state->__pyx_n_s_new); + Py_VISIT(traverse_module_state->__pyx_n_s_obj); + Py_VISIT(traverse_module_state->__pyx_n_s_offset); + Py_VISIT(traverse_module_state->__pyx_n_s_pickle); + Py_VISIT(traverse_module_state->__pyx_n_s_plugin); + Py_VISIT(traverse_module_state->__pyx_n_s_pydev_bundle__pydev_saved_modul); + Py_VISIT(traverse_module_state->__pyx_n_s_pydev_monkey); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_bundle_pydevd_additional); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_bundle_pydevd_constants); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_bundle_pydevd_trace_disp); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_file_utils); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_frame_eval_pydevd_frame); + Py_VISIT(traverse_module_state->__pyx_kp_s_pydevd_frame_eval_pydevd_frame_2); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_frame_eval_pydevd_frame_3); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_frame_eval_pydevd_modify); + Py_VISIT(traverse_module_state->__pyx_n_s_pydevd_tracing); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_FuncCodeInfo); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_ThreadInfo); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle__CacheValue); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle__CodeLineInfo); + Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable); + Py_VISIT(traverse_module_state->__pyx_n_s_reduce); + Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex); + Py_VISIT(traverse_module_state->__pyx_n_s_return); + Py_VISIT(traverse_module_state->__pyx_n_s_rfind); + Py_VISIT(traverse_module_state->__pyx_n_s_run); + Py_VISIT(traverse_module_state->__pyx_n_s_self); + Py_VISIT(traverse_module_state->__pyx_n_s_set_additional_thread_info_lock); + Py_VISIT(traverse_module_state->__pyx_n_s_set_trace_func); + Py_VISIT(traverse_module_state->__pyx_n_s_setstate); + Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); + Py_VISIT(traverse_module_state->__pyx_n_s_show_return_values); + Py_VISIT(traverse_module_state->__pyx_n_s_signature_factory); + Py_VISIT(traverse_module_state->__pyx_n_s_spec); + Py_VISIT(traverse_module_state->__pyx_n_s_state); + Py_VISIT(traverse_module_state->__pyx_n_s_stop_frame_eval); + Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); + Py_VISIT(traverse_module_state->__pyx_n_s_sys); + Py_VISIT(traverse_module_state->__pyx_n_s_test); + Py_VISIT(traverse_module_state->__pyx_n_s_thread); + Py_VISIT(traverse_module_state->__pyx_n_s_thread_active); + Py_VISIT(traverse_module_state->__pyx_n_s_thread_info); + Py_VISIT(traverse_module_state->__pyx_n_s_thread_local_info); + Py_VISIT(traverse_module_state->__pyx_n_s_threading); + Py_VISIT(traverse_module_state->__pyx_n_s_trace_dispatch); + Py_VISIT(traverse_module_state->__pyx_n_s_update); + Py_VISIT(traverse_module_state->__pyx_n_s_update_globals_dict); + Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate); + Py_VISIT(traverse_module_state->__pyx_n_s_version_info); + Py_VISIT(traverse_module_state->__pyx_int_0); + Py_VISIT(traverse_module_state->__pyx_int_1); + Py_VISIT(traverse_module_state->__pyx_int_2); + Py_VISIT(traverse_module_state->__pyx_int_3); + Py_VISIT(traverse_module_state->__pyx_int_9); + Py_VISIT(traverse_module_state->__pyx_int_2520179); + Py_VISIT(traverse_module_state->__pyx_int_11485321); + Py_VISIT(traverse_module_state->__pyx_int_64258489); + Py_VISIT(traverse_module_state->__pyx_int_66829570); + Py_VISIT(traverse_module_state->__pyx_int_72405718); + Py_VISIT(traverse_module_state->__pyx_int_95010005); + Py_VISIT(traverse_module_state->__pyx_int_156687530); + Py_VISIT(traverse_module_state->__pyx_int_180628038); + Py_VISIT(traverse_module_state->__pyx_int_188670045); + Py_VISIT(traverse_module_state->__pyx_int_193022138); + Py_VISIT(traverse_module_state->__pyx_int_240343912); + Py_VISIT(traverse_module_state->__pyx_int_249558979); + Py_VISIT(traverse_module_state->__pyx_tuple__4); + Py_VISIT(traverse_module_state->__pyx_tuple__6); + Py_VISIT(traverse_module_state->__pyx_tuple__7); + Py_VISIT(traverse_module_state->__pyx_tuple__8); + Py_VISIT(traverse_module_state->__pyx_tuple__9); + Py_VISIT(traverse_module_state->__pyx_slice__37); + Py_VISIT(traverse_module_state->__pyx_tuple__12); + Py_VISIT(traverse_module_state->__pyx_tuple__14); + Py_VISIT(traverse_module_state->__pyx_tuple__18); + Py_VISIT(traverse_module_state->__pyx_tuple__21); + Py_VISIT(traverse_module_state->__pyx_tuple__23); + Py_VISIT(traverse_module_state->__pyx_tuple__27); + Py_VISIT(traverse_module_state->__pyx_tuple__29); + Py_VISIT(traverse_module_state->__pyx_tuple__31); + Py_VISIT(traverse_module_state->__pyx_tuple__35); + Py_VISIT(traverse_module_state->__pyx_tuple__38); + Py_VISIT(traverse_module_state->__pyx_tuple__39); + Py_VISIT(traverse_module_state->__pyx_tuple__42); + Py_VISIT(traverse_module_state->__pyx_codeobj__11); + Py_VISIT(traverse_module_state->__pyx_codeobj__13); + Py_VISIT(traverse_module_state->__pyx_codeobj__15); + Py_VISIT(traverse_module_state->__pyx_codeobj__16); + Py_VISIT(traverse_module_state->__pyx_codeobj__17); + Py_VISIT(traverse_module_state->__pyx_codeobj__19); + Py_VISIT(traverse_module_state->__pyx_codeobj__20); + Py_VISIT(traverse_module_state->__pyx_codeobj__22); + Py_VISIT(traverse_module_state->__pyx_codeobj__24); + Py_VISIT(traverse_module_state->__pyx_codeobj__25); + Py_VISIT(traverse_module_state->__pyx_codeobj__26); + Py_VISIT(traverse_module_state->__pyx_codeobj__28); + Py_VISIT(traverse_module_state->__pyx_codeobj__30); + Py_VISIT(traverse_module_state->__pyx_codeobj__32); + Py_VISIT(traverse_module_state->__pyx_codeobj__33); + Py_VISIT(traverse_module_state->__pyx_codeobj__34); + Py_VISIT(traverse_module_state->__pyx_codeobj__36); + Py_VISIT(traverse_module_state->__pyx_codeobj__40); + Py_VISIT(traverse_module_state->__pyx_codeobj__41); + Py_VISIT(traverse_module_state->__pyx_codeobj__43); + Py_VISIT(traverse_module_state->__pyx_codeobj__44); + Py_VISIT(traverse_module_state->__pyx_codeobj__45); + Py_VISIT(traverse_module_state->__pyx_codeobj__46); + return 0; +} +#endif +/* #### Code section: module_state_defines ### */ +#define __pyx_d __pyx_mstate_global->__pyx_d +#define __pyx_b __pyx_mstate_global->__pyx_b +#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime +#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple +#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes +#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode +#ifdef __Pyx_CyFunction_USED +#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType +#endif +#ifdef __Pyx_FusedFunction_USED +#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType +#endif +#ifdef __Pyx_Generator_USED +#define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType +#endif +#ifdef __Pyx_IterableCoroutine_USED +#define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType +#endif +#ifdef __Pyx_Coroutine_USED +#define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType +#endif +#ifdef __Pyx_Coroutine_USED +#define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType +#endif +#if CYTHON_USE_MODULE_STATE +#endif +#if CYTHON_USE_MODULE_STATE +#endif +#define __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo __pyx_mstate_global->__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo +#if CYTHON_USE_MODULE_STATE +#define __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo __pyx_mstate_global->__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo +#define __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo __pyx_mstate_global->__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo +#define __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo __pyx_mstate_global->__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo +#define __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue __pyx_mstate_global->__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue +#endif +#define __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo __pyx_mstate_global->__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo +#define __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo __pyx_mstate_global->__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo +#define __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo __pyx_mstate_global->__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo +#define __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue __pyx_mstate_global->__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue +#define __pyx_kp_s_ __pyx_mstate_global->__pyx_kp_s_ +#define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError +#define __pyx_n_s_AttributeError __pyx_mstate_global->__pyx_n_s_AttributeError +#define __pyx_n_s_CacheValue __pyx_mstate_global->__pyx_n_s_CacheValue +#define __pyx_n_s_CacheValue___reduce_cython __pyx_mstate_global->__pyx_n_s_CacheValue___reduce_cython +#define __pyx_n_s_CacheValue___setstate_cython __pyx_mstate_global->__pyx_n_s_CacheValue___setstate_cython +#define __pyx_n_s_CacheValue_compute_force_stay_i __pyx_mstate_global->__pyx_n_s_CacheValue_compute_force_stay_i +#define __pyx_n_s_CodeLineInfo __pyx_mstate_global->__pyx_n_s_CodeLineInfo +#define __pyx_n_s_CodeLineInfo___reduce_cython __pyx_mstate_global->__pyx_n_s_CodeLineInfo___reduce_cython +#define __pyx_n_s_CodeLineInfo___setstate_cython __pyx_mstate_global->__pyx_n_s_CodeLineInfo___setstate_cython +#define __pyx_n_s_DebugHelper __pyx_mstate_global->__pyx_n_s_DebugHelper +#define __pyx_n_s_FuncCodeInfo __pyx_mstate_global->__pyx_n_s_FuncCodeInfo +#define __pyx_n_s_FuncCodeInfo___reduce_cython __pyx_mstate_global->__pyx_n_s_FuncCodeInfo___reduce_cython +#define __pyx_n_s_FuncCodeInfo___setstate_cython __pyx_mstate_global->__pyx_n_s_FuncCodeInfo___setstate_cython +#define __pyx_n_s_GlobalDebuggerHolder __pyx_mstate_global->__pyx_n_s_GlobalDebuggerHolder +#define __pyx_kp_s_If_a_code_object_is_cached_that __pyx_mstate_global->__pyx_kp_s_If_a_code_object_is_cached_that +#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0 +#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2 +#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3 +#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4 +#define __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER __pyx_mstate_global->__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER +#define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError +#define __pyx_n_s_SetTrace __pyx_mstate_global->__pyx_n_s_SetTrace +#define __pyx_n_s_ThreadInfo __pyx_mstate_global->__pyx_n_s_ThreadInfo +#define __pyx_n_s_ThreadInfo___reduce_cython __pyx_mstate_global->__pyx_n_s_ThreadInfo___reduce_cython +#define __pyx_n_s_ThreadInfo___setstate_cython __pyx_mstate_global->__pyx_n_s_ThreadInfo___setstate_cython +#define __pyx_n_s__10 __pyx_mstate_global->__pyx_n_s__10 +#define __pyx_kp_s__2 __pyx_mstate_global->__pyx_kp_s__2 +#define __pyx_kp_s__3 __pyx_mstate_global->__pyx_kp_s__3 +#define __pyx_kp_u__3 __pyx_mstate_global->__pyx_kp_u__3 +#define __pyx_n_s__47 __pyx_mstate_global->__pyx_n_s__47 +#define __pyx_kp_s__5 __pyx_mstate_global->__pyx_kp_s__5 +#define __pyx_n_s_active __pyx_mstate_global->__pyx_n_s_active +#define __pyx_n_s_additional_info __pyx_mstate_global->__pyx_n_s_additional_info +#define __pyx_n_s_arg __pyx_mstate_global->__pyx_n_s_arg +#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines +#define __pyx_n_s_bootstrap __pyx_mstate_global->__pyx_n_s_bootstrap +#define __pyx_n_s_bootstrap_2 __pyx_mstate_global->__pyx_n_s_bootstrap_2 +#define __pyx_n_s_bootstrap_inner __pyx_mstate_global->__pyx_n_s_bootstrap_inner +#define __pyx_n_s_bootstrap_inner_2 __pyx_mstate_global->__pyx_n_s_bootstrap_inner_2 +#define __pyx_n_s_break_on_caught_exceptions __pyx_mstate_global->__pyx_n_s_break_on_caught_exceptions +#define __pyx_n_s_break_on_user_uncaught_exception __pyx_mstate_global->__pyx_n_s_break_on_user_uncaught_exception +#define __pyx_n_s_breakpoints __pyx_mstate_global->__pyx_n_s_breakpoints +#define __pyx_n_s_breakpoints_hit_at_lines __pyx_mstate_global->__pyx_n_s_breakpoints_hit_at_lines +#define __pyx_n_s_cache __pyx_mstate_global->__pyx_n_s_cache +#define __pyx_n_s_call __pyx_mstate_global->__pyx_n_s_call +#define __pyx_n_s_call_2 __pyx_mstate_global->__pyx_n_s_call_2 +#define __pyx_n_s_can_skip __pyx_mstate_global->__pyx_n_s_can_skip +#define __pyx_n_s_clear_thread_local_info __pyx_mstate_global->__pyx_n_s_clear_thread_local_info +#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback +#define __pyx_n_s_code_line_info __pyx_mstate_global->__pyx_n_s_code_line_info +#define __pyx_n_s_code_obj __pyx_mstate_global->__pyx_n_s_code_obj +#define __pyx_n_s_code_obj_py __pyx_mstate_global->__pyx_n_s_code_obj_py +#define __pyx_n_s_compute_force_stay_in_untraced_m __pyx_mstate_global->__pyx_n_s_compute_force_stay_in_untraced_m +#define __pyx_n_s_current_thread __pyx_mstate_global->__pyx_n_s_current_thread +#define __pyx_n_s_decref_py __pyx_mstate_global->__pyx_n_s_decref_py +#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict +#define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2 +#define __pyx_n_s_dis __pyx_mstate_global->__pyx_n_s_dis +#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable +#define __pyx_n_s_dummy_trace_dispatch __pyx_mstate_global->__pyx_n_s_dummy_trace_dispatch +#define __pyx_n_s_dummy_tracing_holder __pyx_mstate_global->__pyx_n_s_dummy_tracing_holder +#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable +#define __pyx_n_s_enter __pyx_mstate_global->__pyx_n_s_enter +#define __pyx_n_s_event __pyx_mstate_global->__pyx_n_s_event +#define __pyx_n_s_exec __pyx_mstate_global->__pyx_n_s_exec +#define __pyx_n_s_exit __pyx_mstate_global->__pyx_n_s_exit +#define __pyx_n_s_f_back __pyx_mstate_global->__pyx_n_s_f_back +#define __pyx_n_s_f_trace __pyx_mstate_global->__pyx_n_s_f_trace +#define __pyx_n_s_findlinestarts __pyx_mstate_global->__pyx_n_s_findlinestarts +#define __pyx_n_s_first_line __pyx_mstate_global->__pyx_n_s_first_line +#define __pyx_n_s_fix_top_level_trace_and_get_trac __pyx_mstate_global->__pyx_n_s_fix_top_level_trace_and_get_trac +#define __pyx_n_s_frame __pyx_mstate_global->__pyx_n_s_frame +#define __pyx_n_s_frame_eval_func __pyx_mstate_global->__pyx_n_s_frame_eval_func +#define __pyx_n_s_function_breakpoint_name_to_brea __pyx_mstate_global->__pyx_n_s_function_breakpoint_name_to_brea +#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc +#define __pyx_n_s_generate_code_with_breakpoints_p __pyx_mstate_global->__pyx_n_s_generate_code_with_breakpoints_p +#define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get +#define __pyx_n_s_get_abs_path_real_path_and_base __pyx_mstate_global->__pyx_n_s_get_abs_path_real_path_and_base +#define __pyx_n_s_get_cache_file_type __pyx_mstate_global->__pyx_n_s_get_cache_file_type +#define __pyx_n_s_get_cached_code_obj_info_py __pyx_mstate_global->__pyx_n_s_get_cached_code_obj_info_py +#define __pyx_n_s_get_code_line_info __pyx_mstate_global->__pyx_n_s_get_code_line_info +#define __pyx_n_s_get_file_type __pyx_mstate_global->__pyx_n_s_get_file_type +#define __pyx_n_s_get_func_code_info_py __pyx_mstate_global->__pyx_n_s_get_func_code_info_py +#define __pyx_n_s_get_ident __pyx_mstate_global->__pyx_n_s_get_ident +#define __pyx_n_s_get_ident_2 __pyx_mstate_global->__pyx_n_s_get_ident_2 +#define __pyx_n_s_get_thread_info_py __pyx_mstate_global->__pyx_n_s_get_thread_info_py +#define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate +#define __pyx_n_s_global_dbg __pyx_mstate_global->__pyx_n_s_global_dbg +#define __pyx_n_s_has_plugin_exception_breaks __pyx_mstate_global->__pyx_n_s_has_plugin_exception_breaks +#define __pyx_n_s_has_plugin_line_breaks __pyx_mstate_global->__pyx_n_s_has_plugin_line_breaks +#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import +#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing +#define __pyx_n_s_insert_pydevd_breaks __pyx_mstate_global->__pyx_n_s_insert_pydevd_breaks +#define __pyx_n_s_intersection __pyx_mstate_global->__pyx_n_s_intersection +#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine +#define __pyx_n_s_is_pydev_daemon_thread __pyx_mstate_global->__pyx_n_s_is_pydev_daemon_thread +#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled +#define __pyx_n_s_issuperset __pyx_mstate_global->__pyx_n_s_issuperset +#define __pyx_n_s_last_line __pyx_mstate_global->__pyx_n_s_last_line +#define __pyx_n_s_line __pyx_mstate_global->__pyx_n_s_line +#define __pyx_n_s_line_to_offset __pyx_mstate_global->__pyx_n_s_line_to_offset +#define __pyx_n_s_local __pyx_mstate_global->__pyx_n_s_local +#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main +#define __pyx_n_s_main_2 __pyx_mstate_global->__pyx_n_s_main_2 +#define __pyx_n_s_max __pyx_mstate_global->__pyx_n_s_max +#define __pyx_n_s_min __pyx_mstate_global->__pyx_n_s_min +#define __pyx_n_s_mtime __pyx_mstate_global->__pyx_n_s_mtime +#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name +#define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new +#define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj +#define __pyx_n_s_offset __pyx_mstate_global->__pyx_n_s_offset +#define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle +#define __pyx_n_s_plugin __pyx_mstate_global->__pyx_n_s_plugin +#define __pyx_n_s_pydev_bundle__pydev_saved_modul __pyx_mstate_global->__pyx_n_s_pydev_bundle__pydev_saved_modul +#define __pyx_n_s_pydev_monkey __pyx_mstate_global->__pyx_n_s_pydev_monkey +#define __pyx_n_s_pydevd __pyx_mstate_global->__pyx_n_s_pydevd +#define __pyx_n_s_pydevd_bundle_pydevd_additional __pyx_mstate_global->__pyx_n_s_pydevd_bundle_pydevd_additional +#define __pyx_n_s_pydevd_bundle_pydevd_constants __pyx_mstate_global->__pyx_n_s_pydevd_bundle_pydevd_constants +#define __pyx_n_s_pydevd_bundle_pydevd_trace_disp __pyx_mstate_global->__pyx_n_s_pydevd_bundle_pydevd_trace_disp +#define __pyx_n_s_pydevd_file_utils __pyx_mstate_global->__pyx_n_s_pydevd_file_utils +#define __pyx_n_s_pydevd_frame_eval_pydevd_frame __pyx_mstate_global->__pyx_n_s_pydevd_frame_eval_pydevd_frame +#define __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2 __pyx_mstate_global->__pyx_kp_s_pydevd_frame_eval_pydevd_frame_2 +#define __pyx_n_s_pydevd_frame_eval_pydevd_frame_3 __pyx_mstate_global->__pyx_n_s_pydevd_frame_eval_pydevd_frame_3 +#define __pyx_n_s_pydevd_frame_eval_pydevd_modify __pyx_mstate_global->__pyx_n_s_pydevd_frame_eval_pydevd_modify +#define __pyx_n_s_pydevd_tracing __pyx_mstate_global->__pyx_n_s_pydevd_tracing +#define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError +#define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum +#define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result +#define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state +#define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type +#define __pyx_n_s_pyx_unpickle_FuncCodeInfo __pyx_mstate_global->__pyx_n_s_pyx_unpickle_FuncCodeInfo +#define __pyx_n_s_pyx_unpickle_ThreadInfo __pyx_mstate_global->__pyx_n_s_pyx_unpickle_ThreadInfo +#define __pyx_n_s_pyx_unpickle__CacheValue __pyx_mstate_global->__pyx_n_s_pyx_unpickle__CacheValue +#define __pyx_n_s_pyx_unpickle__CodeLineInfo __pyx_mstate_global->__pyx_n_s_pyx_unpickle__CodeLineInfo +#define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable +#define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce +#define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython +#define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex +#define __pyx_n_s_return __pyx_mstate_global->__pyx_n_s_return +#define __pyx_n_s_rfind __pyx_mstate_global->__pyx_n_s_rfind +#define __pyx_n_s_run __pyx_mstate_global->__pyx_n_s_run +#define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self +#define __pyx_n_s_set_additional_thread_info_lock __pyx_mstate_global->__pyx_n_s_set_additional_thread_info_lock +#define __pyx_n_s_set_trace_func __pyx_mstate_global->__pyx_n_s_set_trace_func +#define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate +#define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython +#define __pyx_n_s_show_return_values __pyx_mstate_global->__pyx_n_s_show_return_values +#define __pyx_n_s_signature_factory __pyx_mstate_global->__pyx_n_s_signature_factory +#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec +#define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state +#define __pyx_n_s_stop_frame_eval __pyx_mstate_global->__pyx_n_s_stop_frame_eval +#define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource +#define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys +#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test +#define __pyx_n_s_thread __pyx_mstate_global->__pyx_n_s_thread +#define __pyx_n_s_thread_active __pyx_mstate_global->__pyx_n_s_thread_active +#define __pyx_n_s_thread_info __pyx_mstate_global->__pyx_n_s_thread_info +#define __pyx_n_s_thread_local_info __pyx_mstate_global->__pyx_n_s_thread_local_info +#define __pyx_n_s_threading __pyx_mstate_global->__pyx_n_s_threading +#define __pyx_n_s_trace_dispatch __pyx_mstate_global->__pyx_n_s_trace_dispatch +#define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update +#define __pyx_n_s_update_globals_dict __pyx_mstate_global->__pyx_n_s_update_globals_dict +#define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate +#define __pyx_n_s_version_info __pyx_mstate_global->__pyx_n_s_version_info +#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 +#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 +#define __pyx_int_2 __pyx_mstate_global->__pyx_int_2 +#define __pyx_int_3 __pyx_mstate_global->__pyx_int_3 +#define __pyx_int_9 __pyx_mstate_global->__pyx_int_9 +#define __pyx_int_2520179 __pyx_mstate_global->__pyx_int_2520179 +#define __pyx_int_11485321 __pyx_mstate_global->__pyx_int_11485321 +#define __pyx_int_64258489 __pyx_mstate_global->__pyx_int_64258489 +#define __pyx_int_66829570 __pyx_mstate_global->__pyx_int_66829570 +#define __pyx_int_72405718 __pyx_mstate_global->__pyx_int_72405718 +#define __pyx_int_95010005 __pyx_mstate_global->__pyx_int_95010005 +#define __pyx_int_156687530 __pyx_mstate_global->__pyx_int_156687530 +#define __pyx_int_180628038 __pyx_mstate_global->__pyx_int_180628038 +#define __pyx_int_188670045 __pyx_mstate_global->__pyx_int_188670045 +#define __pyx_int_193022138 __pyx_mstate_global->__pyx_int_193022138 +#define __pyx_int_240343912 __pyx_mstate_global->__pyx_int_240343912 +#define __pyx_int_249558979 __pyx_mstate_global->__pyx_int_249558979 +#define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4 +#define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6 +#define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7 +#define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8 +#define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9 +#define __pyx_slice__37 __pyx_mstate_global->__pyx_slice__37 +#define __pyx_tuple__12 __pyx_mstate_global->__pyx_tuple__12 +#define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14 +#define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18 +#define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21 +#define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23 +#define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27 +#define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29 +#define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31 +#define __pyx_tuple__35 __pyx_mstate_global->__pyx_tuple__35 +#define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38 +#define __pyx_tuple__39 __pyx_mstate_global->__pyx_tuple__39 +#define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42 +#define __pyx_codeobj__11 __pyx_mstate_global->__pyx_codeobj__11 +#define __pyx_codeobj__13 __pyx_mstate_global->__pyx_codeobj__13 +#define __pyx_codeobj__15 __pyx_mstate_global->__pyx_codeobj__15 +#define __pyx_codeobj__16 __pyx_mstate_global->__pyx_codeobj__16 +#define __pyx_codeobj__17 __pyx_mstate_global->__pyx_codeobj__17 +#define __pyx_codeobj__19 __pyx_mstate_global->__pyx_codeobj__19 +#define __pyx_codeobj__20 __pyx_mstate_global->__pyx_codeobj__20 +#define __pyx_codeobj__22 __pyx_mstate_global->__pyx_codeobj__22 +#define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24 +#define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25 +#define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26 +#define __pyx_codeobj__28 __pyx_mstate_global->__pyx_codeobj__28 +#define __pyx_codeobj__30 __pyx_mstate_global->__pyx_codeobj__30 +#define __pyx_codeobj__32 __pyx_mstate_global->__pyx_codeobj__32 +#define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33 +#define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34 +#define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36 +#define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40 +#define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41 +#define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43 +#define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44 +#define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45 +#define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46 +/* #### Code section: module_code ### */ + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":19 + * _thread_active = threading._active + * + * def clear_thread_local_info(): # <<<<<<<<<<<<<< + * global _thread_local_info + * _thread_local_info = threading.local() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_1clear_thread_local_info(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_1clear_thread_local_info = {"clear_thread_local_info", (PyCFunction)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_1clear_thread_local_info, METH_NOARGS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_1clear_thread_local_info(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("clear_thread_local_info (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_clear_thread_local_info(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_clear_thread_local_info(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("clear_thread_local_info", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":21 + * def clear_thread_local_info(): + * global _thread_local_info + * _thread_local_info = threading.local() # <<<<<<<<<<<<<< + * + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_local); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + if (PyDict_SetItem(__pyx_d, __pyx_n_s_thread_local_info, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":19 + * _thread_active = threading._active + * + * def clear_thread_local_info(): # <<<<<<<<<<<<<< + * global _thread_local_info + * _thread_local_info = threading.local() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.clear_thread_local_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":39 + * cdef public bint force_stay_in_untraced_mode + * + * cdef initialize(self, PyFrameObject * frame_obj): # <<<<<<<<<<<<<< + * # Places that create a ThreadInfo should verify that + * # a current Python frame is being executed! + */ + +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_initialize(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyFrameObject *__pyx_v_frame_obj) { + PyObject *__pyx_v_basename = NULL; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_v_j = NULL; + PyObject *__pyx_v_co_name = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyFrameObject *__pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + unsigned int __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("initialize", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":42 + * # Places that create a ThreadInfo should verify that + * # a current Python frame is being executed! + * assert frame_obj != NULL # <<<<<<<<<<<<<< + * + * self.additional_info = None + */ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (__pyx_v_frame_obj != NULL); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); + __PYX_ERR(0, 42, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 42, __pyx_L1_error) + #endif + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":44 + * assert frame_obj != NULL + * + * self.additional_info = None # <<<<<<<<<<<<<< + * self.is_pydevd_thread = False + * self.inside_frame_eval = 0 + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->additional_info); + __Pyx_DECREF((PyObject *)__pyx_v_self->additional_info); + __pyx_v_self->additional_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)Py_None); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":45 + * + * self.additional_info = None + * self.is_pydevd_thread = False # <<<<<<<<<<<<<< + * self.inside_frame_eval = 0 + * self.fully_initialized = False + */ + __pyx_v_self->is_pydevd_thread = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":46 + * self.additional_info = None + * self.is_pydevd_thread = False + * self.inside_frame_eval = 0 # <<<<<<<<<<<<<< + * self.fully_initialized = False + * self.thread_trace_func = None + */ + __pyx_v_self->inside_frame_eval = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":47 + * self.is_pydevd_thread = False + * self.inside_frame_eval = 0 + * self.fully_initialized = False # <<<<<<<<<<<<<< + * self.thread_trace_func = None + * + */ + __pyx_v_self->fully_initialized = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":48 + * self.inside_frame_eval = 0 + * self.fully_initialized = False + * self.thread_trace_func = None # <<<<<<<<<<<<<< + * + * # Get the root (if it's not a Thread initialized from the threading + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->thread_trace_func); + __Pyx_DECREF(__pyx_v_self->thread_trace_func); + __pyx_v_self->thread_trace_func = Py_None; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":54 + * # otherwise, we have to wait for the threading module itself to + * # create the Thread entry). + * while frame_obj.f_back != NULL: # <<<<<<<<<<<<<< + * frame_obj = frame_obj.f_back + * + */ + while (1) { + __pyx_t_1 = (__pyx_v_frame_obj->f_back != NULL); + if (!__pyx_t_1) break; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":55 + * # create the Thread entry). + * while frame_obj.f_back != NULL: + * frame_obj = frame_obj.f_back # <<<<<<<<<<<<<< + * + * basename = frame_obj.f_code.co_filename + */ + __pyx_t_2 = __pyx_v_frame_obj->f_back; + __pyx_v_frame_obj = __pyx_t_2; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":57 + * frame_obj = frame_obj.f_back + * + * basename = frame_obj.f_code.co_filename # <<<<<<<<<<<<<< + * i = basename.rfind('/') + * j = basename.rfind('\\') + */ + __pyx_t_3 = ((PyObject *)__pyx_v_frame_obj->f_code->co_filename); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_basename = __pyx_t_3; + __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":58 + * + * basename = frame_obj.f_code.co_filename + * i = basename.rfind('/') # <<<<<<<<<<<<<< + * j = basename.rfind('\\') + * if j > i: + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_basename, __pyx_n_s_rfind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_s_}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_v_i = __pyx_t_3; + __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":59 + * basename = frame_obj.f_code.co_filename + * i = basename.rfind('/') + * j = basename.rfind('\\') # <<<<<<<<<<<<<< + * if j > i: + * i = j + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_basename, __pyx_n_s_rfind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_s__2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_v_j = __pyx_t_3; + __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":60 + * i = basename.rfind('/') + * j = basename.rfind('\\') + * if j > i: # <<<<<<<<<<<<<< + * i = j + * if i >= 0: + */ + __pyx_t_3 = PyObject_RichCompare(__pyx_v_j, __pyx_v_i, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":61 + * j = basename.rfind('\\') + * if j > i: + * i = j # <<<<<<<<<<<<<< + * if i >= 0: + * basename = basename[i + 1:] + */ + __Pyx_INCREF(__pyx_v_j); + __Pyx_DECREF_SET(__pyx_v_i, __pyx_v_j); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":60 + * i = basename.rfind('/') + * j = basename.rfind('\\') + * if j > i: # <<<<<<<<<<<<<< + * i = j + * if i >= 0: + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":62 + * if j > i: + * i = j + * if i >= 0: # <<<<<<<<<<<<<< + * basename = basename[i + 1:] + * # remove ext + */ + __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":63 + * i = j + * if i >= 0: + * basename = basename[i + 1:] # <<<<<<<<<<<<<< + * # remove ext + * i = basename.rfind('.') + */ + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_basename, 0, 0, &__pyx_t_3, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_basename, __pyx_t_4); + __pyx_t_4 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":62 + * if j > i: + * i = j + * if i >= 0: # <<<<<<<<<<<<<< + * basename = basename[i + 1:] + * # remove ext + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":65 + * basename = basename[i + 1:] + * # remove ext + * i = basename.rfind('.') # <<<<<<<<<<<<<< + * if i >= 0: + * basename = basename[:i] + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_basename, __pyx_n_s_rfind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_s__3}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_4); + __pyx_t_4 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":66 + * # remove ext + * i = basename.rfind('.') + * if i >= 0: # <<<<<<<<<<<<<< + * basename = basename[:i] + * + */ + __pyx_t_4 = PyObject_RichCompare(__pyx_v_i, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":67 + * i = basename.rfind('.') + * if i >= 0: + * basename = basename[:i] # <<<<<<<<<<<<<< + * + * co_name = frame_obj.f_code.co_name + */ + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_basename, 0, 0, NULL, &__pyx_v_i, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_basename, __pyx_t_4); + __pyx_t_4 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":66 + * # remove ext + * i = basename.rfind('.') + * if i >= 0: # <<<<<<<<<<<<<< + * basename = basename[:i] + * + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":69 + * basename = basename[:i] + * + * co_name = frame_obj.f_code.co_name # <<<<<<<<<<<<<< + * + * # In these cases we cannot create a dummy thread (an actual + */ + __pyx_t_4 = ((PyObject *)__pyx_v_frame_obj->f_code->co_name); + __Pyx_INCREF(__pyx_t_4); + __pyx_v_co_name = __pyx_t_4; + __pyx_t_4 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":73 + * # In these cases we cannot create a dummy thread (an actual + * # thread will be created later or tracing will already be set). + * if basename == 'threading' and co_name in ('__bootstrap', '_bootstrap', '__bootstrap_inner', '_bootstrap_inner'): # <<<<<<<<<<<<<< + * self._can_create_dummy_thread = False + * elif basename == 'pydev_monkey' and co_name == '__call__': + */ + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_basename, __pyx_n_s_threading, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L9_bool_binop_done; + } + __Pyx_INCREF(__pyx_v_co_name); + __pyx_t_4 = __pyx_v_co_name; + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_bootstrap, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_bootstrap_2, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_bootstrap_inner, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_bootstrap_inner_2, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + __pyx_L11_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __pyx_t_7; + __pyx_t_1 = __pyx_t_8; + __pyx_L9_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":74 + * # thread will be created later or tracing will already be set). + * if basename == 'threading' and co_name in ('__bootstrap', '_bootstrap', '__bootstrap_inner', '_bootstrap_inner'): + * self._can_create_dummy_thread = False # <<<<<<<<<<<<<< + * elif basename == 'pydev_monkey' and co_name == '__call__': + * self._can_create_dummy_thread = False + */ + __pyx_v_self->_can_create_dummy_thread = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":73 + * # In these cases we cannot create a dummy thread (an actual + * # thread will be created later or tracing will already be set). + * if basename == 'threading' and co_name in ('__bootstrap', '_bootstrap', '__bootstrap_inner', '_bootstrap_inner'): # <<<<<<<<<<<<<< + * self._can_create_dummy_thread = False + * elif basename == 'pydev_monkey' and co_name == '__call__': + */ + goto __pyx_L8; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":75 + * if basename == 'threading' and co_name in ('__bootstrap', '_bootstrap', '__bootstrap_inner', '_bootstrap_inner'): + * self._can_create_dummy_thread = False + * elif basename == 'pydev_monkey' and co_name == '__call__': # <<<<<<<<<<<<<< + * self._can_create_dummy_thread = False + * elif basename == 'pydevd' and co_name in ('run', 'main', '_exec'): + */ + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_basename, __pyx_n_s_pydev_monkey, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 75, __pyx_L1_error) + if (__pyx_t_8) { + } else { + __pyx_t_1 = __pyx_t_8; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_co_name, __pyx_n_s_call, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_t_1 = __pyx_t_8; + __pyx_L15_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":76 + * self._can_create_dummy_thread = False + * elif basename == 'pydev_monkey' and co_name == '__call__': + * self._can_create_dummy_thread = False # <<<<<<<<<<<<<< + * elif basename == 'pydevd' and co_name in ('run', 'main', '_exec'): + * self._can_create_dummy_thread = False + */ + __pyx_v_self->_can_create_dummy_thread = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":75 + * if basename == 'threading' and co_name in ('__bootstrap', '_bootstrap', '__bootstrap_inner', '_bootstrap_inner'): + * self._can_create_dummy_thread = False + * elif basename == 'pydev_monkey' and co_name == '__call__': # <<<<<<<<<<<<<< + * self._can_create_dummy_thread = False + * elif basename == 'pydevd' and co_name in ('run', 'main', '_exec'): + */ + goto __pyx_L8; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":77 + * elif basename == 'pydev_monkey' and co_name == '__call__': + * self._can_create_dummy_thread = False + * elif basename == 'pydevd' and co_name in ('run', 'main', '_exec'): # <<<<<<<<<<<<<< + * self._can_create_dummy_thread = False + * elif basename == 'pydevd_tracing': + */ + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_basename, __pyx_n_s_pydevd, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 77, __pyx_L1_error) + if (__pyx_t_8) { + } else { + __pyx_t_1 = __pyx_t_8; + goto __pyx_L17_bool_binop_done; + } + __Pyx_INCREF(__pyx_v_co_name); + __pyx_t_4 = __pyx_v_co_name; + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_run, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 77, __pyx_L1_error) + if (!__pyx_t_7) { + } else { + __pyx_t_8 = __pyx_t_7; + goto __pyx_L19_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_main, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 77, __pyx_L1_error) + if (!__pyx_t_7) { + } else { + __pyx_t_8 = __pyx_t_7; + goto __pyx_L19_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_exec, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_8 = __pyx_t_7; + __pyx_L19_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = __pyx_t_8; + __pyx_t_1 = __pyx_t_7; + __pyx_L17_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":78 + * self._can_create_dummy_thread = False + * elif basename == 'pydevd' and co_name in ('run', 'main', '_exec'): + * self._can_create_dummy_thread = False # <<<<<<<<<<<<<< + * elif basename == 'pydevd_tracing': + * self._can_create_dummy_thread = False + */ + __pyx_v_self->_can_create_dummy_thread = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":77 + * elif basename == 'pydev_monkey' and co_name == '__call__': + * self._can_create_dummy_thread = False + * elif basename == 'pydevd' and co_name in ('run', 'main', '_exec'): # <<<<<<<<<<<<<< + * self._can_create_dummy_thread = False + * elif basename == 'pydevd_tracing': + */ + goto __pyx_L8; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":79 + * elif basename == 'pydevd' and co_name in ('run', 'main', '_exec'): + * self._can_create_dummy_thread = False + * elif basename == 'pydevd_tracing': # <<<<<<<<<<<<<< + * self._can_create_dummy_thread = False + * else: + */ + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_basename, __pyx_n_s_pydevd_tracing, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 79, __pyx_L1_error) + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":80 + * self._can_create_dummy_thread = False + * elif basename == 'pydevd_tracing': + * self._can_create_dummy_thread = False # <<<<<<<<<<<<<< + * else: + * self._can_create_dummy_thread = True + */ + __pyx_v_self->_can_create_dummy_thread = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":79 + * elif basename == 'pydevd' and co_name in ('run', 'main', '_exec'): + * self._can_create_dummy_thread = False + * elif basename == 'pydevd_tracing': # <<<<<<<<<<<<<< + * self._can_create_dummy_thread = False + * else: + */ + goto __pyx_L8; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":82 + * self._can_create_dummy_thread = False + * else: + * self._can_create_dummy_thread = True # <<<<<<<<<<<<<< + * + * # print('Can create dummy thread for thread started in: %s %s' % (basename, co_name)) + */ + /*else*/ { + __pyx_v_self->_can_create_dummy_thread = 1; + } + __pyx_L8:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":39 + * cdef public bint force_stay_in_untraced_mode + * + * cdef initialize(self, PyFrameObject * frame_obj): # <<<<<<<<<<<<<< + * # Places that create a ThreadInfo should verify that + * # a current Python frame is being executed! + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_basename); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_j); + __Pyx_XDECREF(__pyx_v_co_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":86 + * # print('Can create dummy thread for thread started in: %s %s' % (basename, co_name)) + * + * cdef initialize_if_possible(self): # <<<<<<<<<<<<<< + * # Don't call threading.currentThread because if we're too early in the process + * # we may create a dummy thread. + */ + +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_initialize_if_possible(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self) { + PyObject *__pyx_v_thread_ident = NULL; + PyObject *__pyx_v_t = NULL; + PyObject *__pyx_v_additional_info = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + int __pyx_t_18; + int __pyx_t_19; + int __pyx_t_20; + char const *__pyx_t_21; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("initialize_if_possible", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":89 + * # Don't call threading.currentThread because if we're too early in the process + * # we may create a dummy thread. + * self.inside_frame_eval += 1 # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_v_self->inside_frame_eval = (__pyx_v_self->inside_frame_eval + 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":91 + * self.inside_frame_eval += 1 + * + * try: # <<<<<<<<<<<<<< + * thread_ident = _get_ident() + * t = _thread_active.get(thread_ident) + */ + /*try:*/ { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":92 + * + * try: + * thread_ident = _get_ident() # <<<<<<<<<<<<<< + * t = _thread_active.get(thread_ident) + * if t is None: + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_ident); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_v_thread_ident = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":93 + * try: + * thread_ident = _get_ident() + * t = _thread_active.get(thread_ident) # <<<<<<<<<<<<<< + * if t is None: + * if self._can_create_dummy_thread: + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_thread_active); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_thread_ident}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v_t = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":94 + * thread_ident = _get_ident() + * t = _thread_active.get(thread_ident) + * if t is None: # <<<<<<<<<<<<<< + * if self._can_create_dummy_thread: + * # Initialize the dummy thread and set the tracing (both are needed to + */ + __pyx_t_5 = (__pyx_v_t == Py_None); + if (__pyx_t_5) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":95 + * t = _thread_active.get(thread_ident) + * if t is None: + * if self._can_create_dummy_thread: # <<<<<<<<<<<<<< + * # Initialize the dummy thread and set the tracing (both are needed to + * # actually stop on breakpoints). + */ + if (__pyx_v_self->_can_create_dummy_thread) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":98 + * # Initialize the dummy thread and set the tracing (both are needed to + * # actually stop on breakpoints). + * t = threading.current_thread() # <<<<<<<<<<<<<< + * SetTrace(dummy_trace_dispatch) + * else: + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_current_thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF_SET(__pyx_v_t, __pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":99 + * # actually stop on breakpoints). + * t = threading.current_thread() + * SetTrace(dummy_trace_dispatch) # <<<<<<<<<<<<<< + * else: + * return # Cannot initialize until thread becomes active. + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SetTrace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_dummy_trace_dispatch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":95 + * t = _thread_active.get(thread_ident) + * if t is None: + * if self._can_create_dummy_thread: # <<<<<<<<<<<<<< + * # Initialize the dummy thread and set the tracing (both are needed to + * # actually stop on breakpoints). + */ + goto __pyx_L7; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":101 + * SetTrace(dummy_trace_dispatch) + * else: + * return # Cannot initialize until thread becomes active. # <<<<<<<<<<<<<< + * + * if getattr(t, 'is_pydev_daemon_thread', False): + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L3_return; + } + __pyx_L7:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":94 + * thread_ident = _get_ident() + * t = _thread_active.get(thread_ident) + * if t is None: # <<<<<<<<<<<<<< + * if self._can_create_dummy_thread: + * # Initialize the dummy thread and set the tracing (both are needed to + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":103 + * return # Cannot initialize until thread becomes active. + * + * if getattr(t, 'is_pydev_daemon_thread', False): # <<<<<<<<<<<<<< + * self.is_pydevd_thread = True + * self.fully_initialized = True + */ + __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_t, __pyx_n_s_is_pydev_daemon_thread, Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 103, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_5) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":104 + * + * if getattr(t, 'is_pydev_daemon_thread', False): + * self.is_pydevd_thread = True # <<<<<<<<<<<<<< + * self.fully_initialized = True + * else: + */ + __pyx_v_self->is_pydevd_thread = 1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":105 + * if getattr(t, 'is_pydev_daemon_thread', False): + * self.is_pydevd_thread = True + * self.fully_initialized = True # <<<<<<<<<<<<<< + * else: + * try: + */ + __pyx_v_self->fully_initialized = 1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":103 + * return # Cannot initialize until thread becomes active. + * + * if getattr(t, 'is_pydev_daemon_thread', False): # <<<<<<<<<<<<<< + * self.is_pydevd_thread = True + * self.fully_initialized = True + */ + goto __pyx_L8; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":107 + * self.fully_initialized = True + * else: + * try: # <<<<<<<<<<<<<< + * additional_info = t.additional_info + * if additional_info is None: + */ + /*else*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":108 + * else: + * try: + * additional_info = t.additional_info # <<<<<<<<<<<<<< + * if additional_info is None: + * raise AttributeError() + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_additional_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_additional_info = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":109 + * try: + * additional_info = t.additional_info + * if additional_info is None: # <<<<<<<<<<<<<< + * raise AttributeError() + * except: + */ + __pyx_t_5 = (__pyx_v_additional_info == Py_None); + if (unlikely(__pyx_t_5)) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":110 + * additional_info = t.additional_info + * if additional_info is None: + * raise AttributeError() # <<<<<<<<<<<<<< + * except: + * with _set_additional_thread_info_lock: + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 110, __pyx_L9_error) + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":109 + * try: + * additional_info = t.additional_info + * if additional_info is None: # <<<<<<<<<<<<<< + * raise AttributeError() + * except: + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":107 + * self.fully_initialized = True + * else: + * try: # <<<<<<<<<<<<<< + * additional_info = t.additional_info + * if additional_info is None: + */ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L14_try_end; + __pyx_L9_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":111 + * if additional_info is None: + * raise AttributeError() + * except: # <<<<<<<<<<<<<< + * with _set_additional_thread_info_lock: + * # If it's not there, set it within a lock to avoid any racing + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.initialize_if_possible", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 111, __pyx_L11_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":112 + * raise AttributeError() + * except: + * with _set_additional_thread_info_lock: # <<<<<<<<<<<<<< + * # If it's not there, set it within a lock to avoid any racing + * # conditions. + */ + /*with:*/ { + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_set_additional_thread_info_lock); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_t_6, __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 112, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_6, __pyx_n_s_enter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 112, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_12, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; + __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 112, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + /*try:*/ { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":115 + * # If it's not there, set it within a lock to avoid any racing + * # conditions. + * additional_info = getattr(thread, 'additional_info', None) # <<<<<<<<<<<<<< + * if additional_info is None: + * additional_info = PyDBAdditionalThreadInfo() + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_thread); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L24_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_GetAttr3(__pyx_t_6, __pyx_n_s_additional_info, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 115, __pyx_L24_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_additional_info, __pyx_t_11); + __pyx_t_11 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":116 + * # conditions. + * additional_info = getattr(thread, 'additional_info', None) + * if additional_info is None: # <<<<<<<<<<<<<< + * additional_info = PyDBAdditionalThreadInfo() + * t.additional_info = additional_info + */ + __pyx_t_5 = (__pyx_v_additional_info == Py_None); + if (__pyx_t_5) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":117 + * additional_info = getattr(thread, 'additional_info', None) + * if additional_info is None: + * additional_info = PyDBAdditionalThreadInfo() # <<<<<<<<<<<<<< + * t.additional_info = additional_info + * self.additional_info = additional_info + */ + __pyx_t_11 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L24_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF_SET(__pyx_v_additional_info, __pyx_t_11); + __pyx_t_11 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":116 + * # conditions. + * additional_info = getattr(thread, 'additional_info', None) + * if additional_info is None: # <<<<<<<<<<<<<< + * additional_info = PyDBAdditionalThreadInfo() + * t.additional_info = additional_info + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":118 + * if additional_info is None: + * additional_info = PyDBAdditionalThreadInfo() + * t.additional_info = additional_info # <<<<<<<<<<<<<< + * self.additional_info = additional_info + * self.fully_initialized = True + */ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_t, __pyx_n_s_additional_info, __pyx_v_additional_info) < 0) __PYX_ERR(0, 118, __pyx_L24_error) + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":112 + * raise AttributeError() + * except: + * with _set_additional_thread_info_lock: # <<<<<<<<<<<<<< + * # If it's not there, set it within a lock to avoid any racing + * # conditions. + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + goto __pyx_L31_try_end; + __pyx_L24_error:; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + /*except:*/ { + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.initialize_if_possible", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_6, &__pyx_t_12) < 0) __PYX_ERR(0, 112, __pyx_L26_except_error) + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_12); + __pyx_t_13 = PyTuple_Pack(3, __pyx_t_11, __pyx_t_6, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 112, __pyx_L26_except_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 112, __pyx_L26_except_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_17); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (__pyx_t_5 < 0) __PYX_ERR(0, 112, __pyx_L26_except_error) + __pyx_t_18 = (!__pyx_t_5); + if (unlikely(__pyx_t_18)) { + __Pyx_GIVEREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ErrRestoreWithState(__pyx_t_11, __pyx_t_6, __pyx_t_12); + __pyx_t_11 = 0; __pyx_t_6 = 0; __pyx_t_12 = 0; + __PYX_ERR(0, 112, __pyx_L26_except_error) + } + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L25_exception_handled; + } + __pyx_L26_except_error:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); + goto __pyx_L11_except_error; + __pyx_L25_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); + __pyx_L31_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_10) { + __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__4, NULL); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + } + goto __pyx_L23; + } + __pyx_L23:; + } + goto __pyx_L36; + __pyx_L18_error:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L11_except_error; + __pyx_L36:; + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L10_exception_handled; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":107 + * self.fully_initialized = True + * else: + * try: # <<<<<<<<<<<<<< + * additional_info = t.additional_info + * if additional_info is None: + */ + __pyx_L11_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L4_error; + __pyx_L10_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L14_try_end:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":119 + * additional_info = PyDBAdditionalThreadInfo() + * t.additional_info = additional_info + * self.additional_info = additional_info # <<<<<<<<<<<<<< + * self.fully_initialized = True + * finally: + */ + if (unlikely(!__pyx_v_additional_info)) { __Pyx_RaiseUnboundLocalError("additional_info"); __PYX_ERR(0, 119, __pyx_L4_error) } + if (!(likely(((__pyx_v_additional_info) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_additional_info, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 119, __pyx_L4_error) + __pyx_t_3 = __pyx_v_additional_info; + __Pyx_INCREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF((PyObject *)__pyx_v_self->additional_info); + __Pyx_DECREF((PyObject *)__pyx_v_self->additional_info); + __pyx_v_self->additional_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":120 + * t.additional_info = additional_info + * self.additional_info = additional_info + * self.fully_initialized = True # <<<<<<<<<<<<<< + * finally: + * self.inside_frame_eval -= 1 + */ + __pyx_v_self->fully_initialized = 1; + } + __pyx_L8:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":122 + * self.fully_initialized = True + * finally: + * self.inside_frame_eval -= 1 # <<<<<<<<<<<<<< + * + * + */ + /*finally:*/ { + /*normal exit:*/{ + __pyx_v_self->inside_frame_eval = (__pyx_v_self->inside_frame_eval - 1); + goto __pyx_L5; + } + __pyx_L4_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_10 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_16, &__pyx_t_15); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_15); + __pyx_t_19 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_21 = __pyx_filename; + { + __pyx_v_self->inside_frame_eval = (__pyx_v_self->inside_frame_eval - 1); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_16, __pyx_t_15); + } + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ErrRestore(__pyx_t_9, __pyx_t_8, __pyx_t_7); + __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_10 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; + __pyx_lineno = __pyx_t_19; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_21; + goto __pyx_L1_error; + } + __pyx_L3_return: { + __pyx_t_15 = __pyx_r; + __pyx_r = 0; + __pyx_v_self->inside_frame_eval = (__pyx_v_self->inside_frame_eval - 1); + __pyx_r = __pyx_t_15; + __pyx_t_15 = 0; + goto __pyx_L0; + } + __pyx_L5:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":86 + * # print('Can create dummy thread for thread started in: %s %s' % (basename, co_name)) + * + * cdef initialize_if_possible(self): # <<<<<<<<<<<<<< + * # Don't call threading.currentThread because if we're too early in the process + * # we may create a dummy thread. + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.initialize_if_possible", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_thread_ident); + __Pyx_XDECREF(__pyx_v_t); + __Pyx_XDECREF(__pyx_v_additional_info); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":26 + * cdef class ThreadInfo: + * + * cdef public PyDBAdditionalThreadInfo additional_info # <<<<<<<<<<<<<< + * cdef public bint is_pydevd_thread + * cdef public int inside_frame_eval + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->additional_info); + __pyx_r = ((PyObject *)__pyx_v_self->additional_info); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->additional_info); + __Pyx_DECREF((PyObject *)__pyx_v_self->additional_info); + __pyx_v_self->additional_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.additional_info.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_4__del__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->additional_info); + __Pyx_DECREF((PyObject *)__pyx_v_self->additional_info); + __pyx_v_self->additional_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":27 + * + * cdef public PyDBAdditionalThreadInfo additional_info + * cdef public bint is_pydevd_thread # <<<<<<<<<<<<<< + * cdef public int inside_frame_eval + * cdef public bint fully_initialized + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_16is_pydevd_thread_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_16is_pydevd_thread_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_16is_pydevd_thread___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_16is_pydevd_thread___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_pydevd_thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.is_pydevd_thread.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_16is_pydevd_thread_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_16is_pydevd_thread_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_16is_pydevd_thread_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_16is_pydevd_thread_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_v_self->is_pydevd_thread = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.is_pydevd_thread.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":28 + * cdef public PyDBAdditionalThreadInfo additional_info + * cdef public bint is_pydevd_thread + * cdef public int inside_frame_eval # <<<<<<<<<<<<<< + * cdef public bint fully_initialized + * cdef public object thread_trace_func + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17inside_frame_eval_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17inside_frame_eval_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17inside_frame_eval___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17inside_frame_eval___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->inside_frame_eval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.inside_frame_eval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17inside_frame_eval_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17inside_frame_eval_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17inside_frame_eval_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17inside_frame_eval_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_v_self->inside_frame_eval = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.inside_frame_eval.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":29 + * cdef public bint is_pydevd_thread + * cdef public int inside_frame_eval + * cdef public bint fully_initialized # <<<<<<<<<<<<<< + * cdef public object thread_trace_func + * cdef bint _can_create_dummy_thread + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17fully_initialized_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17fully_initialized_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17fully_initialized___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17fully_initialized___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->fully_initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.fully_initialized.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17fully_initialized_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17fully_initialized_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17fully_initialized_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17fully_initialized_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_v_self->fully_initialized = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.fully_initialized.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":30 + * cdef public int inside_frame_eval + * cdef public bint fully_initialized + * cdef public object thread_trace_func # <<<<<<<<<<<<<< + * cdef bint _can_create_dummy_thread + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->thread_trace_func); + __pyx_r = __pyx_v_self->thread_trace_func; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->thread_trace_func); + __Pyx_DECREF(__pyx_v_self->thread_trace_func); + __pyx_v_self->thread_trace_func = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_4__del__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->thread_trace_func); + __Pyx_DECREF(__pyx_v_self->thread_trace_func); + __pyx_v_self->thread_trace_func = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":37 + * # If True the debugger should not go into trace mode even if the new + * # code for a function is None and there are breakpoints. + * cdef public bint force_stay_in_untraced_mode # <<<<<<<<<<<<<< + * + * cdef initialize(self, PyFrameObject * frame_obj): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_27force_stay_in_untraced_mode_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_27force_stay_in_untraced_mode_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_27force_stay_in_untraced_mode___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_27force_stay_in_untraced_mode___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->force_stay_in_untraced_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.force_stay_in_untraced_mode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_27force_stay_in_untraced_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_27force_stay_in_untraced_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_27force_stay_in_untraced_mode_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_27force_stay_in_untraced_mode_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 37, __pyx_L1_error) + __pyx_v_self->force_stay_in_untraced_mode = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.force_stay_in_untraced_mode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo___reduce_cython__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo___reduce_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 1); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._can_create_dummy_thread, self.additional_info, self.force_stay_in_untraced_mode, self.fully_initialized, self.inside_frame_eval, self.is_pydevd_thread, self.thread_trace_func) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_can_create_dummy_thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->force_stay_in_untraced_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->fully_initialized); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->inside_frame_eval); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->is_pydevd_thread); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->additional_info); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->additional_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_self->additional_info))) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_5)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->thread_trace_func); + __Pyx_GIVEREF(__pyx_v_self->thread_trace_func); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_v_self->thread_trace_func)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._can_create_dummy_thread, self.additional_info, self.force_stay_in_untraced_mode, self.fully_initialized, self.inside_frame_eval, self.is_pydevd_thread, self.thread_trace_func) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_6 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v__dict = __pyx_t_6; + __pyx_t_6 = 0; + + /* "(tree fragment)":7 + * state = (self._can_create_dummy_thread, self.additional_info, self.force_stay_in_untraced_mode, self.fully_initialized, self.inside_frame_eval, self.is_pydevd_thread, self.thread_trace_func) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_7 = (__pyx_v__dict != Py_None); + if (__pyx_t_7) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.additional_info is not None or self.thread_trace_func is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._can_create_dummy_thread, self.additional_info, self.force_stay_in_untraced_mode, self.fully_initialized, self.inside_frame_eval, self.is_pydevd_thread, self.thread_trace_func) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.additional_info is not None or self.thread_trace_func is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_ThreadInfo, (type(self), 0xe535b68, None), state + */ + /*else*/ { + __pyx_t_8 = (((PyObject *)__pyx_v_self->additional_info) != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->thread_trace_func != Py_None); + __pyx_t_7 = __pyx_t_8; + __pyx_L4_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_7; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.additional_info is not None or self.thread_trace_func is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ThreadInfo, (type(self), 0xe535b68, None), state + * else: + */ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.additional_info is not None or self.thread_trace_func is not None + * if use_setstate: + * return __pyx_unpickle_ThreadInfo, (type(self), 0xe535b68, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_ThreadInfo, (type(self), 0xe535b68, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_ThreadInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_240343912); + __Pyx_GIVEREF(__pyx_int_240343912); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_240343912)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.additional_info is not None or self.thread_trace_func is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ThreadInfo, (type(self), 0xe535b68, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_ThreadInfo, (type(self), 0xe535b68, None), state + * else: + * return __pyx_unpickle_ThreadInfo, (type(self), 0xe535b68, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ThreadInfo__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_ThreadInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_240343912); + __Pyx_GIVEREF(__pyx_int_240343912); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_240343912)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_6 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ThreadInfo, (type(self), 0xe535b68, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ThreadInfo__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_2__setstate_cython__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_2__setstate_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 1); + + /* "(tree fragment)":17 + * return __pyx_unpickle_ThreadInfo, (type(self), 0xe535b68, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ThreadInfo__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle_ThreadInfo__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ThreadInfo, (type(self), 0xe535b68, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ThreadInfo__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":139 + * cdef public int breakpoints_mtime + * + * def __init__(self): # <<<<<<<<<<<<<< + * self.co_filename = '' + * self.canonical_normalized_filename = '' + */ + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo___init__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo___init__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":140 + * + * def __init__(self): + * self.co_filename = '' # <<<<<<<<<<<<<< + * self.canonical_normalized_filename = '' + * self.always_skip_code = False + */ + __Pyx_INCREF(__pyx_kp_s__5); + __Pyx_GIVEREF(__pyx_kp_s__5); + __Pyx_GOTREF(__pyx_v_self->co_filename); + __Pyx_DECREF(__pyx_v_self->co_filename); + __pyx_v_self->co_filename = __pyx_kp_s__5; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":141 + * def __init__(self): + * self.co_filename = '' + * self.canonical_normalized_filename = '' # <<<<<<<<<<<<<< + * self.always_skip_code = False + * + */ + __Pyx_INCREF(__pyx_kp_s__5); + __Pyx_GIVEREF(__pyx_kp_s__5); + __Pyx_GOTREF(__pyx_v_self->canonical_normalized_filename); + __Pyx_DECREF(__pyx_v_self->canonical_normalized_filename); + __pyx_v_self->canonical_normalized_filename = __pyx_kp_s__5; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":142 + * self.co_filename = '' + * self.canonical_normalized_filename = '' + * self.always_skip_code = False # <<<<<<<<<<<<<< + * + * # If breakpoints are found but new_code is None, + */ + __pyx_v_self->always_skip_code = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":147 + * # this means we weren't able to actually add the code + * # where needed, so, fallback to tracing. + * self.breakpoint_found = False # <<<<<<<<<<<<<< + * self.new_code = None + * self.breakpoints_mtime = -1 + */ + __pyx_v_self->breakpoint_found = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":148 + * # where needed, so, fallback to tracing. + * self.breakpoint_found = False + * self.new_code = None # <<<<<<<<<<<<<< + * self.breakpoints_mtime = -1 + * + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->new_code); + __Pyx_DECREF(__pyx_v_self->new_code); + __pyx_v_self->new_code = Py_None; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":149 + * self.breakpoint_found = False + * self.new_code = None + * self.breakpoints_mtime = -1 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->breakpoints_mtime = -1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":139 + * cdef public int breakpoints_mtime + * + * def __init__(self): # <<<<<<<<<<<<<< + * self.co_filename = '' + * self.canonical_normalized_filename = '' + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":127 + * cdef class FuncCodeInfo: + * + * cdef public str co_filename # <<<<<<<<<<<<<< + * cdef public str co_name + * cdef public str canonical_normalized_filename + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->co_filename); + __pyx_r = __pyx_v_self->co_filename; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_value))) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->co_filename); + __Pyx_DECREF(__pyx_v_self->co_filename); + __pyx_v_self->co_filename = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.FuncCodeInfo.co_filename.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_4__del__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->co_filename); + __Pyx_DECREF(__pyx_v_self->co_filename); + __pyx_v_self->co_filename = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":128 + * + * cdef public str co_filename + * cdef public str co_name # <<<<<<<<<<<<<< + * cdef public str canonical_normalized_filename + * cdef bint always_skip_code + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->co_name); + __pyx_r = __pyx_v_self->co_name; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_value))) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->co_name); + __Pyx_DECREF(__pyx_v_self->co_name); + __pyx_v_self->co_name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.FuncCodeInfo.co_name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_4__del__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->co_name); + __Pyx_DECREF(__pyx_v_self->co_name); + __pyx_v_self->co_name = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":129 + * cdef public str co_filename + * cdef public str co_name + * cdef public str canonical_normalized_filename # <<<<<<<<<<<<<< + * cdef bint always_skip_code + * cdef public bint breakpoint_found + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->canonical_normalized_filename); + __pyx_r = __pyx_v_self->canonical_normalized_filename; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_value))) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->canonical_normalized_filename); + __Pyx_DECREF(__pyx_v_self->canonical_normalized_filename); + __pyx_v_self->canonical_normalized_filename = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.FuncCodeInfo.canonical_normalized_filename.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_4__del__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->canonical_normalized_filename); + __Pyx_DECREF(__pyx_v_self->canonical_normalized_filename); + __pyx_v_self->canonical_normalized_filename = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":131 + * cdef public str canonical_normalized_filename + * cdef bint always_skip_code + * cdef public bint breakpoint_found # <<<<<<<<<<<<<< + * cdef public object new_code + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_16breakpoint_found_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_16breakpoint_found_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_16breakpoint_found___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_16breakpoint_found___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->breakpoint_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.FuncCodeInfo.breakpoint_found.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_16breakpoint_found_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_16breakpoint_found_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_16breakpoint_found_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_16breakpoint_found_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_v_self->breakpoint_found = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.FuncCodeInfo.breakpoint_found.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":132 + * cdef bint always_skip_code + * cdef public bint breakpoint_found + * cdef public object new_code # <<<<<<<<<<<<<< + * + * # When breakpoints_mtime != PyDb.mtime the validity of breakpoints have + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->new_code); + __pyx_r = __pyx_v_self->new_code; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->new_code); + __Pyx_DECREF(__pyx_v_self->new_code); + __pyx_v_self->new_code = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_4__del__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->new_code); + __Pyx_DECREF(__pyx_v_self->new_code); + __pyx_v_self->new_code = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":137 + * # to be re-evaluated (if invalid a new FuncCodeInfo must be created and + * # tracing can't be disabled for the related frames). + * cdef public int breakpoints_mtime # <<<<<<<<<<<<<< + * + * def __init__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_17breakpoints_mtime_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_17breakpoints_mtime_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_17breakpoints_mtime___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_17breakpoints_mtime___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->breakpoints_mtime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.FuncCodeInfo.breakpoints_mtime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_17breakpoints_mtime_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_17breakpoints_mtime_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_17breakpoints_mtime_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_17breakpoints_mtime_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_v_self->breakpoints_mtime = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.FuncCodeInfo.breakpoints_mtime.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_2__reduce_cython__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_2__reduce_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 1); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.always_skip_code, self.breakpoint_found, self.breakpoints_mtime, self.canonical_normalized_filename, self.co_filename, self.co_name, self.new_code) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->always_skip_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->breakpoint_found); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->breakpoints_mtime); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->canonical_normalized_filename); + __Pyx_GIVEREF(__pyx_v_self->canonical_normalized_filename); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_self->canonical_normalized_filename)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->co_filename); + __Pyx_GIVEREF(__pyx_v_self->co_filename); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_self->co_filename)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->co_name); + __Pyx_GIVEREF(__pyx_v_self->co_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->co_name)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->new_code); + __Pyx_GIVEREF(__pyx_v_self->new_code); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_v_self->new_code)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.always_skip_code, self.breakpoint_found, self.breakpoints_mtime, self.canonical_normalized_filename, self.co_filename, self.co_name, self.new_code) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v__dict = __pyx_t_4; + __pyx_t_4 = 0; + + /* "(tree fragment)":7 + * state = (self.always_skip_code, self.breakpoint_found, self.breakpoints_mtime, self.canonical_normalized_filename, self.co_filename, self.co_name, self.new_code) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.canonical_normalized_filename is not None or self.co_filename is not None or self.co_name is not None or self.new_code is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.always_skip_code, self.breakpoint_found, self.breakpoints_mtime, self.canonical_normalized_filename, self.co_filename, self.co_name, self.new_code) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.canonical_normalized_filename is not None or self.co_filename is not None or self.co_name is not None or self.new_code is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_FuncCodeInfo, (type(self), 0x450d2d6, None), state + */ + /*else*/ { + __pyx_t_6 = (__pyx_v_self->canonical_normalized_filename != ((PyObject*)Py_None)); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->co_filename != ((PyObject*)Py_None)); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->co_name != ((PyObject*)Py_None)); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->new_code != Py_None); + __pyx_t_5 = __pyx_t_6; + __pyx_L4_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_5; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.canonical_normalized_filename is not None or self.co_filename is not None or self.co_name is not None or self.new_code is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_FuncCodeInfo, (type(self), 0x450d2d6, None), state + * else: + */ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.canonical_normalized_filename is not None or self.co_filename is not None or self.co_name is not None or self.new_code is not None + * if use_setstate: + * return __pyx_unpickle_FuncCodeInfo, (type(self), 0x450d2d6, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_FuncCodeInfo, (type(self), 0x450d2d6, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_FuncCodeInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_72405718); + __Pyx_GIVEREF(__pyx_int_72405718); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_72405718)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.canonical_normalized_filename is not None or self.co_filename is not None or self.co_name is not None or self.new_code is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_FuncCodeInfo, (type(self), 0x450d2d6, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_FuncCodeInfo, (type(self), 0x450d2d6, None), state + * else: + * return __pyx_unpickle_FuncCodeInfo, (type(self), 0x450d2d6, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_FuncCodeInfo__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_FuncCodeInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_72405718); + __Pyx_GIVEREF(__pyx_int_72405718); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_72405718)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.FuncCodeInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FuncCodeInfo, (type(self), 0x450d2d6, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FuncCodeInfo__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.FuncCodeInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_4__setstate_cython__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_4__setstate_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 1); + + /* "(tree fragment)":17 + * return __pyx_unpickle_FuncCodeInfo, (type(self), 0x450d2d6, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_FuncCodeInfo__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle_FuncCodeInfo__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FuncCodeInfo, (type(self), 0x450d2d6, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FuncCodeInfo__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.FuncCodeInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":152 + * + * + * def dummy_trace_dispatch(frame, str event, arg): # <<<<<<<<<<<<<< + * if event == 'call': + * if frame.f_trace is not None: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_3dummy_trace_dispatch(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_3dummy_trace_dispatch = {"dummy_trace_dispatch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_3dummy_trace_dispatch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_3dummy_trace_dispatch(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_event = 0; + PyObject *__pyx_v_arg = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("dummy_trace_dispatch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,&__pyx_n_s_event,&__pyx_n_s_arg,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 152, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_event)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 152, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("dummy_trace_dispatch", 1, 3, 3, 1); __PYX_ERR(0, 152, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arg)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 152, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("dummy_trace_dispatch", 1, 3, 3, 2); __PYX_ERR(0, 152, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "dummy_trace_dispatch") < 0)) __PYX_ERR(0, 152, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v_frame = values[0]; + __pyx_v_event = ((PyObject*)values[1]); + __pyx_v_arg = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("dummy_trace_dispatch", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 152, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.dummy_trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), (&PyString_Type), 1, "event", 1))) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_2dummy_trace_dispatch(__pyx_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_2dummy_trace_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("dummy_trace_dispatch", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":153 + * + * def dummy_trace_dispatch(frame, str event, arg): + * if event == 'call': # <<<<<<<<<<<<<< + * if frame.f_trace is not None: + * return frame.f_trace(frame, event, arg) + */ + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 153, __pyx_L1_error) + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":154 + * def dummy_trace_dispatch(frame, str event, arg): + * if event == 'call': + * if frame.f_trace is not None: # <<<<<<<<<<<<<< + * return frame.f_trace(frame, event, arg) + * return None + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = (__pyx_t_2 != Py_None); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":155 + * if event == 'call': + * if frame.f_trace is not None: + * return frame.f_trace(frame, event, arg) # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_frame, __pyx_v_event, __pyx_v_arg}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":154 + * def dummy_trace_dispatch(frame, str event, arg): + * if event == 'call': + * if frame.f_trace is not None: # <<<<<<<<<<<<<< + * return frame.f_trace(frame, event, arg) + * return None + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":153 + * + * def dummy_trace_dispatch(frame, str event, arg): + * if event == 'call': # <<<<<<<<<<<<<< + * if frame.f_trace is not None: + * return frame.f_trace(frame, event, arg) + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":156 + * if frame.f_trace is not None: + * return frame.f_trace(frame, event, arg) + * return None # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":152 + * + * + * def dummy_trace_dispatch(frame, str event, arg): # <<<<<<<<<<<<<< + * if event == 'call': + * if frame.f_trace is not None: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.dummy_trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":159 + * + * + * def get_thread_info_py() -> ThreadInfo: # <<<<<<<<<<<<<< + * return get_thread_info(PyEval_GetFrame()) + * + */ + +/* Python wrapper */ +static struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_5get_thread_info_py(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_5get_thread_info_py = {"get_thread_info_py", (PyCFunction)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_5get_thread_info_py, METH_NOARGS, 0}; +static struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_5get_thread_info_py(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_thread_info_py (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_4get_thread_info_py(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_4get_thread_info_py(CYTHON_UNUSED PyObject *__pyx_self) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_thread_info_py", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":160 + * + * def get_thread_info_py() -> ThreadInfo: + * return get_thread_info(PyEval_GetFrame()) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_thread_info(PyEval_GetFrame())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":159 + * + * + * def get_thread_info_py() -> ThreadInfo: # <<<<<<<<<<<<<< + * return get_thread_info(PyEval_GetFrame()) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_thread_info_py", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":163 + * + * + * cdef ThreadInfo get_thread_info(PyFrameObject * frame_obj): # <<<<<<<<<<<<<< + * ''' + * Provides thread-related info. + */ + +static struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_thread_info(PyFrameObject *__pyx_v_frame_obj) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_thread_info = 0; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + int __pyx_t_10; + char const *__pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_thread_info", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":170 + * ''' + * cdef ThreadInfo thread_info + * try: # <<<<<<<<<<<<<< + * # Note: changing to a `dict[thread.ident] = thread_info` had almost no + * # effect in the performance. + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":173 + * # Note: changing to a `dict[thread.ident] = thread_info` had almost no + * # effect in the performance. + * thread_info = _thread_local_info.thread_info # <<<<<<<<<<<<<< + * except: + * if frame_obj == NULL: + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_thread_local_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_thread_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 173, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo))))) __PYX_ERR(0, 173, __pyx_L3_error) + __pyx_v_thread_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":170 + * ''' + * cdef ThreadInfo thread_info + * try: # <<<<<<<<<<<<<< + * # Note: changing to a `dict[thread.ident] = thread_info` had almost no + * # effect in the performance. + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":174 + * # effect in the performance. + * thread_info = _thread_local_info.thread_info + * except: # <<<<<<<<<<<<<< + * if frame_obj == NULL: + * return None + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_thread_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 174, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_6); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":175 + * thread_info = _thread_local_info.thread_info + * except: + * if frame_obj == NULL: # <<<<<<<<<<<<<< + * return None + * thread_info = ThreadInfo() + */ + __pyx_t_7 = (__pyx_v_frame_obj == NULL); + if (__pyx_t_7) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":176 + * except: + * if frame_obj == NULL: + * return None # <<<<<<<<<<<<<< + * thread_info = ThreadInfo() + * thread_info.initialize(frame_obj) + */ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_r = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)Py_None); __Pyx_INCREF(Py_None); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L6_except_return; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":175 + * thread_info = _thread_local_info.thread_info + * except: + * if frame_obj == NULL: # <<<<<<<<<<<<<< + * return None + * thread_info = ThreadInfo() + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":177 + * if frame_obj == NULL: + * return None + * thread_info = ThreadInfo() # <<<<<<<<<<<<<< + * thread_info.initialize(frame_obj) + * thread_info.inside_frame_eval += 1 + */ + __pyx_t_8 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 177, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_thread_info, ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_t_8)); + __pyx_t_8 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":178 + * return None + * thread_info = ThreadInfo() + * thread_info.initialize(frame_obj) # <<<<<<<<<<<<<< + * thread_info.inside_frame_eval += 1 + * try: + */ + __pyx_t_8 = ((struct __pyx_vtabstruct_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_thread_info->__pyx_vtab)->initialize(__pyx_v_thread_info, __pyx_v_frame_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":179 + * thread_info = ThreadInfo() + * thread_info.initialize(frame_obj) + * thread_info.inside_frame_eval += 1 # <<<<<<<<<<<<<< + * try: + * _thread_local_info.thread_info = thread_info + */ + __pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval + 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":180 + * thread_info.initialize(frame_obj) + * thread_info.inside_frame_eval += 1 + * try: # <<<<<<<<<<<<<< + * _thread_local_info.thread_info = thread_info + * + */ + /*try:*/ { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":181 + * thread_info.inside_frame_eval += 1 + * try: + * _thread_local_info.thread_info = thread_info # <<<<<<<<<<<<<< + * + * # Note: _code_extra_index is not actually thread-related, + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_thread_local_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 181, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_PyObject_SetAttrStr(__pyx_t_8, __pyx_n_s_thread_info, ((PyObject *)__pyx_v_thread_info)) < 0) __PYX_ERR(0, 181, __pyx_L15_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":186 + * # but this is a good point to initialize it. + * global _code_extra_index + * if _code_extra_index == -1: # <<<<<<<<<<<<<< + * _code_extra_index = _PyEval_RequestCodeExtraIndex(release_co_extra) + * + */ + __pyx_t_7 = (__pyx_v_18_pydevd_frame_eval_22pydevd_frame_evaluator__code_extra_index == -1L); + if (__pyx_t_7) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":187 + * global _code_extra_index + * if _code_extra_index == -1: + * _code_extra_index = _PyEval_RequestCodeExtraIndex(release_co_extra) # <<<<<<<<<<<<<< + * + * thread_info.initialize_if_possible() + */ + __pyx_v_18_pydevd_frame_eval_22pydevd_frame_evaluator__code_extra_index = ((int)_PyEval_RequestCodeExtraIndex(release_co_extra)); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":186 + * # but this is a good point to initialize it. + * global _code_extra_index + * if _code_extra_index == -1: # <<<<<<<<<<<<<< + * _code_extra_index = _PyEval_RequestCodeExtraIndex(release_co_extra) + * + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":189 + * _code_extra_index = _PyEval_RequestCodeExtraIndex(release_co_extra) + * + * thread_info.initialize_if_possible() # <<<<<<<<<<<<<< + * finally: + * thread_info.inside_frame_eval -= 1 + */ + __pyx_t_8 = ((struct __pyx_vtabstruct_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_thread_info->__pyx_vtab)->initialize_if_possible(__pyx_v_thread_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 189, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":191 + * thread_info.initialize_if_possible() + * finally: + * thread_info.inside_frame_eval -= 1 # <<<<<<<<<<<<<< + * + * return thread_info + */ + /*finally:*/ { + /*normal exit:*/{ + __pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval - 1); + goto __pyx_L16; + } + __pyx_L15_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; + { + __pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval - 1); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + } + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; + __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; + goto __pyx_L5_except_error; + } + __pyx_L16:; + } + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L4_exception_handled; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":170 + * ''' + * cdef ThreadInfo thread_info + * try: # <<<<<<<<<<<<<< + * # Note: changing to a `dict[thread.ident] = thread_info` had almost no + * # effect in the performance. + */ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L6_except_return:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L0; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":193 + * thread_info.inside_frame_eval -= 1 + * + * return thread_info # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF((PyObject *)__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_thread_info); + __pyx_r = __pyx_v_thread_info; + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":163 + * + * + * cdef ThreadInfo get_thread_info(PyFrameObject * frame_obj): # <<<<<<<<<<<<<< + * ''' + * Provides thread-related info. + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_thread_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_thread_info); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":196 + * + * + * def decref_py(obj): # <<<<<<<<<<<<<< + * ''' + * Helper to be called from Python. + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_7decref_py(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_18_pydevd_frame_eval_22pydevd_frame_evaluator_6decref_py, "\n Helper to be called from Python.\n "); +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_7decref_py = {"decref_py", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_7decref_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18_pydevd_frame_eval_22pydevd_frame_evaluator_6decref_py}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_7decref_py(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_obj = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decref_py (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 196, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "decref_py") < 0)) __PYX_ERR(0, 196, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v_obj = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decref_py", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 196, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.decref_py", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_6decref_py(__pyx_self, __pyx_v_obj); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_6decref_py(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decref_py", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":200 + * Helper to be called from Python. + * ''' + * Py_DECREF(obj) # <<<<<<<<<<<<<< + * + * + */ + Py_DECREF(__pyx_v_obj); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":196 + * + * + * def decref_py(obj): # <<<<<<<<<<<<<< + * ''' + * Helper to be called from Python. + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":203 + * + * + * def get_func_code_info_py(thread_info, frame, code_obj) -> FuncCodeInfo: # <<<<<<<<<<<<<< + * ''' + * Helper to be called from Python. + */ + +/* Python wrapper */ +static struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_9get_func_code_info_py(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_18_pydevd_frame_eval_22pydevd_frame_evaluator_8get_func_code_info_py, "\n Helper to be called from Python.\n "); +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_9get_func_code_info_py = {"get_func_code_info_py", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_9get_func_code_info_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18_pydevd_frame_eval_22pydevd_frame_evaluator_8get_func_code_info_py}; +static struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_9get_func_code_info_py(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_thread_info = 0; + PyObject *__pyx_v_frame = 0; + PyObject *__pyx_v_code_obj = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_func_code_info_py (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_thread_info,&__pyx_n_s_frame,&__pyx_n_s_code_obj,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_thread_info)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 203, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_frame)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 203, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("get_func_code_info_py", 1, 3, 3, 1); __PYX_ERR(0, 203, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_code_obj)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 203, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("get_func_code_info_py", 1, 3, 3, 2); __PYX_ERR(0, 203, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_func_code_info_py") < 0)) __PYX_ERR(0, 203, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v_thread_info = values[0]; + __pyx_v_frame = values[1]; + __pyx_v_code_obj = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_func_code_info_py", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 203, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_func_code_info_py", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_8get_func_code_info_py(__pyx_self, __pyx_v_thread_info, __pyx_v_frame, __pyx_v_code_obj); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_8get_func_code_info_py(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_thread_info, PyObject *__pyx_v_frame, PyObject *__pyx_v_code_obj) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_func_code_info_py", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":207 + * Helper to be called from Python. + * ''' + * return get_func_code_info( thread_info, frame, code_obj) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_func_code_info(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_thread_info), ((PyFrameObject *)__pyx_v_frame), ((PyCodeObject *)__pyx_v_code_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":203 + * + * + * def get_func_code_info_py(thread_info, frame, code_obj) -> FuncCodeInfo: # <<<<<<<<<<<<<< + * ''' + * Helper to be called from Python. + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_func_code_info_py", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":212 + * cdef int _code_extra_index = -1 + * + * cdef FuncCodeInfo get_func_code_info(ThreadInfo thread_info, PyFrameObject * frame_obj, PyCodeObject * code_obj): # <<<<<<<<<<<<<< + * ''' + * Provides code-object related info. + */ + +static struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_func_code_info(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_thread_info, PyFrameObject *__pyx_v_frame_obj, PyCodeObject *__pyx_v_code_obj) { + PyObject *__pyx_v_main_debugger = 0; + PyObject *__pyx_v_extra; + PyObject *__pyx_v_extra_obj; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_func_code_info_obj = NULL; + PyObject *__pyx_v_co_filename = 0; + PyObject *__pyx_v_co_name = 0; + PyObject *__pyx_v_cache_file_type = 0; + PyObject *__pyx_v_cache_file_type_key = 0; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_func_code_info = NULL; + PyObject *__pyx_v_abs_path_real_path_and_base = NULL; + PyObject *__pyx_v_file_type = NULL; + PyObject *__pyx_v_breakpoints = 0; + PyObject *__pyx_v_function_breakpoint = 0; + PyObject *__pyx_v_code_obj_py = 0; + PyObject *__pyx_v_cached_code_obj_info = 0; + PyObject *__pyx_v_breakpoint_found = NULL; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + unsigned int __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_func_code_info", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":228 + * # print('get_func_code_info', f_code.co_name, f_code.co_filename) + * + * cdef object main_debugger = GlobalDebuggerHolder.global_dbg # <<<<<<<<<<<<<< + * thread_info.force_stay_in_untraced_mode = False # This is an output value of the function. + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_GlobalDebuggerHolder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_global_dbg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_main_debugger = __pyx_t_2; + __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":229 + * + * cdef object main_debugger = GlobalDebuggerHolder.global_dbg + * thread_info.force_stay_in_untraced_mode = False # This is an output value of the function. # <<<<<<<<<<<<<< + * + * cdef PyObject * extra + */ + __pyx_v_thread_info->force_stay_in_untraced_mode = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":232 + * + * cdef PyObject * extra + * _PyCode_GetExtra( code_obj, _code_extra_index, & extra) # <<<<<<<<<<<<<< + * if extra is not NULL: + * extra_obj = extra + */ + (void)(_PyCode_GetExtra(((PyObject *)__pyx_v_code_obj), __pyx_v_18_pydevd_frame_eval_22pydevd_frame_evaluator__code_extra_index, (&__pyx_v_extra))); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":233 + * cdef PyObject * extra + * _PyCode_GetExtra( code_obj, _code_extra_index, & extra) + * if extra is not NULL: # <<<<<<<<<<<<<< + * extra_obj = extra + * if extra_obj is not NULL: + */ + __pyx_t_3 = (__pyx_v_extra != NULL); + if (__pyx_t_3) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":234 + * _PyCode_GetExtra( code_obj, _code_extra_index, & extra) + * if extra is not NULL: + * extra_obj = extra # <<<<<<<<<<<<<< + * if extra_obj is not NULL: + * func_code_info_obj = extra_obj + */ + __pyx_v_extra_obj = ((PyObject *)__pyx_v_extra); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":235 + * if extra is not NULL: + * extra_obj = extra + * if extra_obj is not NULL: # <<<<<<<<<<<<<< + * func_code_info_obj = extra_obj + * if func_code_info_obj.breakpoints_mtime == main_debugger.mtime: + */ + __pyx_t_3 = (__pyx_v_extra_obj != NULL); + if (__pyx_t_3) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":236 + * extra_obj = extra + * if extra_obj is not NULL: + * func_code_info_obj = extra_obj # <<<<<<<<<<<<<< + * if func_code_info_obj.breakpoints_mtime == main_debugger.mtime: + * # if DEBUG: + */ + __pyx_t_2 = ((PyObject *)__pyx_v_extra_obj); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_func_code_info_obj = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":237 + * if extra_obj is not NULL: + * func_code_info_obj = extra_obj + * if func_code_info_obj.breakpoints_mtime == main_debugger.mtime: # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('get_func_code_info: matched mtime', f_code.co_name, f_code.co_filename) + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_func_code_info_obj->breakpoints_mtime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_mtime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_3) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":241 + * # print('get_func_code_info: matched mtime', f_code.co_name, f_code.co_filename) + * + * return func_code_info_obj # <<<<<<<<<<<<<< + * + * cdef str co_filename = code_obj.co_filename + */ + __Pyx_XDECREF((PyObject *)__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_func_code_info_obj); + __pyx_r = __pyx_v_func_code_info_obj; + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":237 + * if extra_obj is not NULL: + * func_code_info_obj = extra_obj + * if func_code_info_obj.breakpoints_mtime == main_debugger.mtime: # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('get_func_code_info: matched mtime', f_code.co_name, f_code.co_filename) + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":235 + * if extra is not NULL: + * extra_obj = extra + * if extra_obj is not NULL: # <<<<<<<<<<<<<< + * func_code_info_obj = extra_obj + * if func_code_info_obj.breakpoints_mtime == main_debugger.mtime: + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":233 + * cdef PyObject * extra + * _PyCode_GetExtra( code_obj, _code_extra_index, & extra) + * if extra is not NULL: # <<<<<<<<<<<<<< + * extra_obj = extra + * if extra_obj is not NULL: + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":243 + * return func_code_info_obj + * + * cdef str co_filename = code_obj.co_filename # <<<<<<<<<<<<<< + * cdef str co_name = code_obj.co_name + * cdef dict cache_file_type + */ + __pyx_t_4 = ((PyObject *)__pyx_v_code_obj->co_filename); + __Pyx_INCREF(__pyx_t_4); + __pyx_v_co_filename = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":244 + * + * cdef str co_filename = code_obj.co_filename + * cdef str co_name = code_obj.co_name # <<<<<<<<<<<<<< + * cdef dict cache_file_type + * cdef tuple cache_file_type_key + */ + __pyx_t_4 = ((PyObject *)__pyx_v_code_obj->co_name); + __Pyx_INCREF(__pyx_t_4); + __pyx_v_co_name = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":248 + * cdef tuple cache_file_type_key + * + * func_code_info = FuncCodeInfo() # <<<<<<<<<<<<<< + * func_code_info.breakpoints_mtime = main_debugger.mtime + * + */ + __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_func_code_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":249 + * + * func_code_info = FuncCodeInfo() + * func_code_info.breakpoints_mtime = main_debugger.mtime # <<<<<<<<<<<<<< + * + * func_code_info.co_filename = co_filename + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_mtime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_func_code_info->breakpoints_mtime = __pyx_t_5; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":251 + * func_code_info.breakpoints_mtime = main_debugger.mtime + * + * func_code_info.co_filename = co_filename # <<<<<<<<<<<<<< + * func_code_info.co_name = co_name + * + */ + __Pyx_INCREF(__pyx_v_co_filename); + __Pyx_GIVEREF(__pyx_v_co_filename); + __Pyx_GOTREF(__pyx_v_func_code_info->co_filename); + __Pyx_DECREF(__pyx_v_func_code_info->co_filename); + __pyx_v_func_code_info->co_filename = __pyx_v_co_filename; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":252 + * + * func_code_info.co_filename = co_filename + * func_code_info.co_name = co_name # <<<<<<<<<<<<<< + * + * if not func_code_info.always_skip_code: + */ + __Pyx_INCREF(__pyx_v_co_name); + __Pyx_GIVEREF(__pyx_v_co_name); + __Pyx_GOTREF(__pyx_v_func_code_info->co_name); + __Pyx_DECREF(__pyx_v_func_code_info->co_name); + __pyx_v_func_code_info->co_name = __pyx_v_co_name; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":254 + * func_code_info.co_name = co_name + * + * if not func_code_info.always_skip_code: # <<<<<<<<<<<<<< + * try: + * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[co_filename] + */ + __pyx_t_3 = (!__pyx_v_func_code_info->always_skip_code); + if (__pyx_t_3) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":255 + * + * if not func_code_info.always_skip_code: + * try: # <<<<<<<<<<<<<< + * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[co_filename] + * except: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":256 + * if not func_code_info.always_skip_code: + * try: + * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[co_filename] # <<<<<<<<<<<<<< + * except: + * abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame_obj) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_v_co_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_abs_path_real_path_and_base = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":255 + * + * if not func_code_info.always_skip_code: + * try: # <<<<<<<<<<<<<< + * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[co_filename] + * except: + */ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":257 + * try: + * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[co_filename] + * except: # <<<<<<<<<<<<<< + * abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame_obj) + * + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_func_code_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 257, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":258 + * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[co_filename] + * except: + * abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame_obj) # <<<<<<<<<<<<<< + * + * func_code_info.canonical_normalized_filename = abs_path_real_path_and_base[1] + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 258, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, ((PyObject *)__pyx_v_frame_obj)}; + __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 258, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_abs_path_real_path_and_base, __pyx_t_9); + __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L8_exception_handled; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":255 + * + * if not func_code_info.always_skip_code: + * try: # <<<<<<<<<<<<<< + * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[co_filename] + * except: + */ + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":260 + * abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame_obj) + * + * func_code_info.canonical_normalized_filename = abs_path_real_path_and_base[1] # <<<<<<<<<<<<<< + * + * cache_file_type = main_debugger.get_cache_file_type() + */ + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_abs_path_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_func_code_info->canonical_normalized_filename); + __Pyx_DECREF(__pyx_v_func_code_info->canonical_normalized_filename); + __pyx_v_func_code_info->canonical_normalized_filename = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":262 + * func_code_info.canonical_normalized_filename = abs_path_real_path_and_base[1] + * + * cache_file_type = main_debugger.get_cache_file_type() # <<<<<<<<<<<<<< + * # Note: this cache key must be the same from PyDB.get_file_type() -- see it for comments + * # on the cache. + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_get_cache_file_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(0, 262, __pyx_L1_error) + __pyx_v_cache_file_type = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":265 + * # Note: this cache key must be the same from PyDB.get_file_type() -- see it for comments + * # on the cache. + * cache_file_type_key = (frame_obj.f_code.co_firstlineno, abs_path_real_path_and_base[0], frame_obj.f_code) # <<<<<<<<<<<<<< + * try: + * file_type = cache_file_type[cache_file_type_key] # Make it faster + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_frame_obj->f_code->co_firstlineno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_abs_path_real_path_and_base, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error); + __Pyx_INCREF(((PyObject *)__pyx_v_frame_obj->f_code)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_frame_obj->f_code)); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_frame_obj->f_code))) __PYX_ERR(0, 265, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_4 = 0; + __pyx_v_cache_file_type_key = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":266 + * # on the cache. + * cache_file_type_key = (frame_obj.f_code.co_firstlineno, abs_path_real_path_and_base[0], frame_obj.f_code) + * try: # <<<<<<<<<<<<<< + * file_type = cache_file_type[cache_file_type_key] # Make it faster + * except: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_6); + /*try:*/ { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":267 + * cache_file_type_key = (frame_obj.f_code.co_firstlineno, abs_path_real_path_and_base[0], frame_obj.f_code) + * try: + * file_type = cache_file_type[cache_file_type_key] # Make it faster # <<<<<<<<<<<<<< + * except: + * file_type = main_debugger.get_file_type(frame_obj, abs_path_real_path_and_base) # we don't want to debug anything related to pydevd + */ + if (unlikely(__pyx_v_cache_file_type == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 267, __pyx_L15_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_cache_file_type, __pyx_v_cache_file_type_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_file_type = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":266 + * # on the cache. + * cache_file_type_key = (frame_obj.f_code.co_firstlineno, abs_path_real_path_and_base[0], frame_obj.f_code) + * try: # <<<<<<<<<<<<<< + * file_type = cache_file_type[cache_file_type_key] # Make it faster + * except: + */ + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L20_try_end; + __pyx_L15_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":268 + * try: + * file_type = cache_file_type[cache_file_type_key] # Make it faster + * except: # <<<<<<<<<<<<<< + * file_type = main_debugger.get_file_type(frame_obj, abs_path_real_path_and_base) # we don't want to debug anything related to pydevd + * + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_func_code_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 268, __pyx_L17_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":269 + * file_type = cache_file_type[cache_file_type_key] # Make it faster + * except: + * file_type = main_debugger.get_file_type(frame_obj, abs_path_real_path_and_base) # we don't want to debug anything related to pydevd # <<<<<<<<<<<<<< + * + * if file_type is not None: + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_get_file_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 269, __pyx_L17_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_11, ((PyObject *)__pyx_v_frame_obj), __pyx_v_abs_path_real_path_and_base}; + __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 269, __pyx_L17_except_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_XDECREF_SET(__pyx_v_file_type, __pyx_t_9); + __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L16_exception_handled; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":266 + * # on the cache. + * cache_file_type_key = (frame_obj.f_code.co_firstlineno, abs_path_real_path_and_base[0], frame_obj.f_code) + * try: # <<<<<<<<<<<<<< + * file_type = cache_file_type[cache_file_type_key] # Make it faster + * except: + */ + __pyx_L17_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6); + goto __pyx_L1_error; + __pyx_L16_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6); + __pyx_L20_try_end:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":271 + * file_type = main_debugger.get_file_type(frame_obj, abs_path_real_path_and_base) # we don't want to debug anything related to pydevd + * + * if file_type is not None: # <<<<<<<<<<<<<< + * func_code_info.always_skip_code = True + * + */ + __pyx_t_3 = (__pyx_v_file_type != Py_None); + if (__pyx_t_3) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":272 + * + * if file_type is not None: + * func_code_info.always_skip_code = True # <<<<<<<<<<<<<< + * + * if not func_code_info.always_skip_code: + */ + __pyx_v_func_code_info->always_skip_code = 1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":271 + * file_type = main_debugger.get_file_type(frame_obj, abs_path_real_path_and_base) # we don't want to debug anything related to pydevd + * + * if file_type is not None: # <<<<<<<<<<<<<< + * func_code_info.always_skip_code = True + * + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":254 + * func_code_info.co_name = co_name + * + * if not func_code_info.always_skip_code: # <<<<<<<<<<<<<< + * try: + * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[co_filename] + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":274 + * func_code_info.always_skip_code = True + * + * if not func_code_info.always_skip_code: # <<<<<<<<<<<<<< + * if main_debugger is not None: + * + */ + __pyx_t_3 = (!__pyx_v_func_code_info->always_skip_code); + if (__pyx_t_3) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":275 + * + * if not func_code_info.always_skip_code: + * if main_debugger is not None: # <<<<<<<<<<<<<< + * + * breakpoints: dict = main_debugger.breakpoints.get(func_code_info.canonical_normalized_filename) + */ + __pyx_t_3 = (__pyx_v_main_debugger != Py_None); + if (__pyx_t_3) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":277 + * if main_debugger is not None: + * + * breakpoints: dict = main_debugger.breakpoints.get(func_code_info.canonical_normalized_filename) # <<<<<<<<<<<<<< + * function_breakpoint: object = main_debugger.function_breakpoint_name_to_breakpoint.get(func_code_info.co_name) + * # print('\n---') + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_breakpoints); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_func_code_info->canonical_normalized_filename}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_v_breakpoints = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":278 + * + * breakpoints: dict = main_debugger.breakpoints.get(func_code_info.canonical_normalized_filename) + * function_breakpoint: object = main_debugger.function_breakpoint_name_to_breakpoint.get(func_code_info.co_name) # <<<<<<<<<<<<<< + * # print('\n---') + * # print(main_debugger.breakpoints) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_function_breakpoint_name_to_brea); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_func_code_info->co_name}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_v_function_breakpoint = __pyx_t_2; + __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":283 + * # print(func_code_info.canonical_normalized_filename) + * # print(main_debugger.breakpoints.get(func_code_info.canonical_normalized_filename)) + * code_obj_py: object = code_obj # <<<<<<<<<<<<<< + * cached_code_obj_info: object = _cache.get(code_obj_py) + * if cached_code_obj_info: + */ + __pyx_t_2 = ((PyObject *)__pyx_v_code_obj); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_code_obj_py = __pyx_t_2; + __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":284 + * # print(main_debugger.breakpoints.get(func_code_info.canonical_normalized_filename)) + * code_obj_py: object = code_obj + * cached_code_obj_info: object = _cache.get(code_obj_py) # <<<<<<<<<<<<<< + * if cached_code_obj_info: + * # The cache is for new code objects, so, in this case it's already + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_code_obj_py}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_v_cached_code_obj_info = __pyx_t_2; + __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":285 + * code_obj_py: object = code_obj + * cached_code_obj_info: object = _cache.get(code_obj_py) + * if cached_code_obj_info: # <<<<<<<<<<<<<< + * # The cache is for new code objects, so, in this case it's already + * # using the new code and we can't change it as this is a generator! + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_cached_code_obj_info); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 285, __pyx_L1_error) + if (__pyx_t_3) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":291 + * # we may not want to go into tracing mode (as would usually happen + * # when the new_code is None). + * func_code_info.new_code = None # <<<<<<<<<<<<<< + * breakpoint_found, thread_info.force_stay_in_untraced_mode = \ + * cached_code_obj_info.compute_force_stay_in_untraced_mode(breakpoints) + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_func_code_info->new_code); + __Pyx_DECREF(__pyx_v_func_code_info->new_code); + __pyx_v_func_code_info->new_code = Py_None; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":293 + * func_code_info.new_code = None + * breakpoint_found, thread_info.force_stay_in_untraced_mode = \ + * cached_code_obj_info.compute_force_stay_in_untraced_mode(breakpoints) # <<<<<<<<<<<<<< + * func_code_info.breakpoint_found = breakpoint_found + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cached_code_obj_info, __pyx_n_s_compute_force_stay_in_untraced_m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = NULL; + __pyx_t_12 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_12 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_breakpoints}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 292, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_1 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); + index = 0; __pyx_t_1 = __pyx_t_13(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L27_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L27_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_9), 2) < 0) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_t_13 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L28_unpacking_done; + __pyx_L27_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_13 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_L28_unpacking_done:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":292 + * # when the new_code is None). + * func_code_info.new_code = None + * breakpoint_found, thread_info.force_stay_in_untraced_mode = \ # <<<<<<<<<<<<<< + * cached_code_obj_info.compute_force_stay_in_untraced_mode(breakpoints) + * func_code_info.breakpoint_found = breakpoint_found + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_breakpoint_found = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_v_thread_info->force_stay_in_untraced_mode = __pyx_t_3; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":294 + * breakpoint_found, thread_info.force_stay_in_untraced_mode = \ + * cached_code_obj_info.compute_force_stay_in_untraced_mode(breakpoints) + * func_code_info.breakpoint_found = breakpoint_found # <<<<<<<<<<<<<< + * + * elif function_breakpoint: + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint_found); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_v_func_code_info->breakpoint_found = __pyx_t_3; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":285 + * code_obj_py: object = code_obj + * cached_code_obj_info: object = _cache.get(code_obj_py) + * if cached_code_obj_info: # <<<<<<<<<<<<<< + * # The cache is for new code objects, so, in this case it's already + * # using the new code and we can't change it as this is a generator! + */ + goto __pyx_L26; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":296 + * func_code_info.breakpoint_found = breakpoint_found + * + * elif function_breakpoint: # <<<<<<<<<<<<<< + * # Go directly into tracing mode + * func_code_info.breakpoint_found = True + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_function_breakpoint); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 296, __pyx_L1_error) + if (__pyx_t_3) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":298 + * elif function_breakpoint: + * # Go directly into tracing mode + * func_code_info.breakpoint_found = True # <<<<<<<<<<<<<< + * func_code_info.new_code = None + * + */ + __pyx_v_func_code_info->breakpoint_found = 1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":299 + * # Go directly into tracing mode + * func_code_info.breakpoint_found = True + * func_code_info.new_code = None # <<<<<<<<<<<<<< + * + * elif breakpoints: + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_func_code_info->new_code); + __Pyx_DECREF(__pyx_v_func_code_info->new_code); + __pyx_v_func_code_info->new_code = Py_None; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":296 + * func_code_info.breakpoint_found = breakpoint_found + * + * elif function_breakpoint: # <<<<<<<<<<<<<< + * # Go directly into tracing mode + * func_code_info.breakpoint_found = True + */ + goto __pyx_L26; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":301 + * func_code_info.new_code = None + * + * elif breakpoints: # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('found breakpoints', code_obj_py.co_name, breakpoints) + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoints); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 301, __pyx_L1_error) + if (__pyx_t_3) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":307 + * # Note: new_code can be None if unable to generate. + * # It should automatically put the new code object in the cache. + * breakpoint_found, func_code_info.new_code = generate_code_with_breakpoints(code_obj_py, breakpoints) # <<<<<<<<<<<<<< + * func_code_info.breakpoint_found = breakpoint_found + * + */ + __pyx_t_2 = __pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_generate_code_with_breakpoints(__pyx_v_code_obj_py, __pyx_v_breakpoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 307, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_1 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); + index = 0; __pyx_t_4 = __pyx_t_13(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L29_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_1 = __pyx_t_13(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L29_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_9), 2) < 0) __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_t_13 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L30_unpacking_done; + __pyx_L29_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_13 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_L30_unpacking_done:; + } + __pyx_v_breakpoint_found = __pyx_t_4; + __pyx_t_4 = 0; + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_func_code_info->new_code); + __Pyx_DECREF(__pyx_v_func_code_info->new_code); + __pyx_v_func_code_info->new_code = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":308 + * # It should automatically put the new code object in the cache. + * breakpoint_found, func_code_info.new_code = generate_code_with_breakpoints(code_obj_py, breakpoints) + * func_code_info.breakpoint_found = breakpoint_found # <<<<<<<<<<<<<< + * + * Py_INCREF(func_code_info) + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint_found); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_v_func_code_info->breakpoint_found = __pyx_t_3; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":301 + * func_code_info.new_code = None + * + * elif breakpoints: # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('found breakpoints', code_obj_py.co_name, breakpoints) + */ + } + __pyx_L26:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":275 + * + * if not func_code_info.always_skip_code: + * if main_debugger is not None: # <<<<<<<<<<<<<< + * + * breakpoints: dict = main_debugger.breakpoints.get(func_code_info.canonical_normalized_filename) + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":274 + * func_code_info.always_skip_code = True + * + * if not func_code_info.always_skip_code: # <<<<<<<<<<<<<< + * if main_debugger is not None: + * + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":310 + * func_code_info.breakpoint_found = breakpoint_found + * + * Py_INCREF(func_code_info) # <<<<<<<<<<<<<< + * _PyCode_SetExtra( code_obj, _code_extra_index, func_code_info) + * + */ + Py_INCREF(((PyObject *)__pyx_v_func_code_info)); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":311 + * + * Py_INCREF(func_code_info) + * _PyCode_SetExtra( code_obj, _code_extra_index, func_code_info) # <<<<<<<<<<<<<< + * + * return func_code_info + */ + (void)(_PyCode_SetExtra(((PyObject *)__pyx_v_code_obj), __pyx_v_18_pydevd_frame_eval_22pydevd_frame_evaluator__code_extra_index, ((PyObject *)__pyx_v_func_code_info))); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":313 + * _PyCode_SetExtra( code_obj, _code_extra_index, func_code_info) + * + * return func_code_info # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF((PyObject *)__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_func_code_info); + __pyx_r = __pyx_v_func_code_info; + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":212 + * cdef int _code_extra_index = -1 + * + * cdef FuncCodeInfo get_func_code_info(ThreadInfo thread_info, PyFrameObject * frame_obj, PyCodeObject * code_obj): # <<<<<<<<<<<<<< + * ''' + * Provides code-object related info. + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_func_code_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_main_debugger); + __Pyx_XDECREF((PyObject *)__pyx_v_func_code_info_obj); + __Pyx_XDECREF(__pyx_v_co_filename); + __Pyx_XDECREF(__pyx_v_co_name); + __Pyx_XDECREF(__pyx_v_cache_file_type); + __Pyx_XDECREF(__pyx_v_cache_file_type_key); + __Pyx_XDECREF((PyObject *)__pyx_v_func_code_info); + __Pyx_XDECREF(__pyx_v_abs_path_real_path_and_base); + __Pyx_XDECREF(__pyx_v_file_type); + __Pyx_XDECREF(__pyx_v_breakpoints); + __Pyx_XDECREF(__pyx_v_function_breakpoint); + __Pyx_XDECREF(__pyx_v_code_obj_py); + __Pyx_XDECREF(__pyx_v_cached_code_obj_info); + __Pyx_XDECREF(__pyx_v_breakpoint_found); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":322 + * cdef public int last_line + * + * def __init__(self, dict line_to_offset, int first_line, int last_line): # <<<<<<<<<<<<<< + * self.line_to_offset = line_to_offset + * self.first_line = first_line + */ + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_line_to_offset = 0; + int __pyx_v_first_line; + int __pyx_v_last_line; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_line_to_offset,&__pyx_n_s_first_line,&__pyx_n_s_last_line,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line_to_offset)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_first_line)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 322, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_last_line)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 322, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 322, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); + values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); + } + __pyx_v_line_to_offset = ((PyObject*)values[0]); + __pyx_v_first_line = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_first_line == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + __pyx_v_last_line = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_last_line == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 322, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CodeLineInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_line_to_offset), (&PyDict_Type), 1, "line_to_offset", 1))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo___init__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_v_self), __pyx_v_line_to_offset, __pyx_v_first_line, __pyx_v_last_line); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo___init__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self, PyObject *__pyx_v_line_to_offset, int __pyx_v_first_line, int __pyx_v_last_line) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":323 + * + * def __init__(self, dict line_to_offset, int first_line, int last_line): + * self.line_to_offset = line_to_offset # <<<<<<<<<<<<<< + * self.first_line = first_line + * self.last_line = last_line + */ + __Pyx_INCREF(__pyx_v_line_to_offset); + __Pyx_GIVEREF(__pyx_v_line_to_offset); + __Pyx_GOTREF(__pyx_v_self->line_to_offset); + __Pyx_DECREF(__pyx_v_self->line_to_offset); + __pyx_v_self->line_to_offset = __pyx_v_line_to_offset; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":324 + * def __init__(self, dict line_to_offset, int first_line, int last_line): + * self.line_to_offset = line_to_offset + * self.first_line = first_line # <<<<<<<<<<<<<< + * self.last_line = last_line + * + */ + __pyx_v_self->first_line = __pyx_v_first_line; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":325 + * self.line_to_offset = line_to_offset + * self.first_line = first_line + * self.last_line = last_line # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->last_line = __pyx_v_last_line; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":322 + * cdef public int last_line + * + * def __init__(self, dict line_to_offset, int first_line, int last_line): # <<<<<<<<<<<<<< + * self.line_to_offset = line_to_offset + * self.first_line = first_line + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":318 + * cdef class _CodeLineInfo: + * + * cdef public dict line_to_offset # <<<<<<<<<<<<<< + * cdef public int first_line + * cdef public int last_line + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->line_to_offset); + __pyx_r = __pyx_v_self->line_to_offset; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_value))) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->line_to_offset); + __Pyx_DECREF(__pyx_v_self->line_to_offset); + __pyx_v_self->line_to_offset = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CodeLineInfo.line_to_offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_4__del__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->line_to_offset); + __Pyx_DECREF(__pyx_v_self->line_to_offset); + __pyx_v_self->line_to_offset = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":319 + * + * cdef public dict line_to_offset + * cdef public int first_line # <<<<<<<<<<<<<< + * cdef public int last_line + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_10first_line_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_10first_line_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_10first_line___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_10first_line___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->first_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CodeLineInfo.first_line.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_10first_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_10first_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_10first_line_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_10first_line_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_v_self->first_line = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CodeLineInfo.first_line.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":320 + * cdef public dict line_to_offset + * cdef public int first_line + * cdef public int last_line # <<<<<<<<<<<<<< + * + * def __init__(self, dict line_to_offset, int first_line, int last_line): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_9last_line_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_9last_line_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_9last_line___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_9last_line___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->last_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CodeLineInfo.last_line.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_9last_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_9last_line_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_9last_line_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_9last_line_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_v_self->last_line = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CodeLineInfo.last_line.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_2__reduce_cython__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_2__reduce_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 1); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.first_line, self.last_line, self.line_to_offset) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->first_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->last_line); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->line_to_offset); + __Pyx_GIVEREF(__pyx_v_self->line_to_offset); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->line_to_offset)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.first_line, self.last_line, self.line_to_offset) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.first_line, self.last_line, self.line_to_offset) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.line_to_offset is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.first_line, self.last_line, self.line_to_offset) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.line_to_offset is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle__CodeLineInfo, (type(self), 0x5a9bcd5, None), state + */ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->line_to_offset != ((PyObject*)Py_None)); + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.line_to_offset is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__CodeLineInfo, (type(self), 0x5a9bcd5, None), state + * else: + */ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.line_to_offset is not None + * if use_setstate: + * return __pyx_unpickle__CodeLineInfo, (type(self), 0x5a9bcd5, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle__CodeLineInfo, (type(self), 0x5a9bcd5, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle__CodeLineInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_95010005); + __Pyx_GIVEREF(__pyx_int_95010005); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_95010005)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.line_to_offset is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__CodeLineInfo, (type(self), 0x5a9bcd5, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle__CodeLineInfo, (type(self), 0x5a9bcd5, None), state + * else: + * return __pyx_unpickle__CodeLineInfo, (type(self), 0x5a9bcd5, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__CodeLineInfo__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle__CodeLineInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_95010005); + __Pyx_GIVEREF(__pyx_int_95010005); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_95010005)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CodeLineInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle__CodeLineInfo, (type(self), 0x5a9bcd5, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__CodeLineInfo__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CodeLineInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_4__setstate_cython__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_4__setstate_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 1); + + /* "(tree fragment)":17 + * return __pyx_unpickle__CodeLineInfo, (type(self), 0x5a9bcd5, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__CodeLineInfo__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle__CodeLineInfo__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__CodeLineInfo, (type(self), 0x5a9bcd5, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__CodeLineInfo__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CodeLineInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":329 + * + * # Note: this method has a version in pure-python too. + * def _get_code_line_info(code_obj): # <<<<<<<<<<<<<< + * line_to_offset: dict = {} + * first_line: int = None + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_get_code_line_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_get_code_line_info = {"_get_code_line_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_get_code_line_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_get_code_line_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_code_obj = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_code_line_info (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_code_obj,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_code_obj)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_get_code_line_info") < 0)) __PYX_ERR(0, 329, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v_code_obj = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_get_code_line_info", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 329, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._get_code_line_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10_get_code_line_info(__pyx_self, __pyx_v_code_obj); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10_get_code_line_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code_obj) { + PyObject *__pyx_v_line_to_offset = 0; + PyObject *__pyx_v_first_line = 0; + PyObject *__pyx_v_last_line = 0; + int __pyx_v_offset; + int __pyx_v_line; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_t_10; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_code_line_info", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":330 + * # Note: this method has a version in pure-python too. + * def _get_code_line_info(code_obj): + * line_to_offset: dict = {} # <<<<<<<<<<<<<< + * first_line: int = None + * last_line: int = None + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_line_to_offset = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":331 + * def _get_code_line_info(code_obj): + * line_to_offset: dict = {} + * first_line: int = None # <<<<<<<<<<<<<< + * last_line: int = None + * + */ + __Pyx_INCREF(Py_None); + __pyx_v_first_line = ((PyObject*)Py_None); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":332 + * line_to_offset: dict = {} + * first_line: int = None + * last_line: int = None # <<<<<<<<<<<<<< + * + * cdef int offset + */ + __Pyx_INCREF(Py_None); + __pyx_v_last_line = ((PyObject*)Py_None); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":337 + * cdef int line + * + * for offset, line in dis.findlinestarts(code_obj): # <<<<<<<<<<<<<< + * line_to_offset[line] = offset + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dis); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_findlinestarts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_code_obj}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 337, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 337, __pyx_L1_error) + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 337, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 337, __pyx_L1_error) + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 337, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 337, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); + index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_offset = __pyx_t_10; + __pyx_v_line = __pyx_t_11; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":338 + * + * for offset, line in dis.findlinestarts(code_obj): + * line_to_offset[line] = offset # <<<<<<<<<<<<<< + * + * if line_to_offset: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely((PyDict_SetItem(__pyx_v_line_to_offset, __pyx_t_7, __pyx_t_1) < 0))) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":337 + * cdef int line + * + * for offset, line in dis.findlinestarts(code_obj): # <<<<<<<<<<<<<< + * line_to_offset[line] = offset + * + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":340 + * line_to_offset[line] = offset + * + * if line_to_offset: # <<<<<<<<<<<<<< + * first_line = min(line_to_offset) + * last_line = max(line_to_offset) + */ + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_line_to_offset); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 340, __pyx_L1_error) + if (__pyx_t_12) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":341 + * + * if line_to_offset: + * first_line = min(line_to_offset) # <<<<<<<<<<<<<< + * last_line = max(line_to_offset) + * return _CodeLineInfo(line_to_offset, first_line, last_line) + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_v_line_to_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(__Pyx_Py3Int_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_3))) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_first_line, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":342 + * if line_to_offset: + * first_line = min(line_to_offset) + * last_line = max(line_to_offset) # <<<<<<<<<<<<<< + * return _CodeLineInfo(line_to_offset, first_line, last_line) + * + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_v_line_to_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(__Pyx_Py3Int_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_3))) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_last_line, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":340 + * line_to_offset[line] = offset + * + * if line_to_offset: # <<<<<<<<<<<<<< + * first_line = min(line_to_offset) + * last_line = max(line_to_offset) + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":343 + * first_line = min(line_to_offset) + * last_line = max(line_to_offset) + * return _CodeLineInfo(line_to_offset, first_line, last_line) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_line_to_offset); + __Pyx_GIVEREF(__pyx_v_line_to_offset); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_line_to_offset)) __PYX_ERR(0, 343, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_first_line); + __Pyx_GIVEREF(__pyx_v_first_line); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_first_line)) __PYX_ERR(0, 343, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_last_line); + __Pyx_GIVEREF(__pyx_v_last_line); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_last_line)) __PYX_ERR(0, 343, __pyx_L1_error); + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":329 + * + * # Note: this method has a version in pure-python too. + * def _get_code_line_info(code_obj): # <<<<<<<<<<<<<< + * line_to_offset: dict = {} + * first_line: int = None + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._get_code_line_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_line_to_offset); + __Pyx_XDECREF(__pyx_v_first_line); + __Pyx_XDECREF(__pyx_v_last_line); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":353 + * _cache: dict = {} + * + * def get_cached_code_obj_info_py(code_obj_py): # <<<<<<<<<<<<<< + * ''' + * :return _CacheValue: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13get_cached_code_obj_info_py(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_18_pydevd_frame_eval_22pydevd_frame_evaluator_12get_cached_code_obj_info_py, "\n :return _CacheValue:\n :note: on cython use _cache.get(code_obj_py) directly.\n "); +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_13get_cached_code_obj_info_py = {"get_cached_code_obj_info_py", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13get_cached_code_obj_info_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18_pydevd_frame_eval_22pydevd_frame_evaluator_12get_cached_code_obj_info_py}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13get_cached_code_obj_info_py(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_code_obj_py = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_cached_code_obj_info_py (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_code_obj_py,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_code_obj_py)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_cached_code_obj_info_py") < 0)) __PYX_ERR(0, 353, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v_code_obj_py = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_cached_code_obj_info_py", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 353, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_cached_code_obj_info_py", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12get_cached_code_obj_info_py(__pyx_self, __pyx_v_code_obj_py); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12get_cached_code_obj_info_py(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code_obj_py) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cached_code_obj_info_py", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":358 + * :note: on cython use _cache.get(code_obj_py) directly. + * ''' + * return _cache.get(code_obj_py) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_cache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_code_obj_py}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":353 + * _cache: dict = {} + * + * def get_cached_code_obj_info_py(code_obj_py): # <<<<<<<<<<<<<< + * ''' + * :return _CacheValue: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_cached_code_obj_info_py", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":368 + * cdef public set code_lines_as_set + * + * def __init__(self, object code_obj_py, _CodeLineInfo code_line_info, set breakpoints_hit_at_lines): # <<<<<<<<<<<<<< + * ''' + * :param code_obj_py: + */ + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +PyDoc_STRVAR(__pyx_doc_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue___init__, "\n :param code_obj_py:\n :param _CodeLineInfo code_line_info:\n :param set[int] breakpoints_hit_at_lines:\n "); +#if CYTHON_UPDATE_DESCRIPTOR_DOC +struct wrapperbase __pyx_wrapperbase_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue___init__; +#endif +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_code_obj_py = 0; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_code_line_info = 0; + PyObject *__pyx_v_breakpoints_hit_at_lines = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_code_obj_py,&__pyx_n_s_code_line_info,&__pyx_n_s_breakpoints_hit_at_lines,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_code_obj_py)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_code_line_info)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 368, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_breakpoints_hit_at_lines)) != 0)) { + (void)__Pyx_Arg_NewRef_VARARGS(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 368, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 368, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); + values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); + values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); + } + __pyx_v_code_obj_py = values[0]; + __pyx_v_code_line_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)values[1]); + __pyx_v_breakpoints_hit_at_lines = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 368, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CacheValue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_code_line_info), __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo, 1, "code_line_info", 0))) __PYX_ERR(0, 368, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_breakpoints_hit_at_lines), (&PySet_Type), 1, "breakpoints_hit_at_lines", 1))) __PYX_ERR(0, 368, __pyx_L1_error) + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue___init__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self), __pyx_v_code_obj_py, __pyx_v_code_line_info, __pyx_v_breakpoints_hit_at_lines); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue___init__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_code_obj_py, struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v_code_line_info, PyObject *__pyx_v_breakpoints_hit_at_lines) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":374 + * :param set[int] breakpoints_hit_at_lines: + * ''' + * self.code_obj_py = code_obj_py # <<<<<<<<<<<<<< + * self.code_line_info = code_line_info + * self.breakpoints_hit_at_lines = breakpoints_hit_at_lines + */ + __Pyx_INCREF(__pyx_v_code_obj_py); + __Pyx_GIVEREF(__pyx_v_code_obj_py); + __Pyx_GOTREF(__pyx_v_self->code_obj_py); + __Pyx_DECREF(__pyx_v_self->code_obj_py); + __pyx_v_self->code_obj_py = __pyx_v_code_obj_py; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":375 + * ''' + * self.code_obj_py = code_obj_py + * self.code_line_info = code_line_info # <<<<<<<<<<<<<< + * self.breakpoints_hit_at_lines = breakpoints_hit_at_lines + * self.code_lines_as_set = set(code_line_info.line_to_offset) + */ + __Pyx_INCREF((PyObject *)__pyx_v_code_line_info); + __Pyx_GIVEREF((PyObject *)__pyx_v_code_line_info); + __Pyx_GOTREF((PyObject *)__pyx_v_self->code_line_info); + __Pyx_DECREF((PyObject *)__pyx_v_self->code_line_info); + __pyx_v_self->code_line_info = __pyx_v_code_line_info; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":376 + * self.code_obj_py = code_obj_py + * self.code_line_info = code_line_info + * self.breakpoints_hit_at_lines = breakpoints_hit_at_lines # <<<<<<<<<<<<<< + * self.code_lines_as_set = set(code_line_info.line_to_offset) + * + */ + __Pyx_INCREF(__pyx_v_breakpoints_hit_at_lines); + __Pyx_GIVEREF(__pyx_v_breakpoints_hit_at_lines); + __Pyx_GOTREF(__pyx_v_self->breakpoints_hit_at_lines); + __Pyx_DECREF(__pyx_v_self->breakpoints_hit_at_lines); + __pyx_v_self->breakpoints_hit_at_lines = __pyx_v_breakpoints_hit_at_lines; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":377 + * self.code_line_info = code_line_info + * self.breakpoints_hit_at_lines = breakpoints_hit_at_lines + * self.code_lines_as_set = set(code_line_info.line_to_offset) # <<<<<<<<<<<<<< + * + * cpdef compute_force_stay_in_untraced_mode(self, breakpoints): + */ + __pyx_t_1 = PySet_New(__pyx_v_code_line_info->line_to_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->code_lines_as_set); + __Pyx_DECREF(__pyx_v_self->code_lines_as_set); + __pyx_v_self->code_lines_as_set = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":368 + * cdef public set code_lines_as_set + * + * def __init__(self, object code_obj_py, _CodeLineInfo code_line_info, set breakpoints_hit_at_lines): # <<<<<<<<<<<<<< + * ''' + * :param code_obj_py: + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CacheValue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":379 + * self.code_lines_as_set = set(code_line_info.line_to_offset) + * + * cpdef compute_force_stay_in_untraced_mode(self, breakpoints): # <<<<<<<<<<<<<< + * ''' + * :param breakpoints: + */ + +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_3compute_force_stay_in_untraced_mode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_compute_force_stay_in_untraced_mode(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_breakpoints, int __pyx_skip_dispatch) { + int __pyx_v_force_stay_in_untraced_mode; + int __pyx_v_breakpoint_found; + PyObject *__pyx_v_target_breakpoints = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("compute_force_stay_in_untraced_mode", 1); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_compute_force_stay_in_untraced_m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_3compute_force_stay_in_untraced_mode)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_breakpoints}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":389 + * cdef set target_breakpoints + * + * force_stay_in_untraced_mode = False # <<<<<<<<<<<<<< + * + * target_breakpoints = self.code_lines_as_set.intersection(breakpoints) + */ + __pyx_v_force_stay_in_untraced_mode = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":391 + * force_stay_in_untraced_mode = False + * + * target_breakpoints = self.code_lines_as_set.intersection(breakpoints) # <<<<<<<<<<<<<< + * breakpoint_found = bool(target_breakpoints) + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->code_lines_as_set, __pyx_n_s_intersection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_breakpoints}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_1))) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_v_target_breakpoints = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":392 + * + * target_breakpoints = self.code_lines_as_set.intersection(breakpoints) + * breakpoint_found = bool(target_breakpoints) # <<<<<<<<<<<<<< + * + * if not breakpoint_found: + */ + __pyx_t_6 = (__pyx_v_target_breakpoints != Py_None)&&(PySet_GET_SIZE(__pyx_v_target_breakpoints) != 0); + __pyx_v_breakpoint_found = (!(!__pyx_t_6)); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":394 + * breakpoint_found = bool(target_breakpoints) + * + * if not breakpoint_found: # <<<<<<<<<<<<<< + * force_stay_in_untraced_mode = True + * else: + */ + __pyx_t_6 = (!__pyx_v_breakpoint_found); + if (__pyx_t_6) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":395 + * + * if not breakpoint_found: + * force_stay_in_untraced_mode = True # <<<<<<<<<<<<<< + * else: + * force_stay_in_untraced_mode = self.breakpoints_hit_at_lines.issuperset(set(breakpoints)) + */ + __pyx_v_force_stay_in_untraced_mode = 1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":394 + * breakpoint_found = bool(target_breakpoints) + * + * if not breakpoint_found: # <<<<<<<<<<<<<< + * force_stay_in_untraced_mode = True + * else: + */ + goto __pyx_L3; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":397 + * force_stay_in_untraced_mode = True + * else: + * force_stay_in_untraced_mode = self.breakpoints_hit_at_lines.issuperset(set(breakpoints)) # <<<<<<<<<<<<<< + * + * return breakpoint_found, force_stay_in_untraced_mode + */ + /*else*/ { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->breakpoints_hit_at_lines, __pyx_n_s_issuperset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySet_New(__pyx_v_breakpoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_force_stay_in_untraced_mode = __pyx_t_6; + } + __pyx_L3:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":399 + * force_stay_in_untraced_mode = self.breakpoints_hit_at_lines.issuperset(set(breakpoints)) + * + * return breakpoint_found, force_stay_in_untraced_mode # <<<<<<<<<<<<<< + * + * def generate_code_with_breakpoints_py(object code_obj_py, dict breakpoints): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_breakpoint_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_force_stay_in_untraced_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":379 + * self.code_lines_as_set = set(code_line_info.line_to_offset) + * + * cpdef compute_force_stay_in_untraced_mode(self, breakpoints): # <<<<<<<<<<<<<< + * ''' + * :param breakpoints: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CacheValue.compute_force_stay_in_untraced_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_target_breakpoints); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_3compute_force_stay_in_untraced_mode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_2compute_force_stay_in_untraced_mode, "\n :param breakpoints:\n set(breakpoint_lines) or dict(breakpoint_line->breakpoint info)\n :return tuple(breakpoint_found, force_stay_in_untraced_mode)\n "); +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_3compute_force_stay_in_untraced_mode = {"compute_force_stay_in_untraced_mode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_3compute_force_stay_in_untraced_mode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_2compute_force_stay_in_untraced_mode}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_3compute_force_stay_in_untraced_mode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_breakpoints = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("compute_force_stay_in_untraced_mode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_breakpoints,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_breakpoints)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 379, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "compute_force_stay_in_untraced_mode") < 0)) __PYX_ERR(0, 379, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v_breakpoints = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("compute_force_stay_in_untraced_mode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 379, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CacheValue.compute_force_stay_in_untraced_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_2compute_force_stay_in_untraced_mode(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self), __pyx_v_breakpoints); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_2compute_force_stay_in_untraced_mode(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_breakpoints) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("compute_force_stay_in_untraced_mode", 1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_compute_force_stay_in_untraced_mode(__pyx_v_self, __pyx_v_breakpoints, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CacheValue.compute_force_stay_in_untraced_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":363 + * cdef class _CacheValue(object): + * + * cdef public object code_obj_py # <<<<<<<<<<<<<< + * cdef public _CodeLineInfo code_line_info + * cdef public set breakpoints_hit_at_lines + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->code_obj_py); + __pyx_r = __pyx_v_self->code_obj_py; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->code_obj_py); + __Pyx_DECREF(__pyx_v_self->code_obj_py); + __pyx_v_self->code_obj_py = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_4__del__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->code_obj_py); + __Pyx_DECREF(__pyx_v_self->code_obj_py); + __pyx_v_self->code_obj_py = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":364 + * + * cdef public object code_obj_py + * cdef public _CodeLineInfo code_line_info # <<<<<<<<<<<<<< + * cdef public set breakpoints_hit_at_lines + * cdef public set code_lines_as_set + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->code_line_info); + __pyx_r = ((PyObject *)__pyx_v_self->code_line_info); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo))))) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->code_line_info); + __Pyx_DECREF((PyObject *)__pyx_v_self->code_line_info); + __pyx_v_self->code_line_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CacheValue.code_line_info.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_4__del__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->code_line_info); + __Pyx_DECREF((PyObject *)__pyx_v_self->code_line_info); + __pyx_v_self->code_line_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":365 + * cdef public object code_obj_py + * cdef public _CodeLineInfo code_line_info + * cdef public set breakpoints_hit_at_lines # <<<<<<<<<<<<<< + * cdef public set code_lines_as_set + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->breakpoints_hit_at_lines); + __pyx_r = __pyx_v_self->breakpoints_hit_at_lines; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PySet_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_v_value))) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->breakpoints_hit_at_lines); + __Pyx_DECREF(__pyx_v_self->breakpoints_hit_at_lines); + __pyx_v_self->breakpoints_hit_at_lines = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CacheValue.breakpoints_hit_at_lines.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_4__del__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->breakpoints_hit_at_lines); + __Pyx_DECREF(__pyx_v_self->breakpoints_hit_at_lines); + __pyx_v_self->breakpoints_hit_at_lines = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":366 + * cdef public _CodeLineInfo code_line_info + * cdef public set breakpoints_hit_at_lines + * cdef public set code_lines_as_set # <<<<<<<<<<<<<< + * + * def __init__(self, object code_obj_py, _CodeLineInfo code_line_info, set breakpoints_hit_at_lines): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set___get__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set___get__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 1); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->code_lines_as_set); + __pyx_r = __pyx_v_self->code_lines_as_set; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_2__set__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_2__set__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 1); + if (!(likely(PySet_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_v_value))) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->code_lines_as_set); + __Pyx_DECREF(__pyx_v_self->code_lines_as_set); + __pyx_v_self->code_lines_as_set = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CacheValue.code_lines_as_set.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_4__del__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_4__del__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 1); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->code_lines_as_set); + __Pyx_DECREF(__pyx_v_self->code_lines_as_set); + __pyx_v_self->code_lines_as_set = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { + __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_4__reduce_cython__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_4__reduce_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 1); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.breakpoints_hit_at_lines, self.code_line_info, self.code_lines_as_set, self.code_obj_py) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->breakpoints_hit_at_lines); + __Pyx_GIVEREF(__pyx_v_self->breakpoints_hit_at_lines); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->breakpoints_hit_at_lines)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->code_line_info); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->code_line_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->code_line_info))) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->code_lines_as_set); + __Pyx_GIVEREF(__pyx_v_self->code_lines_as_set); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->code_lines_as_set)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->code_obj_py); + __Pyx_GIVEREF(__pyx_v_self->code_obj_py); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->code_obj_py)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.breakpoints_hit_at_lines, self.code_line_info, self.code_lines_as_set, self.code_obj_py) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.breakpoints_hit_at_lines, self.code_line_info, self.code_lines_as_set, self.code_obj_py) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_2 = (__pyx_v__dict != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.breakpoints_hit_at_lines is not None or self.code_line_info is not None or self.code_lines_as_set is not None or self.code_obj_py is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.breakpoints_hit_at_lines, self.code_line_info, self.code_lines_as_set, self.code_obj_py) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.breakpoints_hit_at_lines is not None or self.code_line_info is not None or self.code_lines_as_set is not None or self.code_obj_py is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle__CacheValue, (type(self), 0xac42a46, None), state + */ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->breakpoints_hit_at_lines != ((PyObject*)Py_None)); + if (!__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->code_line_info) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->code_lines_as_set != ((PyObject*)Py_None)); + if (!__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->code_obj_py != Py_None); + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.breakpoints_hit_at_lines is not None or self.code_line_info is not None or self.code_lines_as_set is not None or self.code_obj_py is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__CacheValue, (type(self), 0xac42a46, None), state + * else: + */ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.breakpoints_hit_at_lines is not None or self.code_line_info is not None or self.code_lines_as_set is not None or self.code_obj_py is not None + * if use_setstate: + * return __pyx_unpickle__CacheValue, (type(self), 0xac42a46, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle__CacheValue, (type(self), 0xac42a46, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle__CacheValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_180628038); + __Pyx_GIVEREF(__pyx_int_180628038); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_180628038)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.breakpoints_hit_at_lines is not None or self.code_line_info is not None or self.code_lines_as_set is not None or self.code_obj_py is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__CacheValue, (type(self), 0xac42a46, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle__CacheValue, (type(self), 0xac42a46, None), state + * else: + * return __pyx_unpickle__CacheValue, (type(self), 0xac42a46, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__CacheValue__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle__CacheValue); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_int_180628038); + __Pyx_GIVEREF(__pyx_int_180628038); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_180628038)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CacheValue.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle__CacheValue, (type(self), 0xac42a46, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__CacheValue__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CacheValue.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_6__setstate_cython__(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_6__setstate_cython__(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 1); + + /* "(tree fragment)":17 + * return __pyx_unpickle__CacheValue, (type(self), 0xac42a46, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__CacheValue__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle__CacheValue__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__CacheValue, (type(self), 0xac42a46, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__CacheValue__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator._CacheValue.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":401 + * return breakpoint_found, force_stay_in_untraced_mode + * + * def generate_code_with_breakpoints_py(object code_obj_py, dict breakpoints): # <<<<<<<<<<<<<< + * return generate_code_with_breakpoints(code_obj_py, breakpoints) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_15generate_code_with_breakpoints_py(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_15generate_code_with_breakpoints_py = {"generate_code_with_breakpoints_py", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_15generate_code_with_breakpoints_py, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_15generate_code_with_breakpoints_py(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_code_obj_py = 0; + PyObject *__pyx_v_breakpoints = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("generate_code_with_breakpoints_py (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_code_obj_py,&__pyx_n_s_breakpoints,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_code_obj_py)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 401, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_breakpoints)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 401, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("generate_code_with_breakpoints_py", 1, 2, 2, 1); __PYX_ERR(0, 401, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "generate_code_with_breakpoints_py") < 0)) __PYX_ERR(0, 401, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + } + __pyx_v_code_obj_py = values[0]; + __pyx_v_breakpoints = ((PyObject*)values[1]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("generate_code_with_breakpoints_py", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 401, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.generate_code_with_breakpoints_py", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_breakpoints), (&PyDict_Type), 1, "breakpoints", 1))) __PYX_ERR(0, 401, __pyx_L1_error) + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_14generate_code_with_breakpoints_py(__pyx_self, __pyx_v_code_obj_py, __pyx_v_breakpoints); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_14generate_code_with_breakpoints_py(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code_obj_py, PyObject *__pyx_v_breakpoints) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("generate_code_with_breakpoints_py", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":402 + * + * def generate_code_with_breakpoints_py(object code_obj_py, dict breakpoints): + * return generate_code_with_breakpoints(code_obj_py, breakpoints) # <<<<<<<<<<<<<< + * + * # DEBUG = True + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_generate_code_with_breakpoints(__pyx_v_code_obj_py, __pyx_v_breakpoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":401 + * return breakpoint_found, force_stay_in_untraced_mode + * + * def generate_code_with_breakpoints_py(object code_obj_py, dict breakpoints): # <<<<<<<<<<<<<< + * return generate_code_with_breakpoints(code_obj_py, breakpoints) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.generate_code_with_breakpoints_py", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":407 + * # debug_helper = DebugHelper() + * + * cdef generate_code_with_breakpoints(object code_obj_py, dict breakpoints): # <<<<<<<<<<<<<< + * ''' + * :param breakpoints: + */ + +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_generate_code_with_breakpoints(PyObject *__pyx_v_code_obj_py, PyObject *__pyx_v_breakpoints) { + int __pyx_v_success; + int __pyx_v_breakpoint_line; + int __pyx_v_breakpoint_found; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v_cache_value = 0; + PyObject *__pyx_v_breakpoints_hit_at_lines = 0; + PyObject *__pyx_v_line_to_offset = 0; + PyObject *__pyx_v_code_line_info = NULL; + PyObject *__pyx_v_new_code = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + Py_ssize_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *(*__pyx_t_12)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("generate_code_with_breakpoints", 0); + __Pyx_INCREF(__pyx_v_code_obj_py); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":424 + * cdef dict line_to_offset + * + * assert code_obj_py not in _cache, 'If a code object is cached, that same code object must be reused.' # <<<<<<<<<<<<<< + * + * # if DEBUG: + */ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_code_obj_py, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) { + __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_kp_s_If_a_code_object_is_cached_that, 0, 0); + __PYX_ERR(0, 424, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 424, __pyx_L1_error) + #endif + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":429 + * # initial_code_obj_py = code_obj_py + * + * code_line_info = _get_code_line_info(code_obj_py) # <<<<<<<<<<<<<< + * + * success = True + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_code_line_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_code_obj_py}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v_code_line_info = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":431 + * code_line_info = _get_code_line_info(code_obj_py) + * + * success = True # <<<<<<<<<<<<<< + * + * breakpoints_hit_at_lines = set() + */ + __pyx_v_success = 1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":433 + * success = True + * + * breakpoints_hit_at_lines = set() # <<<<<<<<<<<<<< + * line_to_offset = code_line_info.line_to_offset + * + */ + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_breakpoints_hit_at_lines = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":434 + * + * breakpoints_hit_at_lines = set() + * line_to_offset = code_line_info.line_to_offset # <<<<<<<<<<<<<< + * + * for breakpoint_line in breakpoints: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_code_line_info, __pyx_n_s_line_to_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(0, 434, __pyx_L1_error) + __pyx_v_line_to_offset = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":436 + * line_to_offset = code_line_info.line_to_offset + * + * for breakpoint_line in breakpoints: # <<<<<<<<<<<<<< + * if breakpoint_line in line_to_offset: + * breakpoints_hit_at_lines.add(breakpoint_line) + */ + __pyx_t_6 = 0; + if (unlikely(__pyx_v_breakpoints == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 436, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_breakpoints, 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + while (1) { + __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_7, &__pyx_t_6, &__pyx_t_3, NULL, NULL, __pyx_t_8); + if (unlikely(__pyx_t_9 == 0)) break; + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_breakpoint_line = __pyx_t_9; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":437 + * + * for breakpoint_line in breakpoints: + * if breakpoint_line in line_to_offset: # <<<<<<<<<<<<<< + * breakpoints_hit_at_lines.add(breakpoint_line) + * + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_breakpoint_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_line_to_offset == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 437, __pyx_L1_error) + } + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_t_3, __pyx_v_line_to_offset, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 437, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_2) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":438 + * for breakpoint_line in breakpoints: + * if breakpoint_line in line_to_offset: + * breakpoints_hit_at_lines.add(breakpoint_line) # <<<<<<<<<<<<<< + * + * if breakpoints_hit_at_lines: + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_breakpoint_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = PySet_Add(__pyx_v_breakpoints_hit_at_lines, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 438, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":437 + * + * for breakpoint_line in breakpoints: + * if breakpoint_line in line_to_offset: # <<<<<<<<<<<<<< + * breakpoints_hit_at_lines.add(breakpoint_line) + * + */ + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":440 + * breakpoints_hit_at_lines.add(breakpoint_line) + * + * if breakpoints_hit_at_lines: # <<<<<<<<<<<<<< + * success, new_code = insert_pydevd_breaks( + * code_obj_py, + */ + __pyx_t_2 = (PySet_GET_SIZE(__pyx_v_breakpoints_hit_at_lines) != 0); + if (__pyx_t_2) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":441 + * + * if breakpoints_hit_at_lines: + * success, new_code = insert_pydevd_breaks( # <<<<<<<<<<<<<< + * code_obj_py, + * breakpoints_hit_at_lines, + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_insert_pydevd_breaks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":444 + * code_obj_py, + * breakpoints_hit_at_lines, + * code_line_info # <<<<<<<<<<<<<< + * ) + * + */ + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_code_obj_py, __pyx_v_breakpoints_hit_at_lines, __pyx_v_code_line_info}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 441, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_3 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); + index = 0; __pyx_t_3 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_4 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L8_unpacking_done; + __pyx_L7_unpacking_failed:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_12 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_L8_unpacking_done:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":441 + * + * if breakpoints_hit_at_lines: + * success, new_code = insert_pydevd_breaks( # <<<<<<<<<<<<<< + * code_obj_py, + * breakpoints_hit_at_lines, + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_success = __pyx_t_2; + __pyx_v_new_code = __pyx_t_4; + __pyx_t_4 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":447 + * ) + * + * if not success: # <<<<<<<<<<<<<< + * code_obj_py = None + * else: + */ + __pyx_t_2 = (!__pyx_v_success); + if (__pyx_t_2) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":448 + * + * if not success: + * code_obj_py = None # <<<<<<<<<<<<<< + * else: + * code_obj_py = new_code + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v_code_obj_py, Py_None); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":447 + * ) + * + * if not success: # <<<<<<<<<<<<<< + * code_obj_py = None + * else: + */ + goto __pyx_L9; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":450 + * code_obj_py = None + * else: + * code_obj_py = new_code # <<<<<<<<<<<<<< + * + * breakpoint_found = bool(breakpoints_hit_at_lines) + */ + /*else*/ { + __Pyx_INCREF(__pyx_v_new_code); + __Pyx_DECREF_SET(__pyx_v_code_obj_py, __pyx_v_new_code); + } + __pyx_L9:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":440 + * breakpoints_hit_at_lines.add(breakpoint_line) + * + * if breakpoints_hit_at_lines: # <<<<<<<<<<<<<< + * success, new_code = insert_pydevd_breaks( + * code_obj_py, + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":452 + * code_obj_py = new_code + * + * breakpoint_found = bool(breakpoints_hit_at_lines) # <<<<<<<<<<<<<< + * if breakpoint_found and success: + * # if DEBUG: + */ + __pyx_t_2 = (PySet_GET_SIZE(__pyx_v_breakpoints_hit_at_lines) != 0); + __pyx_v_breakpoint_found = (!(!__pyx_t_2)); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":453 + * + * breakpoint_found = bool(breakpoints_hit_at_lines) + * if breakpoint_found and success: # <<<<<<<<<<<<<< + * # if DEBUG: + * # op_number = debug_helper.write_dis( + */ + if (__pyx_v_breakpoint_found) { + } else { + __pyx_t_2 = __pyx_v_breakpoint_found; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_2 = __pyx_v_success; + __pyx_L11_bool_binop_done:; + if (__pyx_t_2) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":466 + * # ) + * + * cache_value = _CacheValue(code_obj_py, code_line_info, breakpoints_hit_at_lines) # <<<<<<<<<<<<<< + * _cache[code_obj_py] = cache_value + * + */ + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_code_obj_py); + __Pyx_GIVEREF(__pyx_v_code_obj_py); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_code_obj_py)) __PYX_ERR(0, 466, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_code_line_info); + __Pyx_GIVEREF(__pyx_v_code_line_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_code_line_info)) __PYX_ERR(0, 466, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_breakpoints_hit_at_lines); + __Pyx_GIVEREF(__pyx_v_breakpoints_hit_at_lines); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_breakpoints_hit_at_lines)) __PYX_ERR(0, 466, __pyx_L1_error); + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 466, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_cache_value = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":467 + * + * cache_value = _CacheValue(code_obj_py, code_line_info, breakpoints_hit_at_lines) + * _cache[code_obj_py] = cache_value # <<<<<<<<<<<<<< + * + * return breakpoint_found, code_obj_py + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_v_code_obj_py, ((PyObject *)__pyx_v_cache_value)) < 0))) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":453 + * + * breakpoint_found = bool(breakpoints_hit_at_lines) + * if breakpoint_found and success: # <<<<<<<<<<<<<< + * # if DEBUG: + * # op_number = debug_helper.write_dis( + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":469 + * _cache[code_obj_py] = cache_value + * + * return breakpoint_found, code_obj_py # <<<<<<<<<<<<<< + * + * import sys + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_breakpoint_found); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_code_obj_py); + __Pyx_GIVEREF(__pyx_v_code_obj_py); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_code_obj_py)) __PYX_ERR(0, 469, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":407 + * # debug_helper = DebugHelper() + * + * cdef generate_code_with_breakpoints(object code_obj_py, dict breakpoints): # <<<<<<<<<<<<<< + * ''' + * :param breakpoints: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.generate_code_with_breakpoints", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_cache_value); + __Pyx_XDECREF(__pyx_v_breakpoints_hit_at_lines); + __Pyx_XDECREF(__pyx_v_line_to_offset); + __Pyx_XDECREF(__pyx_v_code_line_info); + __Pyx_XDECREF(__pyx_v_new_code); + __Pyx_XDECREF(__pyx_v_code_obj_py); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":475 + * cdef bint IS_PY_39_OWNARDS = sys.version_info[:2] >= (3, 9) + * + * def frame_eval_func(): # <<<<<<<<<<<<<< + * cdef PyThreadState *state = PyThreadState_Get() + * if IS_PY_39_OWNARDS: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_17frame_eval_func(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_17frame_eval_func = {"frame_eval_func", (PyCFunction)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_17frame_eval_func, METH_NOARGS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_17frame_eval_func(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("frame_eval_func (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_16frame_eval_func(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_16frame_eval_func(CYTHON_UNUSED PyObject *__pyx_self) { + PyThreadState *__pyx_v_state; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("frame_eval_func", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":476 + * + * def frame_eval_func(): + * cdef PyThreadState *state = PyThreadState_Get() # <<<<<<<<<<<<<< + * if IS_PY_39_OWNARDS: + * state.interp.eval_frame = <_PyFrameEvalFunction *> get_bytecode_while_frame_eval_39 + */ + __pyx_v_state = PyThreadState_Get(); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":477 + * def frame_eval_func(): + * cdef PyThreadState *state = PyThreadState_Get() + * if IS_PY_39_OWNARDS: # <<<<<<<<<<<<<< + * state.interp.eval_frame = <_PyFrameEvalFunction *> get_bytecode_while_frame_eval_39 + * else: + */ + if (__pyx_v_18_pydevd_frame_eval_22pydevd_frame_evaluator_IS_PY_39_OWNARDS) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":478 + * cdef PyThreadState *state = PyThreadState_Get() + * if IS_PY_39_OWNARDS: + * state.interp.eval_frame = <_PyFrameEvalFunction *> get_bytecode_while_frame_eval_39 # <<<<<<<<<<<<<< + * else: + * state.interp.eval_frame = <_PyFrameEvalFunction *> get_bytecode_while_frame_eval_38 + */ + __pyx_v_state->interp->eval_frame = ((_PyFrameEvalFunction *)__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytecode_while_frame_eval_39); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":477 + * def frame_eval_func(): + * cdef PyThreadState *state = PyThreadState_Get() + * if IS_PY_39_OWNARDS: # <<<<<<<<<<<<<< + * state.interp.eval_frame = <_PyFrameEvalFunction *> get_bytecode_while_frame_eval_39 + * else: + */ + goto __pyx_L3; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":480 + * state.interp.eval_frame = <_PyFrameEvalFunction *> get_bytecode_while_frame_eval_39 + * else: + * state.interp.eval_frame = <_PyFrameEvalFunction *> get_bytecode_while_frame_eval_38 # <<<<<<<<<<<<<< + * dummy_tracing_holder.set_trace_func(dummy_trace_dispatch) + * + */ + /*else*/ { + __pyx_v_state->interp->eval_frame = ((_PyFrameEvalFunction *)__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytecode_while_frame_eval_38); + } + __pyx_L3:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":481 + * else: + * state.interp.eval_frame = <_PyFrameEvalFunction *> get_bytecode_while_frame_eval_38 + * dummy_tracing_holder.set_trace_func(dummy_trace_dispatch) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dummy_tracing_holder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_set_trace_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dummy_trace_dispatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":475 + * cdef bint IS_PY_39_OWNARDS = sys.version_info[:2] >= (3, 9) + * + * def frame_eval_func(): # <<<<<<<<<<<<<< + * cdef PyThreadState *state = PyThreadState_Get() + * if IS_PY_39_OWNARDS: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.frame_eval_func", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":484 + * + * + * def stop_frame_eval(): # <<<<<<<<<<<<<< + * cdef PyThreadState *state = PyThreadState_Get() + * state.interp.eval_frame = _PyEval_EvalFrameDefault + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_19stop_frame_eval(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_19stop_frame_eval = {"stop_frame_eval", (PyCFunction)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_19stop_frame_eval, METH_NOARGS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_19stop_frame_eval(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("stop_frame_eval (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_18stop_frame_eval(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_18stop_frame_eval(CYTHON_UNUSED PyObject *__pyx_self) { + PyThreadState *__pyx_v_state; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("stop_frame_eval", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":485 + * + * def stop_frame_eval(): + * cdef PyThreadState *state = PyThreadState_Get() # <<<<<<<<<<<<<< + * state.interp.eval_frame = _PyEval_EvalFrameDefault + * + */ + __pyx_v_state = PyThreadState_Get(); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":486 + * def stop_frame_eval(): + * cdef PyThreadState *state = PyThreadState_Get() + * state.interp.eval_frame = _PyEval_EvalFrameDefault # <<<<<<<<<<<<<< + * + * # During the build we'll generate 2 versions of the code below so that we're compatible with + */ + __pyx_v_state->interp->eval_frame = _PyEval_EvalFrameDefault; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":484 + * + * + * def stop_frame_eval(): # <<<<<<<<<<<<<< + * cdef PyThreadState *state = PyThreadState_Get() + * state.interp.eval_frame = _PyEval_EvalFrameDefault + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":494 + * ### WARNING: GENERATED CODE, DO NOT EDIT! + * ### WARNING: GENERATED CODE, DO NOT EDIT! + * cdef PyObject * get_bytecode_while_frame_eval_38(PyFrameObject * frame_obj, int exc): # <<<<<<<<<<<<<< + * ''' + * This function makes the actual evaluation and changes the bytecode to a version + */ + +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytecode_while_frame_eval_38(PyFrameObject *__pyx_v_frame_obj, int __pyx_v_exc) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_thread_info = 0; + CYTHON_UNUSED int __pyx_v_STATE_SUSPEND; + int __pyx_v_CMD_STEP_INTO; + int __pyx_v_CMD_STEP_OVER; + int __pyx_v_CMD_STEP_OVER_MY_CODE; + int __pyx_v_CMD_STEP_INTO_MY_CODE; + int __pyx_v_CMD_STEP_INTO_COROUTINE; + int __pyx_v_CMD_SMART_STEP_INTO; + int __pyx_v_can_skip; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_additional_info = 0; + PyObject *__pyx_v_main_debugger = 0; + PyObject *__pyx_v_frame = NULL; + PyObject *__pyx_v_trace_func = NULL; + PyObject *__pyx_v_apply_to_global = NULL; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_func_code_info = 0; + PyObject *__pyx_v_old = NULL; + PyObject *__pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + unsigned int __pyx_t_10; + PyObject *(*__pyx_t_11)(PyObject *); + int __pyx_t_12; + int __pyx_t_13; + int __pyx_t_14; + char const *__pyx_t_15; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_bytecode_while_frame_eval_38", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":499 + * where programmatic breakpoints are added. + * ''' + * if GlobalDebuggerHolder is None or _thread_local_info is None or exc: # <<<<<<<<<<<<<< + * # Sometimes during process shutdown these global variables become None + * return CALL_EvalFrameDefault_38(frame_obj, exc) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GlobalDebuggerHolder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = (__pyx_t_2 == Py_None); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_thread_local_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = (__pyx_t_2 == Py_None); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_exc != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":501 + * if GlobalDebuggerHolder is None or _thread_local_info is None or exc: + * # Sometimes during process shutdown these global variables become None + * return CALL_EvalFrameDefault_38(frame_obj, exc) # <<<<<<<<<<<<<< + * + * # co_filename: str = frame_obj.f_code.co_filename + */ + __pyx_r = CALL_EvalFrameDefault_38(__pyx_v_frame_obj, __pyx_v_exc); + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":499 + * where programmatic breakpoints are added. + * ''' + * if GlobalDebuggerHolder is None or _thread_local_info is None or exc: # <<<<<<<<<<<<<< + * # Sometimes during process shutdown these global variables become None + * return CALL_EvalFrameDefault_38(frame_obj, exc) + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":508 + * + * cdef ThreadInfo thread_info + * cdef int STATE_SUSPEND = 2 # <<<<<<<<<<<<<< + * cdef int CMD_STEP_INTO = 107 + * cdef int CMD_STEP_OVER = 108 + */ + __pyx_v_STATE_SUSPEND = 2; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":509 + * cdef ThreadInfo thread_info + * cdef int STATE_SUSPEND = 2 + * cdef int CMD_STEP_INTO = 107 # <<<<<<<<<<<<<< + * cdef int CMD_STEP_OVER = 108 + * cdef int CMD_STEP_OVER_MY_CODE = 159 + */ + __pyx_v_CMD_STEP_INTO = 0x6B; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":510 + * cdef int STATE_SUSPEND = 2 + * cdef int CMD_STEP_INTO = 107 + * cdef int CMD_STEP_OVER = 108 # <<<<<<<<<<<<<< + * cdef int CMD_STEP_OVER_MY_CODE = 159 + * cdef int CMD_STEP_INTO_MY_CODE = 144 + */ + __pyx_v_CMD_STEP_OVER = 0x6C; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":511 + * cdef int CMD_STEP_INTO = 107 + * cdef int CMD_STEP_OVER = 108 + * cdef int CMD_STEP_OVER_MY_CODE = 159 # <<<<<<<<<<<<<< + * cdef int CMD_STEP_INTO_MY_CODE = 144 + * cdef int CMD_STEP_INTO_COROUTINE = 206 + */ + __pyx_v_CMD_STEP_OVER_MY_CODE = 0x9F; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":512 + * cdef int CMD_STEP_OVER = 108 + * cdef int CMD_STEP_OVER_MY_CODE = 159 + * cdef int CMD_STEP_INTO_MY_CODE = 144 # <<<<<<<<<<<<<< + * cdef int CMD_STEP_INTO_COROUTINE = 206 + * cdef int CMD_SMART_STEP_INTO = 128 + */ + __pyx_v_CMD_STEP_INTO_MY_CODE = 0x90; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":513 + * cdef int CMD_STEP_OVER_MY_CODE = 159 + * cdef int CMD_STEP_INTO_MY_CODE = 144 + * cdef int CMD_STEP_INTO_COROUTINE = 206 # <<<<<<<<<<<<<< + * cdef int CMD_SMART_STEP_INTO = 128 + * cdef bint can_skip = True + */ + __pyx_v_CMD_STEP_INTO_COROUTINE = 0xCE; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":514 + * cdef int CMD_STEP_INTO_MY_CODE = 144 + * cdef int CMD_STEP_INTO_COROUTINE = 206 + * cdef int CMD_SMART_STEP_INTO = 128 # <<<<<<<<<<<<<< + * cdef bint can_skip = True + * try: + */ + __pyx_v_CMD_SMART_STEP_INTO = 0x80; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":515 + * cdef int CMD_STEP_INTO_COROUTINE = 206 + * cdef int CMD_SMART_STEP_INTO = 128 + * cdef bint can_skip = True # <<<<<<<<<<<<<< + * try: + * thread_info = _thread_local_info.thread_info + */ + __pyx_v_can_skip = 1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":516 + * cdef int CMD_SMART_STEP_INTO = 128 + * cdef bint can_skip = True + * try: # <<<<<<<<<<<<<< + * thread_info = _thread_local_info.thread_info + * except: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + /*try:*/ { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":517 + * cdef bint can_skip = True + * try: + * thread_info = _thread_local_info.thread_info # <<<<<<<<<<<<<< + * except: + * thread_info = get_thread_info(frame_obj) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_thread_local_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_thread_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 517, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo))))) __PYX_ERR(0, 517, __pyx_L7_error) + __pyx_v_thread_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":516 + * cdef int CMD_SMART_STEP_INTO = 128 + * cdef bint can_skip = True + * try: # <<<<<<<<<<<<<< + * thread_info = _thread_local_info.thread_info + * except: + */ + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":518 + * try: + * thread_info = _thread_local_info.thread_info + * except: # <<<<<<<<<<<<<< + * thread_info = get_thread_info(frame_obj) + * if thread_info is None: + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_bytecode_while_frame_eval_38", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_8) < 0) __PYX_ERR(0, 518, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_8); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":519 + * thread_info = _thread_local_info.thread_info + * except: + * thread_info = get_thread_info(frame_obj) # <<<<<<<<<<<<<< + * if thread_info is None: + * return CALL_EvalFrameDefault_38(frame_obj, exc) + */ + __pyx_t_9 = ((PyObject *)__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_thread_info(__pyx_v_frame_obj)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 519, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_thread_info, ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":520 + * except: + * thread_info = get_thread_info(frame_obj) + * if thread_info is None: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * + */ + __pyx_t_1 = (((PyObject *)__pyx_v_thread_info) == Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":521 + * thread_info = get_thread_info(frame_obj) + * if thread_info is None: + * return CALL_EvalFrameDefault_38(frame_obj, exc) # <<<<<<<<<<<<<< + * + * if thread_info.inside_frame_eval: + */ + __pyx_r = CALL_EvalFrameDefault_38(__pyx_v_frame_obj, __pyx_v_exc); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L10_except_return; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":520 + * except: + * thread_info = get_thread_info(frame_obj) + * if thread_info is None: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * + */ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L8_exception_handled; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":516 + * cdef int CMD_SMART_STEP_INTO = 128 + * cdef bint can_skip = True + * try: # <<<<<<<<<<<<<< + * thread_info = _thread_local_info.thread_info + * except: + */ + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + goto __pyx_L1_error; + __pyx_L10_except_return:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + goto __pyx_L0; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + __pyx_L12_try_end:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":523 + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * + * if thread_info.inside_frame_eval: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * + */ + __pyx_t_1 = (__pyx_v_thread_info->inside_frame_eval != 0); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":524 + * + * if thread_info.inside_frame_eval: + * return CALL_EvalFrameDefault_38(frame_obj, exc) # <<<<<<<<<<<<<< + * + * if not thread_info.fully_initialized: + */ + __pyx_r = CALL_EvalFrameDefault_38(__pyx_v_frame_obj, __pyx_v_exc); + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":523 + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * + * if thread_info.inside_frame_eval: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":526 + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * + * if not thread_info.fully_initialized: # <<<<<<<<<<<<<< + * thread_info.initialize_if_possible() + * if not thread_info.fully_initialized: + */ + __pyx_t_1 = (!__pyx_v_thread_info->fully_initialized); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":527 + * + * if not thread_info.fully_initialized: + * thread_info.initialize_if_possible() # <<<<<<<<<<<<<< + * if not thread_info.fully_initialized: + * return CALL_EvalFrameDefault_38(frame_obj, exc) + */ + __pyx_t_8 = ((struct __pyx_vtabstruct_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_thread_info->__pyx_vtab)->initialize_if_possible(__pyx_v_thread_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":528 + * if not thread_info.fully_initialized: + * thread_info.initialize_if_possible() + * if not thread_info.fully_initialized: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * + */ + __pyx_t_1 = (!__pyx_v_thread_info->fully_initialized); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":529 + * thread_info.initialize_if_possible() + * if not thread_info.fully_initialized: + * return CALL_EvalFrameDefault_38(frame_obj, exc) # <<<<<<<<<<<<<< + * + * # Can only get additional_info when fully initialized. + */ + __pyx_r = CALL_EvalFrameDefault_38(__pyx_v_frame_obj, __pyx_v_exc); + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":528 + * if not thread_info.fully_initialized: + * thread_info.initialize_if_possible() + * if not thread_info.fully_initialized: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":526 + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * + * if not thread_info.fully_initialized: # <<<<<<<<<<<<<< + * thread_info.initialize_if_possible() + * if not thread_info.fully_initialized: + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":532 + * + * # Can only get additional_info when fully initialized. + * cdef PyDBAdditionalThreadInfo additional_info = thread_info.additional_info # <<<<<<<<<<<<<< + * if thread_info.is_pydevd_thread or additional_info.is_tracing: + * # Make sure that we don't trace pydevd threads or inside our own calls. + */ + __pyx_t_8 = ((PyObject *)__pyx_v_thread_info->additional_info); + __Pyx_INCREF(__pyx_t_8); + __pyx_v_additional_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":533 + * # Can only get additional_info when fully initialized. + * cdef PyDBAdditionalThreadInfo additional_info = thread_info.additional_info + * if thread_info.is_pydevd_thread or additional_info.is_tracing: # <<<<<<<<<<<<<< + * # Make sure that we don't trace pydevd threads or inside our own calls. + * return CALL_EvalFrameDefault_38(frame_obj, exc) + */ + if (!__pyx_v_thread_info->is_pydevd_thread) { + } else { + __pyx_t_1 = __pyx_v_thread_info->is_pydevd_thread; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_additional_info->is_tracing != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L20_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":535 + * if thread_info.is_pydevd_thread or additional_info.is_tracing: + * # Make sure that we don't trace pydevd threads or inside our own calls. + * return CALL_EvalFrameDefault_38(frame_obj, exc) # <<<<<<<<<<<<<< + * + * # frame = frame_obj + */ + __pyx_r = CALL_EvalFrameDefault_38(__pyx_v_frame_obj, __pyx_v_exc); + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":533 + * # Can only get additional_info when fully initialized. + * cdef PyDBAdditionalThreadInfo additional_info = thread_info.additional_info + * if thread_info.is_pydevd_thread or additional_info.is_tracing: # <<<<<<<<<<<<<< + * # Make sure that we don't trace pydevd threads or inside our own calls. + * return CALL_EvalFrameDefault_38(frame_obj, exc) + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":542 + * # print('get_bytecode_while_frame_eval', frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename) + * + * thread_info.inside_frame_eval += 1 # <<<<<<<<<<<<<< + * additional_info.is_tracing = True + * try: + */ + __pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval + 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":543 + * + * thread_info.inside_frame_eval += 1 + * additional_info.is_tracing = True # <<<<<<<<<<<<<< + * try: + * main_debugger: object = GlobalDebuggerHolder.global_dbg + */ + __pyx_v_additional_info->is_tracing = 1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":544 + * thread_info.inside_frame_eval += 1 + * additional_info.is_tracing = True + * try: # <<<<<<<<<<<<<< + * main_debugger: object = GlobalDebuggerHolder.global_dbg + * if main_debugger is None: + */ + /*try:*/ { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":545 + * additional_info.is_tracing = True + * try: + * main_debugger: object = GlobalDebuggerHolder.global_dbg # <<<<<<<<<<<<<< + * if main_debugger is None: + * return CALL_EvalFrameDefault_38(frame_obj, exc) + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_GlobalDebuggerHolder); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 545, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_global_dbg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_main_debugger = __pyx_t_2; + __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":546 + * try: + * main_debugger: object = GlobalDebuggerHolder.global_dbg + * if main_debugger is None: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * frame = frame_obj + */ + __pyx_t_1 = (__pyx_v_main_debugger == Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":547 + * main_debugger: object = GlobalDebuggerHolder.global_dbg + * if main_debugger is None: + * return CALL_EvalFrameDefault_38(frame_obj, exc) # <<<<<<<<<<<<<< + * frame = frame_obj + * + */ + __pyx_r = CALL_EvalFrameDefault_38(__pyx_v_frame_obj, __pyx_v_exc); + goto __pyx_L22_return; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":546 + * try: + * main_debugger: object = GlobalDebuggerHolder.global_dbg + * if main_debugger is None: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * frame = frame_obj + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":548 + * if main_debugger is None: + * return CALL_EvalFrameDefault_38(frame_obj, exc) + * frame = frame_obj # <<<<<<<<<<<<<< + * + * if thread_info.thread_trace_func is None: + */ + __pyx_t_2 = ((PyObject *)__pyx_v_frame_obj); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_frame = __pyx_t_2; + __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":550 + * frame = frame_obj + * + * if thread_info.thread_trace_func is None: # <<<<<<<<<<<<<< + * trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) + * if apply_to_global: + */ + __pyx_t_1 = (__pyx_v_thread_info->thread_trace_func == Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":551 + * + * if thread_info.thread_trace_func is None: + * trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) # <<<<<<<<<<<<<< + * if apply_to_global: + * thread_info.thread_trace_func = trace_func + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_fix_top_level_trace_and_get_trac); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 551, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_main_debugger, __pyx_v_frame}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 551, __pyx_L23_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_8 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 551, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 551, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 551, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); + index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L27_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 1; __pyx_t_7 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L27_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < 0) __PYX_ERR(0, 551, __pyx_L23_error) + __pyx_t_11 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L28_unpacking_done; + __pyx_L27_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_11 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 551, __pyx_L23_error) + __pyx_L28_unpacking_done:; + } + __pyx_v_trace_func = __pyx_t_8; + __pyx_t_8 = 0; + __pyx_v_apply_to_global = __pyx_t_7; + __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":552 + * if thread_info.thread_trace_func is None: + * trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) + * if apply_to_global: # <<<<<<<<<<<<<< + * thread_info.thread_trace_func = trace_func + * + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_apply_to_global); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 552, __pyx_L23_error) + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":553 + * trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) + * if apply_to_global: + * thread_info.thread_trace_func = trace_func # <<<<<<<<<<<<<< + * + * if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ + */ + __Pyx_INCREF(__pyx_v_trace_func); + __Pyx_GIVEREF(__pyx_v_trace_func); + __Pyx_GOTREF(__pyx_v_thread_info->thread_trace_func); + __Pyx_DECREF(__pyx_v_thread_info->thread_trace_func); + __pyx_v_thread_info->thread_trace_func = __pyx_v_trace_func; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":552 + * if thread_info.thread_trace_func is None: + * trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) + * if apply_to_global: # <<<<<<<<<<<<<< + * thread_info.thread_trace_func = trace_func + * + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":550 + * frame = frame_obj + * + * if thread_info.thread_trace_func is None: # <<<<<<<<<<<<<< + * trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) + * if apply_to_global: + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":555 + * thread_info.thread_trace_func = trace_func + * + * if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ # <<<<<<<<<<<<<< + * main_debugger.break_on_caught_exceptions or \ + * main_debugger.break_on_user_uncaught_exceptions or \ + */ + __pyx_t_12 = __pyx_v_additional_info->pydev_step_cmd; + __pyx_t_13 = (__pyx_t_12 == __pyx_v_CMD_STEP_INTO); + if (!__pyx_t_13) { + } else { + __pyx_t_3 = __pyx_t_13; + goto __pyx_L33_bool_binop_done; + } + __pyx_t_13 = (__pyx_t_12 == __pyx_v_CMD_STEP_INTO_MY_CODE); + if (!__pyx_t_13) { + } else { + __pyx_t_3 = __pyx_t_13; + goto __pyx_L33_bool_binop_done; + } + __pyx_t_13 = (__pyx_t_12 == __pyx_v_CMD_STEP_INTO_COROUTINE); + if (!__pyx_t_13) { + } else { + __pyx_t_3 = __pyx_t_13; + goto __pyx_L33_bool_binop_done; + } + __pyx_t_13 = (__pyx_t_12 == __pyx_v_CMD_SMART_STEP_INTO); + __pyx_t_3 = __pyx_t_13; + __pyx_L33_bool_binop_done:; + __pyx_t_13 = __pyx_t_3; + if (!__pyx_t_13) { + } else { + __pyx_t_1 = __pyx_t_13; + goto __pyx_L31_bool_binop_done; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":556 + * + * if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ + * main_debugger.break_on_caught_exceptions or \ # <<<<<<<<<<<<<< + * main_debugger.break_on_user_uncaught_exceptions or \ + * main_debugger.has_plugin_exception_breaks or \ + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_break_on_caught_exceptions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 556, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_13) { + } else { + __pyx_t_1 = __pyx_t_13; + goto __pyx_L31_bool_binop_done; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":557 + * if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ + * main_debugger.break_on_caught_exceptions or \ + * main_debugger.break_on_user_uncaught_exceptions or \ # <<<<<<<<<<<<<< + * main_debugger.has_plugin_exception_breaks or \ + * main_debugger.signature_factory or \ + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_break_on_user_uncaught_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 557, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_13) { + } else { + __pyx_t_1 = __pyx_t_13; + goto __pyx_L31_bool_binop_done; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":558 + * main_debugger.break_on_caught_exceptions or \ + * main_debugger.break_on_user_uncaught_exceptions or \ + * main_debugger.has_plugin_exception_breaks or \ # <<<<<<<<<<<<<< + * main_debugger.signature_factory or \ + * additional_info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and main_debugger.show_return_values and frame.f_back is additional_info.pydev_step_stop: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 558, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_13) { + } else { + __pyx_t_1 = __pyx_t_13; + goto __pyx_L31_bool_binop_done; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":559 + * main_debugger.break_on_user_uncaught_exceptions or \ + * main_debugger.has_plugin_exception_breaks or \ + * main_debugger.signature_factory or \ # <<<<<<<<<<<<<< + * additional_info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and main_debugger.show_return_values and frame.f_back is additional_info.pydev_step_stop: + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_signature_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 559, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_13) { + } else { + __pyx_t_1 = __pyx_t_13; + goto __pyx_L31_bool_binop_done; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":560 + * main_debugger.has_plugin_exception_breaks or \ + * main_debugger.signature_factory or \ + * additional_info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and main_debugger.show_return_values and frame.f_back is additional_info.pydev_step_stop: # <<<<<<<<<<<<<< + * + * # if DEBUG: + */ + __pyx_t_12 = __pyx_v_additional_info->pydev_step_cmd; + __pyx_t_3 = (__pyx_t_12 == __pyx_v_CMD_STEP_OVER); + if (!__pyx_t_3) { + } else { + __pyx_t_13 = __pyx_t_3; + goto __pyx_L42_bool_binop_done; + } + __pyx_t_3 = (__pyx_t_12 == __pyx_v_CMD_STEP_OVER_MY_CODE); + __pyx_t_13 = __pyx_t_3; + __pyx_L42_bool_binop_done:; + __pyx_t_3 = __pyx_t_13; + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L31_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 560, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L31_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = (__pyx_t_2 == __pyx_v_additional_info->pydev_step_stop); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L31_bool_binop_done:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":555 + * thread_info.thread_trace_func = trace_func + * + * if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ # <<<<<<<<<<<<<< + * main_debugger.break_on_caught_exceptions or \ + * main_debugger.break_on_user_uncaught_exceptions or \ + */ + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":564 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval enabled trace') + * if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<< + * frame.f_trace = thread_info.thread_trace_func + * else: + */ + __pyx_t_1 = (__pyx_v_thread_info->thread_trace_func != Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":565 + * # print('get_bytecode_while_frame_eval enabled trace') + * if thread_info.thread_trace_func is not None: + * frame.f_trace = thread_info.thread_trace_func # <<<<<<<<<<<<<< + * else: + * frame.f_trace = main_debugger.trace_dispatch + */ + __pyx_t_2 = __pyx_v_thread_info->thread_trace_func; + __Pyx_INCREF(__pyx_t_2); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_2) < 0) __PYX_ERR(0, 565, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":564 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval enabled trace') + * if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<< + * frame.f_trace = thread_info.thread_trace_func + * else: + */ + goto __pyx_L45; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":567 + * frame.f_trace = thread_info.thread_trace_func + * else: + * frame.f_trace = main_debugger.trace_dispatch # <<<<<<<<<<<<<< + * else: + * func_code_info: FuncCodeInfo = get_func_code_info(thread_info, frame_obj, frame_obj.f_code) + */ + /*else*/ { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_7) < 0) __PYX_ERR(0, 567, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_L45:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":555 + * thread_info.thread_trace_func = trace_func + * + * if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ # <<<<<<<<<<<<<< + * main_debugger.break_on_caught_exceptions or \ + * main_debugger.break_on_user_uncaught_exceptions or \ + */ + goto __pyx_L30; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":569 + * frame.f_trace = main_debugger.trace_dispatch + * else: + * func_code_info: FuncCodeInfo = get_func_code_info(thread_info, frame_obj, frame_obj.f_code) # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('get_bytecode_while_frame_eval always skip', func_code_info.always_skip_code) + */ + /*else*/ { + __pyx_t_7 = ((PyObject *)__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_func_code_info(__pyx_v_thread_info, __pyx_v_frame_obj, __pyx_v_frame_obj->f_code)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 569, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_func_code_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":572 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval always skip', func_code_info.always_skip_code) + * if not func_code_info.always_skip_code: # <<<<<<<<<<<<<< + * + * if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: + */ + __pyx_t_1 = (!__pyx_v_func_code_info->always_skip_code); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":574 + * if not func_code_info.always_skip_code: + * + * if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: # <<<<<<<<<<<<<< + * can_skip = main_debugger.plugin.can_skip(main_debugger, frame_obj) + * + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 574, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 574, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 574, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 574, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L48_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":575 + * + * if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: + * can_skip = main_debugger.plugin.can_skip(main_debugger, frame_obj) # <<<<<<<<<<<<<< + * + * if not can_skip: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_plugin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_can_skip); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 575, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_main_debugger, ((PyObject *)__pyx_v_frame_obj)}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 575, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 575, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_can_skip = __pyx_t_1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":577 + * can_skip = main_debugger.plugin.can_skip(main_debugger, frame_obj) + * + * if not can_skip: # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('get_bytecode_while_frame_eval not can_skip') + */ + __pyx_t_1 = (!__pyx_v_can_skip); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":580 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval not can_skip') + * if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<< + * frame.f_trace = thread_info.thread_trace_func + * else: + */ + __pyx_t_1 = (__pyx_v_thread_info->thread_trace_func != Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":581 + * # print('get_bytecode_while_frame_eval not can_skip') + * if thread_info.thread_trace_func is not None: + * frame.f_trace = thread_info.thread_trace_func # <<<<<<<<<<<<<< + * else: + * frame.f_trace = main_debugger.trace_dispatch + */ + __pyx_t_7 = __pyx_v_thread_info->thread_trace_func; + __Pyx_INCREF(__pyx_t_7); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_7) < 0) __PYX_ERR(0, 581, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":580 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval not can_skip') + * if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<< + * frame.f_trace = thread_info.thread_trace_func + * else: + */ + goto __pyx_L51; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":583 + * frame.f_trace = thread_info.thread_trace_func + * else: + * frame.f_trace = main_debugger.trace_dispatch # <<<<<<<<<<<<<< + * + * if can_skip and func_code_info.breakpoint_found: + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 583, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_t_7; + __Pyx_INCREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_8) < 0) __PYX_ERR(0, 583, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_L51:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":577 + * can_skip = main_debugger.plugin.can_skip(main_debugger, frame_obj) + * + * if not can_skip: # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('get_bytecode_while_frame_eval not can_skip') + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":574 + * if not func_code_info.always_skip_code: + * + * if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: # <<<<<<<<<<<<<< + * can_skip = main_debugger.plugin.can_skip(main_debugger, frame_obj) + * + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":585 + * frame.f_trace = main_debugger.trace_dispatch + * + * if can_skip and func_code_info.breakpoint_found: # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('get_bytecode_while_frame_eval new_code', func_code_info.new_code) + */ + if (__pyx_v_can_skip) { + } else { + __pyx_t_1 = __pyx_v_can_skip; + goto __pyx_L53_bool_binop_done; + } + __pyx_t_1 = __pyx_v_func_code_info->breakpoint_found; + __pyx_L53_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":588 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval new_code', func_code_info.new_code) + * if not thread_info.force_stay_in_untraced_mode: # <<<<<<<<<<<<<< + * # If breakpoints are found but new_code is None, + * # this means we weren't able to actually add the code + */ + __pyx_t_1 = (!__pyx_v_thread_info->force_stay_in_untraced_mode); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":592 + * # this means we weren't able to actually add the code + * # where needed, so, fallback to tracing. + * if func_code_info.new_code is None: # <<<<<<<<<<<<<< + * if thread_info.thread_trace_func is not None: + * frame.f_trace = thread_info.thread_trace_func + */ + __pyx_t_1 = (__pyx_v_func_code_info->new_code == Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":593 + * # where needed, so, fallback to tracing. + * if func_code_info.new_code is None: + * if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<< + * frame.f_trace = thread_info.thread_trace_func + * else: + */ + __pyx_t_1 = (__pyx_v_thread_info->thread_trace_func != Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":594 + * if func_code_info.new_code is None: + * if thread_info.thread_trace_func is not None: + * frame.f_trace = thread_info.thread_trace_func # <<<<<<<<<<<<<< + * else: + * frame.f_trace = main_debugger.trace_dispatch + */ + __pyx_t_8 = __pyx_v_thread_info->thread_trace_func; + __Pyx_INCREF(__pyx_t_8); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_8) < 0) __PYX_ERR(0, 594, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":593 + * # where needed, so, fallback to tracing. + * if func_code_info.new_code is None: + * if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<< + * frame.f_trace = thread_info.thread_trace_func + * else: + */ + goto __pyx_L57; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":596 + * frame.f_trace = thread_info.thread_trace_func + * else: + * frame.f_trace = main_debugger.trace_dispatch # <<<<<<<<<<<<<< + * else: + * # print('Using frame eval break for', frame_obj.f_code.co_name) + */ + /*else*/ { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 596, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __pyx_t_8; + __Pyx_INCREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_7) < 0) __PYX_ERR(0, 596, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_L57:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":592 + * # this means we weren't able to actually add the code + * # where needed, so, fallback to tracing. + * if func_code_info.new_code is None: # <<<<<<<<<<<<<< + * if thread_info.thread_trace_func is not None: + * frame.f_trace = thread_info.thread_trace_func + */ + goto __pyx_L56; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":599 + * else: + * # print('Using frame eval break for', frame_obj.f_code.co_name) + * update_globals_dict( frame_obj.f_globals) # <<<<<<<<<<<<<< + * Py_INCREF(func_code_info.new_code) + * old = frame_obj.f_code + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_update_globals_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 599, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_frame_obj->f_globals)}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 599, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":600 + * # print('Using frame eval break for', frame_obj.f_code.co_name) + * update_globals_dict( frame_obj.f_globals) + * Py_INCREF(func_code_info.new_code) # <<<<<<<<<<<<<< + * old = frame_obj.f_code + * frame_obj.f_code = func_code_info.new_code + */ + __pyx_t_7 = __pyx_v_func_code_info->new_code; + __Pyx_INCREF(__pyx_t_7); + Py_INCREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":601 + * update_globals_dict( frame_obj.f_globals) + * Py_INCREF(func_code_info.new_code) + * old = frame_obj.f_code # <<<<<<<<<<<<<< + * frame_obj.f_code = func_code_info.new_code + * Py_DECREF(old) + */ + __pyx_t_7 = ((PyObject *)__pyx_v_frame_obj->f_code); + __Pyx_INCREF(__pyx_t_7); + __pyx_v_old = __pyx_t_7; + __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":602 + * Py_INCREF(func_code_info.new_code) + * old = frame_obj.f_code + * frame_obj.f_code = func_code_info.new_code # <<<<<<<<<<<<<< + * Py_DECREF(old) + * else: + */ + __pyx_v_frame_obj->f_code = ((PyCodeObject *)__pyx_v_func_code_info->new_code); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":603 + * old = frame_obj.f_code + * frame_obj.f_code = func_code_info.new_code + * Py_DECREF(old) # <<<<<<<<<<<<<< + * else: + * # When we're forcing to stay in traced mode we need to + */ + Py_DECREF(__pyx_v_old); + } + __pyx_L56:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":588 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval new_code', func_code_info.new_code) + * if not thread_info.force_stay_in_untraced_mode: # <<<<<<<<<<<<<< + * # If breakpoints are found but new_code is None, + * # this means we weren't able to actually add the code + */ + goto __pyx_L55; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":608 + * # update the globals dict (because this means that we're reusing + * # a previous code which had breakpoints added in a new frame). + * update_globals_dict( frame_obj.f_globals) # <<<<<<<<<<<<<< + * + * finally: + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_update_globals_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 608, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_frame_obj->f_globals)}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 608, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_L55:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":585 + * frame.f_trace = main_debugger.trace_dispatch + * + * if can_skip and func_code_info.breakpoint_found: # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('get_bytecode_while_frame_eval new_code', func_code_info.new_code) + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":572 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval always skip', func_code_info.always_skip_code) + * if not func_code_info.always_skip_code: # <<<<<<<<<<<<<< + * + * if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: + */ + } + } + __pyx_L30:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":611 + * + * finally: + * thread_info.inside_frame_eval -= 1 # <<<<<<<<<<<<<< + * additional_info.is_tracing = False + * + */ + /*finally:*/ { + /*normal exit:*/{ + __pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval - 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":612 + * finally: + * thread_info.inside_frame_eval -= 1 + * additional_info.is_tracing = False # <<<<<<<<<<<<<< + * + * return CALL_EvalFrameDefault_38(frame_obj, exc) + */ + __pyx_v_additional_info->is_tracing = 0; + goto __pyx_L24; + } + __pyx_L23_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + __pyx_t_12 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; + { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":611 + * + * finally: + * thread_info.inside_frame_eval -= 1 # <<<<<<<<<<<<<< + * additional_info.is_tracing = False + * + */ + __pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval - 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":612 + * finally: + * thread_info.inside_frame_eval -= 1 + * additional_info.is_tracing = False # <<<<<<<<<<<<<< + * + * return CALL_EvalFrameDefault_38(frame_obj, exc) + */ + __pyx_v_additional_info->is_tracing = 0; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + } + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestore(__pyx_t_6, __pyx_t_5, __pyx_t_4); + __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; + goto __pyx_L1_error; + } + __pyx_L22_return: { + __pyx_t_19 = __pyx_r; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":611 + * + * finally: + * thread_info.inside_frame_eval -= 1 # <<<<<<<<<<<<<< + * additional_info.is_tracing = False + * + */ + __pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval - 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":612 + * finally: + * thread_info.inside_frame_eval -= 1 + * additional_info.is_tracing = False # <<<<<<<<<<<<<< + * + * return CALL_EvalFrameDefault_38(frame_obj, exc) + */ + __pyx_v_additional_info->is_tracing = 0; + __pyx_r = __pyx_t_19; + goto __pyx_L0; + } + __pyx_L24:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":614 + * additional_info.is_tracing = False + * + * return CALL_EvalFrameDefault_38(frame_obj, exc) # <<<<<<<<<<<<<< + * ### WARNING: GENERATED CODE, DO NOT EDIT! + * ### WARNING: GENERATED CODE, DO NOT EDIT! + */ + __pyx_r = CALL_EvalFrameDefault_38(__pyx_v_frame_obj, __pyx_v_exc); + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":494 + * ### WARNING: GENERATED CODE, DO NOT EDIT! + * ### WARNING: GENERATED CODE, DO NOT EDIT! + * cdef PyObject * get_bytecode_while_frame_eval_38(PyFrameObject * frame_obj, int exc): # <<<<<<<<<<<<<< + * ''' + * This function makes the actual evaluation and changes the bytecode to a version + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_bytecode_while_frame_eval_38", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_thread_info); + __Pyx_XDECREF((PyObject *)__pyx_v_additional_info); + __Pyx_XDECREF(__pyx_v_main_debugger); + __Pyx_XDECREF(__pyx_v_frame); + __Pyx_XDECREF(__pyx_v_trace_func); + __Pyx_XDECREF(__pyx_v_apply_to_global); + __Pyx_XDECREF((PyObject *)__pyx_v_func_code_info); + __Pyx_XDECREF(__pyx_v_old); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":623 + * ### WARNING: GENERATED CODE, DO NOT EDIT! + * ### WARNING: GENERATED CODE, DO NOT EDIT! + * cdef PyObject * get_bytecode_while_frame_eval_39(PyThreadState* tstate, PyFrameObject * frame_obj, int exc): # <<<<<<<<<<<<<< + * ''' + * This function makes the actual evaluation and changes the bytecode to a version + */ + +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytecode_while_frame_eval_39(PyThreadState *__pyx_v_tstate, PyFrameObject *__pyx_v_frame_obj, int __pyx_v_exc) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v_thread_info = 0; + CYTHON_UNUSED int __pyx_v_STATE_SUSPEND; + int __pyx_v_CMD_STEP_INTO; + int __pyx_v_CMD_STEP_OVER; + int __pyx_v_CMD_STEP_OVER_MY_CODE; + int __pyx_v_CMD_STEP_INTO_MY_CODE; + int __pyx_v_CMD_STEP_INTO_COROUTINE; + int __pyx_v_CMD_SMART_STEP_INTO; + int __pyx_v_can_skip; + struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *__pyx_v_additional_info = 0; + PyObject *__pyx_v_main_debugger = 0; + PyObject *__pyx_v_frame = NULL; + PyObject *__pyx_v_trace_func = NULL; + PyObject *__pyx_v_apply_to_global = NULL; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v_func_code_info = 0; + PyObject *__pyx_v_old = NULL; + PyObject *__pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + unsigned int __pyx_t_10; + PyObject *(*__pyx_t_11)(PyObject *); + int __pyx_t_12; + int __pyx_t_13; + int __pyx_t_14; + char const *__pyx_t_15; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_bytecode_while_frame_eval_39", 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":628 + * where programmatic breakpoints are added. + * ''' + * if GlobalDebuggerHolder is None or _thread_local_info is None or exc: # <<<<<<<<<<<<<< + * # Sometimes during process shutdown these global variables become None + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GlobalDebuggerHolder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = (__pyx_t_2 == Py_None); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_thread_local_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = (__pyx_t_2 == Py_None); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_exc != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":630 + * if GlobalDebuggerHolder is None or _thread_local_info is None or exc: + * # Sometimes during process shutdown these global variables become None + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) # <<<<<<<<<<<<<< + * + * # co_filename: str = frame_obj.f_code.co_filename + */ + __pyx_r = CALL_EvalFrameDefault_39(__pyx_v_tstate, __pyx_v_frame_obj, __pyx_v_exc); + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":628 + * where programmatic breakpoints are added. + * ''' + * if GlobalDebuggerHolder is None or _thread_local_info is None or exc: # <<<<<<<<<<<<<< + * # Sometimes during process shutdown these global variables become None + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":637 + * + * cdef ThreadInfo thread_info + * cdef int STATE_SUSPEND = 2 # <<<<<<<<<<<<<< + * cdef int CMD_STEP_INTO = 107 + * cdef int CMD_STEP_OVER = 108 + */ + __pyx_v_STATE_SUSPEND = 2; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":638 + * cdef ThreadInfo thread_info + * cdef int STATE_SUSPEND = 2 + * cdef int CMD_STEP_INTO = 107 # <<<<<<<<<<<<<< + * cdef int CMD_STEP_OVER = 108 + * cdef int CMD_STEP_OVER_MY_CODE = 159 + */ + __pyx_v_CMD_STEP_INTO = 0x6B; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":639 + * cdef int STATE_SUSPEND = 2 + * cdef int CMD_STEP_INTO = 107 + * cdef int CMD_STEP_OVER = 108 # <<<<<<<<<<<<<< + * cdef int CMD_STEP_OVER_MY_CODE = 159 + * cdef int CMD_STEP_INTO_MY_CODE = 144 + */ + __pyx_v_CMD_STEP_OVER = 0x6C; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":640 + * cdef int CMD_STEP_INTO = 107 + * cdef int CMD_STEP_OVER = 108 + * cdef int CMD_STEP_OVER_MY_CODE = 159 # <<<<<<<<<<<<<< + * cdef int CMD_STEP_INTO_MY_CODE = 144 + * cdef int CMD_STEP_INTO_COROUTINE = 206 + */ + __pyx_v_CMD_STEP_OVER_MY_CODE = 0x9F; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":641 + * cdef int CMD_STEP_OVER = 108 + * cdef int CMD_STEP_OVER_MY_CODE = 159 + * cdef int CMD_STEP_INTO_MY_CODE = 144 # <<<<<<<<<<<<<< + * cdef int CMD_STEP_INTO_COROUTINE = 206 + * cdef int CMD_SMART_STEP_INTO = 128 + */ + __pyx_v_CMD_STEP_INTO_MY_CODE = 0x90; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":642 + * cdef int CMD_STEP_OVER_MY_CODE = 159 + * cdef int CMD_STEP_INTO_MY_CODE = 144 + * cdef int CMD_STEP_INTO_COROUTINE = 206 # <<<<<<<<<<<<<< + * cdef int CMD_SMART_STEP_INTO = 128 + * cdef bint can_skip = True + */ + __pyx_v_CMD_STEP_INTO_COROUTINE = 0xCE; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":643 + * cdef int CMD_STEP_INTO_MY_CODE = 144 + * cdef int CMD_STEP_INTO_COROUTINE = 206 + * cdef int CMD_SMART_STEP_INTO = 128 # <<<<<<<<<<<<<< + * cdef bint can_skip = True + * try: + */ + __pyx_v_CMD_SMART_STEP_INTO = 0x80; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":644 + * cdef int CMD_STEP_INTO_COROUTINE = 206 + * cdef int CMD_SMART_STEP_INTO = 128 + * cdef bint can_skip = True # <<<<<<<<<<<<<< + * try: + * thread_info = _thread_local_info.thread_info + */ + __pyx_v_can_skip = 1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":645 + * cdef int CMD_SMART_STEP_INTO = 128 + * cdef bint can_skip = True + * try: # <<<<<<<<<<<<<< + * thread_info = _thread_local_info.thread_info + * except: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + /*try:*/ { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":646 + * cdef bint can_skip = True + * try: + * thread_info = _thread_local_info.thread_info # <<<<<<<<<<<<<< + * except: + * thread_info = get_thread_info(frame_obj) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_thread_local_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_thread_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 646, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo))))) __PYX_ERR(0, 646, __pyx_L7_error) + __pyx_v_thread_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":645 + * cdef int CMD_SMART_STEP_INTO = 128 + * cdef bint can_skip = True + * try: # <<<<<<<<<<<<<< + * thread_info = _thread_local_info.thread_info + * except: + */ + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":647 + * try: + * thread_info = _thread_local_info.thread_info + * except: # <<<<<<<<<<<<<< + * thread_info = get_thread_info(frame_obj) + * if thread_info is None: + */ + /*except:*/ { + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_bytecode_while_frame_eval_39", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_8) < 0) __PYX_ERR(0, 647, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_8); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":648 + * thread_info = _thread_local_info.thread_info + * except: + * thread_info = get_thread_info(frame_obj) # <<<<<<<<<<<<<< + * if thread_info is None: + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + */ + __pyx_t_9 = ((PyObject *)__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_thread_info(__pyx_v_frame_obj)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 648, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_thread_info, ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":649 + * except: + * thread_info = get_thread_info(frame_obj) + * if thread_info is None: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * + */ + __pyx_t_1 = (((PyObject *)__pyx_v_thread_info) == Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":650 + * thread_info = get_thread_info(frame_obj) + * if thread_info is None: + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) # <<<<<<<<<<<<<< + * + * if thread_info.inside_frame_eval: + */ + __pyx_r = CALL_EvalFrameDefault_39(__pyx_v_tstate, __pyx_v_frame_obj, __pyx_v_exc); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L10_except_return; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":649 + * except: + * thread_info = get_thread_info(frame_obj) + * if thread_info is None: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * + */ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L8_exception_handled; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":645 + * cdef int CMD_SMART_STEP_INTO = 128 + * cdef bint can_skip = True + * try: # <<<<<<<<<<<<<< + * thread_info = _thread_local_info.thread_info + * except: + */ + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + goto __pyx_L1_error; + __pyx_L10_except_return:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + goto __pyx_L0; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + __pyx_L12_try_end:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":652 + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * + * if thread_info.inside_frame_eval: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * + */ + __pyx_t_1 = (__pyx_v_thread_info->inside_frame_eval != 0); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":653 + * + * if thread_info.inside_frame_eval: + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) # <<<<<<<<<<<<<< + * + * if not thread_info.fully_initialized: + */ + __pyx_r = CALL_EvalFrameDefault_39(__pyx_v_tstate, __pyx_v_frame_obj, __pyx_v_exc); + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":652 + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * + * if thread_info.inside_frame_eval: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":655 + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * + * if not thread_info.fully_initialized: # <<<<<<<<<<<<<< + * thread_info.initialize_if_possible() + * if not thread_info.fully_initialized: + */ + __pyx_t_1 = (!__pyx_v_thread_info->fully_initialized); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":656 + * + * if not thread_info.fully_initialized: + * thread_info.initialize_if_possible() # <<<<<<<<<<<<<< + * if not thread_info.fully_initialized: + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + */ + __pyx_t_8 = ((struct __pyx_vtabstruct_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v_thread_info->__pyx_vtab)->initialize_if_possible(__pyx_v_thread_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":657 + * if not thread_info.fully_initialized: + * thread_info.initialize_if_possible() + * if not thread_info.fully_initialized: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * + */ + __pyx_t_1 = (!__pyx_v_thread_info->fully_initialized); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":658 + * thread_info.initialize_if_possible() + * if not thread_info.fully_initialized: + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) # <<<<<<<<<<<<<< + * + * # Can only get additional_info when fully initialized. + */ + __pyx_r = CALL_EvalFrameDefault_39(__pyx_v_tstate, __pyx_v_frame_obj, __pyx_v_exc); + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":657 + * if not thread_info.fully_initialized: + * thread_info.initialize_if_possible() + * if not thread_info.fully_initialized: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":655 + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * + * if not thread_info.fully_initialized: # <<<<<<<<<<<<<< + * thread_info.initialize_if_possible() + * if not thread_info.fully_initialized: + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":661 + * + * # Can only get additional_info when fully initialized. + * cdef PyDBAdditionalThreadInfo additional_info = thread_info.additional_info # <<<<<<<<<<<<<< + * if thread_info.is_pydevd_thread or additional_info.is_tracing: + * # Make sure that we don't trace pydevd threads or inside our own calls. + */ + __pyx_t_8 = ((PyObject *)__pyx_v_thread_info->additional_info); + __Pyx_INCREF(__pyx_t_8); + __pyx_v_additional_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":662 + * # Can only get additional_info when fully initialized. + * cdef PyDBAdditionalThreadInfo additional_info = thread_info.additional_info + * if thread_info.is_pydevd_thread or additional_info.is_tracing: # <<<<<<<<<<<<<< + * # Make sure that we don't trace pydevd threads or inside our own calls. + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + */ + if (!__pyx_v_thread_info->is_pydevd_thread) { + } else { + __pyx_t_1 = __pyx_v_thread_info->is_pydevd_thread; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_additional_info->is_tracing != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L20_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":664 + * if thread_info.is_pydevd_thread or additional_info.is_tracing: + * # Make sure that we don't trace pydevd threads or inside our own calls. + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) # <<<<<<<<<<<<<< + * + * # frame = frame_obj + */ + __pyx_r = CALL_EvalFrameDefault_39(__pyx_v_tstate, __pyx_v_frame_obj, __pyx_v_exc); + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":662 + * # Can only get additional_info when fully initialized. + * cdef PyDBAdditionalThreadInfo additional_info = thread_info.additional_info + * if thread_info.is_pydevd_thread or additional_info.is_tracing: # <<<<<<<<<<<<<< + * # Make sure that we don't trace pydevd threads or inside our own calls. + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":671 + * # print('get_bytecode_while_frame_eval', frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename) + * + * thread_info.inside_frame_eval += 1 # <<<<<<<<<<<<<< + * additional_info.is_tracing = True + * try: + */ + __pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval + 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":672 + * + * thread_info.inside_frame_eval += 1 + * additional_info.is_tracing = True # <<<<<<<<<<<<<< + * try: + * main_debugger: object = GlobalDebuggerHolder.global_dbg + */ + __pyx_v_additional_info->is_tracing = 1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":673 + * thread_info.inside_frame_eval += 1 + * additional_info.is_tracing = True + * try: # <<<<<<<<<<<<<< + * main_debugger: object = GlobalDebuggerHolder.global_dbg + * if main_debugger is None: + */ + /*try:*/ { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":674 + * additional_info.is_tracing = True + * try: + * main_debugger: object = GlobalDebuggerHolder.global_dbg # <<<<<<<<<<<<<< + * if main_debugger is None: + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_GlobalDebuggerHolder); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 674, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_global_dbg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_main_debugger = __pyx_t_2; + __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":675 + * try: + * main_debugger: object = GlobalDebuggerHolder.global_dbg + * if main_debugger is None: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * frame = frame_obj + */ + __pyx_t_1 = (__pyx_v_main_debugger == Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":676 + * main_debugger: object = GlobalDebuggerHolder.global_dbg + * if main_debugger is None: + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) # <<<<<<<<<<<<<< + * frame = frame_obj + * + */ + __pyx_r = CALL_EvalFrameDefault_39(__pyx_v_tstate, __pyx_v_frame_obj, __pyx_v_exc); + goto __pyx_L22_return; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":675 + * try: + * main_debugger: object = GlobalDebuggerHolder.global_dbg + * if main_debugger is None: # <<<<<<<<<<<<<< + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * frame = frame_obj + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":677 + * if main_debugger is None: + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + * frame = frame_obj # <<<<<<<<<<<<<< + * + * if thread_info.thread_trace_func is None: + */ + __pyx_t_2 = ((PyObject *)__pyx_v_frame_obj); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_frame = __pyx_t_2; + __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":679 + * frame = frame_obj + * + * if thread_info.thread_trace_func is None: # <<<<<<<<<<<<<< + * trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) + * if apply_to_global: + */ + __pyx_t_1 = (__pyx_v_thread_info->thread_trace_func == Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":680 + * + * if thread_info.thread_trace_func is None: + * trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) # <<<<<<<<<<<<<< + * if apply_to_global: + * thread_info.thread_trace_func = trace_func + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_fix_top_level_trace_and_get_trac); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 680, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_main_debugger, __pyx_v_frame}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 680, __pyx_L23_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_8 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 680, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 680, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); + index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L27_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 1; __pyx_t_7 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L27_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < 0) __PYX_ERR(0, 680, __pyx_L23_error) + __pyx_t_11 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L28_unpacking_done; + __pyx_L27_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_11 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 680, __pyx_L23_error) + __pyx_L28_unpacking_done:; + } + __pyx_v_trace_func = __pyx_t_8; + __pyx_t_8 = 0; + __pyx_v_apply_to_global = __pyx_t_7; + __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":681 + * if thread_info.thread_trace_func is None: + * trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) + * if apply_to_global: # <<<<<<<<<<<<<< + * thread_info.thread_trace_func = trace_func + * + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_apply_to_global); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 681, __pyx_L23_error) + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":682 + * trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) + * if apply_to_global: + * thread_info.thread_trace_func = trace_func # <<<<<<<<<<<<<< + * + * if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ + */ + __Pyx_INCREF(__pyx_v_trace_func); + __Pyx_GIVEREF(__pyx_v_trace_func); + __Pyx_GOTREF(__pyx_v_thread_info->thread_trace_func); + __Pyx_DECREF(__pyx_v_thread_info->thread_trace_func); + __pyx_v_thread_info->thread_trace_func = __pyx_v_trace_func; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":681 + * if thread_info.thread_trace_func is None: + * trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) + * if apply_to_global: # <<<<<<<<<<<<<< + * thread_info.thread_trace_func = trace_func + * + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":679 + * frame = frame_obj + * + * if thread_info.thread_trace_func is None: # <<<<<<<<<<<<<< + * trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) + * if apply_to_global: + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":684 + * thread_info.thread_trace_func = trace_func + * + * if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ # <<<<<<<<<<<<<< + * main_debugger.break_on_caught_exceptions or \ + * main_debugger.break_on_user_uncaught_exceptions or \ + */ + __pyx_t_12 = __pyx_v_additional_info->pydev_step_cmd; + __pyx_t_13 = (__pyx_t_12 == __pyx_v_CMD_STEP_INTO); + if (!__pyx_t_13) { + } else { + __pyx_t_3 = __pyx_t_13; + goto __pyx_L33_bool_binop_done; + } + __pyx_t_13 = (__pyx_t_12 == __pyx_v_CMD_STEP_INTO_MY_CODE); + if (!__pyx_t_13) { + } else { + __pyx_t_3 = __pyx_t_13; + goto __pyx_L33_bool_binop_done; + } + __pyx_t_13 = (__pyx_t_12 == __pyx_v_CMD_STEP_INTO_COROUTINE); + if (!__pyx_t_13) { + } else { + __pyx_t_3 = __pyx_t_13; + goto __pyx_L33_bool_binop_done; + } + __pyx_t_13 = (__pyx_t_12 == __pyx_v_CMD_SMART_STEP_INTO); + __pyx_t_3 = __pyx_t_13; + __pyx_L33_bool_binop_done:; + __pyx_t_13 = __pyx_t_3; + if (!__pyx_t_13) { + } else { + __pyx_t_1 = __pyx_t_13; + goto __pyx_L31_bool_binop_done; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":685 + * + * if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ + * main_debugger.break_on_caught_exceptions or \ # <<<<<<<<<<<<<< + * main_debugger.break_on_user_uncaught_exceptions or \ + * main_debugger.has_plugin_exception_breaks or \ + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_break_on_caught_exceptions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 685, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_13) { + } else { + __pyx_t_1 = __pyx_t_13; + goto __pyx_L31_bool_binop_done; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":686 + * if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ + * main_debugger.break_on_caught_exceptions or \ + * main_debugger.break_on_user_uncaught_exceptions or \ # <<<<<<<<<<<<<< + * main_debugger.has_plugin_exception_breaks or \ + * main_debugger.signature_factory or \ + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_break_on_user_uncaught_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 686, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_13) { + } else { + __pyx_t_1 = __pyx_t_13; + goto __pyx_L31_bool_binop_done; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":687 + * main_debugger.break_on_caught_exceptions or \ + * main_debugger.break_on_user_uncaught_exceptions or \ + * main_debugger.has_plugin_exception_breaks or \ # <<<<<<<<<<<<<< + * main_debugger.signature_factory or \ + * additional_info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and main_debugger.show_return_values and frame.f_back is additional_info.pydev_step_stop: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 687, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_13) { + } else { + __pyx_t_1 = __pyx_t_13; + goto __pyx_L31_bool_binop_done; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":688 + * main_debugger.break_on_user_uncaught_exceptions or \ + * main_debugger.has_plugin_exception_breaks or \ + * main_debugger.signature_factory or \ # <<<<<<<<<<<<<< + * additional_info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and main_debugger.show_return_values and frame.f_back is additional_info.pydev_step_stop: + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_signature_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 688, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_13) { + } else { + __pyx_t_1 = __pyx_t_13; + goto __pyx_L31_bool_binop_done; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":689 + * main_debugger.has_plugin_exception_breaks or \ + * main_debugger.signature_factory or \ + * additional_info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and main_debugger.show_return_values and frame.f_back is additional_info.pydev_step_stop: # <<<<<<<<<<<<<< + * + * # if DEBUG: + */ + __pyx_t_12 = __pyx_v_additional_info->pydev_step_cmd; + __pyx_t_3 = (__pyx_t_12 == __pyx_v_CMD_STEP_OVER); + if (!__pyx_t_3) { + } else { + __pyx_t_13 = __pyx_t_3; + goto __pyx_L42_bool_binop_done; + } + __pyx_t_3 = (__pyx_t_12 == __pyx_v_CMD_STEP_OVER_MY_CODE); + __pyx_t_13 = __pyx_t_3; + __pyx_L42_bool_binop_done:; + __pyx_t_3 = __pyx_t_13; + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L31_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 689, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L31_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = (__pyx_t_2 == __pyx_v_additional_info->pydev_step_stop); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L31_bool_binop_done:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":684 + * thread_info.thread_trace_func = trace_func + * + * if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ # <<<<<<<<<<<<<< + * main_debugger.break_on_caught_exceptions or \ + * main_debugger.break_on_user_uncaught_exceptions or \ + */ + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":693 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval enabled trace') + * if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<< + * frame.f_trace = thread_info.thread_trace_func + * else: + */ + __pyx_t_1 = (__pyx_v_thread_info->thread_trace_func != Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":694 + * # print('get_bytecode_while_frame_eval enabled trace') + * if thread_info.thread_trace_func is not None: + * frame.f_trace = thread_info.thread_trace_func # <<<<<<<<<<<<<< + * else: + * frame.f_trace = main_debugger.trace_dispatch + */ + __pyx_t_2 = __pyx_v_thread_info->thread_trace_func; + __Pyx_INCREF(__pyx_t_2); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_2) < 0) __PYX_ERR(0, 694, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":693 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval enabled trace') + * if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<< + * frame.f_trace = thread_info.thread_trace_func + * else: + */ + goto __pyx_L45; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":696 + * frame.f_trace = thread_info.thread_trace_func + * else: + * frame.f_trace = main_debugger.trace_dispatch # <<<<<<<<<<<<<< + * else: + * func_code_info: FuncCodeInfo = get_func_code_info(thread_info, frame_obj, frame_obj.f_code) + */ + /*else*/ { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_7) < 0) __PYX_ERR(0, 696, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_L45:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":684 + * thread_info.thread_trace_func = trace_func + * + * if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ # <<<<<<<<<<<<<< + * main_debugger.break_on_caught_exceptions or \ + * main_debugger.break_on_user_uncaught_exceptions or \ + */ + goto __pyx_L30; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":698 + * frame.f_trace = main_debugger.trace_dispatch + * else: + * func_code_info: FuncCodeInfo = get_func_code_info(thread_info, frame_obj, frame_obj.f_code) # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('get_bytecode_while_frame_eval always skip', func_code_info.always_skip_code) + */ + /*else*/ { + __pyx_t_7 = ((PyObject *)__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_func_code_info(__pyx_v_thread_info, __pyx_v_frame_obj, __pyx_v_frame_obj->f_code)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 698, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_func_code_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_t_7); + __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":701 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval always skip', func_code_info.always_skip_code) + * if not func_code_info.always_skip_code: # <<<<<<<<<<<<<< + * + * if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: + */ + __pyx_t_1 = (!__pyx_v_func_code_info->always_skip_code); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":703 + * if not func_code_info.always_skip_code: + * + * if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: # <<<<<<<<<<<<<< + * can_skip = main_debugger.plugin.can_skip(main_debugger, frame_obj) + * + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 703, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 703, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 703, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 703, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L48_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":704 + * + * if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: + * can_skip = main_debugger.plugin.can_skip(main_debugger, frame_obj) # <<<<<<<<<<<<<< + * + * if not can_skip: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_plugin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_can_skip); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 704, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_main_debugger, ((PyObject *)__pyx_v_frame_obj)}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 704, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 704, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_can_skip = __pyx_t_1; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":706 + * can_skip = main_debugger.plugin.can_skip(main_debugger, frame_obj) + * + * if not can_skip: # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('get_bytecode_while_frame_eval not can_skip') + */ + __pyx_t_1 = (!__pyx_v_can_skip); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":709 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval not can_skip') + * if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<< + * frame.f_trace = thread_info.thread_trace_func + * else: + */ + __pyx_t_1 = (__pyx_v_thread_info->thread_trace_func != Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":710 + * # print('get_bytecode_while_frame_eval not can_skip') + * if thread_info.thread_trace_func is not None: + * frame.f_trace = thread_info.thread_trace_func # <<<<<<<<<<<<<< + * else: + * frame.f_trace = main_debugger.trace_dispatch + */ + __pyx_t_7 = __pyx_v_thread_info->thread_trace_func; + __Pyx_INCREF(__pyx_t_7); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_7) < 0) __PYX_ERR(0, 710, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":709 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval not can_skip') + * if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<< + * frame.f_trace = thread_info.thread_trace_func + * else: + */ + goto __pyx_L51; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":712 + * frame.f_trace = thread_info.thread_trace_func + * else: + * frame.f_trace = main_debugger.trace_dispatch # <<<<<<<<<<<<<< + * + * if can_skip and func_code_info.breakpoint_found: + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 712, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_t_7; + __Pyx_INCREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_8) < 0) __PYX_ERR(0, 712, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_L51:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":706 + * can_skip = main_debugger.plugin.can_skip(main_debugger, frame_obj) + * + * if not can_skip: # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('get_bytecode_while_frame_eval not can_skip') + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":703 + * if not func_code_info.always_skip_code: + * + * if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: # <<<<<<<<<<<<<< + * can_skip = main_debugger.plugin.can_skip(main_debugger, frame_obj) + * + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":714 + * frame.f_trace = main_debugger.trace_dispatch + * + * if can_skip and func_code_info.breakpoint_found: # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('get_bytecode_while_frame_eval new_code', func_code_info.new_code) + */ + if (__pyx_v_can_skip) { + } else { + __pyx_t_1 = __pyx_v_can_skip; + goto __pyx_L53_bool_binop_done; + } + __pyx_t_1 = __pyx_v_func_code_info->breakpoint_found; + __pyx_L53_bool_binop_done:; + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":717 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval new_code', func_code_info.new_code) + * if not thread_info.force_stay_in_untraced_mode: # <<<<<<<<<<<<<< + * # If breakpoints are found but new_code is None, + * # this means we weren't able to actually add the code + */ + __pyx_t_1 = (!__pyx_v_thread_info->force_stay_in_untraced_mode); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":721 + * # this means we weren't able to actually add the code + * # where needed, so, fallback to tracing. + * if func_code_info.new_code is None: # <<<<<<<<<<<<<< + * if thread_info.thread_trace_func is not None: + * frame.f_trace = thread_info.thread_trace_func + */ + __pyx_t_1 = (__pyx_v_func_code_info->new_code == Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":722 + * # where needed, so, fallback to tracing. + * if func_code_info.new_code is None: + * if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<< + * frame.f_trace = thread_info.thread_trace_func + * else: + */ + __pyx_t_1 = (__pyx_v_thread_info->thread_trace_func != Py_None); + if (__pyx_t_1) { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":723 + * if func_code_info.new_code is None: + * if thread_info.thread_trace_func is not None: + * frame.f_trace = thread_info.thread_trace_func # <<<<<<<<<<<<<< + * else: + * frame.f_trace = main_debugger.trace_dispatch + */ + __pyx_t_8 = __pyx_v_thread_info->thread_trace_func; + __Pyx_INCREF(__pyx_t_8); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_8) < 0) __PYX_ERR(0, 723, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":722 + * # where needed, so, fallback to tracing. + * if func_code_info.new_code is None: + * if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<< + * frame.f_trace = thread_info.thread_trace_func + * else: + */ + goto __pyx_L57; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":725 + * frame.f_trace = thread_info.thread_trace_func + * else: + * frame.f_trace = main_debugger.trace_dispatch # <<<<<<<<<<<<<< + * else: + * # print('Using frame eval break for', frame_obj.f_code.co_name) + */ + /*else*/ { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 725, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __pyx_t_8; + __Pyx_INCREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_7) < 0) __PYX_ERR(0, 725, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_L57:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":721 + * # this means we weren't able to actually add the code + * # where needed, so, fallback to tracing. + * if func_code_info.new_code is None: # <<<<<<<<<<<<<< + * if thread_info.thread_trace_func is not None: + * frame.f_trace = thread_info.thread_trace_func + */ + goto __pyx_L56; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":728 + * else: + * # print('Using frame eval break for', frame_obj.f_code.co_name) + * update_globals_dict( frame_obj.f_globals) # <<<<<<<<<<<<<< + * Py_INCREF(func_code_info.new_code) + * old = frame_obj.f_code + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_update_globals_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 728, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_frame_obj->f_globals)}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 728, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":729 + * # print('Using frame eval break for', frame_obj.f_code.co_name) + * update_globals_dict( frame_obj.f_globals) + * Py_INCREF(func_code_info.new_code) # <<<<<<<<<<<<<< + * old = frame_obj.f_code + * frame_obj.f_code = func_code_info.new_code + */ + __pyx_t_7 = __pyx_v_func_code_info->new_code; + __Pyx_INCREF(__pyx_t_7); + Py_INCREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":730 + * update_globals_dict( frame_obj.f_globals) + * Py_INCREF(func_code_info.new_code) + * old = frame_obj.f_code # <<<<<<<<<<<<<< + * frame_obj.f_code = func_code_info.new_code + * Py_DECREF(old) + */ + __pyx_t_7 = ((PyObject *)__pyx_v_frame_obj->f_code); + __Pyx_INCREF(__pyx_t_7); + __pyx_v_old = __pyx_t_7; + __pyx_t_7 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":731 + * Py_INCREF(func_code_info.new_code) + * old = frame_obj.f_code + * frame_obj.f_code = func_code_info.new_code # <<<<<<<<<<<<<< + * Py_DECREF(old) + * else: + */ + __pyx_v_frame_obj->f_code = ((PyCodeObject *)__pyx_v_func_code_info->new_code); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":732 + * old = frame_obj.f_code + * frame_obj.f_code = func_code_info.new_code + * Py_DECREF(old) # <<<<<<<<<<<<<< + * else: + * # When we're forcing to stay in traced mode we need to + */ + Py_DECREF(__pyx_v_old); + } + __pyx_L56:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":717 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval new_code', func_code_info.new_code) + * if not thread_info.force_stay_in_untraced_mode: # <<<<<<<<<<<<<< + * # If breakpoints are found but new_code is None, + * # this means we weren't able to actually add the code + */ + goto __pyx_L55; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":737 + * # update the globals dict (because this means that we're reusing + * # a previous code which had breakpoints added in a new frame). + * update_globals_dict( frame_obj.f_globals) # <<<<<<<<<<<<<< + * + * finally: + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_update_globals_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 737, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = NULL; + __pyx_t_10 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_frame_obj->f_globals)}; + __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 737, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_L55:; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":714 + * frame.f_trace = main_debugger.trace_dispatch + * + * if can_skip and func_code_info.breakpoint_found: # <<<<<<<<<<<<<< + * # if DEBUG: + * # print('get_bytecode_while_frame_eval new_code', func_code_info.new_code) + */ + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":701 + * # if DEBUG: + * # print('get_bytecode_while_frame_eval always skip', func_code_info.always_skip_code) + * if not func_code_info.always_skip_code: # <<<<<<<<<<<<<< + * + * if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: + */ + } + } + __pyx_L30:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":740 + * + * finally: + * thread_info.inside_frame_eval -= 1 # <<<<<<<<<<<<<< + * additional_info.is_tracing = False + * + */ + /*finally:*/ { + /*normal exit:*/{ + __pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval - 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":741 + * finally: + * thread_info.inside_frame_eval -= 1 + * additional_info.is_tracing = False # <<<<<<<<<<<<<< + * + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + */ + __pyx_v_additional_info->is_tracing = 0; + goto __pyx_L24; + } + __pyx_L23_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + __pyx_t_12 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; + { + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":740 + * + * finally: + * thread_info.inside_frame_eval -= 1 # <<<<<<<<<<<<<< + * additional_info.is_tracing = False + * + */ + __pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval - 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":741 + * finally: + * thread_info.inside_frame_eval -= 1 + * additional_info.is_tracing = False # <<<<<<<<<<<<<< + * + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + */ + __pyx_v_additional_info->is_tracing = 0; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + } + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestore(__pyx_t_6, __pyx_t_5, __pyx_t_4); + __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; + goto __pyx_L1_error; + } + __pyx_L22_return: { + __pyx_t_19 = __pyx_r; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":740 + * + * finally: + * thread_info.inside_frame_eval -= 1 # <<<<<<<<<<<<<< + * additional_info.is_tracing = False + * + */ + __pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval - 1); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":741 + * finally: + * thread_info.inside_frame_eval -= 1 + * additional_info.is_tracing = False # <<<<<<<<<<<<<< + * + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) + */ + __pyx_v_additional_info->is_tracing = 0; + __pyx_r = __pyx_t_19; + goto __pyx_L0; + } + __pyx_L24:; + } + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":743 + * additional_info.is_tracing = False + * + * return CALL_EvalFrameDefault_39(tstate, frame_obj, exc) # <<<<<<<<<<<<<< + * ### WARNING: GENERATED CODE, DO NOT EDIT! + * ### WARNING: GENERATED CODE, DO NOT EDIT! + */ + __pyx_r = CALL_EvalFrameDefault_39(__pyx_v_tstate, __pyx_v_frame_obj, __pyx_v_exc); + goto __pyx_L0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":623 + * ### WARNING: GENERATED CODE, DO NOT EDIT! + * ### WARNING: GENERATED CODE, DO NOT EDIT! + * cdef PyObject * get_bytecode_while_frame_eval_39(PyThreadState* tstate, PyFrameObject * frame_obj, int exc): # <<<<<<<<<<<<<< + * ''' + * This function makes the actual evaluation and changes the bytecode to a version + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.get_bytecode_while_frame_eval_39", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_thread_info); + __Pyx_XDECREF((PyObject *)__pyx_v_additional_info); + __Pyx_XDECREF(__pyx_v_main_debugger); + __Pyx_XDECREF(__pyx_v_frame); + __Pyx_XDECREF(__pyx_v_trace_func); + __Pyx_XDECREF(__pyx_v_apply_to_global); + __Pyx_XDECREF((PyObject *)__pyx_v_func_code_info); + __Pyx_XDECREF(__pyx_v_old); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_ThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_21__pyx_unpickle_ThreadInfo(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_21__pyx_unpickle_ThreadInfo = {"__pyx_unpickle_ThreadInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_21__pyx_unpickle_ThreadInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_21__pyx_unpickle_ThreadInfo(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_ThreadInfo (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ThreadInfo", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ThreadInfo", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_ThreadInfo") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ThreadInfo", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.__pyx_unpickle_ThreadInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_20__pyx_unpickle_ThreadInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_20__pyx_unpickle_ThreadInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ThreadInfo", 1); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xe535b68, 0xb8148ba, 0x0af4089): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe535b68, 0xb8148ba, 0x0af4089) = (_can_create_dummy_thread, additional_info, force_stay_in_untraced_mode, fully_initialized, inside_frame_eval, is_pydevd_thread, thread_trace_func))" % __pyx_checksum + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__6, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0xe535b68, 0xb8148ba, 0x0af4089): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe535b68, 0xb8148ba, 0x0af4089) = (_can_create_dummy_thread, additional_info, force_stay_in_untraced_mode, fully_initialized, inside_frame_eval, is_pydevd_thread, thread_trace_func))" % __pyx_checksum + * __pyx_result = ThreadInfo.__new__(__pyx_type) + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0xe535b68, 0xb8148ba, 0x0af4089): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe535b68, 0xb8148ba, 0x0af4089) = (_can_create_dummy_thread, additional_info, force_stay_in_untraced_mode, fully_initialized, inside_frame_eval, is_pydevd_thread, thread_trace_func))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = ThreadInfo.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xe535b68, 0xb8148ba, 0x0af4089): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe535b68, 0xb8148ba, 0x0af4089) = (_can_create_dummy_thread, additional_info, force_stay_in_untraced_mode, fully_initialized, inside_frame_eval, is_pydevd_thread, thread_trace_func))" % __pyx_checksum + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe535b68, 0xb8148ba, 0x0af4089) = (_can_create_dummy_thread, additional_info, force_stay_in_untraced_mode, fully_initialized, inside_frame_eval, is_pydevd_thread, thread_trace_func))" % __pyx_checksum + * __pyx_result = ThreadInfo.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_ThreadInfo__set_state( __pyx_result, __pyx_state) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe535b68, 0xb8148ba, 0x0af4089) = (_can_create_dummy_thread, additional_info, force_stay_in_untraced_mode, fully_initialized, inside_frame_eval, is_pydevd_thread, thread_trace_func))" % __pyx_checksum + * __pyx_result = ThreadInfo.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ThreadInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = ThreadInfo.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_ThreadInfo__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_ThreadInfo__set_state(ThreadInfo __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle_ThreadInfo__set_state(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe535b68, 0xb8148ba, 0x0af4089) = (_can_create_dummy_thread, additional_info, force_stay_in_untraced_mode, fully_initialized, inside_frame_eval, is_pydevd_thread, thread_trace_func))" % __pyx_checksum + * __pyx_result = ThreadInfo.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ThreadInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_ThreadInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_ThreadInfo__set_state(ThreadInfo __pyx_result, tuple __pyx_state): + * __pyx_result._can_create_dummy_thread = __pyx_state[0]; __pyx_result.additional_info = __pyx_state[1]; __pyx_result.force_stay_in_untraced_mode = __pyx_state[2]; __pyx_result.fully_initialized = __pyx_state[3]; __pyx_result.inside_frame_eval = __pyx_state[4]; __pyx_result.is_pydevd_thread = __pyx_state[5]; __pyx_result.thread_trace_func = __pyx_state[6] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_ThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.__pyx_unpickle_ThreadInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_ThreadInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ThreadInfo__set_state(ThreadInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._can_create_dummy_thread = __pyx_state[0]; __pyx_result.additional_info = __pyx_state[1]; __pyx_result.force_stay_in_untraced_mode = __pyx_state[2]; __pyx_result.fully_initialized = __pyx_state[3]; __pyx_result.inside_frame_eval = __pyx_state[4]; __pyx_result.is_pydevd_thread = __pyx_state[5]; __pyx_result.thread_trace_func = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle_ThreadInfo__set_state(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ThreadInfo__set_state", 1); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_ThreadInfo__set_state(ThreadInfo __pyx_result, tuple __pyx_state): + * __pyx_result._can_create_dummy_thread = __pyx_state[0]; __pyx_result.additional_info = __pyx_state[1]; __pyx_result.force_stay_in_untraced_mode = __pyx_state[2]; __pyx_result.fully_initialized = __pyx_state[3]; __pyx_result.inside_frame_eval = __pyx_state[4]; __pyx_result.is_pydevd_thread = __pyx_state[5]; __pyx_result.thread_trace_func = __pyx_state[6] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[7]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_can_create_dummy_thread = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->additional_info); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->additional_info); + __pyx_v___pyx_result->additional_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->force_stay_in_untraced_mode = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->fully_initialized = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->inside_frame_eval = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->is_pydevd_thread = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->thread_trace_func); + __Pyx_DECREF(__pyx_v___pyx_result->thread_trace_func); + __pyx_v___pyx_result->thread_trace_func = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_ThreadInfo__set_state(ThreadInfo __pyx_result, tuple __pyx_state): + * __pyx_result._can_create_dummy_thread = __pyx_state[0]; __pyx_result.additional_info = __pyx_state[1]; __pyx_result.force_stay_in_untraced_mode = __pyx_state[2]; __pyx_result.fully_initialized = __pyx_state[3]; __pyx_result.inside_frame_eval = __pyx_state[4]; __pyx_result.is_pydevd_thread = __pyx_state[5]; __pyx_result.thread_trace_func = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[7]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 13, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_4 > 7); + if (__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result._can_create_dummy_thread = __pyx_state[0]; __pyx_result.additional_info = __pyx_state[1]; __pyx_result.force_stay_in_untraced_mode = __pyx_state[2]; __pyx_result.fully_initialized = __pyx_state[3]; __pyx_result.inside_frame_eval = __pyx_state[4]; __pyx_result.is_pydevd_thread = __pyx_state[5]; __pyx_result.thread_trace_func = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[7]) # <<<<<<<<<<<<<< + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 14, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_ThreadInfo__set_state(ThreadInfo __pyx_result, tuple __pyx_state): + * __pyx_result._can_create_dummy_thread = __pyx_state[0]; __pyx_result.additional_info = __pyx_state[1]; __pyx_result.force_stay_in_untraced_mode = __pyx_state[2]; __pyx_result.fully_initialized = __pyx_state[3]; __pyx_result.inside_frame_eval = __pyx_state[4]; __pyx_result.is_pydevd_thread = __pyx_state[5]; __pyx_result.thread_trace_func = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[7]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_ThreadInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ThreadInfo__set_state(ThreadInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._can_create_dummy_thread = __pyx_state[0]; __pyx_result.additional_info = __pyx_state[1]; __pyx_result.force_stay_in_untraced_mode = __pyx_state[2]; __pyx_result.fully_initialized = __pyx_state[3]; __pyx_result.inside_frame_eval = __pyx_state[4]; __pyx_result.is_pydevd_thread = __pyx_state[5]; __pyx_result.thread_trace_func = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.__pyx_unpickle_ThreadInfo__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_FuncCodeInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_23__pyx_unpickle_FuncCodeInfo(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_23__pyx_unpickle_FuncCodeInfo = {"__pyx_unpickle_FuncCodeInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_23__pyx_unpickle_FuncCodeInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_23__pyx_unpickle_FuncCodeInfo(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_FuncCodeInfo (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FuncCodeInfo", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FuncCodeInfo", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_FuncCodeInfo") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FuncCodeInfo", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.__pyx_unpickle_FuncCodeInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_22__pyx_unpickle_FuncCodeInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_22__pyx_unpickle_FuncCodeInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_FuncCodeInfo", 1); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0x450d2d6, 0x956dcaa, 0xb3ee05d): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x450d2d6, 0x956dcaa, 0xb3ee05d) = (always_skip_code, breakpoint_found, breakpoints_mtime, canonical_normalized_filename, co_filename, co_name, new_code))" % __pyx_checksum + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__7, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0x450d2d6, 0x956dcaa, 0xb3ee05d): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x450d2d6, 0x956dcaa, 0xb3ee05d) = (always_skip_code, breakpoint_found, breakpoints_mtime, canonical_normalized_filename, co_filename, co_name, new_code))" % __pyx_checksum + * __pyx_result = FuncCodeInfo.__new__(__pyx_type) + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0x450d2d6, 0x956dcaa, 0xb3ee05d): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x450d2d6, 0x956dcaa, 0xb3ee05d) = (always_skip_code, breakpoint_found, breakpoints_mtime, canonical_normalized_filename, co_filename, co_name, new_code))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = FuncCodeInfo.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0x450d2d6, 0x956dcaa, 0xb3ee05d): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x450d2d6, 0x956dcaa, 0xb3ee05d) = (always_skip_code, breakpoint_found, breakpoints_mtime, canonical_normalized_filename, co_filename, co_name, new_code))" % __pyx_checksum + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x450d2d6, 0x956dcaa, 0xb3ee05d) = (always_skip_code, breakpoint_found, breakpoints_mtime, canonical_normalized_filename, co_filename, co_name, new_code))" % __pyx_checksum + * __pyx_result = FuncCodeInfo.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_FuncCodeInfo__set_state( __pyx_result, __pyx_state) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x450d2d6, 0x956dcaa, 0xb3ee05d) = (always_skip_code, breakpoint_found, breakpoints_mtime, canonical_normalized_filename, co_filename, co_name, new_code))" % __pyx_checksum + * __pyx_result = FuncCodeInfo.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_FuncCodeInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = FuncCodeInfo.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_FuncCodeInfo__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_FuncCodeInfo__set_state(FuncCodeInfo __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle_FuncCodeInfo__set_state(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x450d2d6, 0x956dcaa, 0xb3ee05d) = (always_skip_code, breakpoint_found, breakpoints_mtime, canonical_normalized_filename, co_filename, co_name, new_code))" % __pyx_checksum + * __pyx_result = FuncCodeInfo.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_FuncCodeInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_FuncCodeInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_FuncCodeInfo__set_state(FuncCodeInfo __pyx_result, tuple __pyx_state): + * __pyx_result.always_skip_code = __pyx_state[0]; __pyx_result.breakpoint_found = __pyx_state[1]; __pyx_result.breakpoints_mtime = __pyx_state[2]; __pyx_result.canonical_normalized_filename = __pyx_state[3]; __pyx_result.co_filename = __pyx_state[4]; __pyx_result.co_name = __pyx_state[5]; __pyx_result.new_code = __pyx_state[6] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_FuncCodeInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.__pyx_unpickle_FuncCodeInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_FuncCodeInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_FuncCodeInfo__set_state(FuncCodeInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.always_skip_code = __pyx_state[0]; __pyx_result.breakpoint_found = __pyx_state[1]; __pyx_result.breakpoints_mtime = __pyx_state[2]; __pyx_result.canonical_normalized_filename = __pyx_state[3]; __pyx_result.co_filename = __pyx_state[4]; __pyx_result.co_name = __pyx_state[5]; __pyx_result.new_code = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle_FuncCodeInfo__set_state(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_FuncCodeInfo__set_state", 1); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_FuncCodeInfo__set_state(FuncCodeInfo __pyx_result, tuple __pyx_state): + * __pyx_result.always_skip_code = __pyx_state[0]; __pyx_result.breakpoint_found = __pyx_state[1]; __pyx_result.breakpoints_mtime = __pyx_state[2]; __pyx_result.canonical_normalized_filename = __pyx_state[3]; __pyx_result.co_filename = __pyx_state[4]; __pyx_result.co_name = __pyx_state[5]; __pyx_result.new_code = __pyx_state[6] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[7]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->always_skip_code = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->breakpoint_found = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->breakpoints_mtime = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->canonical_normalized_filename); + __Pyx_DECREF(__pyx_v___pyx_result->canonical_normalized_filename); + __pyx_v___pyx_result->canonical_normalized_filename = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->co_filename); + __Pyx_DECREF(__pyx_v___pyx_result->co_filename); + __pyx_v___pyx_result->co_filename = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->co_name); + __Pyx_DECREF(__pyx_v___pyx_result->co_name); + __pyx_v___pyx_result->co_name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->new_code); + __Pyx_DECREF(__pyx_v___pyx_result->new_code); + __pyx_v___pyx_result->new_code = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_FuncCodeInfo__set_state(FuncCodeInfo __pyx_result, tuple __pyx_state): + * __pyx_result.always_skip_code = __pyx_state[0]; __pyx_result.breakpoint_found = __pyx_state[1]; __pyx_result.breakpoints_mtime = __pyx_state[2]; __pyx_result.canonical_normalized_filename = __pyx_state[3]; __pyx_result.co_filename = __pyx_state[4]; __pyx_result.co_name = __pyx_state[5]; __pyx_result.new_code = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[7]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 13, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_4 > 7); + if (__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result.always_skip_code = __pyx_state[0]; __pyx_result.breakpoint_found = __pyx_state[1]; __pyx_result.breakpoints_mtime = __pyx_state[2]; __pyx_result.canonical_normalized_filename = __pyx_state[3]; __pyx_result.co_filename = __pyx_state[4]; __pyx_result.co_name = __pyx_state[5]; __pyx_result.new_code = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[7]) # <<<<<<<<<<<<<< + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 14, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_FuncCodeInfo__set_state(FuncCodeInfo __pyx_result, tuple __pyx_state): + * __pyx_result.always_skip_code = __pyx_state[0]; __pyx_result.breakpoint_found = __pyx_state[1]; __pyx_result.breakpoints_mtime = __pyx_state[2]; __pyx_result.canonical_normalized_filename = __pyx_state[3]; __pyx_result.co_filename = __pyx_state[4]; __pyx_result.co_name = __pyx_state[5]; __pyx_result.new_code = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[7]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_FuncCodeInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_FuncCodeInfo__set_state(FuncCodeInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.always_skip_code = __pyx_state[0]; __pyx_result.breakpoint_found = __pyx_state[1]; __pyx_result.breakpoints_mtime = __pyx_state[2]; __pyx_result.canonical_normalized_filename = __pyx_state[3]; __pyx_result.co_filename = __pyx_state[4]; __pyx_result.co_name = __pyx_state[5]; __pyx_result.new_code = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.__pyx_unpickle_FuncCodeInfo__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle__CodeLineInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_25__pyx_unpickle__CodeLineInfo(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_25__pyx_unpickle__CodeLineInfo = {"__pyx_unpickle__CodeLineInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_25__pyx_unpickle__CodeLineInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_25__pyx_unpickle__CodeLineInfo(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle__CodeLineInfo (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__CodeLineInfo", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__CodeLineInfo", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle__CodeLineInfo") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__CodeLineInfo", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.__pyx_unpickle__CodeLineInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_24__pyx_unpickle__CodeLineInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_24__pyx_unpickle__CodeLineInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__CodeLineInfo", 1); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0x5a9bcd5, 0x0267473, 0x3fbbd02): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x5a9bcd5, 0x0267473, 0x3fbbd02) = (first_line, last_line, line_to_offset))" % __pyx_checksum + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__8, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0x5a9bcd5, 0x0267473, 0x3fbbd02): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x5a9bcd5, 0x0267473, 0x3fbbd02) = (first_line, last_line, line_to_offset))" % __pyx_checksum + * __pyx_result = _CodeLineInfo.__new__(__pyx_type) + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0x5a9bcd5, 0x0267473, 0x3fbbd02): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x5a9bcd5, 0x0267473, 0x3fbbd02) = (first_line, last_line, line_to_offset))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = _CodeLineInfo.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0x5a9bcd5, 0x0267473, 0x3fbbd02): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x5a9bcd5, 0x0267473, 0x3fbbd02) = (first_line, last_line, line_to_offset))" % __pyx_checksum + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x5a9bcd5, 0x0267473, 0x3fbbd02) = (first_line, last_line, line_to_offset))" % __pyx_checksum + * __pyx_result = _CodeLineInfo.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle__CodeLineInfo__set_state(<_CodeLineInfo> __pyx_result, __pyx_state) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x5a9bcd5, 0x0267473, 0x3fbbd02) = (first_line, last_line, line_to_offset))" % __pyx_checksum + * __pyx_result = _CodeLineInfo.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__CodeLineInfo__set_state(<_CodeLineInfo> __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = _CodeLineInfo.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle__CodeLineInfo__set_state(<_CodeLineInfo> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle__CodeLineInfo__set_state(_CodeLineInfo __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle__CodeLineInfo__set_state(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x5a9bcd5, 0x0267473, 0x3fbbd02) = (first_line, last_line, line_to_offset))" % __pyx_checksum + * __pyx_result = _CodeLineInfo.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__CodeLineInfo__set_state(<_CodeLineInfo> __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle__CodeLineInfo__set_state(<_CodeLineInfo> __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle__CodeLineInfo__set_state(_CodeLineInfo __pyx_result, tuple __pyx_state): + * __pyx_result.first_line = __pyx_state[0]; __pyx_result.last_line = __pyx_state[1]; __pyx_result.line_to_offset = __pyx_state[2] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle__CodeLineInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.__pyx_unpickle__CodeLineInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle__CodeLineInfo__set_state(<_CodeLineInfo> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__CodeLineInfo__set_state(_CodeLineInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.first_line = __pyx_state[0]; __pyx_result.last_line = __pyx_state[1]; __pyx_result.line_to_offset = __pyx_state[2] + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle__CodeLineInfo__set_state(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__CodeLineInfo__set_state", 1); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle__CodeLineInfo__set_state(_CodeLineInfo __pyx_result, tuple __pyx_state): + * __pyx_result.first_line = __pyx_state[0]; __pyx_result.last_line = __pyx_state[1]; __pyx_result.line_to_offset = __pyx_state[2] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[3]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->first_line = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->last_line = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->line_to_offset); + __Pyx_DECREF(__pyx_v___pyx_result->line_to_offset); + __pyx_v___pyx_result->line_to_offset = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__CodeLineInfo__set_state(_CodeLineInfo __pyx_result, tuple __pyx_state): + * __pyx_result.first_line = __pyx_state[0]; __pyx_result.last_line = __pyx_state[1]; __pyx_result.line_to_offset = __pyx_state[2] + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[3]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 13, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_4 > 3); + if (__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_3 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":14 + * __pyx_result.first_line = __pyx_state[0]; __pyx_result.last_line = __pyx_state[1]; __pyx_result.line_to_offset = __pyx_state[2] + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 14, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__CodeLineInfo__set_state(_CodeLineInfo __pyx_result, tuple __pyx_state): + * __pyx_result.first_line = __pyx_state[0]; __pyx_result.last_line = __pyx_state[1]; __pyx_result.line_to_offset = __pyx_state[2] + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[3]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle__CodeLineInfo__set_state(<_CodeLineInfo> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__CodeLineInfo__set_state(_CodeLineInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.first_line = __pyx_state[0]; __pyx_result.last_line = __pyx_state[1]; __pyx_result.line_to_offset = __pyx_state[2] + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.__pyx_unpickle__CodeLineInfo__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle__CacheValue(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_27__pyx_unpickle__CacheValue(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_27__pyx_unpickle__CacheValue = {"__pyx_unpickle__CacheValue", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_27__pyx_unpickle__CacheValue, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_27__pyx_unpickle__CacheValue(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle__CacheValue (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_MACROS + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + if (__pyx_kwds) { + Py_ssize_t kw_args; + switch (__pyx_nargs) { + case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); + switch (__pyx_nargs) { + case 0: + if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__CacheValue", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__CacheValue", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle__CacheValue") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__CacheValue", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.__pyx_unpickle__CacheValue", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_26__pyx_unpickle__CacheValue(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + { + Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); + } + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_26__pyx_unpickle__CacheValue(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__CacheValue", 1); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xac42a46, 0xedff7c3, 0x3d481b9): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xac42a46, 0xedff7c3, 0x3d481b9) = (breakpoints_hit_at_lines, code_line_info, code_lines_as_set, code_obj_py))" % __pyx_checksum + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__9, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0xac42a46, 0xedff7c3, 0x3d481b9): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xac42a46, 0xedff7c3, 0x3d481b9) = (breakpoints_hit_at_lines, code_line_info, code_lines_as_set, code_obj_py))" % __pyx_checksum + * __pyx_result = _CacheValue.__new__(__pyx_type) + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0xac42a46, 0xedff7c3, 0x3d481b9): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xac42a46, 0xedff7c3, 0x3d481b9) = (breakpoints_hit_at_lines, code_line_info, code_lines_as_set, code_obj_py))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = _CacheValue.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xac42a46, 0xedff7c3, 0x3d481b9): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xac42a46, 0xedff7c3, 0x3d481b9) = (breakpoints_hit_at_lines, code_line_info, code_lines_as_set, code_obj_py))" % __pyx_checksum + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xac42a46, 0xedff7c3, 0x3d481b9) = (breakpoints_hit_at_lines, code_line_info, code_lines_as_set, code_obj_py))" % __pyx_checksum + * __pyx_result = _CacheValue.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle__CacheValue__set_state(<_CacheValue> __pyx_result, __pyx_state) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xac42a46, 0xedff7c3, 0x3d481b9) = (breakpoints_hit_at_lines, code_line_info, code_lines_as_set, code_obj_py))" % __pyx_checksum + * __pyx_result = _CacheValue.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__CacheValue__set_state(<_CacheValue> __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = _CacheValue.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle__CacheValue__set_state(<_CacheValue> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle__CacheValue__set_state(_CacheValue __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle__CacheValue__set_state(((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xac42a46, 0xedff7c3, 0x3d481b9) = (breakpoints_hit_at_lines, code_line_info, code_lines_as_set, code_obj_py))" % __pyx_checksum + * __pyx_result = _CacheValue.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__CacheValue__set_state(<_CacheValue> __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle__CacheValue__set_state(<_CacheValue> __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle__CacheValue__set_state(_CacheValue __pyx_result, tuple __pyx_state): + * __pyx_result.breakpoints_hit_at_lines = __pyx_state[0]; __pyx_result.code_line_info = __pyx_state[1]; __pyx_result.code_lines_as_set = __pyx_state[2]; __pyx_result.code_obj_py = __pyx_state[3] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle__CacheValue(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.__pyx_unpickle__CacheValue", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle__CacheValue__set_state(<_CacheValue> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__CacheValue__set_state(_CacheValue __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.breakpoints_hit_at_lines = __pyx_state[0]; __pyx_result.code_line_info = __pyx_state[1]; __pyx_result.code_lines_as_set = __pyx_state[2]; __pyx_result.code_obj_py = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator___pyx_unpickle__CacheValue__set_state(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + unsigned int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__CacheValue__set_state", 1); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle__CacheValue__set_state(_CacheValue __pyx_result, tuple __pyx_state): + * __pyx_result.breakpoints_hit_at_lines = __pyx_state[0]; __pyx_result.code_line_info = __pyx_state[1]; __pyx_result.code_lines_as_set = __pyx_state[2]; __pyx_result.code_obj_py = __pyx_state[3] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->breakpoints_hit_at_lines); + __Pyx_DECREF(__pyx_v___pyx_result->breakpoints_hit_at_lines); + __pyx_v___pyx_result->breakpoints_hit_at_lines = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->code_line_info); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->code_line_info); + __pyx_v___pyx_result->code_line_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->code_lines_as_set); + __Pyx_DECREF(__pyx_v___pyx_result->code_lines_as_set); + __pyx_v___pyx_result->code_lines_as_set = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->code_obj_py); + __Pyx_DECREF(__pyx_v___pyx_result->code_obj_py); + __pyx_v___pyx_result->code_obj_py = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__CacheValue__set_state(_CacheValue __pyx_result, tuple __pyx_state): + * __pyx_result.breakpoints_hit_at_lines = __pyx_state[0]; __pyx_result.code_line_info = __pyx_state[1]; __pyx_result.code_lines_as_set = __pyx_state[2]; __pyx_result.code_obj_py = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 13, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_3 > 4); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result.breakpoints_hit_at_lines = __pyx_state[0]; __pyx_result.code_line_info = __pyx_state[1]; __pyx_result.code_lines_as_set = __pyx_state[2]; __pyx_result.code_obj_py = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 14, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__CacheValue__set_state(_CacheValue __pyx_result, tuple __pyx_state): + * __pyx_result.breakpoints_hit_at_lines = __pyx_state[0]; __pyx_result.code_line_info = __pyx_state[1]; __pyx_result.code_lines_as_set = __pyx_state[2]; __pyx_result.code_obj_py = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle__CacheValue__set_state(<_CacheValue> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__CacheValue__set_state(_CacheValue __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.breakpoints_hit_at_lines = __pyx_state[0]; __pyx_result.code_line_info = __pyx_state[1]; __pyx_result.code_lines_as_set = __pyx_state[2]; __pyx_result.code_obj_py = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("_pydevd_frame_eval.pydevd_frame_evaluator.__pyx_unpickle__CacheValue__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static struct __pyx_vtabstruct_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo __pyx_vtable_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo; + +static PyObject *__pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)o); + p->__pyx_vtab = __pyx_vtabptr_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo; + p->additional_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)Py_None); Py_INCREF(Py_None); + p->thread_trace_func = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo(PyObject *o) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *p = (struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->additional_info); + Py_CLEAR(p->thread_trace_func); + #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *p = (struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)o; + if (p->additional_info) { + e = (*v)(((PyObject *)p->additional_info), a); if (e) return e; + } + if (p->thread_trace_func) { + e = (*v)(p->thread_trace_func, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *p = (struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *)o; + tmp = ((PyObject*)p->additional_info); + p->additional_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->thread_trace_func); + p->thread_trace_func = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_additional_info(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_additional_info(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_3__set__(o, v); + } + else { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_15additional_info_5__del__(o); + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_is_pydevd_thread(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_16is_pydevd_thread_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_is_pydevd_thread(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_16is_pydevd_thread_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_inside_frame_eval(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17inside_frame_eval_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_inside_frame_eval(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17inside_frame_eval_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_fully_initialized(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17fully_initialized_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_fully_initialized(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17fully_initialized_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_thread_trace_func(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_thread_trace_func(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_3__set__(o, v); + } + else { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_17thread_trace_func_5__del__(o); + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_force_stay_in_untraced_mode(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_27force_stay_in_untraced_mode_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_force_stay_in_untraced_mode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_27force_stay_in_untraced_mode_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo[] = { + {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo[] = { + {(char *)"additional_info", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_additional_info, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_additional_info, (char *)0, 0}, + {(char *)"is_pydevd_thread", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_is_pydevd_thread, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_is_pydevd_thread, (char *)0, 0}, + {(char *)"inside_frame_eval", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_inside_frame_eval, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_inside_frame_eval, (char *)0, 0}, + {(char *)"fully_initialized", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_fully_initialized, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_fully_initialized, (char *)0, 0}, + {(char *)"thread_trace_func", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_thread_trace_func, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_thread_trace_func, (char *)0, 0}, + {(char *)"force_stay_in_untraced_mode", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_force_stay_in_untraced_mode, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_force_stay_in_untraced_mode, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo}, + {Py_tp_clear, (void *)__pyx_tp_clear_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo}, + {Py_tp_methods, (void *)__pyx_methods_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo}, + {Py_tp_getset, (void *)__pyx_getsets_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo}, + {Py_tp_new, (void *)__pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo}, + {0, 0}, +}; +static PyType_Spec __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo_spec = { + "_pydevd_frame_eval.pydevd_frame_evaluator.ThreadInfo", + sizeof(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo_slots, +}; +#else + +static PyTypeObject __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo = { + PyVarObject_HEAD_INIT(0, 0) + "_pydevd_frame_eval.pydevd_frame_evaluator.""ThreadInfo", /*tp_name*/ + sizeof(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo, /*tp_traverse*/ + __pyx_tp_clear_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)o); + p->co_filename = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->co_name = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->canonical_normalized_filename = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->new_code = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo(PyObject *o) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *p = (struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->co_filename); + Py_CLEAR(p->co_name); + Py_CLEAR(p->canonical_normalized_filename); + Py_CLEAR(p->new_code); + #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *p = (struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)o; + if (p->new_code) { + e = (*v)(p->new_code, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *p = (struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)o; + tmp = ((PyObject*)p->new_code); + p->new_code = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_co_filename(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_co_filename(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_3__set__(o, v); + } + else { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_11co_filename_5__del__(o); + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_co_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_co_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_3__set__(o, v); + } + else { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_7co_name_5__del__(o); + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_canonical_normalized_filename(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_canonical_normalized_filename(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_3__set__(o, v); + } + else { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_29canonical_normalized_filename_5__del__(o); + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_breakpoint_found(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_16breakpoint_found_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_breakpoint_found(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_16breakpoint_found_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_new_code(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_new_code(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_3__set__(o, v); + } + else { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_8new_code_5__del__(o); + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_breakpoints_mtime(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_17breakpoints_mtime_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_breakpoints_mtime(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_17breakpoints_mtime_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo[] = { + {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo[] = { + {(char *)"co_filename", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_co_filename, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_co_filename, (char *)0, 0}, + {(char *)"co_name", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_co_name, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_co_name, (char *)0, 0}, + {(char *)"canonical_normalized_filename", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_canonical_normalized_filename, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_canonical_normalized_filename, (char *)0, 0}, + {(char *)"breakpoint_found", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_breakpoint_found, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_breakpoint_found, (char *)0, 0}, + {(char *)"new_code", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_new_code, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_new_code, (char *)0, 0}, + {(char *)"breakpoints_mtime", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_breakpoints_mtime, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_breakpoints_mtime, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo}, + {Py_tp_clear, (void *)__pyx_tp_clear_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo}, + {Py_tp_methods, (void *)__pyx_methods_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo}, + {Py_tp_getset, (void *)__pyx_getsets_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo}, + {Py_tp_init, (void *)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo}, + {0, 0}, +}; +static PyType_Spec __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo_spec = { + "_pydevd_frame_eval.pydevd_frame_evaluator.FuncCodeInfo", + sizeof(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo_slots, +}; +#else + +static PyTypeObject __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo = { + PyVarObject_HEAD_INIT(0, 0) + "_pydevd_frame_eval.pydevd_frame_evaluator.""FuncCodeInfo", /*tp_name*/ + sizeof(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo, /*tp_traverse*/ + __pyx_tp_clear_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)o); + p->line_to_offset = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo(PyObject *o) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *p = (struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->line_to_offset); + #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *p = (struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)o; + if (p->line_to_offset) { + e = (*v)(p->line_to_offset, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *p = (struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)o; + tmp = ((PyObject*)p->line_to_offset); + p->line_to_offset = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_line_to_offset(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_line_to_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_3__set__(o, v); + } + else { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_14line_to_offset_5__del__(o); + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_first_line(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_10first_line_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_first_line(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_10first_line_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_last_line(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_9last_line_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_last_line(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_9last_line_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo[] = { + {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo[] = { + {(char *)"line_to_offset", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_line_to_offset, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_line_to_offset, (char *)0, 0}, + {(char *)"first_line", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_first_line, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_first_line, (char *)0, 0}, + {(char *)"last_line", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_last_line, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_last_line, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo}, + {Py_tp_clear, (void *)__pyx_tp_clear_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo}, + {Py_tp_methods, (void *)__pyx_methods_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo}, + {Py_tp_getset, (void *)__pyx_getsets_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo}, + {Py_tp_init, (void *)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo}, + {0, 0}, +}; +static PyType_Spec __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo_spec = { + "_pydevd_frame_eval.pydevd_frame_evaluator._CodeLineInfo", + sizeof(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo_slots, +}; +#else + +static PyTypeObject __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo = { + PyVarObject_HEAD_INIT(0, 0) + "_pydevd_frame_eval.pydevd_frame_evaluator.""_CodeLineInfo", /*tp_name*/ + sizeof(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo, /*tp_traverse*/ + __pyx_tp_clear_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue __pyx_vtable_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue; + +static PyObject *__pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)o); + p->__pyx_vtab = __pyx_vtabptr_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue; + p->code_obj_py = Py_None; Py_INCREF(Py_None); + p->code_line_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)Py_None); Py_INCREF(Py_None); + p->breakpoints_hit_at_lines = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->code_lines_as_set = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue(PyObject *o) { + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *p = (struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->code_obj_py); + Py_CLEAR(p->code_line_info); + Py_CLEAR(p->breakpoints_hit_at_lines); + Py_CLEAR(p->code_lines_as_set); + #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *p = (struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)o; + if (p->code_obj_py) { + e = (*v)(p->code_obj_py, a); if (e) return e; + } + if (p->code_line_info) { + e = (*v)(((PyObject *)p->code_line_info), a); if (e) return e; + } + if (p->breakpoints_hit_at_lines) { + e = (*v)(p->breakpoints_hit_at_lines, a); if (e) return e; + } + if (p->code_lines_as_set) { + e = (*v)(p->code_lines_as_set, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *p = (struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *)o; + tmp = ((PyObject*)p->code_obj_py); + p->code_obj_py = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->code_line_info); + p->code_line_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->breakpoints_hit_at_lines); + p->breakpoints_hit_at_lines = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->code_lines_as_set); + p->code_lines_as_set = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_code_obj_py(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_code_obj_py(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_3__set__(o, v); + } + else { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_11code_obj_py_5__del__(o); + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_code_line_info(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_code_line_info(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_3__set__(o, v); + } + else { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_14code_line_info_5__del__(o); + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_breakpoints_hit_at_lines(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_breakpoints_hit_at_lines(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_3__set__(o, v); + } + else { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_24breakpoints_hit_at_lines_5__del__(o); + } +} + +static PyObject *__pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_code_lines_as_set(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_1__get__(o); +} + +static int __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_code_lines_as_set(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_3__set__(o, v); + } + else { + return __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_17code_lines_as_set_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue[] = { + {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue[] = { + {(char *)"code_obj_py", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_code_obj_py, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_code_obj_py, (char *)0, 0}, + {(char *)"code_line_info", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_code_line_info, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_code_line_info, (char *)0, 0}, + {(char *)"breakpoints_hit_at_lines", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_breakpoints_hit_at_lines, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_breakpoints_hit_at_lines, (char *)0, 0}, + {(char *)"code_lines_as_set", __pyx_getprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_code_lines_as_set, __pyx_setprop_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_code_lines_as_set, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue}, + {Py_tp_clear, (void *)__pyx_tp_clear_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue}, + {Py_tp_methods, (void *)__pyx_methods_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue}, + {Py_tp_getset, (void *)__pyx_getsets_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue}, + {Py_tp_init, (void *)__pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue}, + {0, 0}, +}; +static PyType_Spec __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue_spec = { + "_pydevd_frame_eval.pydevd_frame_evaluator._CacheValue", + sizeof(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue_slots, +}; +#else + +static PyTypeObject __pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue = { + PyVarObject_HEAD_INIT(0, 0) + "_pydevd_frame_eval.pydevd_frame_evaluator.""_CacheValue", /*tp_name*/ + sizeof(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue, /*tp_traverse*/ + __pyx_tp_clear_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif +/* #### Code section: pystring_table ### */ + +static int __Pyx_CreateStringTabAndInitStrings(void) { + __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0}, + {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1}, + {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, + {&__pyx_n_s_CacheValue, __pyx_k_CacheValue, sizeof(__pyx_k_CacheValue), 0, 0, 1, 1}, + {&__pyx_n_s_CacheValue___reduce_cython, __pyx_k_CacheValue___reduce_cython, sizeof(__pyx_k_CacheValue___reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_CacheValue___setstate_cython, __pyx_k_CacheValue___setstate_cython, sizeof(__pyx_k_CacheValue___setstate_cython), 0, 0, 1, 1}, + {&__pyx_n_s_CacheValue_compute_force_stay_i, __pyx_k_CacheValue_compute_force_stay_i, sizeof(__pyx_k_CacheValue_compute_force_stay_i), 0, 0, 1, 1}, + {&__pyx_n_s_CodeLineInfo, __pyx_k_CodeLineInfo, sizeof(__pyx_k_CodeLineInfo), 0, 0, 1, 1}, + {&__pyx_n_s_CodeLineInfo___reduce_cython, __pyx_k_CodeLineInfo___reduce_cython, sizeof(__pyx_k_CodeLineInfo___reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_CodeLineInfo___setstate_cython, __pyx_k_CodeLineInfo___setstate_cython, sizeof(__pyx_k_CodeLineInfo___setstate_cython), 0, 0, 1, 1}, + {&__pyx_n_s_DebugHelper, __pyx_k_DebugHelper, sizeof(__pyx_k_DebugHelper), 0, 0, 1, 1}, + {&__pyx_n_s_FuncCodeInfo, __pyx_k_FuncCodeInfo, sizeof(__pyx_k_FuncCodeInfo), 0, 0, 1, 1}, + {&__pyx_n_s_FuncCodeInfo___reduce_cython, __pyx_k_FuncCodeInfo___reduce_cython, sizeof(__pyx_k_FuncCodeInfo___reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_FuncCodeInfo___setstate_cython, __pyx_k_FuncCodeInfo___setstate_cython, sizeof(__pyx_k_FuncCodeInfo___setstate_cython), 0, 0, 1, 1}, + {&__pyx_n_s_GlobalDebuggerHolder, __pyx_k_GlobalDebuggerHolder, sizeof(__pyx_k_GlobalDebuggerHolder), 0, 0, 1, 1}, + {&__pyx_kp_s_If_a_code_object_is_cached_that, __pyx_k_If_a_code_object_is_cached_that, sizeof(__pyx_k_If_a_code_object_is_cached_that), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_k_Incompatible_checksums_0x_x_vs_0_2, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_2), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_k_Incompatible_checksums_0x_x_vs_0_3, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_3), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_k_Incompatible_checksums_0x_x_vs_0_4, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_4), 0, 0, 1, 0}, + {&__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER, __pyx_k_NORM_PATHS_AND_BASE_CONTAINER, sizeof(__pyx_k_NORM_PATHS_AND_BASE_CONTAINER), 0, 0, 1, 1}, + {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, + {&__pyx_n_s_SetTrace, __pyx_k_SetTrace, sizeof(__pyx_k_SetTrace), 0, 0, 1, 1}, + {&__pyx_n_s_ThreadInfo, __pyx_k_ThreadInfo, sizeof(__pyx_k_ThreadInfo), 0, 0, 1, 1}, + {&__pyx_n_s_ThreadInfo___reduce_cython, __pyx_k_ThreadInfo___reduce_cython, sizeof(__pyx_k_ThreadInfo___reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_ThreadInfo___setstate_cython, __pyx_k_ThreadInfo___setstate_cython, sizeof(__pyx_k_ThreadInfo___setstate_cython), 0, 0, 1, 1}, + {&__pyx_n_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 1}, + {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0}, + {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0}, + {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0}, + {&__pyx_n_s__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 0, 1, 1}, + {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0}, + {&__pyx_n_s_active, __pyx_k_active, sizeof(__pyx_k_active), 0, 0, 1, 1}, + {&__pyx_n_s_additional_info, __pyx_k_additional_info, sizeof(__pyx_k_additional_info), 0, 0, 1, 1}, + {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1}, + {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, + {&__pyx_n_s_bootstrap, __pyx_k_bootstrap, sizeof(__pyx_k_bootstrap), 0, 0, 1, 1}, + {&__pyx_n_s_bootstrap_2, __pyx_k_bootstrap_2, sizeof(__pyx_k_bootstrap_2), 0, 0, 1, 1}, + {&__pyx_n_s_bootstrap_inner, __pyx_k_bootstrap_inner, sizeof(__pyx_k_bootstrap_inner), 0, 0, 1, 1}, + {&__pyx_n_s_bootstrap_inner_2, __pyx_k_bootstrap_inner_2, sizeof(__pyx_k_bootstrap_inner_2), 0, 0, 1, 1}, + {&__pyx_n_s_break_on_caught_exceptions, __pyx_k_break_on_caught_exceptions, sizeof(__pyx_k_break_on_caught_exceptions), 0, 0, 1, 1}, + {&__pyx_n_s_break_on_user_uncaught_exception, __pyx_k_break_on_user_uncaught_exception, sizeof(__pyx_k_break_on_user_uncaught_exception), 0, 0, 1, 1}, + {&__pyx_n_s_breakpoints, __pyx_k_breakpoints, sizeof(__pyx_k_breakpoints), 0, 0, 1, 1}, + {&__pyx_n_s_breakpoints_hit_at_lines, __pyx_k_breakpoints_hit_at_lines, sizeof(__pyx_k_breakpoints_hit_at_lines), 0, 0, 1, 1}, + {&__pyx_n_s_cache, __pyx_k_cache, sizeof(__pyx_k_cache), 0, 0, 1, 1}, + {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1}, + {&__pyx_n_s_call_2, __pyx_k_call_2, sizeof(__pyx_k_call_2), 0, 0, 1, 1}, + {&__pyx_n_s_can_skip, __pyx_k_can_skip, sizeof(__pyx_k_can_skip), 0, 0, 1, 1}, + {&__pyx_n_s_clear_thread_local_info, __pyx_k_clear_thread_local_info, sizeof(__pyx_k_clear_thread_local_info), 0, 0, 1, 1}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, + {&__pyx_n_s_code_line_info, __pyx_k_code_line_info, sizeof(__pyx_k_code_line_info), 0, 0, 1, 1}, + {&__pyx_n_s_code_obj, __pyx_k_code_obj, sizeof(__pyx_k_code_obj), 0, 0, 1, 1}, + {&__pyx_n_s_code_obj_py, __pyx_k_code_obj_py, sizeof(__pyx_k_code_obj_py), 0, 0, 1, 1}, + {&__pyx_n_s_compute_force_stay_in_untraced_m, __pyx_k_compute_force_stay_in_untraced_m, sizeof(__pyx_k_compute_force_stay_in_untraced_m), 0, 0, 1, 1}, + {&__pyx_n_s_current_thread, __pyx_k_current_thread, sizeof(__pyx_k_current_thread), 0, 0, 1, 1}, + {&__pyx_n_s_decref_py, __pyx_k_decref_py, sizeof(__pyx_k_decref_py), 0, 0, 1, 1}, + {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, + {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1}, + {&__pyx_n_s_dis, __pyx_k_dis, sizeof(__pyx_k_dis), 0, 0, 1, 1}, + {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0}, + {&__pyx_n_s_dummy_trace_dispatch, __pyx_k_dummy_trace_dispatch, sizeof(__pyx_k_dummy_trace_dispatch), 0, 0, 1, 1}, + {&__pyx_n_s_dummy_tracing_holder, __pyx_k_dummy_tracing_holder, sizeof(__pyx_k_dummy_tracing_holder), 0, 0, 1, 1}, + {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0}, + {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, + {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1}, + {&__pyx_n_s_exec, __pyx_k_exec, sizeof(__pyx_k_exec), 0, 0, 1, 1}, + {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, + {&__pyx_n_s_f_back, __pyx_k_f_back, sizeof(__pyx_k_f_back), 0, 0, 1, 1}, + {&__pyx_n_s_f_trace, __pyx_k_f_trace, sizeof(__pyx_k_f_trace), 0, 0, 1, 1}, + {&__pyx_n_s_findlinestarts, __pyx_k_findlinestarts, sizeof(__pyx_k_findlinestarts), 0, 0, 1, 1}, + {&__pyx_n_s_first_line, __pyx_k_first_line, sizeof(__pyx_k_first_line), 0, 0, 1, 1}, + {&__pyx_n_s_fix_top_level_trace_and_get_trac, __pyx_k_fix_top_level_trace_and_get_trac, sizeof(__pyx_k_fix_top_level_trace_and_get_trac), 0, 0, 1, 1}, + {&__pyx_n_s_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 0, 1, 1}, + {&__pyx_n_s_frame_eval_func, __pyx_k_frame_eval_func, sizeof(__pyx_k_frame_eval_func), 0, 0, 1, 1}, + {&__pyx_n_s_function_breakpoint_name_to_brea, __pyx_k_function_breakpoint_name_to_brea, sizeof(__pyx_k_function_breakpoint_name_to_brea), 0, 0, 1, 1}, + {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0}, + {&__pyx_n_s_generate_code_with_breakpoints_p, __pyx_k_generate_code_with_breakpoints_p, sizeof(__pyx_k_generate_code_with_breakpoints_p), 0, 0, 1, 1}, + {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, + {&__pyx_n_s_get_abs_path_real_path_and_base, __pyx_k_get_abs_path_real_path_and_base, sizeof(__pyx_k_get_abs_path_real_path_and_base), 0, 0, 1, 1}, + {&__pyx_n_s_get_cache_file_type, __pyx_k_get_cache_file_type, sizeof(__pyx_k_get_cache_file_type), 0, 0, 1, 1}, + {&__pyx_n_s_get_cached_code_obj_info_py, __pyx_k_get_cached_code_obj_info_py, sizeof(__pyx_k_get_cached_code_obj_info_py), 0, 0, 1, 1}, + {&__pyx_n_s_get_code_line_info, __pyx_k_get_code_line_info, sizeof(__pyx_k_get_code_line_info), 0, 0, 1, 1}, + {&__pyx_n_s_get_file_type, __pyx_k_get_file_type, sizeof(__pyx_k_get_file_type), 0, 0, 1, 1}, + {&__pyx_n_s_get_func_code_info_py, __pyx_k_get_func_code_info_py, sizeof(__pyx_k_get_func_code_info_py), 0, 0, 1, 1}, + {&__pyx_n_s_get_ident, __pyx_k_get_ident, sizeof(__pyx_k_get_ident), 0, 0, 1, 1}, + {&__pyx_n_s_get_ident_2, __pyx_k_get_ident_2, sizeof(__pyx_k_get_ident_2), 0, 0, 1, 1}, + {&__pyx_n_s_get_thread_info_py, __pyx_k_get_thread_info_py, sizeof(__pyx_k_get_thread_info_py), 0, 0, 1, 1}, + {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, + {&__pyx_n_s_global_dbg, __pyx_k_global_dbg, sizeof(__pyx_k_global_dbg), 0, 0, 1, 1}, + {&__pyx_n_s_has_plugin_exception_breaks, __pyx_k_has_plugin_exception_breaks, sizeof(__pyx_k_has_plugin_exception_breaks), 0, 0, 1, 1}, + {&__pyx_n_s_has_plugin_line_breaks, __pyx_k_has_plugin_line_breaks, sizeof(__pyx_k_has_plugin_line_breaks), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1}, + {&__pyx_n_s_insert_pydevd_breaks, __pyx_k_insert_pydevd_breaks, sizeof(__pyx_k_insert_pydevd_breaks), 0, 0, 1, 1}, + {&__pyx_n_s_intersection, __pyx_k_intersection, sizeof(__pyx_k_intersection), 0, 0, 1, 1}, + {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, + {&__pyx_n_s_is_pydev_daemon_thread, __pyx_k_is_pydev_daemon_thread, sizeof(__pyx_k_is_pydev_daemon_thread), 0, 0, 1, 1}, + {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, + {&__pyx_n_s_issuperset, __pyx_k_issuperset, sizeof(__pyx_k_issuperset), 0, 0, 1, 1}, + {&__pyx_n_s_last_line, __pyx_k_last_line, sizeof(__pyx_k_last_line), 0, 0, 1, 1}, + {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1}, + {&__pyx_n_s_line_to_offset, __pyx_k_line_to_offset, sizeof(__pyx_k_line_to_offset), 0, 0, 1, 1}, + {&__pyx_n_s_local, __pyx_k_local, sizeof(__pyx_k_local), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_main_2, __pyx_k_main_2, sizeof(__pyx_k_main_2), 0, 0, 1, 1}, + {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1}, + {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1}, + {&__pyx_n_s_mtime, __pyx_k_mtime, sizeof(__pyx_k_mtime), 0, 0, 1, 1}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, + {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, + {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1}, + {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, + {&__pyx_n_s_plugin, __pyx_k_plugin, sizeof(__pyx_k_plugin), 0, 0, 1, 1}, + {&__pyx_n_s_pydev_bundle__pydev_saved_modul, __pyx_k_pydev_bundle__pydev_saved_modul, sizeof(__pyx_k_pydev_bundle__pydev_saved_modul), 0, 0, 1, 1}, + {&__pyx_n_s_pydev_monkey, __pyx_k_pydev_monkey, sizeof(__pyx_k_pydev_monkey), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd, __pyx_k_pydevd, sizeof(__pyx_k_pydevd), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_bundle_pydevd_additional, __pyx_k_pydevd_bundle_pydevd_additional, sizeof(__pyx_k_pydevd_bundle_pydevd_additional), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_k_pydevd_bundle_pydevd_constants, sizeof(__pyx_k_pydevd_bundle_pydevd_constants), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_bundle_pydevd_trace_disp, __pyx_k_pydevd_bundle_pydevd_trace_disp, sizeof(__pyx_k_pydevd_bundle_pydevd_trace_disp), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_file_utils, __pyx_k_pydevd_file_utils, sizeof(__pyx_k_pydevd_file_utils), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_frame_eval_pydevd_frame, __pyx_k_pydevd_frame_eval_pydevd_frame, sizeof(__pyx_k_pydevd_frame_eval_pydevd_frame), 0, 0, 1, 1}, + {&__pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_k_pydevd_frame_eval_pydevd_frame_2, sizeof(__pyx_k_pydevd_frame_eval_pydevd_frame_2), 0, 0, 1, 0}, + {&__pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_k_pydevd_frame_eval_pydevd_frame_3, sizeof(__pyx_k_pydevd_frame_eval_pydevd_frame_3), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_frame_eval_pydevd_modify, __pyx_k_pydevd_frame_eval_pydevd_modify, sizeof(__pyx_k_pydevd_frame_eval_pydevd_modify), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_tracing, __pyx_k_pydevd_tracing, sizeof(__pyx_k_pydevd_tracing), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_FuncCodeInfo, __pyx_k_pyx_unpickle_FuncCodeInfo, sizeof(__pyx_k_pyx_unpickle_FuncCodeInfo), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_ThreadInfo, __pyx_k_pyx_unpickle_ThreadInfo, sizeof(__pyx_k_pyx_unpickle_ThreadInfo), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle__CacheValue, __pyx_k_pyx_unpickle__CacheValue, sizeof(__pyx_k_pyx_unpickle__CacheValue), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle__CodeLineInfo, __pyx_k_pyx_unpickle__CodeLineInfo, sizeof(__pyx_k_pyx_unpickle__CodeLineInfo), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, + {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, + {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1}, + {&__pyx_n_s_rfind, __pyx_k_rfind, sizeof(__pyx_k_rfind), 0, 0, 1, 1}, + {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1}, + {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, + {&__pyx_n_s_set_additional_thread_info_lock, __pyx_k_set_additional_thread_info_lock, sizeof(__pyx_k_set_additional_thread_info_lock), 0, 0, 1, 1}, + {&__pyx_n_s_set_trace_func, __pyx_k_set_trace_func, sizeof(__pyx_k_set_trace_func), 0, 0, 1, 1}, + {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, + {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, + {&__pyx_n_s_show_return_values, __pyx_k_show_return_values, sizeof(__pyx_k_show_return_values), 0, 0, 1, 1}, + {&__pyx_n_s_signature_factory, __pyx_k_signature_factory, sizeof(__pyx_k_signature_factory), 0, 0, 1, 1}, + {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, + {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, + {&__pyx_n_s_stop_frame_eval, __pyx_k_stop_frame_eval, sizeof(__pyx_k_stop_frame_eval), 0, 0, 1, 1}, + {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, + {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_thread, __pyx_k_thread, sizeof(__pyx_k_thread), 0, 0, 1, 1}, + {&__pyx_n_s_thread_active, __pyx_k_thread_active, sizeof(__pyx_k_thread_active), 0, 0, 1, 1}, + {&__pyx_n_s_thread_info, __pyx_k_thread_info, sizeof(__pyx_k_thread_info), 0, 0, 1, 1}, + {&__pyx_n_s_thread_local_info, __pyx_k_thread_local_info, sizeof(__pyx_k_thread_local_info), 0, 0, 1, 1}, + {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1}, + {&__pyx_n_s_trace_dispatch, __pyx_k_trace_dispatch, sizeof(__pyx_k_trace_dispatch), 0, 0, 1, 1}, + {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, + {&__pyx_n_s_update_globals_dict, __pyx_k_update_globals_dict, sizeof(__pyx_k_update_globals_dict), 0, 0, 1, 1}, + {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1}, + {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} + }; + return __Pyx_InitStrings(__pyx_string_tab); +} +/* #### Code section: cached_builtins ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) __PYX_ERR(0, 341, __pyx_L1_error) + __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 342, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":112 + * raise AttributeError() + * except: + * with _set_additional_thread_info_lock: # <<<<<<<<<<<<<< + * # If it's not there, set it within a lock to avoid any racing + * # conditions. + */ + __pyx_tuple__4 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xe535b68, 0xb8148ba, 0x0af4089): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe535b68, 0xb8148ba, 0x0af4089) = (_can_create_dummy_thread, additional_info, force_stay_in_untraced_mode, fully_initialized, inside_frame_eval, is_pydevd_thread, thread_trace_func))" % __pyx_checksum + */ + __pyx_tuple__6 = PyTuple_Pack(3, __pyx_int_240343912, __pyx_int_193022138, __pyx_int_11485321); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); + __pyx_tuple__7 = PyTuple_Pack(3, __pyx_int_72405718, __pyx_int_156687530, __pyx_int_188670045); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); + __pyx_tuple__8 = PyTuple_Pack(3, __pyx_int_95010005, __pyx_int_2520179, __pyx_int_66829570); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); + __pyx_tuple__9 = PyTuple_Pack(3, __pyx_int_180628038, __pyx_int_249558979, __pyx_int_64258489); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":19 + * _thread_active = threading._active + * + * def clear_thread_local_info(): # <<<<<<<<<<<<<< + * global _thread_local_info + * _thread_local_info = threading.local() + */ + __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_clear_thread_local_info, 19, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 19, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_tuple__12 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); + __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(1, 1, __pyx_L1_error) + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ThreadInfo, (type(self), 0xe535b68, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ThreadInfo__set_state(self, __pyx_state) + */ + __pyx_tuple__14 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(1, 16, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(1, 1, __pyx_L1_error) + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FuncCodeInfo, (type(self), 0x450d2d6, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FuncCodeInfo__set_state(self, __pyx_state) + */ + __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(1, 16, __pyx_L1_error) + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":152 + * + * + * def dummy_trace_dispatch(frame, str event, arg): # <<<<<<<<<<<<<< + * if event == 'call': + * if frame.f_trace is not None: + */ + __pyx_tuple__18 = PyTuple_Pack(3, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); + __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_dummy_trace_dispatch, 152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 152, __pyx_L1_error) + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":159 + * + * + * def get_thread_info_py() -> ThreadInfo: # <<<<<<<<<<<<<< + * return get_thread_info(PyEval_GetFrame()) + * + */ + __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_get_thread_info_py, 159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 159, __pyx_L1_error) + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":196 + * + * + * def decref_py(obj): # <<<<<<<<<<<<<< + * ''' + * Helper to be called from Python. + */ + __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); + __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_decref_py, 196, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 196, __pyx_L1_error) + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":203 + * + * + * def get_func_code_info_py(thread_info, frame, code_obj) -> FuncCodeInfo: # <<<<<<<<<<<<<< + * ''' + * Helper to be called from Python. + */ + __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_thread_info, __pyx_n_s_frame, __pyx_n_s_code_obj); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__23); + __Pyx_GIVEREF(__pyx_tuple__23); + __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_get_func_code_info_py, 203, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 203, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(1, 1, __pyx_L1_error) + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__CodeLineInfo, (type(self), 0x5a9bcd5, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__CodeLineInfo__set_state(self, __pyx_state) + */ + __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(1, 16, __pyx_L1_error) + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":329 + * + * # Note: this method has a version in pure-python too. + * def _get_code_line_info(code_obj): # <<<<<<<<<<<<<< + * line_to_offset: dict = {} + * first_line: int = None + */ + __pyx_tuple__27 = PyTuple_Pack(6, __pyx_n_s_code_obj, __pyx_n_s_line_to_offset, __pyx_n_s_first_line, __pyx_n_s_last_line, __pyx_n_s_offset, __pyx_n_s_line); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__27); + __Pyx_GIVEREF(__pyx_tuple__27); + __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_get_code_line_info, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 329, __pyx_L1_error) + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":353 + * _cache: dict = {} + * + * def get_cached_code_obj_info_py(code_obj_py): # <<<<<<<<<<<<<< + * ''' + * :return _CacheValue: + */ + __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_code_obj_py); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); + __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_get_cached_code_obj_info_py, 353, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 353, __pyx_L1_error) + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":379 + * self.code_lines_as_set = set(code_line_info.line_to_offset) + * + * cpdef compute_force_stay_in_untraced_mode(self, breakpoints): # <<<<<<<<<<<<<< + * ''' + * :param breakpoints: + */ + __pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_breakpoints); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); + __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_compute_force_stay_in_untraced_m, 379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 379, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 1, __pyx_L1_error) + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__CacheValue, (type(self), 0xac42a46, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__CacheValue__set_state(self, __pyx_state) + */ + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(1, 16, __pyx_L1_error) + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":401 + * return breakpoint_found, force_stay_in_untraced_mode + * + * def generate_code_with_breakpoints_py(object code_obj_py, dict breakpoints): # <<<<<<<<<<<<<< + * return generate_code_with_breakpoints(code_obj_py, breakpoints) + * + */ + __pyx_tuple__35 = PyTuple_Pack(2, __pyx_n_s_code_obj_py, __pyx_n_s_breakpoints); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__35); + __Pyx_GIVEREF(__pyx_tuple__35); + __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_generate_code_with_breakpoints_p, 401, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 401, __pyx_L1_error) + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":473 + * import sys + * + * cdef bint IS_PY_39_OWNARDS = sys.version_info[:2] >= (3, 9) # <<<<<<<<<<<<<< + * + * def frame_eval_func(): + */ + __pyx_slice__37 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__37)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__37); + __Pyx_GIVEREF(__pyx_slice__37); + __pyx_tuple__38 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_9); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__38); + __Pyx_GIVEREF(__pyx_tuple__38); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":475 + * cdef bint IS_PY_39_OWNARDS = sys.version_info[:2] >= (3, 9) + * + * def frame_eval_func(): # <<<<<<<<<<<<<< + * cdef PyThreadState *state = PyThreadState_Get() + * if IS_PY_39_OWNARDS: + */ + __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__39); + __Pyx_GIVEREF(__pyx_tuple__39); + __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_frame_eval_func, 475, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 475, __pyx_L1_error) + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":484 + * + * + * def stop_frame_eval(): # <<<<<<<<<<<<<< + * cdef PyThreadState *state = PyThreadState_Get() + * state.interp.eval_frame = _PyEval_EvalFrameDefault + */ + __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_stop_frame_eval, 484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 484, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __pyx_unpickle_ThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_tuple__42 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__42); + __Pyx_GIVEREF(__pyx_tuple__42); + __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ThreadInfo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FuncCodeInfo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__CodeLineInfo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__CacheValue, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) { + if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_2520179 = PyInt_FromLong(2520179L); if (unlikely(!__pyx_int_2520179)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_11485321 = PyInt_FromLong(11485321L); if (unlikely(!__pyx_int_11485321)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_64258489 = PyInt_FromLong(64258489L); if (unlikely(!__pyx_int_64258489)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_66829570 = PyInt_FromLong(66829570L); if (unlikely(!__pyx_int_66829570)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_72405718 = PyInt_FromLong(72405718L); if (unlikely(!__pyx_int_72405718)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_95010005 = PyInt_FromLong(95010005L); if (unlikely(!__pyx_int_95010005)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_156687530 = PyInt_FromLong(156687530L); if (unlikely(!__pyx_int_156687530)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_180628038 = PyInt_FromLong(180628038L); if (unlikely(!__pyx_int_180628038)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_188670045 = PyInt_FromLong(188670045L); if (unlikely(!__pyx_int_188670045)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_193022138 = PyInt_FromLong(193022138L); if (unlikely(!__pyx_int_193022138)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_240343912 = PyInt_FromLong(240343912L); if (unlikely(!__pyx_int_240343912)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_249558979 = PyInt_FromLong(249558979L); if (unlikely(!__pyx_int_249558979)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_globals ### */ + +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_module ### */ + +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ + +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo = &__pyx_vtable_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo; + __pyx_vtable_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo.initialize = (PyObject *(*)(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *, PyFrameObject *))__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_initialize; + __pyx_vtable_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo.initialize_if_possible = (PyObject *(*)(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo *))__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_initialize_if_possible; + #if CYTHON_USE_TYPE_SPECS + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo_spec, NULL); if (unlikely(!__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo)) __PYX_ERR(0, 24, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo_spec, __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + #else + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo = &__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + #endif + #if PY_MAJOR_VERSION < 3 + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo->tp_print = 0; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo->tp_dictoffset && __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo->tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo, __pyx_vtabptr_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_MergeVtables(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ThreadInfo, (PyObject *) __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo_spec, NULL); if (unlikely(!__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo)) __PYX_ERR(0, 125, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo_spec, __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo) < 0) __PYX_ERR(0, 125, __pyx_L1_error) + #else + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo = &__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo) < 0) __PYX_ERR(0, 125, __pyx_L1_error) + #endif + #if PY_MAJOR_VERSION < 3 + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo->tp_print = 0; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo->tp_dictoffset && __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo->tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FuncCodeInfo, (PyObject *) __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo) < 0) __PYX_ERR(0, 125, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo) < 0) __PYX_ERR(0, 125, __pyx_L1_error) + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo_spec, NULL); if (unlikely(!__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo)) __PYX_ERR(0, 316, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo_spec, __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo) < 0) __PYX_ERR(0, 316, __pyx_L1_error) + #else + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo = &__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo) < 0) __PYX_ERR(0, 316, __pyx_L1_error) + #endif + #if PY_MAJOR_VERSION < 3 + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo->tp_print = 0; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo->tp_dictoffset && __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo->tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CodeLineInfo, (PyObject *) __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo) < 0) __PYX_ERR(0, 316, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo) < 0) __PYX_ERR(0, 316, __pyx_L1_error) + #endif + __pyx_vtabptr_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue = &__pyx_vtable_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue; + __pyx_vtable_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue.compute_force_stay_in_untraced_mode = (PyObject *(*)(struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue *, PyObject *, int __pyx_skip_dispatch))__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_compute_force_stay_in_untraced_mode; + #if CYTHON_USE_TYPE_SPECS + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue_spec, NULL); if (unlikely(!__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue)) __PYX_ERR(0, 361, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue_spec, __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue) < 0) __PYX_ERR(0, 361, __pyx_L1_error) + #else + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue = &__pyx_type_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue) < 0) __PYX_ERR(0, 361, __pyx_L1_error) + #endif + #if PY_MAJOR_VERSION < 3 + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue->tp_print = 0; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue->tp_dictoffset && __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue->tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + #endif + #if CYTHON_UPDATE_DESCRIPTOR_DOC + { + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 361, __pyx_L1_error) + if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { + __pyx_wrapperbase_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue___init__.doc = __pyx_doc_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue___init__; + } + } + #endif + if (__Pyx_SetVtable(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue, __pyx_vtabptr_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue) < 0) __PYX_ERR(0, 361, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_MergeVtables(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue) < 0) __PYX_ERR(0, 361, __pyx_L1_error) + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CacheValue, (PyObject *) __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue) < 0) __PYX_ERR(0, 361, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue) < 0) __PYX_ERR(0, 361, __pyx_L1_error) + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(void) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule("_pydevd_bundle.pydevd_cython"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo = __Pyx_ImportType_3_0_11(__pyx_t_1, "_pydevd_bundle.pydevd_cython", "PyDBAdditionalThreadInfo", sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo = (struct __pyx_vtabstruct_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo*)__Pyx_GetVtable(__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo); if (unlikely(!__pyx_vtabptr_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + + +#if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_pydevd_frame_evaluator(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_pydevd_frame_evaluator}, + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "pydevd_frame_evaluator", + 0, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #elif CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstate), /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif +#endif + +#ifndef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void +#endif +#else +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyObject * +#endif +#endif + + +#if PY_MAJOR_VERSION < 3 +__Pyx_PyMODINIT_FUNC initpydevd_frame_evaluator(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initpydevd_frame_evaluator(void) +#else +__Pyx_PyMODINIT_FUNC PyInit_pydevd_frame_evaluator(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_pydevd_frame_evaluator(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) +#else +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +#endif +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { +#if CYTHON_COMPILING_IN_LIMITED_API + result = PyModule_AddObject(module, to_name, value); +#else + result = PyDict_SetItemString(moddict, to_name, value); +#endif + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + moddict = module; +#else + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; +#endif + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_pydevd_frame_evaluator(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'pydevd_frame_evaluator' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("pydevd_frame_evaluator", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #elif CYTHON_USE_MODULE_STATE + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + { + int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "pydevd_frame_evaluator" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #endif + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_pydevd_frame_evaluator(void)", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + PyEval_InitThreads(); + #endif + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main__pydevd_frame_eval__pydevd_frame_evaluator) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "_pydevd_frame_eval.pydevd_frame_evaluator")) { + if (unlikely((PyDict_SetItemString(modules, "_pydevd_frame_eval.pydevd_frame_evaluator", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + (void)__Pyx_modinit_function_export_code(); + if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":2 + * from __future__ import print_function + * from _pydev_bundle._pydev_saved_modules import threading, thread # <<<<<<<<<<<<<< + * from _pydevd_bundle.pydevd_constants import GlobalDebuggerHolder + * import dis + */ + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_threading); + __Pyx_GIVEREF(__pyx_n_s_threading); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_threading)) __PYX_ERR(0, 2, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_thread); + __Pyx_GIVEREF(__pyx_n_s_thread); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_thread)) __PYX_ERR(0, 2, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydev_bundle__pydev_saved_modul, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_2) < 0) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_thread, __pyx_t_2) < 0) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":3 + * from __future__ import print_function + * from _pydev_bundle._pydev_saved_modules import threading, thread + * from _pydevd_bundle.pydevd_constants import GlobalDebuggerHolder # <<<<<<<<<<<<<< + * import dis + * import sys + */ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_GlobalDebuggerHolder); + __Pyx_GIVEREF(__pyx_n_s_GlobalDebuggerHolder); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_GlobalDebuggerHolder)) __PYX_ERR(0, 3, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_GlobalDebuggerHolder); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_GlobalDebuggerHolder, __pyx_t_3) < 0) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":4 + * from _pydev_bundle._pydev_saved_modules import threading, thread + * from _pydevd_bundle.pydevd_constants import GlobalDebuggerHolder + * import dis # <<<<<<<<<<<<<< + * import sys + * from _pydevd_frame_eval.pydevd_frame_tracing import update_globals_dict, dummy_tracing_holder + */ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_dis, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dis, __pyx_t_2) < 0) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":5 + * from _pydevd_bundle.pydevd_constants import GlobalDebuggerHolder + * import dis + * import sys # <<<<<<<<<<<<<< + * from _pydevd_frame_eval.pydevd_frame_tracing import update_globals_dict, dummy_tracing_holder + * from _pydevd_frame_eval.pydevd_modify_bytecode import DebugHelper, insert_pydevd_breaks + */ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":6 + * import dis + * import sys + * from _pydevd_frame_eval.pydevd_frame_tracing import update_globals_dict, dummy_tracing_holder # <<<<<<<<<<<<<< + * from _pydevd_frame_eval.pydevd_modify_bytecode import DebugHelper, insert_pydevd_breaks + * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER + */ + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_update_globals_dict); + __Pyx_GIVEREF(__pyx_n_s_update_globals_dict); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_update_globals_dict)) __PYX_ERR(0, 6, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_dummy_tracing_holder); + __Pyx_GIVEREF(__pyx_n_s_dummy_tracing_holder); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_dummy_tracing_holder)) __PYX_ERR(0, 6, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_frame_eval_pydevd_frame, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_update_globals_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_update_globals_dict, __pyx_t_2) < 0) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_dummy_tracing_holder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dummy_tracing_holder, __pyx_t_2) < 0) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":7 + * import sys + * from _pydevd_frame_eval.pydevd_frame_tracing import update_globals_dict, dummy_tracing_holder + * from _pydevd_frame_eval.pydevd_modify_bytecode import DebugHelper, insert_pydevd_breaks # <<<<<<<<<<<<<< + * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER + * from _pydevd_bundle.pydevd_trace_dispatch import fix_top_level_trace_and_get_trace_func + */ + __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_DebugHelper); + __Pyx_GIVEREF(__pyx_n_s_DebugHelper); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_DebugHelper)) __PYX_ERR(0, 7, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_insert_pydevd_breaks); + __Pyx_GIVEREF(__pyx_n_s_insert_pydevd_breaks); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_insert_pydevd_breaks)) __PYX_ERR(0, 7, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_frame_eval_pydevd_modify, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_DebugHelper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DebugHelper, __pyx_t_3) < 0) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_insert_pydevd_breaks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_insert_pydevd_breaks, __pyx_t_3) < 0) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":8 + * from _pydevd_frame_eval.pydevd_frame_tracing import update_globals_dict, dummy_tracing_holder + * from _pydevd_frame_eval.pydevd_modify_bytecode import DebugHelper, insert_pydevd_breaks + * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER # <<<<<<<<<<<<<< + * from _pydevd_bundle.pydevd_trace_dispatch import fix_top_level_trace_and_get_trace_func + * + */ + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_get_abs_path_real_path_and_base); + __Pyx_GIVEREF(__pyx_n_s_get_abs_path_real_path_and_base); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_abs_path_real_path_and_base)) __PYX_ERR(0, 8, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); + __Pyx_GIVEREF(__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER)) __PYX_ERR(0, 8, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_file_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_abs_path_real_path_and_base, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":9 + * from _pydevd_frame_eval.pydevd_modify_bytecode import DebugHelper, insert_pydevd_breaks + * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER + * from _pydevd_bundle.pydevd_trace_dispatch import fix_top_level_trace_and_get_trace_func # <<<<<<<<<<<<<< + * + * from _pydevd_bundle.pydevd_additional_thread_info import _set_additional_thread_info_lock + */ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_fix_top_level_trace_and_get_trac); + __Pyx_GIVEREF(__pyx_n_s_fix_top_level_trace_and_get_trac); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_fix_top_level_trace_and_get_trac)) __PYX_ERR(0, 9, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_trace_disp, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_fix_top_level_trace_and_get_trac); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fix_top_level_trace_and_get_trac, __pyx_t_3) < 0) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":11 + * from _pydevd_bundle.pydevd_trace_dispatch import fix_top_level_trace_and_get_trace_func + * + * from _pydevd_bundle.pydevd_additional_thread_info import _set_additional_thread_info_lock # <<<<<<<<<<<<<< + * from _pydevd_bundle.pydevd_cython cimport PyDBAdditionalThreadInfo + * from pydevd_tracing import SetTrace + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_set_additional_thread_info_lock); + __Pyx_GIVEREF(__pyx_n_s_set_additional_thread_info_lock); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_set_additional_thread_info_lock)) __PYX_ERR(0, 11, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_additional, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_set_additional_thread_info_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_additional_thread_info_lock, __pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":13 + * from _pydevd_bundle.pydevd_additional_thread_info import _set_additional_thread_info_lock + * from _pydevd_bundle.pydevd_cython cimport PyDBAdditionalThreadInfo + * from pydevd_tracing import SetTrace # <<<<<<<<<<<<<< + * + * _get_ident = threading.get_ident # Note this is py3 only, if py2 needed to be supported, _get_ident would be needed. + */ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_SetTrace); + __Pyx_GIVEREF(__pyx_n_s_SetTrace); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_SetTrace)) __PYX_ERR(0, 13, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_tracing, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_SetTrace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SetTrace, __pyx_t_3) < 0) __PYX_ERR(0, 13, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":15 + * from pydevd_tracing import SetTrace + * + * _get_ident = threading.get_ident # Note this is py3 only, if py2 needed to be supported, _get_ident would be needed. # <<<<<<<<<<<<<< + * _thread_local_info = threading.local() + * _thread_active = threading._active + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_ident_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_ident, __pyx_t_3) < 0) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":16 + * + * _get_ident = threading.get_ident # Note this is py3 only, if py2 needed to be supported, _get_ident would be needed. + * _thread_local_info = threading.local() # <<<<<<<<<<<<<< + * _thread_active = threading._active + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_local); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_thread_local_info, __pyx_t_3) < 0) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":17 + * _get_ident = threading.get_ident # Note this is py3 only, if py2 needed to be supported, _get_ident would be needed. + * _thread_local_info = threading.local() + * _thread_active = threading._active # <<<<<<<<<<<<<< + * + * def clear_thread_local_info(): + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_active); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_thread_active, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":19 + * _thread_active = threading._active + * + * def clear_thread_local_info(): # <<<<<<<<<<<<<< + * global _thread_local_info + * _thread_local_info = threading.local() + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_1clear_thread_local_info, 0, __pyx_n_s_clear_thread_local_info, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_clear_thread_local_info, __pyx_t_2) < 0) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ThreadInfo___reduce_cython, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo); + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ThreadInfo, (type(self), 0xe535b68, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ThreadInfo__set_state(self, __pyx_state) + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_10ThreadInfo_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ThreadInfo___setstate_cython, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_ThreadInfo); + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FuncCodeInfo___reduce_cython, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo); + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FuncCodeInfo, (type(self), 0x450d2d6, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FuncCodeInfo__set_state(self, __pyx_state) + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_12FuncCodeInfo_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FuncCodeInfo___setstate_cython, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":152 + * + * + * def dummy_trace_dispatch(frame, str event, arg): # <<<<<<<<<<<<<< + * if event == 'call': + * if frame.f_trace is not None: + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_3dummy_trace_dispatch, 0, __pyx_n_s_dummy_trace_dispatch, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dummy_trace_dispatch, __pyx_t_2) < 0) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":159 + * + * + * def get_thread_info_py() -> ThreadInfo: # <<<<<<<<<<<<<< + * return get_thread_info(PyEval_GetFrame()) + * + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_n_s_ThreadInfo) < 0) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_5get_thread_info_py, 0, __pyx_n_s_get_thread_info_py, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_thread_info_py, __pyx_t_3) < 0) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":196 + * + * + * def decref_py(obj): # <<<<<<<<<<<<<< + * ''' + * Helper to be called from Python. + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_7decref_py, 0, __pyx_n_s_decref_py, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_decref_py, __pyx_t_3) < 0) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":203 + * + * + * def get_func_code_info_py(thread_info, frame, code_obj) -> FuncCodeInfo: # <<<<<<<<<<<<<< + * ''' + * Helper to be called from Python. + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_return, __pyx_n_s_FuncCodeInfo) < 0) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_9get_func_code_info_py, 0, __pyx_n_s_get_func_code_info_py, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_func_code_info_py, __pyx_t_2) < 0) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":210 + * + * + * cdef int _code_extra_index = -1 # <<<<<<<<<<<<<< + * + * cdef FuncCodeInfo get_func_code_info(ThreadInfo thread_info, PyFrameObject * frame_obj, PyCodeObject * code_obj): + */ + __pyx_v_18_pydevd_frame_eval_22pydevd_frame_evaluator__code_extra_index = -1; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CodeLineInfo___reduce_cython, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo); + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__CodeLineInfo, (type(self), 0x5a9bcd5, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__CodeLineInfo__set_state(self, __pyx_state) + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_13_CodeLineInfo_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CodeLineInfo___setstate_cython, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CodeLineInfo); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":329 + * + * # Note: this method has a version in pure-python too. + * def _get_code_line_info(code_obj): # <<<<<<<<<<<<<< + * line_to_offset: dict = {} + * first_line: int = None + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_get_code_line_info, 0, __pyx_n_s_get_code_line_info, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_code_line_info, __pyx_t_2) < 0) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":351 + * # handled by the cython side in `FuncCodeInfo get_func_code_info` by providing the + * # same code info if the debugger mtime is still the same). + * _cache: dict = {} # <<<<<<<<<<<<<< + * + * def get_cached_code_obj_info_py(code_obj_py): + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_cache, __pyx_t_2) < 0) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":353 + * _cache: dict = {} + * + * def get_cached_code_obj_info_py(code_obj_py): # <<<<<<<<<<<<<< + * ''' + * :return _CacheValue: + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_13get_cached_code_obj_info_py, 0, __pyx_n_s_get_cached_code_obj_info_py, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_cached_code_obj_info_py, __pyx_t_2) < 0) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":379 + * self.code_lines_as_set = set(code_line_info.line_to_offset) + * + * cpdef compute_force_stay_in_untraced_mode(self, breakpoints): # <<<<<<<<<<<<<< + * ''' + * :param breakpoints: + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_3compute_force_stay_in_untraced_mode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CacheValue_compute_force_stay_i, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue, __pyx_n_s_compute_force_stay_in_untraced_m, __pyx_t_2) < 0) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue); + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CacheValue___reduce_cython, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue); + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__CacheValue, (type(self), 0xac42a46, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__CacheValue__set_state(self, __pyx_state) + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_11_CacheValue_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CacheValue___setstate_cython, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_18_pydevd_frame_eval_22pydevd_frame_evaluator__CacheValue); + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":401 + * return breakpoint_found, force_stay_in_untraced_mode + * + * def generate_code_with_breakpoints_py(object code_obj_py, dict breakpoints): # <<<<<<<<<<<<<< + * return generate_code_with_breakpoints(code_obj_py, breakpoints) + * + */ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_15generate_code_with_breakpoints_py, 0, __pyx_n_s_generate_code_with_breakpoints_p, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_code_with_breakpoints_p, __pyx_t_2) < 0) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":471 + * return breakpoint_found, code_obj_py + * + * import sys # <<<<<<<<<<<<<< + * + * cdef bint IS_PY_39_OWNARDS = sys.version_info[:2] >= (3, 9) + */ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":473 + * import sys + * + * cdef bint IS_PY_39_OWNARDS = sys.version_info[:2] >= (3, 9) # <<<<<<<<<<<<<< + * + * def frame_eval_func(): + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 2, NULL, NULL, &__pyx_slice__37, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_tuple__38, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_18_pydevd_frame_eval_22pydevd_frame_evaluator_IS_PY_39_OWNARDS = __pyx_t_4; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":475 + * cdef bint IS_PY_39_OWNARDS = sys.version_info[:2] >= (3, 9) + * + * def frame_eval_func(): # <<<<<<<<<<<<<< + * cdef PyThreadState *state = PyThreadState_Get() + * if IS_PY_39_OWNARDS: + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_17frame_eval_func, 0, __pyx_n_s_frame_eval_func, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_frame_eval_func, __pyx_t_3) < 0) __PYX_ERR(0, 475, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":484 + * + * + * def stop_frame_eval(): # <<<<<<<<<<<<<< + * cdef PyThreadState *state = PyThreadState_Get() + * state.interp.eval_frame = _PyEval_EvalFrameDefault + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_19stop_frame_eval, 0, __pyx_n_s_stop_frame_eval, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_stop_frame_eval, __pyx_t_3) < 0) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_ThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_21__pyx_unpickle_ThreadInfo, 0, __pyx_n_s_pyx_unpickle_ThreadInfo, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ThreadInfo, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":11 + * __pyx_unpickle_ThreadInfo__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ThreadInfo__set_state(ThreadInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._can_create_dummy_thread = __pyx_state[0]; __pyx_result.additional_info = __pyx_state[1]; __pyx_result.force_stay_in_untraced_mode = __pyx_state[2]; __pyx_result.fully_initialized = __pyx_state[3]; __pyx_result.inside_frame_eval = __pyx_state[4]; __pyx_result.is_pydevd_thread = __pyx_state[5]; __pyx_result.thread_trace_func = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_23__pyx_unpickle_FuncCodeInfo, 0, __pyx_n_s_pyx_unpickle_FuncCodeInfo, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FuncCodeInfo, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":1 + * def __pyx_unpickle__CodeLineInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_25__pyx_unpickle__CodeLineInfo, 0, __pyx_n_s_pyx_unpickle__CodeLineInfo, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__CodeLineInfo, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":11 + * __pyx_unpickle__CodeLineInfo__set_state(<_CodeLineInfo> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__CodeLineInfo__set_state(_CodeLineInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.first_line = __pyx_state[0]; __pyx_result.last_line = __pyx_state[1]; __pyx_result.line_to_offset = __pyx_state[2] + * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_27__pyx_unpickle__CacheValue, 0, __pyx_n_s_pyx_unpickle__CacheValue, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__CacheValue, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":1 + * from __future__ import print_function # <<<<<<<<<<<<<< + * from _pydev_bundle._pydev_saved_modules import threading, thread + * from _pydevd_bundle.pydevd_constants import GlobalDebuggerHolder + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + if (__pyx_m) { + if (__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init _pydevd_frame_eval.pydevd_frame_evaluator", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init _pydevd_frame_eval.pydevd_frame_evaluator"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* TupleAndListFromArray */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + Py_INCREF(__pyx_empty_tuple); + return __pyx_empty_tuple; + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API + return PyObject_RichCompareBool(s1, s2, equals); +#else +#if PY_MAJOR_VERSION < 3 + PyObject* owned_ref = NULL; +#endif + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); +#if PY_MAJOR_VERSION < 3 + if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { + owned_ref = PyUnicode_FromObject(s2); + if (unlikely(!owned_ref)) + return -1; + s2 = owned_ref; + s2_is_unicode = 1; + } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { + owned_ref = PyUnicode_FromObject(s1); + if (unlikely(!owned_ref)) + return -1; + s1 = owned_ref; + s1_is_unicode = 1; + } else if (((!s2_is_unicode) & (!s1_is_unicode))) { + return __Pyx_PyBytes_Equals(s1, s2, equals); + } +#endif + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length; + int kind; + void *data1, *data2; + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + length = __Pyx_PyUnicode_GET_LENGTH(s1); + if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + #if CYTHON_PEP393_ENABLED + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + #else + hash1 = ((PyUnicodeObject*)s1)->hash; + hash2 = ((PyUnicodeObject*)s2)->hash; + #endif + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ); +return_ne: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames); + for (i = 0; i < n; i++) + { + if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); + PyObject *dict; + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#elif CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + #if PY_MAJOR_VERSION < 3 + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { + return NULL; + } + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + #endif + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + #if PY_MAJOR_VERSION < 3 + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + #endif + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + #if PY_MAJOR_VERSION < 3 + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + #endif + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + #if PY_VERSION_HEX >= 0x030700A1 + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if PY_VERSION_HEX < 0x03090000 + vectorcallfunc f = _PyVectorcall_Function(func); + #else + vectorcallfunc f = PyVectorcall_Function(func); + #endif + if (f) { + return f(func, args, (size_t)nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, (size_t)nargs, NULL); + } + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* RaiseException */ +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + __Pyx_PyThreadState_declare + CYTHON_UNUSED_VAR(cause); + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { + #if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); + #elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +/* PyIntBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long x; + long a = PyInt_AS_LONG(op1); + + x = (long)((unsigned long)a + (unsigned long)b); + if (likely((x^a) >= 0 || (x^b) >= 0)) + return PyInt_FromLong(x); + return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; +#endif + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op2); + } + if (likely(__Pyx_PyLong_IsCompact(op1))) { + a = __Pyx_PyLong_CompactValue(op1); + } else { + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + } + x = a + b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla + llb; + return PyLong_FromLongLong(llx); +#endif + + + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; +#if CYTHON_COMPILING_IN_LIMITED_API + double a = __pyx_PyFloat_AsDouble(op1); +#else + double a = PyFloat_AS_DOUBLE(op1); +#endif + double result; + + PyFPE_START_PROTECT("add", return NULL) + result = ((double)a) + (double)b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); + } + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#endif + +/* SliceObject */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, int wraparound) { + __Pyx_TypeName obj_type_name; +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp; +#if PY_MAJOR_VERSION < 3 + PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; + if (likely(ms && ms->sq_slice)) { + if (!has_cstart) { + if (_py_start && (*_py_start != Py_None)) { + cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); + if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstart = 0; + } + if (!has_cstop) { + if (_py_stop && (*_py_stop != Py_None)) { + cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); + if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstop = PY_SSIZE_T_MAX; + } + if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { + Py_ssize_t l = ms->sq_length(obj); + if (likely(l >= 0)) { + if (cstop < 0) { + cstop += l; + if (cstop < 0) cstop = 0; + } + if (cstart < 0) { + cstart += l; + if (cstart < 0) cstart = 0; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + goto bad; + PyErr_Clear(); + } + } + return ms->sq_slice(obj, cstart, cstop); + } +#else + CYTHON_UNUSED_VAR(wraparound); +#endif + mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#else + CYTHON_UNUSED_VAR(wraparound); +#endif + { + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyInt_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyInt_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); +bad: + return NULL; +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyString_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* PyObjectCallNoArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C00A6 + local_value = tstate->current_exception; + tstate->current_exception = 0; + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6 + if (unlikely(tstate->current_exception)) +#elif CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); +#if PY_MAJOR_VERSION < 3 + if (unlikely(PyInstance_Check(obj))) + return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name); +#endif + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_setattr)) + return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); +#endif + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* RaiseUnboundLocalError */ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* KeywordStringCheck */ +static int __Pyx_CheckKeywordStrings( + PyObject *kw, + const char* function_name, + int kw_allowed) +{ + PyObject* key = 0; + Py_ssize_t pos = 0; +#if CYTHON_COMPILING_IN_PYPY + if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0)) + goto invalid_keyword; + return 1; +#else + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { + Py_ssize_t kwsize; +#if CYTHON_ASSUME_SAFE_MACROS + kwsize = PyTuple_GET_SIZE(kw); +#else + kwsize = PyTuple_Size(kw); + if (kwsize < 0) return 0; +#endif + if (unlikely(kwsize == 0)) + return 1; + if (!kw_allowed) { +#if CYTHON_ASSUME_SAFE_MACROS + key = PyTuple_GET_ITEM(kw, 0); +#else + key = PyTuple_GetItem(kw, pos); + if (!key) return 0; +#endif + goto invalid_keyword; + } +#if PY_VERSION_HEX < 0x03090000 + for (pos = 0; pos < kwsize; pos++) { +#if CYTHON_ASSUME_SAFE_MACROS + key = PyTuple_GET_ITEM(kw, pos); +#else + key = PyTuple_GetItem(kw, pos); + if (!key) return 0; +#endif + if (unlikely(!PyUnicode_Check(key))) + goto invalid_keyword_type; + } +#endif + return 1; + } + while (PyDict_Next(kw, &pos, &key, 0)) { + #if PY_MAJOR_VERSION < 3 + if (unlikely(!PyString_Check(key))) + #endif + if (unlikely(!PyUnicode_Check(key))) + goto invalid_keyword_type; + } + if (!kw_allowed && unlikely(key)) + goto invalid_keyword; + return 1; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + return 0; +#endif +invalid_keyword: + #if PY_MAJOR_VERSION < 3 + PyErr_Format(PyExc_TypeError, + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif + return 0; +} + +/* RaiseDoubleKeywords */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject *const *kwvalues, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); + while (1) { + Py_XDECREF(key); key = NULL; + Py_XDECREF(value); value = NULL; + if (kwds_is_tuple) { + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS + size = PyTuple_GET_SIZE(kwds); +#else + size = PyTuple_Size(kwds); + if (size < 0) goto bad; +#endif + if (pos >= size) break; +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); + if (!key) goto bad; +#elif CYTHON_ASSUME_SAFE_MACROS + key = PyTuple_GET_ITEM(kwds, pos); +#else + key = PyTuple_GetItem(kwds, pos); + if (!key) goto bad; +#endif + value = kwvalues[pos]; + pos++; + } + else + { + if (!PyDict_Next(kwds, &pos, &key, &value)) break; +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); +#endif + } + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(value); + Py_DECREF(key); +#endif + key = NULL; + value = NULL; + continue; + } +#if !CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); +#endif + Py_INCREF(value); + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; +#if CYTHON_AVOID_BORROWED_REFS + value = NULL; +#endif + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = ( + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key) + ); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; +#if CYTHON_AVOID_BORROWED_REFS + value = NULL; +#endif + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + Py_XDECREF(key); + Py_XDECREF(value); + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + #if PY_MAJOR_VERSION < 3 + PyErr_Format(PyExc_TypeError, + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + Py_XDECREF(key); + Py_XDECREF(value); + return -1; +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + type_name = __Pyx_PyType_GetName(type); + obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name); + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* DictGetItem */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (!PyErr_Occurred()) { + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return NULL; + } + Py_INCREF(value); + return value; +} +#endif + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (mm && mm->mp_subscript) { + PyObject *r, *key = PyInt_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* PyObjectCallOneArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#elif PY_MAJOR_VERSION >= 3 + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetName(tp); + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); +#else + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", + type_name, PyString_AS_STRING(name)); +#endif + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod0 */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +} + +/* RaiseNoneIterError */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* UnpackTupleError */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else if (PyTuple_GET_SIZE(t) < index) { + __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); + } else { + __Pyx_RaiseTooManyValuesError(index); + } +} + +/* UnpackTuple2 */ +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_COMPILING_IN_PYPY + value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_COMPILING_IN_PYPY +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = __Pyx_PyObject_GetIterNextFunc(iter); + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +#if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 +#include +#endif +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#elif PY_MAJOR_VERSION >= 3 + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_COMPILING_IN_PYPY + if (source_is_dict) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyTuple_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyList_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *empty_list = 0; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (unlikely(!py_import)) + goto bad; + if (!from_list) { + empty_list = PyList_New(0); + if (unlikely(!empty_list)) + goto bad; + from_list = empty_list; + } + #endif + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if (strchr(__Pyx_MODULE_NAME, '.') != NULL) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (unlikely(!py_level)) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, __pyx_d, empty_dict, from_list, level); + #endif + } + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__3); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + +/* GetAttr */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS +#if PY_MAJOR_VERSION >= 3 + if (likely(PyUnicode_Check(n))) +#else + if (likely(PyString_Check(n))) +#endif + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/* HasAttr */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!__Pyx_PyBaseString_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_GetAttr(o, n); + if (!r) { + PyErr_Clear(); + return 0; + } else { + Py_DECREF(r); + return 1; + } +} + +/* FixUpExtensionType */ +#if CYTHON_USE_TYPE_SPECS +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); +#else + const PyType_Slot *slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { + int changed = 0; +#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) + const +#endif + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { +#if PY_VERSION_HEX < 0x030900b1 + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); +#if PY_VERSION_HEX >= 0x030800b4 + type->tp_vectorcall_offset = memb->offset; +#else + type->tp_print = (printfunc) memb->offset; +#endif + changed = 1; + } +#endif +#else + if ((0)); +#endif +#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { + Py_DECREF(descr); + return -1; + } + Py_DECREF(descr); + changed = 1; + } +#endif + } + memb++; + } + if (changed) + PyType_Modified(type); + } +#endif + return 0; +} +#endif + +/* ValidateBasesTuple */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_MACROS + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (n < 0) return -1; +#endif + for (i = 1; i < n; i++) + { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + PyTypeObject *b; +#if PY_MAJOR_VERSION < 3 + if (PyClass_Check(b0)) + { + PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", + PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) + gc = PyImport_GetModule(__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* PyObject_GenericGetAttrNoDict */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { + __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp); + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, attr_name); +#else + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", + type_name, PyString_AS_STRING(attr_name)); +#endif + __Pyx_DECREF_TypeName(type_name); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { + PyObject *descr; + PyTypeObject *tp = Py_TYPE(obj); + if (unlikely(!PyString_Check(attr_name))) { + return PyObject_GenericGetAttr(obj, attr_name); + } + assert(!tp->tp_dictoffset); + descr = _PyType_Lookup(tp, attr_name); + if (unlikely(!descr)) { + return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); + } + Py_INCREF(descr); + #if PY_MAJOR_VERSION < 3 + if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) + #endif + { + descrgetfunc f = Py_TYPE(descr)->tp_descr_get; + if (unlikely(f)) { + PyObject *res = f(descr, obj, (PyObject *)tp); + Py_DECREF(descr); + return res; + } + } + return descr; +} +#endif + +/* PyObject_GenericGetAttr */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { + if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { + return PyObject_GenericGetAttr(obj, attr_name); + } + return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); +} +#endif + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +#if !CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i; + void** base_vtables; + __Pyx_TypeName tp_base_name; + __Pyx_TypeName base_name; + void* unknown = (void*)-1; + PyObject* bases = type->tp_bases; + int base_depth = 0; + { + PyTypeObject* base = type->tp_base; + while (base) { + base_depth += 1; + base = base->tp_base; + } + } + base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; + for (i = 1; i < PyTuple_GET_SIZE(bases); i++) { + void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i))); + if (base_vtable != NULL) { + int j; + PyTypeObject* base = type->tp_base; + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = base->tp_base; + } + } + } + PyErr_Clear(); + free(base_vtables); + return 0; +bad: + tp_base_name = __Pyx_PyType_GetName(type->tp_base); + base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i)); + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); + free(base_vtables); + return -1; +} +#endif + +/* SetupReduce */ +#if !CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); + if (likely(reduce_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); + if (likely(setstate_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} +#endif + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_0_11 +#define __PYX_HAVE_RT_ImportType_3_0_11 +static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !CYTHON_COMPILING_IN_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* ImportDottedModule */ +#if PY_MAJOR_VERSION >= 3 +static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { + PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; + if (unlikely(PyErr_Occurred())) { + PyErr_Clear(); + } + if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) { + partial_name = name; + } else { + slice = PySequence_GetSlice(parts_tuple, 0, count); + if (unlikely(!slice)) + goto bad; + sep = PyUnicode_FromStringAndSize(".", 1); + if (unlikely(!sep)) + goto bad; + partial_name = PyUnicode_Join(sep, slice); + } + PyErr_Format( +#if PY_MAJOR_VERSION < 3 + PyExc_ImportError, + "No module named '%s'", PyString_AS_STRING(partial_name)); +#else +#if PY_VERSION_HEX >= 0x030600B1 + PyExc_ModuleNotFoundError, +#else + PyExc_ImportError, +#endif + "No module named '%U'", partial_name); +#endif +bad: + Py_XDECREF(sep); + Py_XDECREF(slice); + Py_XDECREF(partial_name); + return NULL; +} +#endif +#if PY_MAJOR_VERSION >= 3 +static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { + PyObject *imported_module; +#if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + return NULL; + imported_module = __Pyx_PyDict_GetItemStr(modules, name); + Py_XINCREF(imported_module); +#else + imported_module = PyImport_GetModule(name); +#endif + return imported_module; +} +#endif +#if PY_MAJOR_VERSION >= 3 +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { + Py_ssize_t i, nparts; + nparts = PyTuple_GET_SIZE(parts_tuple); + for (i=1; i < nparts && module; i++) { + PyObject *part, *submodule; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + part = PyTuple_GET_ITEM(parts_tuple, i); +#else + part = PySequence_ITEM(parts_tuple, i); +#endif + submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(part); +#endif + Py_DECREF(module); + module = submodule; + } + if (unlikely(!module)) { + return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); + } + return module; +} +#endif +static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { +#if PY_MAJOR_VERSION < 3 + PyObject *module, *from_list, *star = __pyx_n_s__10; + CYTHON_UNUSED_VAR(parts_tuple); + from_list = PyList_New(1); + if (unlikely(!from_list)) + return NULL; + Py_INCREF(star); + PyList_SET_ITEM(from_list, 0, star); + module = __Pyx_Import(name, from_list, 0); + Py_DECREF(from_list); + return module; +#else + PyObject *imported_module; + PyObject *module = __Pyx_Import(name, NULL, 0); + if (!parts_tuple || unlikely(!module)) + return module; + imported_module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(imported_module)) { + Py_DECREF(module); + return imported_module; + } + PyErr_Clear(); + return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); +#endif +} +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1 + PyObject *module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(module)) { + PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec); + if (likely(spec)) { + PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing); + if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { + Py_DECREF(spec); + spec = NULL; + } + Py_XDECREF(unsafe); + } + if (likely(!spec)) { + PyErr_Clear(); + return module; + } + Py_DECREF(spec); + Py_DECREF(module); + } else if (PyErr_Occurred()) { + PyErr_Clear(); + } +#endif + return __Pyx__ImportDottedModule(name, parts_tuple); +} + +/* FetchSharedCythonModule */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType */ +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t basicsize, + Py_ssize_t expected_basicsize) { + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +#if !CYTHON_USE_TYPE_SPECS +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { + PyObject* abi_module; + const char* object_name; + PyTypeObject *cached_type = NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) return NULL; + object_name = strrchr(type->tp_name, '.'); + object_name = object_name ? object_name+1 : type->tp_name; + cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); + if (cached_type) { + if (__Pyx_VerifyCachedType( + (PyObject *)cached_type, + object_name, + cached_type->tp_basicsize, + type->tp_basicsize) < 0) { + goto bad; + } + goto done; + } + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + if (PyType_Ready(type) < 0) goto bad; + if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) + goto bad; + Py_INCREF(type); + cached_type = type; +done: + Py_DECREF(abi_module); + return cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} +#else +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module, *cached_type = NULL; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) return NULL; + cached_type = PyObject_GetAttrString(abi_module, object_name); + if (cached_type) { + Py_ssize_t basicsize; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; +#else + basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; +#endif + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + basicsize, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + CYTHON_UNUSED_VAR(module); + cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; +done: + Py_DECREF(abi_module); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} +#endif + +/* PyVectorcallFastCallDict */ +#if CYTHON_METH_FASTCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i, pos; + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (PyDict_Next(kw, &pos, &key, &value)) { + keys_are_strings &= Py_TYPE(key)->tp_flags; + Py_INCREF(key); + Py_INCREF(value); + PyTuple_SET_ITEM(kwnames, i, key); + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) { + return vc(func, args, nargs, NULL); + } + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) +{ + CYTHON_UNUSED_VAR(closure); + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { +#if PY_MAJOR_VERSION >= 3 + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); +#else + op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); +#endif + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#elif PY_MAJOR_VERSION >= 3 + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#else + op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(op->func_name, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_qualname); + return op->func_qualname; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(op->func_dict, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = op->defaults_tuple; + CYTHON_UNUSED_VAR(context); + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = op->defaults_kwdict; + CYTHON_UNUSED_VAR(context); + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = op->func_annotations; + CYTHON_UNUSED_VAR(context); + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + int is_coroutine; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; +#if PY_VERSION_HEX >= 0x03050000 + if (is_coroutine) { + PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(op->func_is_coroutine)) { + return __Pyx_NewRef(op->func_is_coroutine); + } +ignore: + PyErr_Clear(); + } +#endif + op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); + return __Pyx_NewRef(op->func_is_coroutine); +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if CYTHON_USE_TYPE_SPECS + {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#if CYTHON_METH_FASTCALL +#if CYTHON_BACKPORT_VECTORCALL + {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else +#if !CYTHON_COMPILING_IN_LIMITED_API + {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#endif +#endif +#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API + {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + CYTHON_UNUSED_VAR(args); +#if PY_MAJOR_VERSION >= 3 + Py_INCREF(m->func_qualname); + return m->func_qualname; +#else + return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name); +#endif +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults_pyobjects = 0; + op->defaults_size = 0; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_XDECREF(pydefaults[i]); + PyObject_Free(m->defaults); + m->defaults = NULL; + } + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif + Py_VISIT(m->func_dict); + Py_VISIT(m->func_name); + Py_VISIT(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + Py_VISIT(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_VISIT(pydefaults[i]); + } + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromFormat("", + op->func_qualname, (void *)op); +#else + return PyString_FromFormat("", + PyString_AsString(op->func_qualname), (void *)op); +#endif +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyObject *py_name = NULL; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_MACROS + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); +#if CYTHON_COMPILING_IN_LIMITED_API + py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); + if (!py_name) return NULL; + PyErr_Format(PyExc_TypeError, + "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, size); + Py_DECREF(py_name); +#else + PyErr_Format(PyExc_TypeError, + "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); +#endif + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_MACROS + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } +#if CYTHON_COMPILING_IN_LIMITED_API + py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); + if (!py_name) return NULL; + PyErr_Format(PyExc_TypeError, + "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, size); + Py_DECREF(py_name); +#else + PyErr_Format(PyExc_TypeError, + "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); +#endif + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } +#if CYTHON_COMPILING_IN_LIMITED_API + py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL); + if (!py_name) return NULL; + PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments", + py_name); + Py_DECREF(py_name); +#else + PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", + f->m_ml->ml_name); +#endif + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_MACROS + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(!argc) < 0) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); +#if PY_MAJOR_VERSION > 2 + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); +#else + PyErr_SetString(PyExc_TypeError, + "unbound method needs an argument"); +#endif + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + PyErr_Format(PyExc_TypeError, "%.200s() needs an argument", + ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) { + PyErr_Format(PyExc_TypeError, + "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: + self = ((PyCFunctionObject*)cyfunc)->m_self; + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + PyErr_Format(PyExc_TypeError, + "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + def->ml_name, nargs); + return NULL; + } + return def->ml_meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: + self = ((PyCFunctionObject*)cyfunc)->m_self; + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + PyErr_Format(PyExc_TypeError, + "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + def->ml_name, nargs); + return NULL; + } + return def->ml_meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: + self = ((PyCFunctionObject*)cyfunc)->m_self; + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: + self = ((PyCFunctionObject*)cyfunc)->m_self; + break; + default: + return NULL; + } + return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames); +} +#endif +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +#else +static PyTypeObject __pyx_CyFunctionType_type = { + PyVarObject_HEAD_INIT(0, 0) + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, + (destructor) __Pyx_CyFunction_dealloc, +#if !CYTHON_METH_FASTCALL + 0, +#elif CYTHON_BACKPORT_VECTORCALL + (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), +#else + offsetof(PyCFunctionObject, vectorcall), +#endif + 0, + 0, +#if PY_MAJOR_VERSION < 3 + 0, +#else + 0, +#endif + (reprfunc) __Pyx_CyFunction_repr, + 0, + 0, + 0, + 0, + __Pyx_CyFunction_CallAsMethod, + 0, + 0, + 0, + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + 0, + (traverseproc) __Pyx_CyFunction_traverse, + (inquiry) __Pyx_CyFunction_clear, + 0, +#if PY_VERSION_HEX < 0x030500A0 + offsetof(__pyx_CyFunctionObject, func_weakreflist), +#else + offsetof(PyCFunctionObject, m_weakreflist), +#endif + 0, + 0, + __pyx_CyFunction_methods, + __pyx_CyFunction_members, + __pyx_CyFunction_getsets, + 0, + 0, + __Pyx_PyMethod_New, + 0, + offsetof(__pyx_CyFunctionObject, func_dict), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +#if PY_VERSION_HEX >= 0x030400a1 + 0, +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, +#endif +#if __PYX_NEED_TP_PRINT_SLOT + 0, +#endif +#if PY_VERSION_HEX >= 0x030C0000 + 0, +#endif +#if PY_VERSION_HEX >= 0x030d00A4 + 0, +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, +#endif +}; +#endif +static int __pyx_CyFunction_init(PyObject *module) { +#if CYTHON_USE_TYPE_SPECS + __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); +#else + CYTHON_UNUSED_VAR(module); + __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); +#endif + if (unlikely(__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_Malloc(size); + if (unlikely(!m->defaults)) + return PyErr_NoMemory(); + memset(m->defaults, 0, size); + m->defaults_pyobjects = pyobjects; + m->defaults_size = size; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback */ +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +#if !CYTHON_COMPILING_IN_LIMITED_API +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} +#endif + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result; + result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + #if __PYX_LIMITED_VERSION_HEX < 0x030780000 + { + PyObject *compiled = NULL, *result = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL; + compiled = Py_CompileString( + "out = type(code)(\n" + " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" + " code.co_flags, code.co_code, code.co_consts, code.co_names,\n" + " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" + " code.co_lnotab)\n", "", Py_file_input); + if (!compiled) return NULL; + result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict); + Py_DECREF(compiled); + if (!result) PyErr_Print(); + Py_DECREF(result); + result = PyDict_GetItemString(scratch_dict, "out"); + if (result) Py_INCREF(result); + return result; + } + #else + return NULL; + #endif +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + #if PY_MAJOR_VERSION < 3 + PyObject *py_srcfile = NULL; + py_srcfile = PyString_FromString(filename); + if (!py_srcfile) goto bad; + #endif + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + if (!py_funcname) goto bad; + #endif + } + #if PY_MAJOR_VERSION < 3 + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + #else + py_code = PyCode_NewEmpty(filename, funcname, py_line); + #endif + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_srcfile); + #endif + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL; + PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + arg_tuple = PyTuple_Pack(2, py_bytes, order_str); + if (!arg_tuple) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } + result = PyObject_Call(from_bytes, arg_tuple, kwds); + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if ((sizeof(int) < sizeof(long))) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } +#endif + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if ((sizeof(long) < sizeof(long))) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } +#endif + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL; + PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + arg_tuple = PyTuple_Pack(2, py_bytes, order_str); + if (!arg_tuple) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } + result = PyObject_Call(from_bytes, arg_tuple, kwds); + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API +static __Pyx_TypeName +__Pyx_PyType_GetName(PyTypeObject* tp) +{ + PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_n_s_name); + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { + PyErr_Clear(); + Py_XDECREF(name); + name = __Pyx_NewRef(__pyx_n_s__47); + } + return name; +} +#endif + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; i= 0x030B00A4 + return Py_Version & ~0xFFUL; +#else + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + return version; +#endif +} +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* InitStrings */ +#if PY_MAJOR_VERSION >= 3 +static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) { + if (t.is_unicode | t.is_str) { + if (t.intern) { + *str = PyUnicode_InternFromString(t.s); + } else if (t.encoding) { + *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL); + } else { + *str = PyUnicode_FromStringAndSize(t.s, t.n - 1); + } + } else { + *str = PyBytes_FromStringAndSize(t.s, t.n - 1); + } + if (!*str) + return -1; + if (PyObject_Hash(*str) == -1) + return -1; + return 0; +} +#endif +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { + while (t->p) { + #if PY_MAJOR_VERSION >= 3 + __Pyx_InitString(*t, t->p); + #else + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + #endif + ++t; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")", + type_name, type_name, result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); +#if PY_MAJOR_VERSION < 3 + } else if (likely(PyInt_CheckExact(o))) { + return PyInt_AS_LONG(o); +#endif + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyInt_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pxd b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pxd new file mode 100644 index 0000000..d8fb5f2 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pxd @@ -0,0 +1,131 @@ +from cpython.mem cimport PyMem_Malloc, PyMem_Free + +cdef extern from *: + ctypedef void PyObject + ctypedef struct PyCodeObject: + int co_argcount; # arguments, except *args */ + int co_kwonlyargcount; # keyword only arguments */ + int co_nlocals; # local variables */ + int co_stacksize; # entries needed for evaluation stack */ + int co_flags; # CO_..., see below */ + int co_firstlineno; # first source line number */ + PyObject *co_code; # instruction opcodes */ + PyObject *co_consts; # list (constants used) */ + PyObject *co_names; # list of strings (names used) */ + PyObject *co_varnames; # tuple of strings (local variable names) */ + PyObject *co_freevars; # tuple of strings (free variable names) */ + PyObject *co_cellvars; # tuple of strings (cell variable names) */ + unsigned char *co_cell2arg; # Maps cell vars which are arguments. */ + PyObject *co_filename; # unicode (where it was loaded from) */ + PyObject *co_name; # unicode (name, for reference) */ + PyObject *co_lnotab; # string (encoding addr<->lineno mapping) See + # Objects/lnotab_notes.txt for details. */ + void *co_zombieframe; # for optimization only (see frameobject.c) */ + PyObject *co_weakreflist; # to support weakrefs to code objects */ + void *co_extra; + +cdef extern from "frameobject.h": + ctypedef struct PyFrameObject: + PyFrameObject *f_back + PyCodeObject *f_code # code segment + PyObject *f_builtins # builtin symbol table (PyDictObject) + PyObject *f_globals # global symbol table (PyDictObject) */ + PyObject *f_locals # local symbol table (any mapping) */ + PyObject **f_valuestack # + PyObject **f_stacktop + PyObject *f_trace # Trace function */ + PyObject *f_exc_type + PyObject *f_exc_value + PyObject *f_exc_traceback + PyObject *f_gen; + + int f_lasti; #/* Last instruction if called */ + int f_lineno; #/* Current line number */ + int f_iblock; #/* index in f_blockstack */ + char f_executing; #/* whether the frame is still executing */ + PyObject *f_localsplus[1]; + +cdef extern from "release_mem.h": + void release_co_extra(void *) + +cdef extern from "code.h": + ctypedef void freefunc(void *) + int _PyCode_GetExtra(PyObject *code, Py_ssize_t index, void **extra) + int _PyCode_SetExtra(PyObject *code, Py_ssize_t index, void *extra) + +# TODO: Things are in a different place for Python 3.11. +# cdef extern from "cpython/code.h": +# ctypedef void freefunc(void *) +# int _PyCode_GetExtra(PyObject *code, Py_ssize_t index, void **extra) +# int _PyCode_SetExtra(PyObject *code, Py_ssize_t index, void *extra) + +cdef extern from "Python.h": + void Py_INCREF(object o) + void Py_DECREF(object o) + object PyImport_ImportModule(char *name) + PyObject* PyObject_CallFunction(PyObject *callable, const char *format, ...) + object PyObject_GetAttrString(object o, char *attr_name) + +cdef extern from "pystate.h": + # ctypedef PyObject* _PyFrameEvalFunction(PyThreadState* tstate, PyFrameObject *frame, int exc) + # ctypedef PyObject* _PyFrameEvalFunction(PyFrameObject *frame, int exc) + ctypedef PyObject* _PyFrameEvalFunction(...) + + ctypedef struct PyInterpreterState: + PyInterpreterState *next + PyInterpreterState *tstate_head + + PyObject *modules + + PyObject *modules_by_index + PyObject *sysdict + PyObject *builtins + PyObject *importlib + + PyObject *codec_search_path + PyObject *codec_search_cache + PyObject *codec_error_registry + int codecs_initialized + int fscodec_initialized + + int dlopenflags + + PyObject *builtins_copy + PyObject *import_func + # Initialized to PyEval_EvalFrameDefault(). + _PyFrameEvalFunction eval_frame + + ctypedef struct PyThreadState: + PyThreadState *prev + PyThreadState *next + PyInterpreterState *interp + # ... + + PyThreadState *PyThreadState_Get() + +cdef extern from "ceval.h": + ''' +#if PY_VERSION_HEX >= 0x03090000 +PyObject * noop(PyFrameObject *frame, int exc) { + return NULL; +} +#define CALL_EvalFrameDefault_38(a, b) noop(a, b) +#define CALL_EvalFrameDefault_39(a, b, c) _PyEval_EvalFrameDefault(a, b, c) +#else +PyObject * noop(PyThreadState* tstate, PyFrameObject *frame, int exc) { + return NULL; +} +#define CALL_EvalFrameDefault_39(a, b, c) noop(a, b, c) +#define CALL_EvalFrameDefault_38(a, b) _PyEval_EvalFrameDefault(a, b) +#endif + ''' + + int _PyEval_RequestCodeExtraIndex(freefunc) + PyFrameObject *PyEval_GetFrame() + PyObject* PyEval_CallFunction(PyObject *callable, const char *format, ...) + + # PyObject* _PyEval_EvalFrameDefault(PyThreadState* tstate, PyFrameObject *frame, int exc) + # PyObject* _PyEval_EvalFrameDefault(PyFrameObject *frame, int exc) + PyObject* _PyEval_EvalFrameDefault(...) + PyObject* CALL_EvalFrameDefault_38(PyFrameObject *frame, int exc) # Actually a macro. + PyObject* CALL_EvalFrameDefault_39(PyThreadState* tstate, PyFrameObject *frame, int exc) # Actually a macro. diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.template.pyx b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.template.pyx new file mode 100644 index 0000000..1bbf9f8 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.template.pyx @@ -0,0 +1,613 @@ +from __future__ import print_function +from _pydev_bundle._pydev_saved_modules import threading, thread +from _pydevd_bundle.pydevd_constants import GlobalDebuggerHolder +import dis +import sys +from _pydevd_frame_eval.pydevd_frame_tracing import update_globals_dict, dummy_tracing_holder +from _pydevd_frame_eval.pydevd_modify_bytecode import DebugHelper, insert_pydevd_breaks +from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER +from _pydevd_bundle.pydevd_trace_dispatch import fix_top_level_trace_and_get_trace_func + +from _pydevd_bundle.pydevd_additional_thread_info import _set_additional_thread_info_lock +from _pydevd_bundle.pydevd_cython cimport PyDBAdditionalThreadInfo +from pydevd_tracing import SetTrace + +_get_ident = threading.get_ident # Note this is py3 only, if py2 needed to be supported, _get_ident would be needed. +_thread_local_info = threading.local() +_thread_active = threading._active + +def clear_thread_local_info(): + global _thread_local_info + _thread_local_info = threading.local() + + +cdef class ThreadInfo: + + cdef public PyDBAdditionalThreadInfo additional_info + cdef public bint is_pydevd_thread + cdef public int inside_frame_eval + cdef public bint fully_initialized + cdef public object thread_trace_func + cdef bint _can_create_dummy_thread + + # Note: whenever get_func_code_info is called, this value is reset (we're using + # it as a thread-local value info). + # If True the debugger should not go into trace mode even if the new + # code for a function is None and there are breakpoints. + cdef public bint force_stay_in_untraced_mode + + cdef initialize(self, PyFrameObject * frame_obj): + # Places that create a ThreadInfo should verify that + # a current Python frame is being executed! + assert frame_obj != NULL + + self.additional_info = None + self.is_pydevd_thread = False + self.inside_frame_eval = 0 + self.fully_initialized = False + self.thread_trace_func = None + + # Get the root (if it's not a Thread initialized from the threading + # module, create the dummy thread entry so that we can debug it -- + # otherwise, we have to wait for the threading module itself to + # create the Thread entry). + while frame_obj.f_back != NULL: + frame_obj = frame_obj.f_back + + basename = frame_obj.f_code.co_filename + i = basename.rfind('/') + j = basename.rfind('\\') + if j > i: + i = j + if i >= 0: + basename = basename[i + 1:] + # remove ext + i = basename.rfind('.') + if i >= 0: + basename = basename[:i] + + co_name = frame_obj.f_code.co_name + + # In these cases we cannot create a dummy thread (an actual + # thread will be created later or tracing will already be set). + if basename == 'threading' and co_name in ('__bootstrap', '_bootstrap', '__bootstrap_inner', '_bootstrap_inner'): + self._can_create_dummy_thread = False + elif basename == 'pydev_monkey' and co_name == '__call__': + self._can_create_dummy_thread = False + elif basename == 'pydevd' and co_name in ('run', 'main', '_exec'): + self._can_create_dummy_thread = False + elif basename == 'pydevd_tracing': + self._can_create_dummy_thread = False + else: + self._can_create_dummy_thread = True + + # print('Can create dummy thread for thread started in: %s %s' % (basename, co_name)) + + cdef initialize_if_possible(self): + # Don't call threading.currentThread because if we're too early in the process + # we may create a dummy thread. + self.inside_frame_eval += 1 + + try: + thread_ident = _get_ident() + t = _thread_active.get(thread_ident) + if t is None: + if self._can_create_dummy_thread: + # Initialize the dummy thread and set the tracing (both are needed to + # actually stop on breakpoints). + t = threading.current_thread() + SetTrace(dummy_trace_dispatch) + else: + return # Cannot initialize until thread becomes active. + + if getattr(t, 'is_pydev_daemon_thread', False): + self.is_pydevd_thread = True + self.fully_initialized = True + else: + try: + additional_info = t.additional_info + if additional_info is None: + raise AttributeError() + except: + with _set_additional_thread_info_lock: + # If it's not there, set it within a lock to avoid any racing + # conditions. + additional_info = getattr(thread, 'additional_info', None) + if additional_info is None: + additional_info = PyDBAdditionalThreadInfo() + t.additional_info = additional_info + self.additional_info = additional_info + self.fully_initialized = True + finally: + self.inside_frame_eval -= 1 + + +cdef class FuncCodeInfo: + + cdef public str co_filename + cdef public str co_name + cdef public str canonical_normalized_filename + cdef bint always_skip_code + cdef public bint breakpoint_found + cdef public object new_code + + # When breakpoints_mtime != PyDb.mtime the validity of breakpoints have + # to be re-evaluated (if invalid a new FuncCodeInfo must be created and + # tracing can't be disabled for the related frames). + cdef public int breakpoints_mtime + + def __init__(self): + self.co_filename = '' + self.canonical_normalized_filename = '' + self.always_skip_code = False + + # If breakpoints are found but new_code is None, + # this means we weren't able to actually add the code + # where needed, so, fallback to tracing. + self.breakpoint_found = False + self.new_code = None + self.breakpoints_mtime = -1 + + +def dummy_trace_dispatch(frame, str event, arg): + if event == 'call': + if frame.f_trace is not None: + return frame.f_trace(frame, event, arg) + return None + + +def get_thread_info_py() -> ThreadInfo: + return get_thread_info(PyEval_GetFrame()) + + +cdef ThreadInfo get_thread_info(PyFrameObject * frame_obj): + ''' + Provides thread-related info. + + May return None if the thread is still not active. + ''' + cdef ThreadInfo thread_info + try: + # Note: changing to a `dict[thread.ident] = thread_info` had almost no + # effect in the performance. + thread_info = _thread_local_info.thread_info + except: + if frame_obj == NULL: + return None + thread_info = ThreadInfo() + thread_info.initialize(frame_obj) + thread_info.inside_frame_eval += 1 + try: + _thread_local_info.thread_info = thread_info + + # Note: _code_extra_index is not actually thread-related, + # but this is a good point to initialize it. + global _code_extra_index + if _code_extra_index == -1: + _code_extra_index = _PyEval_RequestCodeExtraIndex(release_co_extra) + + thread_info.initialize_if_possible() + finally: + thread_info.inside_frame_eval -= 1 + + return thread_info + + +def decref_py(obj): + ''' + Helper to be called from Python. + ''' + Py_DECREF(obj) + + +def get_func_code_info_py(thread_info, frame, code_obj) -> FuncCodeInfo: + ''' + Helper to be called from Python. + ''' + return get_func_code_info( thread_info, frame, code_obj) + + +cdef int _code_extra_index = -1 + +cdef FuncCodeInfo get_func_code_info(ThreadInfo thread_info, PyFrameObject * frame_obj, PyCodeObject * code_obj): + ''' + Provides code-object related info. + + Stores the gathered info in a cache in the code object itself. Note that + multiple threads can get the same info. + + get_thread_info() *must* be called at least once before get_func_code_info() + to initialize _code_extra_index. + + ''' + # f_code = code_obj + # DEBUG = f_code.co_filename.endswith('_debugger_case_multiprocessing.py') + # if DEBUG: + # print('get_func_code_info', f_code.co_name, f_code.co_filename) + + cdef object main_debugger = GlobalDebuggerHolder.global_dbg + thread_info.force_stay_in_untraced_mode = False # This is an output value of the function. + + cdef PyObject * extra + _PyCode_GetExtra( code_obj, _code_extra_index, & extra) + if extra is not NULL: + extra_obj = extra + if extra_obj is not NULL: + func_code_info_obj = extra_obj + if func_code_info_obj.breakpoints_mtime == main_debugger.mtime: + # if DEBUG: + # print('get_func_code_info: matched mtime', f_code.co_name, f_code.co_filename) + + return func_code_info_obj + + cdef str co_filename = code_obj.co_filename + cdef str co_name = code_obj.co_name + cdef dict cache_file_type + cdef tuple cache_file_type_key + + func_code_info = FuncCodeInfo() + func_code_info.breakpoints_mtime = main_debugger.mtime + + func_code_info.co_filename = co_filename + func_code_info.co_name = co_name + + if not func_code_info.always_skip_code: + try: + abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[co_filename] + except: + abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame_obj) + + func_code_info.canonical_normalized_filename = abs_path_real_path_and_base[1] + + cache_file_type = main_debugger.get_cache_file_type() + # Note: this cache key must be the same from PyDB.get_file_type() -- see it for comments + # on the cache. + cache_file_type_key = (frame_obj.f_code.co_firstlineno, abs_path_real_path_and_base[0], frame_obj.f_code) + try: + file_type = cache_file_type[cache_file_type_key] # Make it faster + except: + file_type = main_debugger.get_file_type(frame_obj, abs_path_real_path_and_base) # we don't want to debug anything related to pydevd + + if file_type is not None: + func_code_info.always_skip_code = True + + if not func_code_info.always_skip_code: + if main_debugger is not None: + + breakpoints: dict = main_debugger.breakpoints.get(func_code_info.canonical_normalized_filename) + function_breakpoint: object = main_debugger.function_breakpoint_name_to_breakpoint.get(func_code_info.co_name) + # print('\n---') + # print(main_debugger.breakpoints) + # print(func_code_info.canonical_normalized_filename) + # print(main_debugger.breakpoints.get(func_code_info.canonical_normalized_filename)) + code_obj_py: object = code_obj + cached_code_obj_info: object = _cache.get(code_obj_py) + if cached_code_obj_info: + # The cache is for new code objects, so, in this case it's already + # using the new code and we can't change it as this is a generator! + # There's still a catch though: even though we don't replace the code, + # we may not want to go into tracing mode (as would usually happen + # when the new_code is None). + func_code_info.new_code = None + breakpoint_found, thread_info.force_stay_in_untraced_mode = \ + cached_code_obj_info.compute_force_stay_in_untraced_mode(breakpoints) + func_code_info.breakpoint_found = breakpoint_found + + elif function_breakpoint: + # Go directly into tracing mode + func_code_info.breakpoint_found = True + func_code_info.new_code = None + + elif breakpoints: + # if DEBUG: + # print('found breakpoints', code_obj_py.co_name, breakpoints) + + # Note: new_code can be None if unable to generate. + # It should automatically put the new code object in the cache. + breakpoint_found, func_code_info.new_code = generate_code_with_breakpoints(code_obj_py, breakpoints) + func_code_info.breakpoint_found = breakpoint_found + + Py_INCREF(func_code_info) + _PyCode_SetExtra( code_obj, _code_extra_index, func_code_info) + + return func_code_info + + +cdef class _CodeLineInfo: + + cdef public dict line_to_offset + cdef public int first_line + cdef public int last_line + + def __init__(self, dict line_to_offset, int first_line, int last_line): + self.line_to_offset = line_to_offset + self.first_line = first_line + self.last_line = last_line + + +# Note: this method has a version in pure-python too. +def _get_code_line_info(code_obj): + line_to_offset: dict = {} + first_line: int = None + last_line: int = None + + cdef int offset + cdef int line + + for offset, line in dis.findlinestarts(code_obj): + line_to_offset[line] = offset + + if line_to_offset: + first_line = min(line_to_offset) + last_line = max(line_to_offset) + return _CodeLineInfo(line_to_offset, first_line, last_line) + + +# Note: this is a cache where the key is the code objects we create ourselves so that +# we always return the same code object for generators. +# (so, we don't have a cache from the old code to the new info -- that's actually +# handled by the cython side in `FuncCodeInfo get_func_code_info` by providing the +# same code info if the debugger mtime is still the same). +_cache: dict = {} + +def get_cached_code_obj_info_py(code_obj_py): + ''' + :return _CacheValue: + :note: on cython use _cache.get(code_obj_py) directly. + ''' + return _cache.get(code_obj_py) + + +cdef class _CacheValue(object): + + cdef public object code_obj_py + cdef public _CodeLineInfo code_line_info + cdef public set breakpoints_hit_at_lines + cdef public set code_lines_as_set + + def __init__(self, object code_obj_py, _CodeLineInfo code_line_info, set breakpoints_hit_at_lines): + ''' + :param code_obj_py: + :param _CodeLineInfo code_line_info: + :param set[int] breakpoints_hit_at_lines: + ''' + self.code_obj_py = code_obj_py + self.code_line_info = code_line_info + self.breakpoints_hit_at_lines = breakpoints_hit_at_lines + self.code_lines_as_set = set(code_line_info.line_to_offset) + + cpdef compute_force_stay_in_untraced_mode(self, breakpoints): + ''' + :param breakpoints: + set(breakpoint_lines) or dict(breakpoint_line->breakpoint info) + :return tuple(breakpoint_found, force_stay_in_untraced_mode) + ''' + cdef bint force_stay_in_untraced_mode + cdef bint breakpoint_found + cdef set target_breakpoints + + force_stay_in_untraced_mode = False + + target_breakpoints = self.code_lines_as_set.intersection(breakpoints) + breakpoint_found = bool(target_breakpoints) + + if not breakpoint_found: + force_stay_in_untraced_mode = True + else: + force_stay_in_untraced_mode = self.breakpoints_hit_at_lines.issuperset(set(breakpoints)) + + return breakpoint_found, force_stay_in_untraced_mode + +def generate_code_with_breakpoints_py(object code_obj_py, dict breakpoints): + return generate_code_with_breakpoints(code_obj_py, breakpoints) + +# DEBUG = True +# debug_helper = DebugHelper() + +cdef generate_code_with_breakpoints(object code_obj_py, dict breakpoints): + ''' + :param breakpoints: + dict where the keys are the breakpoint lines. + :return tuple(breakpoint_found, new_code) + ''' + # The cache is needed for generator functions, because after each yield a new frame + # is created but the former code object is used (so, check if code_to_modify is + # already there and if not cache based on the new code generated). + + cdef bint success + cdef int breakpoint_line + cdef bint breakpoint_found + cdef _CacheValue cache_value + cdef set breakpoints_hit_at_lines + cdef dict line_to_offset + + assert code_obj_py not in _cache, 'If a code object is cached, that same code object must be reused.' + +# if DEBUG: +# initial_code_obj_py = code_obj_py + + code_line_info = _get_code_line_info(code_obj_py) + + success = True + + breakpoints_hit_at_lines = set() + line_to_offset = code_line_info.line_to_offset + + for breakpoint_line in breakpoints: + if breakpoint_line in line_to_offset: + breakpoints_hit_at_lines.add(breakpoint_line) + + if breakpoints_hit_at_lines: + success, new_code = insert_pydevd_breaks( + code_obj_py, + breakpoints_hit_at_lines, + code_line_info + ) + + if not success: + code_obj_py = None + else: + code_obj_py = new_code + + breakpoint_found = bool(breakpoints_hit_at_lines) + if breakpoint_found and success: +# if DEBUG: +# op_number = debug_helper.write_dis( +# 'inserting code, breaks at: %s' % (list(breakpoints),), +# initial_code_obj_py +# ) +# +# debug_helper.write_dis( +# 'after inserting code, breaks at: %s' % (list(breakpoints,)), +# code_obj_py, +# op_number=op_number, +# ) + + cache_value = _CacheValue(code_obj_py, code_line_info, breakpoints_hit_at_lines) + _cache[code_obj_py] = cache_value + + return breakpoint_found, code_obj_py + +import sys + +cdef bint IS_PY_39_OWNARDS = sys.version_info[:2] >= (3, 9) + +def frame_eval_func(): + cdef PyThreadState *state = PyThreadState_Get() + if IS_PY_39_OWNARDS: + state.interp.eval_frame = <_PyFrameEvalFunction *> get_bytecode_while_frame_eval_39 + else: + state.interp.eval_frame = <_PyFrameEvalFunction *> get_bytecode_while_frame_eval_38 + dummy_tracing_holder.set_trace_func(dummy_trace_dispatch) + + +def stop_frame_eval(): + cdef PyThreadState *state = PyThreadState_Get() + state.interp.eval_frame = _PyEval_EvalFrameDefault + +# During the build we'll generate 2 versions of the code below so that we're compatible with +# Python 3.9, which receives a "PyThreadState* tstate" as the first parameter and Python 3.6-3.8 +# which doesn't. +### TEMPLATE_START +cdef PyObject * get_bytecode_while_frame_eval(PyFrameObject * frame_obj, int exc): + ''' + This function makes the actual evaluation and changes the bytecode to a version + where programmatic breakpoints are added. + ''' + if GlobalDebuggerHolder is None or _thread_local_info is None or exc: + # Sometimes during process shutdown these global variables become None + return CALL_EvalFrameDefault + + # co_filename: str = frame_obj.f_code.co_filename + # if co_filename.endswith('threading.py'): + # return CALL_EvalFrameDefault + + cdef ThreadInfo thread_info + cdef int STATE_SUSPEND = 2 + cdef int CMD_STEP_INTO = 107 + cdef int CMD_STEP_OVER = 108 + cdef int CMD_STEP_OVER_MY_CODE = 159 + cdef int CMD_STEP_INTO_MY_CODE = 144 + cdef int CMD_STEP_INTO_COROUTINE = 206 + cdef int CMD_SMART_STEP_INTO = 128 + cdef bint can_skip = True + try: + thread_info = _thread_local_info.thread_info + except: + thread_info = get_thread_info(frame_obj) + if thread_info is None: + return CALL_EvalFrameDefault + + if thread_info.inside_frame_eval: + return CALL_EvalFrameDefault + + if not thread_info.fully_initialized: + thread_info.initialize_if_possible() + if not thread_info.fully_initialized: + return CALL_EvalFrameDefault + + # Can only get additional_info when fully initialized. + cdef PyDBAdditionalThreadInfo additional_info = thread_info.additional_info + if thread_info.is_pydevd_thread or additional_info.is_tracing: + # Make sure that we don't trace pydevd threads or inside our own calls. + return CALL_EvalFrameDefault + + # frame = frame_obj + # DEBUG = frame.f_code.co_filename.endswith('_debugger_case_tracing.py') + # if DEBUG: + # print('get_bytecode_while_frame_eval', frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename) + + thread_info.inside_frame_eval += 1 + additional_info.is_tracing = True + try: + main_debugger: object = GlobalDebuggerHolder.global_dbg + if main_debugger is None: + return CALL_EvalFrameDefault + frame = frame_obj + + if thread_info.thread_trace_func is None: + trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame) + if apply_to_global: + thread_info.thread_trace_func = trace_func + + if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE, CMD_SMART_STEP_INTO) or \ + main_debugger.break_on_caught_exceptions or \ + main_debugger.break_on_user_uncaught_exceptions or \ + main_debugger.has_plugin_exception_breaks or \ + main_debugger.signature_factory or \ + additional_info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and main_debugger.show_return_values and frame.f_back is additional_info.pydev_step_stop: + + # if DEBUG: + # print('get_bytecode_while_frame_eval enabled trace') + if thread_info.thread_trace_func is not None: + frame.f_trace = thread_info.thread_trace_func + else: + frame.f_trace = main_debugger.trace_dispatch + else: + func_code_info: FuncCodeInfo = get_func_code_info(thread_info, frame_obj, frame_obj.f_code) + # if DEBUG: + # print('get_bytecode_while_frame_eval always skip', func_code_info.always_skip_code) + if not func_code_info.always_skip_code: + + if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: + can_skip = main_debugger.plugin.can_skip(main_debugger, frame_obj) + + if not can_skip: + # if DEBUG: + # print('get_bytecode_while_frame_eval not can_skip') + if thread_info.thread_trace_func is not None: + frame.f_trace = thread_info.thread_trace_func + else: + frame.f_trace = main_debugger.trace_dispatch + + if can_skip and func_code_info.breakpoint_found: + # if DEBUG: + # print('get_bytecode_while_frame_eval new_code', func_code_info.new_code) + if not thread_info.force_stay_in_untraced_mode: + # If breakpoints are found but new_code is None, + # this means we weren't able to actually add the code + # where needed, so, fallback to tracing. + if func_code_info.new_code is None: + if thread_info.thread_trace_func is not None: + frame.f_trace = thread_info.thread_trace_func + else: + frame.f_trace = main_debugger.trace_dispatch + else: + # print('Using frame eval break for', frame_obj.f_code.co_name) + update_globals_dict( frame_obj.f_globals) + Py_INCREF(func_code_info.new_code) + old = frame_obj.f_code + frame_obj.f_code = func_code_info.new_code + Py_DECREF(old) + else: + # When we're forcing to stay in traced mode we need to + # update the globals dict (because this means that we're reusing + # a previous code which had breakpoints added in a new frame). + update_globals_dict( frame_obj.f_globals) + + finally: + thread_info.inside_frame_eval -= 1 + additional_info.is_tracing = False + + return CALL_EvalFrameDefault +### TEMPLATE_END diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py new file mode 100644 index 0000000..a14f999 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py @@ -0,0 +1,121 @@ +import sys + +from _pydev_bundle import pydev_log +from _pydev_bundle._pydev_saved_modules import threading +from _pydevd_bundle.pydevd_comm import get_global_debugger +from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER +from _pydevd_bundle.pydevd_additional_thread_info import set_additional_thread_info + + +class DummyTracingHolder: + dummy_trace_func = None + + def set_trace_func(self, trace_func): + self.dummy_trace_func = trace_func + + +dummy_tracing_holder = DummyTracingHolder() + + +def update_globals_dict(globals_dict): + new_globals = {"_pydev_stop_at_break": _pydev_stop_at_break} + globals_dict.update(new_globals) + + +def _get_line_for_frame(frame): + # it's absolutely necessary to reset tracing function for frame in order to get the real line number + tracing_func = frame.f_trace + frame.f_trace = None + line = frame.f_lineno + frame.f_trace = tracing_func + return line + + +def _pydev_stop_at_break(line): + frame = sys._getframe(1) + # print('pydevd SET TRACING at ', line, 'curr line', frame.f_lineno) + t = threading.current_thread() + try: + additional_info = t.additional_info + except: + additional_info = set_additional_thread_info(t) + + if additional_info.is_tracing: + return + + additional_info.is_tracing += 1 + try: + py_db = get_global_debugger() + if py_db is None: + return + + pydev_log.debug("Setting f_trace due to frame eval mode in file: %s on line %s", frame.f_code.co_filename, line) + additional_info.trace_suspend_type = "frame_eval" + + pydevd_frame_eval_cython_wrapper = sys.modules["_pydevd_frame_eval.pydevd_frame_eval_cython_wrapper"] + thread_info = pydevd_frame_eval_cython_wrapper.get_thread_info_py() + if thread_info.thread_trace_func is not None: + frame.f_trace = thread_info.thread_trace_func + else: + frame.f_trace = py_db.get_thread_local_trace_func() + finally: + additional_info.is_tracing -= 1 + + +def _pydev_needs_stop_at_break(line): + """ + We separate the functionality into 2 functions so that we can generate a bytecode which + generates a spurious line change so that we can do: + + if _pydev_needs_stop_at_break(): + # Set line to line -1 + _pydev_stop_at_break() + # then, proceed to go to the current line + # (which will then trigger a line event). + """ + t = threading.current_thread() + try: + additional_info = t.additional_info + except: + additional_info = set_additional_thread_info(t) + + if additional_info.is_tracing: + return False + + additional_info.is_tracing += 1 + try: + frame = sys._getframe(1) + # print('pydev needs stop at break?', line, 'curr line', frame.f_lineno, 'curr trace', frame.f_trace) + if frame.f_trace is not None: + # i.e.: this frame is already being traced, thus, we don't need to use programmatic breakpoints. + return False + + py_db = get_global_debugger() + if py_db is None: + return False + + try: + abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] + except: + abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) + canonical_normalized_filename = abs_path_real_path_and_base[1] + + try: + python_breakpoint = py_db.breakpoints[canonical_normalized_filename][line] + except: + # print("Couldn't find breakpoint in the file %s on line %s" % (frame.f_code.co_filename, line)) + # Could be KeyError if line is not there or TypeError if breakpoints_for_file is None. + # Note: using catch-all exception for performance reasons (if the user adds a breakpoint + # and then removes it after hitting it once, this method added for the programmatic + # breakpoint will keep on being called and one of those exceptions will always be raised + # here). + return False + + if python_breakpoint: + # print('YES') + return True + + finally: + additional_info.is_tracing -= 1 + + return False diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_modify_bytecode.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_modify_bytecode.py new file mode 100644 index 0000000..336cdc8 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_modify_bytecode.py @@ -0,0 +1,363 @@ +from collections import namedtuple +import dis +from functools import partial +import itertools +import os.path +import sys + +from _pydevd_frame_eval.vendored import bytecode +from _pydevd_frame_eval.vendored.bytecode.instr import Instr, Label +from _pydev_bundle import pydev_log +from _pydevd_frame_eval.pydevd_frame_tracing import _pydev_stop_at_break, _pydev_needs_stop_at_break + +DEBUG = False + + +class DebugHelper(object): + def __init__(self): + self._debug_dir = os.path.join(os.path.dirname(__file__), "debug_info") + try: + os.makedirs(self._debug_dir) + except: + pass + self._next = partial(next, itertools.count(0)) + + def _get_filename(self, op_number=None, prefix=""): + if op_number is None: + op_number = self._next() + name = "%03d_before.txt" % op_number + else: + name = "%03d_change.txt" % op_number + + filename = os.path.join(self._debug_dir, prefix + name) + return filename, op_number + + def write_bytecode(self, b, op_number=None, prefix=""): + filename, op_number = self._get_filename(op_number, prefix) + with open(filename, "w") as stream: + bytecode.dump_bytecode(b, stream=stream, lineno=True) + return op_number + + def write_dis(self, code_to_modify, op_number=None, prefix=""): + filename, op_number = self._get_filename(op_number, prefix) + with open(filename, "w") as stream: + stream.write("-------- ") + stream.write("-------- ") + stream.write("id(code_to_modify): %s" % id(code_to_modify)) + stream.write("\n\n") + dis.dis(code_to_modify, file=stream) + return op_number + + +_CodeLineInfo = namedtuple("_CodeLineInfo", "line_to_offset, first_line, last_line") + + +# Note: this method has a version in cython too (that one is usually used, this is just for tests). +def _get_code_line_info(code_obj): + line_to_offset = {} + first_line = None + last_line = None + + for offset, line in dis.findlinestarts(code_obj): + if line is not None: + line_to_offset[line] = offset + + if line_to_offset: + first_line = min(line_to_offset) + last_line = max(line_to_offset) + return _CodeLineInfo(line_to_offset, first_line, last_line) + + +if DEBUG: + debug_helper = DebugHelper() + + +def get_instructions_to_add(stop_at_line, _pydev_stop_at_break=_pydev_stop_at_break, _pydev_needs_stop_at_break=_pydev_needs_stop_at_break): + """ + This is the bytecode for something as: + + if _pydev_needs_stop_at_break(): + _pydev_stop_at_break() + + but with some special handling for lines. + """ + # Good reference to how things work regarding line numbers and jumps: + # https://github.com/python/cpython/blob/3.6/Objects/lnotab_notes.txt + + # Usually use a stop line -1, but if that'd be 0, using line +1 is ok too. + spurious_line = stop_at_line - 1 + if spurious_line <= 0: + spurious_line = stop_at_line + 1 + + label = Label() + return [ + # -- if _pydev_needs_stop_at_break(): + Instr("LOAD_CONST", _pydev_needs_stop_at_break, lineno=stop_at_line), + Instr("LOAD_CONST", stop_at_line, lineno=stop_at_line), + Instr("CALL_FUNCTION", 1, lineno=stop_at_line), + Instr("POP_JUMP_IF_FALSE", label, lineno=stop_at_line), + # -- _pydev_stop_at_break() + # + # Note that this has line numbers -1 so that when the NOP just below + # is executed we have a spurious line event. + Instr("LOAD_CONST", _pydev_stop_at_break, lineno=spurious_line), + Instr("LOAD_CONST", stop_at_line, lineno=spurious_line), + Instr("CALL_FUNCTION", 1, lineno=spurious_line), + Instr("POP_TOP", lineno=spurious_line), + # Reason for the NOP: Python will give us a 'line' trace event whenever we forward jump to + # the first instruction of a line, so, in the case where we haven't added a programmatic + # breakpoint (either because we didn't hit a breakpoint anymore or because it was already + # tracing), we don't want the spurious line event due to the line change, so, we make a jump + # to the instruction right after the NOP so that the spurious line event is NOT generated in + # this case (otherwise we'd have a line event even if the line didn't change). + Instr("NOP", lineno=stop_at_line), + label, + ] + + +class _Node(object): + def __init__(self, data): + self.prev = None + self.next = None + self.data = data + + def append(self, data): + node = _Node(data) + + curr_next = self.next + + node.next = self.next + node.prev = self + self.next = node + + if curr_next is not None: + curr_next.prev = node + + return node + + def prepend(self, data): + node = _Node(data) + + curr_prev = self.prev + + node.prev = self.prev + node.next = self + self.prev = node + + if curr_prev is not None: + curr_prev.next = node + + return node + + +class _HelperBytecodeList(object): + """ + A helper double-linked list to make the manipulation a bit easier (so that we don't need + to keep track of indices that change) and performant (because adding multiple items to + the middle of a regular list isn't ideal). + """ + + def __init__(self, lst=None): + self._head = None + self._tail = None + if lst: + node = self + for item in lst: + node = node.append(item) + + def append(self, data): + if self._tail is None: + node = _Node(data) + self._head = self._tail = node + return node + else: + node = self._tail = self.tail.append(data) + return node + + @property + def head(self): + node = self._head + # Manipulating the node directly may make it unsynchronized. + while node.prev: + self._head = node = node.prev + return node + + @property + def tail(self): + node = self._tail + # Manipulating the node directly may make it unsynchronized. + while node.next: + self._tail = node = node.next + return node + + def __iter__(self): + node = self.head + + while node: + yield node.data + node = node.next + + +_PREDICT_TABLE = { + "LIST_APPEND": ("JUMP_ABSOLUTE",), + "SET_ADD": ("JUMP_ABSOLUTE",), + "GET_ANEXT": ("LOAD_CONST",), + "GET_AWAITABLE": ("LOAD_CONST",), + "DICT_MERGE": ("CALL_FUNCTION_EX",), + "MAP_ADD": ("JUMP_ABSOLUTE",), + "COMPARE_OP": ( + "POP_JUMP_IF_FALSE", + "POP_JUMP_IF_TRUE", + ), + "IS_OP": ( + "POP_JUMP_IF_FALSE", + "POP_JUMP_IF_TRUE", + ), + "CONTAINS_OP": ( + "POP_JUMP_IF_FALSE", + "POP_JUMP_IF_TRUE", + ), + # Note: there are some others with PREDICT on ceval, but they have more logic + # and it needs more experimentation to know how it behaves in the static generated + # code (and it's only an issue for us if there's actually a line change between + # those, so, we don't have to really handle all the cases, only the one where + # the line number actually changes from one instruction to the predicted one). +} + +# 3.10 optimizations include copying code branches multiple times (for instance +# if the body of a finally has a single assign statement it can copy the assign to the case +# where an exception happens and doesn't happen for optimization purposes) and as such +# we need to add the programmatic breakpoint multiple times. +TRACK_MULTIPLE_BRANCHES = sys.version_info[:2] >= (3, 10) + +# When tracking multiple branches, we try to fix the bytecodes which would be PREDICTED in the +# Python eval loop so that we don't have spurious line events that wouldn't usually be issued +# in the tracing as they're ignored due to the eval prediction (even though they're in the bytecode). +FIX_PREDICT = sys.version_info[:2] >= (3, 10) + + +def insert_pydevd_breaks( + code_to_modify, + breakpoint_lines, + code_line_info=None, + _pydev_stop_at_break=_pydev_stop_at_break, + _pydev_needs_stop_at_break=_pydev_needs_stop_at_break, +): + """ + Inserts pydevd programmatic breaks into the code (at the given lines). + + :param breakpoint_lines: set with the lines where we should add breakpoints. + :return: tuple(boolean flag whether insertion was successful, modified code). + """ + if code_line_info is None: + code_line_info = _get_code_line_info(code_to_modify) + + if not code_line_info.line_to_offset: + return False, code_to_modify + + # Create a copy (and make sure we're dealing with a set). + breakpoint_lines = set(breakpoint_lines) + + # Note that we can even generate breakpoints on the first line of code + # now, since we generate a spurious line event -- it may be a bit pointless + # as we'll stop in the first line and we don't currently stop the tracing after the + # user resumes, but in the future, if we do that, this would be a nice + # improvement. + # if code_to_modify.co_firstlineno in breakpoint_lines: + # return False, code_to_modify + + for line in breakpoint_lines: + if line <= 0: + # The first line is line 1, so, a break at line 0 is not valid. + pydev_log.info("Trying to add breakpoint in invalid line: %s", line) + return False, code_to_modify + + try: + b = bytecode.Bytecode.from_code(code_to_modify) + + if DEBUG: + op_number_bytecode = debug_helper.write_bytecode(b, prefix="bytecode.") + + helper_list = _HelperBytecodeList(b) + + modified_breakpoint_lines = breakpoint_lines.copy() + + curr_node = helper_list.head + added_breaks_in_lines = set() + last_lineno = None + while curr_node is not None: + instruction = curr_node.data + instruction_lineno = getattr(instruction, "lineno", None) + curr_name = getattr(instruction, "name", None) + + if FIX_PREDICT: + predict_targets = _PREDICT_TABLE.get(curr_name) + if predict_targets: + # Odd case: the next instruction may have a line number but it doesn't really + # appear in the tracing due to the PREDICT() in ceval, so, fix the bytecode so + # that it does things the way that ceval actually interprets it. + # See: https://mail.python.org/archives/list/python-dev@python.org/thread/CP2PTFCMTK57KM3M3DLJNWGO66R5RVPB/ + next_instruction = curr_node.next.data + next_name = getattr(next_instruction, "name", None) + if next_name in predict_targets: + next_instruction_lineno = getattr(next_instruction, "lineno", None) + if next_instruction_lineno: + next_instruction.lineno = None + + if instruction_lineno is not None: + if TRACK_MULTIPLE_BRANCHES: + if last_lineno is None: + last_lineno = instruction_lineno + else: + if last_lineno == instruction_lineno: + # If the previous is a label, someone may jump into it, so, we need to add + # the break even if it's in the same line. + if curr_node.prev.data.__class__ != Label: + # Skip adding this as the line is still the same. + curr_node = curr_node.next + continue + last_lineno = instruction_lineno + else: + if instruction_lineno in added_breaks_in_lines: + curr_node = curr_node.next + continue + + if instruction_lineno in modified_breakpoint_lines: + added_breaks_in_lines.add(instruction_lineno) + if curr_node.prev is not None and curr_node.prev.data.__class__ == Label and curr_name == "POP_TOP": + # If we have a SETUP_FINALLY where the target is a POP_TOP, we can't change + # the target to be the breakpoint instruction (this can crash the interpreter). + + for new_instruction in get_instructions_to_add( + instruction_lineno, + _pydev_stop_at_break=_pydev_stop_at_break, + _pydev_needs_stop_at_break=_pydev_needs_stop_at_break, + ): + curr_node = curr_node.append(new_instruction) + + else: + for new_instruction in get_instructions_to_add( + instruction_lineno, + _pydev_stop_at_break=_pydev_stop_at_break, + _pydev_needs_stop_at_break=_pydev_needs_stop_at_break, + ): + curr_node.prepend(new_instruction) + + curr_node = curr_node.next + + b[:] = helper_list + + if DEBUG: + debug_helper.write_bytecode(b, op_number_bytecode, prefix="bytecode.") + + new_code = b.to_code() + + except: + pydev_log.exception("Error inserting pydevd breaks.") + return False, code_to_modify + + if DEBUG: + op_number = debug_helper.write_dis(code_to_modify) + debug_helper.write_dis(new_code, op_number) + + return True, new_code diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/release_mem.h b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/release_mem.h new file mode 100644 index 0000000..cc6e3d9 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/release_mem.h @@ -0,0 +1,5 @@ +#include "Python.h" + +void release_co_extra(void *obj) { + Py_XDECREF(obj); +} diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/README.txt b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/README.txt new file mode 100644 index 0000000..d15aa20 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/README.txt @@ -0,0 +1,18 @@ +This folder contains vendored dependencies of the debugger. + +Right now this means the 'bytecode' library (MIT license). + +To update the version remove the bytecode* contents from this folder and then use: + +pip install bytecode --target . + +or from master (if needed for some early bugfix): + +python -m pip install https://github.com/MatthieuDartiailh/bytecode/archive/main.zip --target . + +Then run 'pydevd_fix_code.py' to fix the imports on the vendored file, run its tests (to see +if things are still ok) and commit. + +Then, to finish, apply the patch to add the offset to the instructions (bcb8a28669e9178f96f5d71af7259e0674acc47c) + +Note: commit the egg-info as a note of the license (force if needed). \ No newline at end of file diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__init__.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..aa9fe6a Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__pycache__/pydevd_fix_code.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__pycache__/pydevd_fix_code.cpython-312.pyc new file mode 100644 index 0000000..abe93d1 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__pycache__/pydevd_fix_code.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/COPYING b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/COPYING new file mode 100644 index 0000000..81d7e37 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/COPYING @@ -0,0 +1,21 @@ +The MIT License (MIT) +Copyright (c) 2016 Red Hat. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/INSTALLER b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/INSTALLER new file mode 100644 index 0000000..a1b589e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/METADATA b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/METADATA new file mode 100644 index 0000000..e1d5e01 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/METADATA @@ -0,0 +1,77 @@ +Metadata-Version: 2.1 +Name: bytecode +Version: 0.13.0.dev0 +Summary: Python module to generate and modify bytecode +Home-page: https://github.com/MatthieuDartiailh/bytecode +Author: Victor Stinner +Author-email: victor.stinner@gmail.com +Maintainer: Matthieu C. Dartiailh +Maintainer-email: m.dartiailh@gmail.com +License: MIT license +Platform: UNKNOWN +Classifier: Development Status :: 4 - Beta +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: MIT License +Classifier: Natural Language :: English +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Requires-Python: >=3.6 + +******** +bytecode +******** + +.. image:: https://img.shields.io/pypi/v/bytecode.svg + :alt: Latest release on the Python Cheeseshop (PyPI) + :target: https://pypi.python.org/pypi/bytecode + +.. image:: https://github.com/MatthieuDartiailh/bytecode/workflows/Continuous%20Integration/badge.svg + :target: https://github.com/MatthieuDartiailh/bytecode/actions + :alt: Continuous integration + +.. image:: https://github.com/MatthieuDartiailh/bytecode/workflows/Documentation%20building/badge.svg + :target: https://github.com/MatthieuDartiailh/bytecode/actions + :alt: Documentation building + +.. image:: https://img.shields.io/codecov/c/github/MatthieuDartiailh/bytecode/master.svg + :alt: Code coverage of bytecode on codecov.io + :target: https://codecov.io/github/MatthieuDartiailh/bytecode + +.. image:: https://img.shields.io/badge/code%20style-black-000000.svg + :alt: Code formatted using Black + :target: https://github.com/psf/black + +``bytecode`` is a Python module to generate and modify bytecode. + +* `bytecode project homepage at GitHub + `_ (code, bugs) +* `bytecode documentation + `_ +* `Download latest bytecode release at the Python Cheeseshop (PyPI) + `_ + +Install bytecode: ``python3 -m pip install bytecode``. It requires Python 3.6 +or newer. The latest release that supports Python 3.5 is 0.12.0. For Python 2.7 +support, have a look at `dead-bytecode +`_ instead. + +Example executing ``print('Hello World!')``: + +.. code:: python + + from bytecode import Instr, Bytecode + + bytecode = Bytecode([Instr("LOAD_NAME", 'print'), + Instr("LOAD_CONST", 'Hello World!'), + Instr("CALL_FUNCTION", 1), + Instr("POP_TOP"), + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE")]) + code = bytecode.to_code() + exec(code) + diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/RECORD b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/RECORD new file mode 100644 index 0000000..3890ece --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/RECORD @@ -0,0 +1,42 @@ +bytecode-0.13.0.dev0.dist-info/COPYING,sha256=baWkm-Te2LLURwK7TL0zOkMSVjVCU_ezvObHBo298Tk,1074 +bytecode-0.13.0.dev0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +bytecode-0.13.0.dev0.dist-info/METADATA,sha256=9XadDK6YTQ-FPowYI5DS4ieA7hRGnRP_fM5Z9ioPkEQ,2929 +bytecode-0.13.0.dev0.dist-info/RECORD,, +bytecode-0.13.0.dev0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +bytecode-0.13.0.dev0.dist-info/WHEEL,sha256=OqRkF0eY5GHssMorFjlbTIq072vpHpF60fIQA6lS9xA,92 +bytecode-0.13.0.dev0.dist-info/direct_url.json,sha256=s58Rb4KXRlMKxk-mzpvr_tJRQ-Hx8-DHsU6NdohCnAg,93 +bytecode-0.13.0.dev0.dist-info/top_level.txt,sha256=9BhdB7HqYZ-PvHNoWX6ilwLYWQqcgEOLwdb3aXm5Gys,9 +bytecode/__init__.py,sha256=d-yk4Xh4SwOWq9NgoD2rmBLG6RhUFNljeqs-NjMNSYM,3885 +bytecode/__pycache__/__init__.cpython-38.pyc,, +bytecode/__pycache__/bytecode.cpython-38.pyc,, +bytecode/__pycache__/cfg.cpython-38.pyc,, +bytecode/__pycache__/concrete.cpython-38.pyc,, +bytecode/__pycache__/flags.cpython-38.pyc,, +bytecode/__pycache__/instr.cpython-38.pyc,, +bytecode/__pycache__/peephole_opt.cpython-38.pyc,, +bytecode/bytecode.py,sha256=IMCcatHMtQ7M31nwj4r3drcvQuGVJAOP0d7C0O8P_SE,6894 +bytecode/cfg.py,sha256=RmJGJqwCxR-XYaPH9YGY4wNDycdtLvIBJb1OGSmxcN0,15274 +bytecode/concrete.py,sha256=0eb6Yh_NDLmzJNcMs2TFom0EqFVSM1cO3inMH90YE-s,21683 +bytecode/flags.py,sha256=hAvM_B2yQKRw44leHP0oCae0aaJraAbDDTpqIf4I1CM,5987 +bytecode/instr.py,sha256=HYc65LjNSOB3GCWkNkCSkee1rRzUyr89rgdjbKBaTpE,11616 +bytecode/peephole_opt.py,sha256=W-cFVPOZN-JKfDV3aImsYenDSZkSNBDTVQqeMrGPU18,15712 +bytecode/tests/__init__.py,sha256=BAdOXXNRdMVX4D8TuRYPlG9PHU7Cb0bzvyfA9s435kM,4968 +bytecode/tests/__pycache__/__init__.cpython-38.pyc,, +bytecode/tests/__pycache__/test_bytecode.cpython-38.pyc,, +bytecode/tests/__pycache__/test_cfg.cpython-38.pyc,, +bytecode/tests/__pycache__/test_code.cpython-38.pyc,, +bytecode/tests/__pycache__/test_concrete.cpython-38.pyc,, +bytecode/tests/__pycache__/test_flags.cpython-38.pyc,, +bytecode/tests/__pycache__/test_instr.cpython-38.pyc,, +bytecode/tests/__pycache__/test_misc.cpython-38.pyc,, +bytecode/tests/__pycache__/test_peephole_opt.cpython-38.pyc,, +bytecode/tests/__pycache__/util_annotation.cpython-38.pyc,, +bytecode/tests/test_bytecode.py,sha256=buvtlDC0NwoQ3zuZ7OENIIDngSqtiO9WkAa2-UvxGkI,15584 +bytecode/tests/test_cfg.py,sha256=c0xT8OfV-mDHu-DIDWr6LVlZQyK4GfgLSmT5AsodbMk,28194 +bytecode/tests/test_code.py,sha256=XCOH29rOXSoQz130s-AIC62r23e9qNjk8Y2xDB2LmSc,2100 +bytecode/tests/test_concrete.py,sha256=qT2qvabkF0yC7inniNx53cMSDN-2Qi0IE3pwBZSzF8g,49253 +bytecode/tests/test_flags.py,sha256=DY9U3c6tJdxJFm0jEm_To1Cc0I99EidQv_0guud-4oE,5684 +bytecode/tests/test_instr.py,sha256=rYeF8u-L0aW8bLPBxTUSy_T7KP6SaXyJKv9OhC8k6aA,11295 +bytecode/tests/test_misc.py,sha256=wyK1wpVPHRfaXgo-EqUI-F1nyB9-UACerHsHbExAo1U,6758 +bytecode/tests/test_peephole_opt.py,sha256=niUfhgEbiFR7IAmdQ_N9Qgh7D3wdRQ_zS0V8mKC4EzI,32640 +bytecode/tests/util_annotation.py,sha256=wKq6yPWrzkNlholl5Y10b3VjuCkoiYVgvcIjk_8jzf8,485 diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/REQUESTED b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/REQUESTED new file mode 100644 index 0000000..e69de29 diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/WHEEL b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/WHEEL new file mode 100644 index 0000000..385faab --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: bdist_wheel (0.36.2) +Root-Is-Purelib: true +Tag: py3-none-any + diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/direct_url.json b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/direct_url.json new file mode 100644 index 0000000..3c32b57 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/direct_url.json @@ -0,0 +1 @@ +{"archive_info": {}, "url": "https://github.com/MatthieuDartiailh/bytecode/archive/main.zip"} \ No newline at end of file diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/top_level.txt b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/top_level.txt new file mode 100644 index 0000000..b37707e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode-0.13.0.dev0.dist-info/top_level.txt @@ -0,0 +1 @@ +bytecode diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__init__.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__init__.py new file mode 100644 index 0000000..a68ddcc --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__init__.py @@ -0,0 +1,131 @@ +__version__ = "0.13.0.dev" + +__all__ = [ + "Label", + "Instr", + "SetLineno", + "Bytecode", + "ConcreteInstr", + "ConcreteBytecode", + "ControlFlowGraph", + "CompilerFlags", + "Compare", +] + +from _pydevd_frame_eval.vendored.bytecode.flags import CompilerFlags +from _pydevd_frame_eval.vendored.bytecode.instr import ( + UNSET, + Label, + SetLineno, + Instr, + CellVar, + FreeVar, # noqa + Compare, +) +from _pydevd_frame_eval.vendored.bytecode.bytecode import ( + BaseBytecode, + _BaseBytecodeList, + _InstrList, + Bytecode, +) # noqa +from _pydevd_frame_eval.vendored.bytecode.concrete import ( + ConcreteInstr, + ConcreteBytecode, # noqa + # import needed to use it in bytecode.py + _ConvertBytecodeToConcrete, +) +from _pydevd_frame_eval.vendored.bytecode.cfg import BasicBlock, ControlFlowGraph # noqa +import sys + + +def dump_bytecode(bytecode, *, lineno=False, stream=sys.stdout): + def format_line(index, line): + nonlocal cur_lineno, prev_lineno + if lineno: + if cur_lineno != prev_lineno: + line = "L.% 3s % 3s: %s" % (cur_lineno, index, line) + prev_lineno = cur_lineno + else: + line = " % 3s: %s" % (index, line) + else: + line = line + return line + + def format_instr(instr, labels=None): + text = instr.name + arg = instr._arg + if arg is not UNSET: + if isinstance(arg, Label): + try: + arg = "<%s>" % labels[arg] + except KeyError: + arg = "" + elif isinstance(arg, BasicBlock): + try: + arg = "<%s>" % labels[id(arg)] + except KeyError: + arg = "" + else: + arg = repr(arg) + text = "%s %s" % (text, arg) + return text + + indent = " " * 4 + + cur_lineno = bytecode.first_lineno + prev_lineno = None + + if isinstance(bytecode, ConcreteBytecode): + offset = 0 + for instr in bytecode: + fields = [] + if instr.lineno is not None: + cur_lineno = instr.lineno + if lineno: + fields.append(format_instr(instr)) + line = "".join(fields) + line = format_line(offset, line) + else: + fields.append("% 3s %s" % (offset, format_instr(instr))) + line = "".join(fields) + print(line, file=stream) + + offset += instr.size + elif isinstance(bytecode, Bytecode): + labels = {} + for index, instr in enumerate(bytecode): + if isinstance(instr, Label): + labels[instr] = "label_instr%s" % index + + for index, instr in enumerate(bytecode): + if isinstance(instr, Label): + label = labels[instr] + line = "%s:" % label + if index != 0: + print(file=stream) + else: + if instr.lineno is not None: + cur_lineno = instr.lineno + line = format_instr(instr, labels) + line = indent + format_line(index, line) + print(line, file=stream) + print(file=stream) + elif isinstance(bytecode, ControlFlowGraph): + labels = {} + for block_index, block in enumerate(bytecode, 1): + labels[id(block)] = "block%s" % block_index + + for block_index, block in enumerate(bytecode, 1): + print("%s:" % labels[id(block)], file=stream) + prev_lineno = None + for index, instr in enumerate(block): + if instr.lineno is not None: + cur_lineno = instr.lineno + line = format_instr(instr, labels) + line = indent + format_line(index, line) + print(line, file=stream) + if block.next_block is not None: + print(indent + "-> %s" % labels[id(block.next_block)], file=stream) + print(file=stream) + else: + raise TypeError("unknown bytecode class") diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..6734d22 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/bytecode.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/bytecode.cpython-312.pyc new file mode 100644 index 0000000..d195790 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/bytecode.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/cfg.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/cfg.cpython-312.pyc new file mode 100644 index 0000000..f0226e0 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/cfg.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/concrete.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/concrete.cpython-312.pyc new file mode 100644 index 0000000..a7c1270 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/concrete.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/flags.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/flags.cpython-312.pyc new file mode 100644 index 0000000..f491bc2 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/flags.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/instr.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/instr.cpython-312.pyc new file mode 100644 index 0000000..a1cb3d5 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/instr.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/peephole_opt.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/peephole_opt.cpython-312.pyc new file mode 100644 index 0000000..8532ee9 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__pycache__/peephole_opt.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/bytecode.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/bytecode.py new file mode 100644 index 0000000..8680659 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/bytecode.py @@ -0,0 +1,208 @@ +# alias to keep the 'bytecode' variable free +import sys +from _pydevd_frame_eval.vendored import bytecode as _bytecode +from _pydevd_frame_eval.vendored.bytecode.instr import UNSET, Label, SetLineno, Instr +from _pydevd_frame_eval.vendored.bytecode.flags import infer_flags + + +class BaseBytecode: + def __init__(self): + self.argcount = 0 + if sys.version_info > (3, 8): + self.posonlyargcount = 0 + self.kwonlyargcount = 0 + self.first_lineno = 1 + self.name = "" + self.filename = "" + self.docstring = UNSET + self.cellvars = [] + # we cannot recreate freevars from instructions because of super() + # special-case + self.freevars = [] + self._flags = _bytecode.CompilerFlags(0) + + def _copy_attr_from(self, bytecode): + self.argcount = bytecode.argcount + if sys.version_info > (3, 8): + self.posonlyargcount = bytecode.posonlyargcount + self.kwonlyargcount = bytecode.kwonlyargcount + self.flags = bytecode.flags + self.first_lineno = bytecode.first_lineno + self.name = bytecode.name + self.filename = bytecode.filename + self.docstring = bytecode.docstring + self.cellvars = list(bytecode.cellvars) + self.freevars = list(bytecode.freevars) + + def __eq__(self, other): + if type(self) != type(other): + return False + + if self.argcount != other.argcount: + return False + if sys.version_info > (3, 8): + if self.posonlyargcount != other.posonlyargcount: + return False + if self.kwonlyargcount != other.kwonlyargcount: + return False + if self.flags != other.flags: + return False + if self.first_lineno != other.first_lineno: + return False + if self.filename != other.filename: + return False + if self.name != other.name: + return False + if self.docstring != other.docstring: + return False + if self.cellvars != other.cellvars: + return False + if self.freevars != other.freevars: + return False + if self.compute_stacksize() != other.compute_stacksize(): + return False + + return True + + @property + def flags(self): + return self._flags + + @flags.setter + def flags(self, value): + if not isinstance(value, _bytecode.CompilerFlags): + value = _bytecode.CompilerFlags(value) + self._flags = value + + def update_flags(self, *, is_async=None): + self.flags = infer_flags(self, is_async) + + +class _BaseBytecodeList(BaseBytecode, list): + """List subclass providing type stable slicing and copying.""" + + def __getitem__(self, index): + value = super().__getitem__(index) + if isinstance(index, slice): + value = type(self)(value) + value._copy_attr_from(self) + + return value + + def copy(self): + new = type(self)(super().copy()) + new._copy_attr_from(self) + return new + + def legalize(self): + """Check that all the element of the list are valid and remove SetLineno.""" + lineno_pos = [] + set_lineno = None + current_lineno = self.first_lineno + + for pos, instr in enumerate(self): + if isinstance(instr, SetLineno): + set_lineno = instr.lineno + lineno_pos.append(pos) + continue + # Filter out Labels + if not isinstance(instr, Instr): + continue + if set_lineno is not None: + instr.lineno = set_lineno + elif instr.lineno is None: + instr.lineno = current_lineno + else: + current_lineno = instr.lineno + + for i in reversed(lineno_pos): + del self[i] + + def __iter__(self): + instructions = super().__iter__() + for instr in instructions: + self._check_instr(instr) + yield instr + + def _check_instr(self, instr): + raise NotImplementedError() + + +class _InstrList(list): + def _flat(self): + instructions = [] + labels = {} + jumps = [] + + offset = 0 + for index, instr in enumerate(self): + if isinstance(instr, Label): + instructions.append("label_instr%s" % index) + labels[instr] = offset + else: + if isinstance(instr, Instr) and isinstance(instr.arg, Label): + target_label = instr.arg + instr = _bytecode.ConcreteInstr(instr.name, 0, lineno=instr.lineno) + jumps.append((target_label, instr)) + instructions.append(instr) + offset += 1 + + for target_label, instr in jumps: + instr.arg = labels[target_label] + + return instructions + + def __eq__(self, other): + if not isinstance(other, _InstrList): + other = _InstrList(other) + + return self._flat() == other._flat() + + +class Bytecode(_InstrList, _BaseBytecodeList): + def __init__(self, instructions=()): + BaseBytecode.__init__(self) + self.argnames = [] + for instr in instructions: + self._check_instr(instr) + self.extend(instructions) + + def __iter__(self): + instructions = super().__iter__() + for instr in instructions: + self._check_instr(instr) + yield instr + + def _check_instr(self, instr): + if not isinstance(instr, (Label, SetLineno, Instr)): + raise ValueError( + "Bytecode must only contain Label, " "SetLineno, and Instr objects, " "but %s was found" % type(instr).__name__ + ) + + def _copy_attr_from(self, bytecode): + super()._copy_attr_from(bytecode) + if isinstance(bytecode, Bytecode): + self.argnames = bytecode.argnames + + @staticmethod + def from_code(code): + if sys.version_info[:2] >= (3, 11): + raise RuntimeError("This is not updated for Python 3.11 onwards, use only up to Python 3.10!!") + concrete = _bytecode.ConcreteBytecode.from_code(code) + return concrete.to_bytecode() + + def compute_stacksize(self, *, check_pre_and_post=True): + cfg = _bytecode.ControlFlowGraph.from_bytecode(self) + return cfg.compute_stacksize(check_pre_and_post=check_pre_and_post) + + def to_code(self, compute_jumps_passes=None, stacksize=None, *, check_pre_and_post=True): + # Prevent reconverting the concrete bytecode to bytecode and cfg to do the + # calculation if we need to do it. + if stacksize is None: + stacksize = self.compute_stacksize(check_pre_and_post=check_pre_and_post) + bc = self.to_concrete_bytecode(compute_jumps_passes=compute_jumps_passes) + return bc.to_code(stacksize=stacksize) + + def to_concrete_bytecode(self, compute_jumps_passes=None): + converter = _bytecode._ConvertBytecodeToConcrete(self) + return converter.to_concrete_bytecode(compute_jumps_passes=compute_jumps_passes) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/cfg.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/cfg.py new file mode 100644 index 0000000..6024c4f --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/cfg.py @@ -0,0 +1,443 @@ +import sys + +# alias to keep the 'bytecode' variable free +from _pydevd_frame_eval.vendored import bytecode as _bytecode +from _pydevd_frame_eval.vendored.bytecode.concrete import ConcreteInstr +from _pydevd_frame_eval.vendored.bytecode.flags import CompilerFlags +from _pydevd_frame_eval.vendored.bytecode.instr import Label, SetLineno, Instr + + +class BasicBlock(_bytecode._InstrList): + def __init__(self, instructions=None): + # a BasicBlock object, or None + self.next_block = None + if instructions: + super().__init__(instructions) + + def __iter__(self): + index = 0 + while index < len(self): + instr = self[index] + index += 1 + + if not isinstance(instr, (SetLineno, Instr)): + raise ValueError("BasicBlock must only contain SetLineno and Instr objects, " "but %s was found" % instr.__class__.__name__) + + if isinstance(instr, Instr) and instr.has_jump(): + if index < len(self): + raise ValueError("Only the last instruction of a basic " "block can be a jump") + + if not isinstance(instr.arg, BasicBlock): + raise ValueError( + "Jump target must a BasicBlock, got %s", + type(instr.arg).__name__, + ) + + yield instr + + def __getitem__(self, index): + value = super().__getitem__(index) + if isinstance(index, slice): + value = type(self)(value) + value.next_block = self.next_block + + return value + + def copy(self): + new = type(self)(super().copy()) + new.next_block = self.next_block + return new + + def legalize(self, first_lineno): + """Check that all the element of the list are valid and remove SetLineno.""" + lineno_pos = [] + set_lineno = None + current_lineno = first_lineno + + for pos, instr in enumerate(self): + if isinstance(instr, SetLineno): + set_lineno = current_lineno = instr.lineno + lineno_pos.append(pos) + continue + if set_lineno is not None: + instr.lineno = set_lineno + elif instr.lineno is None: + instr.lineno = current_lineno + else: + current_lineno = instr.lineno + + for i in reversed(lineno_pos): + del self[i] + + return current_lineno + + def get_jump(self): + if not self: + return None + + last_instr = self[-1] + if not (isinstance(last_instr, Instr) and last_instr.has_jump()): + return None + + target_block = last_instr.arg + assert isinstance(target_block, BasicBlock) + return target_block + + +def _compute_stack_size(block, size, maxsize, *, check_pre_and_post=True): + """Generator used to reduce the use of function stacks. + + This allows to avoid nested recursion and allow to treat more cases. + + HOW-TO: + Following the methods of Trampoline + (see https://en.wikipedia.org/wiki/Trampoline_(computing)), + + We yield either: + + - the arguments that would be used in the recursive calls, i.e, + 'yield block, size, maxsize' instead of making a recursive call + '_compute_stack_size(block, size, maxsize)', if we encounter an + instruction jumping to another block or if the block is linked to + another one (ie `next_block` is set) + - the required stack from the stack if we went through all the instructions + or encountered an unconditional jump. + + In the first case, the calling function is then responsible for creating a + new generator with those arguments, iterating over it till exhaustion to + determine the stacksize required by the block and resuming this function + with the determined stacksize. + + """ + # If the block is currently being visited (seen = True) or if it was visited + # previously by using a larger starting size than the one in use, return the + # maxsize. + if block.seen or block.startsize >= size: + yield maxsize + + def update_size(pre_delta, post_delta, size, maxsize): + size += pre_delta + if size < 0: + msg = "Failed to compute stacksize, got negative size" + raise RuntimeError(msg) + size += post_delta + maxsize = max(maxsize, size) + return size, maxsize + + # Prevent recursive visit of block if two blocks are nested (jump from one + # to the other). + block.seen = True + block.startsize = size + + for instr in block: + # Ignore SetLineno + if isinstance(instr, SetLineno): + continue + + # For instructions with a jump first compute the stacksize required when the + # jump is taken. + if instr.has_jump(): + effect = instr.pre_and_post_stack_effect(jump=True) if check_pre_and_post else (instr.stack_effect(jump=True), 0) + taken_size, maxsize = update_size(*effect, size, maxsize) + # Yield the parameters required to compute the stacksize required + # by the block to which the jumnp points to and resume when we now + # the maxsize. + maxsize = yield instr.arg, taken_size, maxsize + + # For unconditional jumps abort early since the other instruction will + # never be seen. + if instr.is_uncond_jump(): + block.seen = False + yield maxsize + + # jump=False: non-taken path of jumps, or any non-jump + effect = instr.pre_and_post_stack_effect(jump=False) if check_pre_and_post else (instr.stack_effect(jump=False), 0) + size, maxsize = update_size(*effect, size, maxsize) + + if block.next_block: + maxsize = yield block.next_block, size, maxsize + + block.seen = False + yield maxsize + + +class ControlFlowGraph(_bytecode.BaseBytecode): + def __init__(self): + super().__init__() + self._blocks = [] + self._block_index = {} + self.argnames = [] + + self.add_block() + + def legalize(self): + """Legalize all blocks.""" + current_lineno = self.first_lineno + for block in self._blocks: + current_lineno = block.legalize(current_lineno) + + def get_block_index(self, block): + try: + return self._block_index[id(block)] + except KeyError: + raise ValueError("the block is not part of this bytecode") + + def _add_block(self, block): + block_index = len(self._blocks) + self._blocks.append(block) + self._block_index[id(block)] = block_index + + def add_block(self, instructions=None): + block = BasicBlock(instructions) + self._add_block(block) + return block + + def compute_stacksize(self, *, check_pre_and_post=True): + """Compute the stack size by iterating through the blocks + + The implementation make use of a generator function to avoid issue with + deeply nested recursions. + + """ + # In the absence of any block return 0 + if not self: + return 0 + + # Ensure that previous calculation do not impact this one. + for block in self: + block.seen = False + block.startsize = -32768 # INT_MIN + + # Starting with Python 3.10, generator and coroutines start with one object + # on the stack (None, anything is an error). + initial_stack_size = 0 + if sys.version_info >= (3, 10) and self.flags & (CompilerFlags.GENERATOR | CompilerFlags.COROUTINE | CompilerFlags.ASYNC_GENERATOR): + initial_stack_size = 1 + + # Create a generator/coroutine responsible of dealing with the first block + coro = _compute_stack_size(self[0], initial_stack_size, 0, check_pre_and_post=check_pre_and_post) + + # Create a list of generator that have not yet been exhausted + coroutines = [] + + push_coroutine = coroutines.append + pop_coroutine = coroutines.pop + args = None + + try: + while True: + args = coro.send(None) + + # Consume the stored generators as long as they return a simple + # interger that is to be used to resume the last stored generator. + while isinstance(args, int): + coro = pop_coroutine() + args = coro.send(args) + + # Otherwise we enter a new block and we store the generator under + # use and create a new one to process the new block + push_coroutine(coro) + coro = _compute_stack_size(*args, check_pre_and_post=check_pre_and_post) + + except IndexError: + # The exception occurs when all the generators have been exhausted + # in which case teh last yielded value is the stacksize. + assert args is not None + return args + + def __repr__(self): + return "" % len(self._blocks) + + def get_instructions(self): + instructions = [] + jumps = [] + + for block in self: + target_block = block.get_jump() + if target_block is not None: + instr = block[-1] + instr = ConcreteInstr(instr.name, 0, lineno=instr.lineno) + jumps.append((target_block, instr)) + + instructions.extend(block[:-1]) + instructions.append(instr) + else: + instructions.extend(block) + + for target_block, instr in jumps: + instr.arg = self.get_block_index(target_block) + + return instructions + + def __eq__(self, other): + if type(self) != type(other): + return False + + if self.argnames != other.argnames: + return False + + instrs1 = self.get_instructions() + instrs2 = other.get_instructions() + if instrs1 != instrs2: + return False + # FIXME: compare block.next_block + + return super().__eq__(other) + + def __len__(self): + return len(self._blocks) + + def __iter__(self): + return iter(self._blocks) + + def __getitem__(self, index): + if isinstance(index, BasicBlock): + index = self.get_block_index(index) + return self._blocks[index] + + def __delitem__(self, index): + if isinstance(index, BasicBlock): + index = self.get_block_index(index) + block = self._blocks[index] + del self._blocks[index] + del self._block_index[id(block)] + for index in range(index, len(self)): + block = self._blocks[index] + self._block_index[id(block)] -= 1 + + def split_block(self, block, index): + if not isinstance(block, BasicBlock): + raise TypeError("expected block") + block_index = self.get_block_index(block) + + if index < 0: + raise ValueError("index must be positive") + + block = self._blocks[block_index] + if index == 0: + return block + + if index > len(block): + raise ValueError("index out of the block") + + instructions = block[index:] + if not instructions: + if block_index + 1 < len(self): + return self[block_index + 1] + + del block[index:] + + block2 = BasicBlock(instructions) + block.next_block = block2 + + for block in self[block_index + 1 :]: + self._block_index[id(block)] += 1 + + self._blocks.insert(block_index + 1, block2) + self._block_index[id(block2)] = block_index + 1 + + return block2 + + @staticmethod + def from_bytecode(bytecode): + # label => instruction index + label_to_block_index = {} + jumps = [] + block_starts = {} + for index, instr in enumerate(bytecode): + if isinstance(instr, Label): + label_to_block_index[instr] = index + else: + if isinstance(instr, Instr) and isinstance(instr.arg, Label): + jumps.append((index, instr.arg)) + + for target_index, target_label in jumps: + target_index = label_to_block_index[target_label] + block_starts[target_index] = target_label + + bytecode_blocks = _bytecode.ControlFlowGraph() + bytecode_blocks._copy_attr_from(bytecode) + bytecode_blocks.argnames = list(bytecode.argnames) + + # copy instructions, convert labels to block labels + block = bytecode_blocks[0] + labels = {} + jumps = [] + for index, instr in enumerate(bytecode): + if index in block_starts: + old_label = block_starts[index] + if index != 0: + new_block = bytecode_blocks.add_block() + if not block[-1].is_final(): + block.next_block = new_block + block = new_block + if old_label is not None: + labels[old_label] = block + elif block and isinstance(block[-1], Instr): + if block[-1].is_final(): + block = bytecode_blocks.add_block() + elif block[-1].has_jump(): + new_block = bytecode_blocks.add_block() + block.next_block = new_block + block = new_block + + if isinstance(instr, Label): + continue + + # don't copy SetLineno objects + if isinstance(instr, Instr): + instr = instr.copy() + if isinstance(instr.arg, Label): + jumps.append(instr) + block.append(instr) + + for instr in jumps: + label = instr.arg + instr.arg = labels[label] + + return bytecode_blocks + + def to_bytecode(self): + """Convert to Bytecode.""" + + used_blocks = set() + for block in self: + target_block = block.get_jump() + if target_block is not None: + used_blocks.add(id(target_block)) + + labels = {} + jumps = [] + instructions = [] + + for block in self: + if id(block) in used_blocks: + new_label = Label() + labels[id(block)] = new_label + instructions.append(new_label) + + for instr in block: + # don't copy SetLineno objects + if isinstance(instr, Instr): + instr = instr.copy() + if isinstance(instr.arg, BasicBlock): + jumps.append(instr) + instructions.append(instr) + + # Map to new labels + for instr in jumps: + instr.arg = labels[id(instr.arg)] + + bytecode = _bytecode.Bytecode() + bytecode._copy_attr_from(self) + bytecode.argnames = list(self.argnames) + bytecode[:] = instructions + + return bytecode + + def to_code(self, stacksize=None): + """Convert to code.""" + if stacksize is None: + stacksize = self.compute_stacksize() + bc = self.to_bytecode() + return bc.to_code(stacksize=stacksize) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/concrete.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/concrete.py new file mode 100644 index 0000000..63ec614 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/concrete.py @@ -0,0 +1,658 @@ +import dis +import inspect +import opcode as _opcode +import struct +import sys +import types + +# alias to keep the 'bytecode' variable free +from _pydevd_frame_eval.vendored import bytecode as _bytecode +from _pydevd_frame_eval.vendored.bytecode.instr import ( + UNSET, + Instr, + Label, + SetLineno, + FreeVar, + CellVar, + Compare, + const_key, + _check_arg_int, +) + +# - jumps use instruction +# - lineno use bytes (dis.findlinestarts(code)) +# - dis displays bytes +OFFSET_AS_INSTRUCTION = sys.version_info >= (3, 10) + + +def _set_docstring(code, consts): + if not consts: + return + first_const = consts[0] + if isinstance(first_const, str) or first_const is None: + code.docstring = first_const + + +class ConcreteInstr(Instr): + """Concrete instruction. + + arg must be an integer in the range 0..2147483647. + + It has a read-only size attribute. + """ + + __slots__ = ("_size", "_extended_args", "offset") + + def __init__(self, name, arg=UNSET, *, lineno=None, extended_args=None, offset=None): + # Allow to remember a potentially meaningless EXTENDED_ARG emitted by + # Python to properly compute the size and avoid messing up the jump + # targets + self._extended_args = extended_args + self._set(name, arg, lineno) + self.offset = offset + + def _check_arg(self, name, opcode, arg): + if opcode >= _opcode.HAVE_ARGUMENT: + if arg is UNSET: + raise ValueError("operation %s requires an argument" % name) + + _check_arg_int(name, arg) + else: + if arg is not UNSET: + raise ValueError("operation %s has no argument" % name) + + def _set(self, name, arg, lineno): + super()._set(name, arg, lineno) + size = 2 + if arg is not UNSET: + while arg > 0xFF: + size += 2 + arg >>= 8 + if self._extended_args is not None: + size = 2 + 2 * self._extended_args + self._size = size + + @property + def size(self): + return self._size + + def _cmp_key(self, labels=None): + return (self._lineno, self._name, self._arg) + + def get_jump_target(self, instr_offset): + if self._opcode in _opcode.hasjrel: + s = (self._size // 2) if OFFSET_AS_INSTRUCTION else self._size + return instr_offset + s + self._arg + if self._opcode in _opcode.hasjabs: + return self._arg + return None + + def assemble(self): + if self._arg is UNSET: + return bytes((self._opcode, 0)) + + arg = self._arg + b = [self._opcode, arg & 0xFF] + while arg > 0xFF: + arg >>= 8 + b[:0] = [_opcode.EXTENDED_ARG, arg & 0xFF] + + if self._extended_args: + while len(b) < self._size: + b[:0] = [_opcode.EXTENDED_ARG, 0x00] + + return bytes(b) + + @classmethod + def disassemble(cls, lineno, code, offset): + index = 2 * offset if OFFSET_AS_INSTRUCTION else offset + op = code[index] + if op >= _opcode.HAVE_ARGUMENT: + arg = code[index + 1] + else: + arg = UNSET + name = _opcode.opname[op] + # fabioz: added offset to ConcreteBytecode + # Need to keep an eye on https://github.com/MatthieuDartiailh/bytecode/issues/48 in + # case the library decides to add this in some other way. + return cls(name, arg, lineno=lineno, offset=index) + + +class ConcreteBytecode(_bytecode._BaseBytecodeList): + def __init__(self, instructions=(), *, consts=(), names=(), varnames=()): + super().__init__() + self.consts = list(consts) + self.names = list(names) + self.varnames = list(varnames) + for instr in instructions: + self._check_instr(instr) + self.extend(instructions) + + def __iter__(self): + instructions = super().__iter__() + for instr in instructions: + self._check_instr(instr) + yield instr + + def _check_instr(self, instr): + if not isinstance(instr, (ConcreteInstr, SetLineno)): + raise ValueError( + "ConcreteBytecode must only contain " "ConcreteInstr and SetLineno objects, " "but %s was found" % type(instr).__name__ + ) + + def _copy_attr_from(self, bytecode): + super()._copy_attr_from(bytecode) + if isinstance(bytecode, ConcreteBytecode): + self.consts = bytecode.consts + self.names = bytecode.names + self.varnames = bytecode.varnames + + def __repr__(self): + return "" % len(self) + + def __eq__(self, other): + if type(self) != type(other): + return False + + const_keys1 = list(map(const_key, self.consts)) + const_keys2 = list(map(const_key, other.consts)) + if const_keys1 != const_keys2: + return False + + if self.names != other.names: + return False + if self.varnames != other.varnames: + return False + + return super().__eq__(other) + + @staticmethod + def from_code(code, *, extended_arg=False): + line_starts = dict(entry for entry in dis.findlinestarts(code) if entry[1] is not None) + + # find block starts + instructions = [] + offset = 0 + lineno = code.co_firstlineno + while offset < (len(code.co_code) // (2 if OFFSET_AS_INSTRUCTION else 1)): + lineno_off = (2 * offset) if OFFSET_AS_INSTRUCTION else offset + if lineno_off in line_starts: + lineno = line_starts[lineno_off] + + instr = ConcreteInstr.disassemble(lineno, code.co_code, offset) + + instructions.append(instr) + offset += (instr.size // 2) if OFFSET_AS_INSTRUCTION else instr.size + + bytecode = ConcreteBytecode() + + # replace jump targets with blocks + # HINT : in some cases Python generate useless EXTENDED_ARG opcode + # with a value of zero. Such opcodes do not increases the size of the + # following opcode the way a normal EXTENDED_ARG does. As a + # consequence, they need to be tracked manually as otherwise the + # offsets in jump targets can end up being wrong. + if not extended_arg: + # The list is modified in place + bytecode._remove_extended_args(instructions) + + bytecode.name = code.co_name + bytecode.filename = code.co_filename + bytecode.flags = code.co_flags + bytecode.argcount = code.co_argcount + if sys.version_info >= (3, 8): + bytecode.posonlyargcount = code.co_posonlyargcount + bytecode.kwonlyargcount = code.co_kwonlyargcount + bytecode.first_lineno = code.co_firstlineno + bytecode.names = list(code.co_names) + bytecode.consts = list(code.co_consts) + bytecode.varnames = list(code.co_varnames) + bytecode.freevars = list(code.co_freevars) + bytecode.cellvars = list(code.co_cellvars) + _set_docstring(bytecode, code.co_consts) + + bytecode[:] = instructions + return bytecode + + @staticmethod + def _normalize_lineno(instructions, first_lineno): + lineno = first_lineno + for instr in instructions: + # if instr.lineno is not set, it's inherited from the previous + # instruction, or from self.first_lineno + if instr.lineno is not None: + lineno = instr.lineno + + if isinstance(instr, ConcreteInstr): + yield (lineno, instr) + + def _assemble_code(self): + offset = 0 + code_str = [] + linenos = [] + for lineno, instr in self._normalize_lineno(self, self.first_lineno): + code_str.append(instr.assemble()) + i_size = instr.size + linenos.append(((offset * 2) if OFFSET_AS_INSTRUCTION else offset, i_size, lineno)) + offset += (i_size // 2) if OFFSET_AS_INSTRUCTION else i_size + code_str = b"".join(code_str) + return (code_str, linenos) + + @staticmethod + def _assemble_lnotab(first_lineno, linenos): + lnotab = [] + old_offset = 0 + old_lineno = first_lineno + for offset, _, lineno in linenos: + dlineno = lineno - old_lineno + if dlineno == 0: + continue + # FIXME: be kind, force monotonic line numbers? add an option? + if dlineno < 0 and sys.version_info < (3, 6): + raise ValueError("negative line number delta is not supported " "on Python < 3.6") + old_lineno = lineno + + doff = offset - old_offset + old_offset = offset + + while doff > 255: + lnotab.append(b"\xff\x00") + doff -= 255 + + while dlineno < -128: + lnotab.append(struct.pack("Bb", doff, -128)) + doff = 0 + dlineno -= -128 + + while dlineno > 127: + lnotab.append(struct.pack("Bb", doff, 127)) + doff = 0 + dlineno -= 127 + + assert 0 <= doff <= 255 + assert -128 <= dlineno <= 127 + + lnotab.append(struct.pack("Bb", doff, dlineno)) + + return b"".join(lnotab) + + @staticmethod + def _pack_linetable(doff, dlineno, linetable): + while dlineno < -127: + linetable.append(struct.pack("Bb", 0, -127)) + dlineno -= -127 + + while dlineno > 127: + linetable.append(struct.pack("Bb", 0, 127)) + dlineno -= 127 + + if doff > 254: + linetable.append(struct.pack("Bb", 254, dlineno)) + doff -= 254 + + while doff > 254: + linetable.append(b"\xfe\x00") + doff -= 254 + linetable.append(struct.pack("Bb", doff, 0)) + + else: + linetable.append(struct.pack("Bb", doff, dlineno)) + + assert 0 <= doff <= 254 + assert -127 <= dlineno <= 127 + + def _assemble_linestable(self, first_lineno, linenos): + if not linenos: + return b"" + + linetable = [] + old_offset = 0 + + iter_in = iter(linenos) + + offset, i_size, old_lineno = next(iter_in) + old_dlineno = old_lineno - first_lineno + for offset, i_size, lineno in iter_in: + dlineno = lineno - old_lineno + if dlineno == 0: + continue + old_lineno = lineno + + doff = offset - old_offset + old_offset = offset + + self._pack_linetable(doff, old_dlineno, linetable) + old_dlineno = dlineno + + # Pack the line of the last instruction. + doff = offset + i_size - old_offset + self._pack_linetable(doff, old_dlineno, linetable) + + return b"".join(linetable) + + @staticmethod + def _remove_extended_args(instructions): + # replace jump targets with blocks + # HINT : in some cases Python generate useless EXTENDED_ARG opcode + # with a value of zero. Such opcodes do not increases the size of the + # following opcode the way a normal EXTENDED_ARG does. As a + # consequence, they need to be tracked manually as otherwise the + # offsets in jump targets can end up being wrong. + nb_extended_args = 0 + extended_arg = None + index = 0 + while index < len(instructions): + instr = instructions[index] + + # Skip SetLineno meta instruction + if isinstance(instr, SetLineno): + index += 1 + continue + + if instr.name == "EXTENDED_ARG": + nb_extended_args += 1 + if extended_arg is not None: + extended_arg = (extended_arg << 8) + instr.arg + else: + extended_arg = instr.arg + + del instructions[index] + continue + + if extended_arg is not None: + arg = (extended_arg << 8) + instr.arg + extended_arg = None + + instr = ConcreteInstr( + instr.name, + arg, + lineno=instr.lineno, + extended_args=nb_extended_args, + offset=instr.offset, + ) + instructions[index] = instr + nb_extended_args = 0 + + index += 1 + + if extended_arg is not None: + raise ValueError("EXTENDED_ARG at the end of the code") + + def compute_stacksize(self, *, check_pre_and_post=True): + bytecode = self.to_bytecode() + cfg = _bytecode.ControlFlowGraph.from_bytecode(bytecode) + return cfg.compute_stacksize(check_pre_and_post=check_pre_and_post) + + def to_code(self, stacksize=None, *, check_pre_and_post=True): + code_str, linenos = self._assemble_code() + lnotab = ( + self._assemble_linestable(self.first_lineno, linenos) + if sys.version_info >= (3, 10) + else self._assemble_lnotab(self.first_lineno, linenos) + ) + nlocals = len(self.varnames) + if stacksize is None: + stacksize = self.compute_stacksize(check_pre_and_post=check_pre_and_post) + + if sys.version_info < (3, 8): + return types.CodeType( + self.argcount, + self.kwonlyargcount, + nlocals, + stacksize, + int(self.flags), + code_str, + tuple(self.consts), + tuple(self.names), + tuple(self.varnames), + self.filename, + self.name, + self.first_lineno, + lnotab, + tuple(self.freevars), + tuple(self.cellvars), + ) + else: + return types.CodeType( + self.argcount, + self.posonlyargcount, + self.kwonlyargcount, + nlocals, + stacksize, + int(self.flags), + code_str, + tuple(self.consts), + tuple(self.names), + tuple(self.varnames), + self.filename, + self.name, + self.first_lineno, + lnotab, + tuple(self.freevars), + tuple(self.cellvars), + ) + + def to_bytecode(self): + # Copy instruction and remove extended args if any (in-place) + c_instructions = self[:] + self._remove_extended_args(c_instructions) + + # find jump targets + jump_targets = set() + offset = 0 + for instr in c_instructions: + if isinstance(instr, SetLineno): + continue + target = instr.get_jump_target(offset) + if target is not None: + jump_targets.add(target) + offset += (instr.size // 2) if OFFSET_AS_INSTRUCTION else instr.size + + # create labels + jumps = [] + instructions = [] + labels = {} + offset = 0 + ncells = len(self.cellvars) + + for lineno, instr in self._normalize_lineno(c_instructions, self.first_lineno): + if offset in jump_targets: + label = Label() + labels[offset] = label + instructions.append(label) + + jump_target = instr.get_jump_target(offset) + size = instr.size + + arg = instr.arg + # FIXME: better error reporting + if instr.opcode in _opcode.hasconst: + arg = self.consts[arg] + elif instr.opcode in _opcode.haslocal: + arg = self.varnames[arg] + elif instr.opcode in _opcode.hasname: + arg = self.names[arg] + elif instr.opcode in _opcode.hasfree: + if arg < ncells: + name = self.cellvars[arg] + arg = CellVar(name) + else: + name = self.freevars[arg - ncells] + arg = FreeVar(name) + elif instr.opcode in _opcode.hascompare: + arg = Compare(arg) + + if jump_target is None: + instr = Instr(instr.name, arg, lineno=lineno, offset=instr.offset) + else: + instr_index = len(instructions) + instructions.append(instr) + offset += (size // 2) if OFFSET_AS_INSTRUCTION else size + + if jump_target is not None: + jumps.append((instr_index, jump_target)) + + # replace jump targets with labels + for index, jump_target in jumps: + instr = instructions[index] + # FIXME: better error reporting on missing label + label = labels[jump_target] + instructions[index] = Instr(instr.name, label, lineno=instr.lineno, offset=instr.offset) + + bytecode = _bytecode.Bytecode() + bytecode._copy_attr_from(self) + + nargs = bytecode.argcount + bytecode.kwonlyargcount + if sys.version_info > (3, 8): + nargs += bytecode.posonlyargcount + if bytecode.flags & inspect.CO_VARARGS: + nargs += 1 + if bytecode.flags & inspect.CO_VARKEYWORDS: + nargs += 1 + bytecode.argnames = self.varnames[:nargs] + _set_docstring(bytecode, self.consts) + + bytecode.extend(instructions) + return bytecode + + +class _ConvertBytecodeToConcrete: + # Default number of passes of compute_jumps() before giving up. Refer to + # assemble_jump_offsets() in compile.c for background. + _compute_jumps_passes = 10 + + def __init__(self, code): + assert isinstance(code, _bytecode.Bytecode) + self.bytecode = code + + # temporary variables + self.instructions = [] + self.jumps = [] + self.labels = {} + + # used to build ConcreteBytecode() object + self.consts_indices = {} + self.consts_list = [] + self.names = [] + self.varnames = [] + + def add_const(self, value): + key = const_key(value) + if key in self.consts_indices: + return self.consts_indices[key] + index = len(self.consts_indices) + self.consts_indices[key] = index + self.consts_list.append(value) + return index + + @staticmethod + def add(names, name): + try: + index = names.index(name) + except ValueError: + index = len(names) + names.append(name) + return index + + def concrete_instructions(self): + ncells = len(self.bytecode.cellvars) + lineno = self.bytecode.first_lineno + + for instr in self.bytecode: + if isinstance(instr, Label): + self.labels[instr] = len(self.instructions) + continue + + if isinstance(instr, SetLineno): + lineno = instr.lineno + continue + + if isinstance(instr, ConcreteInstr): + instr = instr.copy() + else: + assert isinstance(instr, Instr) + + if instr.lineno is not None: + lineno = instr.lineno + + arg = instr.arg + is_jump = isinstance(arg, Label) + if is_jump: + label = arg + # fake value, real value is set in compute_jumps() + arg = 0 + elif instr.opcode in _opcode.hasconst: + arg = self.add_const(arg) + elif instr.opcode in _opcode.haslocal: + arg = self.add(self.varnames, arg) + elif instr.opcode in _opcode.hasname: + arg = self.add(self.names, arg) + elif instr.opcode in _opcode.hasfree: + if isinstance(arg, CellVar): + arg = self.bytecode.cellvars.index(arg.name) + else: + assert isinstance(arg, FreeVar) + arg = ncells + self.bytecode.freevars.index(arg.name) + elif instr.opcode in _opcode.hascompare: + if isinstance(arg, Compare): + arg = arg.value + + instr = ConcreteInstr(instr.name, arg, lineno=lineno) + if is_jump: + self.jumps.append((len(self.instructions), label, instr)) + + self.instructions.append(instr) + + def compute_jumps(self): + offsets = [] + offset = 0 + for index, instr in enumerate(self.instructions): + offsets.append(offset) + offset += instr.size // 2 if OFFSET_AS_INSTRUCTION else instr.size + # needed if a label is at the end + offsets.append(offset) + + # fix argument of jump instructions: resolve labels + modified = False + for index, label, instr in self.jumps: + target_index = self.labels[label] + target_offset = offsets[target_index] + + if instr.opcode in _opcode.hasjrel: + instr_offset = offsets[index] + target_offset -= instr_offset + (instr.size // 2 if OFFSET_AS_INSTRUCTION else instr.size) + + old_size = instr.size + # FIXME: better error report if target_offset is negative + instr.arg = target_offset + if instr.size != old_size: + modified = True + + return modified + + def to_concrete_bytecode(self, compute_jumps_passes=None): + if compute_jumps_passes is None: + compute_jumps_passes = self._compute_jumps_passes + + first_const = self.bytecode.docstring + if first_const is not UNSET: + self.add_const(first_const) + + self.varnames.extend(self.bytecode.argnames) + + self.concrete_instructions() + for pas in range(0, compute_jumps_passes): + modified = self.compute_jumps() + if not modified: + break + else: + raise RuntimeError("compute_jumps() failed to converge after" " %d passes" % (pas + 1)) + + concrete = ConcreteBytecode( + self.instructions, + consts=self.consts_list.copy(), + names=self.names, + varnames=self.varnames, + ) + concrete._copy_attr_from(self.bytecode) + return concrete diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/flags.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/flags.py new file mode 100644 index 0000000..ea72f9e --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/flags.py @@ -0,0 +1,162 @@ +# alias to keep the 'bytecode' variable free +import sys +from enum import IntFlag +from _pydevd_frame_eval.vendored import bytecode as _bytecode + + +class CompilerFlags(IntFlag): + """Possible values of the co_flags attribute of Code object. + + Note: We do not rely on inspect values here as some of them are missing and + furthermore would be version dependent. + + """ + + OPTIMIZED = 0x00001 # noqa + NEWLOCALS = 0x00002 # noqa + VARARGS = 0x00004 # noqa + VARKEYWORDS = 0x00008 # noqa + NESTED = 0x00010 # noqa + GENERATOR = 0x00020 # noqa + NOFREE = 0x00040 # noqa + # New in Python 3.5 + # Used for coroutines defined using async def ie native coroutine + COROUTINE = 0x00080 # noqa + # Used for coroutines defined as a generator and then decorated using + # types.coroutine + ITERABLE_COROUTINE = 0x00100 # noqa + # New in Python 3.6 + # Generator defined in an async def function + ASYNC_GENERATOR = 0x00200 # noqa + + # __future__ flags + # future flags changed in Python 3.9 + if sys.version_info < (3, 9): + FUTURE_GENERATOR_STOP = 0x80000 # noqa + if sys.version_info > (3, 6): + FUTURE_ANNOTATIONS = 0x100000 + else: + FUTURE_GENERATOR_STOP = 0x800000 # noqa + FUTURE_ANNOTATIONS = 0x1000000 + + +def infer_flags(bytecode, is_async=None): + """Infer the proper flags for a bytecode based on the instructions. + + Because the bytecode does not have enough context to guess if a function + is asynchronous the algorithm tries to be conservative and will never turn + a previously async code into a sync one. + + Parameters + ---------- + bytecode : Bytecode | ConcreteBytecode | ControlFlowGraph + Bytecode for which to infer the proper flags + is_async : bool | None, optional + Force the code to be marked as asynchronous if True, prevent it from + being marked as asynchronous if False and simply infer the best + solution based on the opcode and the existing flag if None. + + """ + flags = CompilerFlags(0) + if not isinstance( + bytecode, + (_bytecode.Bytecode, _bytecode.ConcreteBytecode, _bytecode.ControlFlowGraph), + ): + msg = "Expected a Bytecode, ConcreteBytecode or ControlFlowGraph " "instance not %s" + raise ValueError(msg % bytecode) + + instructions = bytecode.get_instructions() if isinstance(bytecode, _bytecode.ControlFlowGraph) else bytecode + instr_names = {i.name for i in instructions if not isinstance(i, (_bytecode.SetLineno, _bytecode.Label))} + + # Identify optimized code + if not (instr_names & {"STORE_NAME", "LOAD_NAME", "DELETE_NAME"}): + flags |= CompilerFlags.OPTIMIZED + + # Check for free variables + if not ( + instr_names + & { + "LOAD_CLOSURE", + "LOAD_DEREF", + "STORE_DEREF", + "DELETE_DEREF", + "LOAD_CLASSDEREF", + } + ): + flags |= CompilerFlags.NOFREE + + # Copy flags for which we cannot infer the right value + flags |= bytecode.flags & (CompilerFlags.NEWLOCALS | CompilerFlags.VARARGS | CompilerFlags.VARKEYWORDS | CompilerFlags.NESTED) + + sure_generator = instr_names & {"YIELD_VALUE"} + maybe_generator = instr_names & {"YIELD_VALUE", "YIELD_FROM"} + + sure_async = instr_names & { + "GET_AWAITABLE", + "GET_AITER", + "GET_ANEXT", + "BEFORE_ASYNC_WITH", + "SETUP_ASYNC_WITH", + "END_ASYNC_FOR", + } + + # If performing inference or forcing an async behavior, first inspect + # the flags since this is the only way to identify iterable coroutines + if is_async in (None, True): + if bytecode.flags & CompilerFlags.COROUTINE: + if sure_generator: + flags |= CompilerFlags.ASYNC_GENERATOR + else: + flags |= CompilerFlags.COROUTINE + elif bytecode.flags & CompilerFlags.ITERABLE_COROUTINE: + if sure_async: + msg = ( + "The ITERABLE_COROUTINE flag is set but bytecode that" + "can only be used in async functions have been " + "detected. Please unset that flag before performing " + "inference." + ) + raise ValueError(msg) + flags |= CompilerFlags.ITERABLE_COROUTINE + elif bytecode.flags & CompilerFlags.ASYNC_GENERATOR: + if not sure_generator: + flags |= CompilerFlags.COROUTINE + else: + flags |= CompilerFlags.ASYNC_GENERATOR + + # If the code was not asynchronous before determine if it should now be + # asynchronous based on the opcode and the is_async argument. + else: + if sure_async: + # YIELD_FROM is not allowed in async generator + if sure_generator: + flags |= CompilerFlags.ASYNC_GENERATOR + else: + flags |= CompilerFlags.COROUTINE + + elif maybe_generator: + if is_async: + if sure_generator: + flags |= CompilerFlags.ASYNC_GENERATOR + else: + flags |= CompilerFlags.COROUTINE + else: + flags |= CompilerFlags.GENERATOR + + elif is_async: + flags |= CompilerFlags.COROUTINE + + # If the code should not be asynchronous, check first it is possible and + # next set the GENERATOR flag if relevant + else: + if sure_async: + raise ValueError( + "The is_async argument is False but bytecodes " "that can only be used in async functions have " "been detected." + ) + + if maybe_generator: + flags |= CompilerFlags.GENERATOR + + flags |= bytecode.flags & CompilerFlags.FUTURE_GENERATOR_STOP + + return flags diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/instr.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/instr.py new file mode 100644 index 0000000..a25bea8 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/instr.py @@ -0,0 +1,372 @@ +import enum +import dis +import opcode as _opcode +import sys +from marshal import dumps as _dumps + +from _pydevd_frame_eval.vendored import bytecode as _bytecode + + +@enum.unique +class Compare(enum.IntEnum): + LT = 0 + LE = 1 + EQ = 2 + NE = 3 + GT = 4 + GE = 5 + IN = 6 + NOT_IN = 7 + IS = 8 + IS_NOT = 9 + EXC_MATCH = 10 + + +UNSET = object() + + +def const_key(obj): + try: + return _dumps(obj) + except ValueError: + # For other types, we use the object identifier as an unique identifier + # to ensure that they are seen as unequal. + return (type(obj), id(obj)) + + +def _pushes_back(opname): + if opname in ["CALL_FINALLY"]: + # CALL_FINALLY pushes the address of the "finally" block instead of a + # value, hence we don't treat it as pushing back op + return False + return ( + opname.startswith("UNARY_") + or opname.startswith("GET_") + # BUILD_XXX_UNPACK have been removed in 3.9 + or opname.startswith("BINARY_") + or opname.startswith("INPLACE_") + or opname.startswith("BUILD_") + or opname.startswith("CALL_") + ) or opname in ( + "LIST_TO_TUPLE", + "LIST_EXTEND", + "SET_UPDATE", + "DICT_UPDATE", + "DICT_MERGE", + "IS_OP", + "CONTAINS_OP", + "FORMAT_VALUE", + "MAKE_FUNCTION", + "IMPORT_NAME", + # technically, these three do not push back, but leave the container + # object on TOS + "SET_ADD", + "LIST_APPEND", + "MAP_ADD", + "LOAD_ATTR", + ) + + +def _check_lineno(lineno): + if not isinstance(lineno, int): + raise TypeError("lineno must be an int") + if lineno < 1: + raise ValueError("invalid lineno") + + +class SetLineno: + __slots__ = ("_lineno",) + + def __init__(self, lineno): + _check_lineno(lineno) + self._lineno = lineno + + @property + def lineno(self): + return self._lineno + + def __eq__(self, other): + if not isinstance(other, SetLineno): + return False + return self._lineno == other._lineno + + +class Label: + __slots__ = () + + +class _Variable: + __slots__ = ("name",) + + def __init__(self, name): + self.name = name + + def __eq__(self, other): + if type(self) != type(other): + return False + return self.name == other.name + + def __str__(self): + return self.name + + def __repr__(self): + return "<%s %r>" % (self.__class__.__name__, self.name) + + +class CellVar(_Variable): + __slots__ = () + + +class FreeVar(_Variable): + __slots__ = () + + +def _check_arg_int(name, arg): + if not isinstance(arg, int): + raise TypeError("operation %s argument must be an int, " "got %s" % (name, type(arg).__name__)) + + if not (0 <= arg <= 2147483647): + raise ValueError("operation %s argument must be in " "the range 0..2,147,483,647" % name) + + +if sys.version_info < (3, 8): + _stack_effects = { + # NOTE: the entries are all 2-tuples. Entry[0/False] is non-taken jumps. + # Entry[1/True] is for taken jumps. + # opcodes not in dis.stack_effect + _opcode.opmap["EXTENDED_ARG"]: (0, 0), + _opcode.opmap["NOP"]: (0, 0), + # Jump taken/not-taken are different: + _opcode.opmap["JUMP_IF_TRUE_OR_POP"]: (-1, 0), + _opcode.opmap["JUMP_IF_FALSE_OR_POP"]: (-1, 0), + _opcode.opmap["FOR_ITER"]: (1, -1), + _opcode.opmap["SETUP_WITH"]: (1, 6), + _opcode.opmap["SETUP_ASYNC_WITH"]: (0, 5), + _opcode.opmap["SETUP_EXCEPT"]: (0, 6), # as of 3.7, below for <=3.6 + _opcode.opmap["SETUP_FINALLY"]: (0, 6), # as of 3.7, below for <=3.6 + } + + # More stack effect values that are unique to the version of Python. + if sys.version_info < (3, 7): + _stack_effects.update( + { + _opcode.opmap["SETUP_WITH"]: (7, 7), + _opcode.opmap["SETUP_EXCEPT"]: (6, 9), + _opcode.opmap["SETUP_FINALLY"]: (6, 9), + } + ) + + +class Instr: + """Abstract instruction.""" + + __slots__ = ("_name", "_opcode", "_arg", "_lineno", "offset") + + def __init__(self, name, arg=UNSET, *, lineno=None, offset=None): + self._set(name, arg, lineno) + self.offset = offset + + def _check_arg(self, name, opcode, arg): + if name == "EXTENDED_ARG": + raise ValueError( + "only concrete instruction can contain EXTENDED_ARG, " "highlevel instruction can represent arbitrary argument without it" + ) + + if opcode >= _opcode.HAVE_ARGUMENT: + if arg is UNSET: + raise ValueError("operation %s requires an argument" % name) + else: + if arg is not UNSET: + raise ValueError("operation %s has no argument" % name) + + if self._has_jump(opcode): + if not isinstance(arg, (Label, _bytecode.BasicBlock)): + raise TypeError("operation %s argument type must be " "Label or BasicBlock, got %s" % (name, type(arg).__name__)) + + elif opcode in _opcode.hasfree: + if not isinstance(arg, (CellVar, FreeVar)): + raise TypeError("operation %s argument must be CellVar " "or FreeVar, got %s" % (name, type(arg).__name__)) + + elif opcode in _opcode.haslocal or opcode in _opcode.hasname: + if not isinstance(arg, str): + raise TypeError("operation %s argument must be a str, " "got %s" % (name, type(arg).__name__)) + + elif opcode in _opcode.hasconst: + if isinstance(arg, Label): + raise ValueError("label argument cannot be used " "in %s operation" % name) + if isinstance(arg, _bytecode.BasicBlock): + raise ValueError("block argument cannot be used " "in %s operation" % name) + + elif opcode in _opcode.hascompare: + if not isinstance(arg, Compare): + raise TypeError("operation %s argument type must be " "Compare, got %s" % (name, type(arg).__name__)) + + elif opcode >= _opcode.HAVE_ARGUMENT: + _check_arg_int(name, arg) + + def _set(self, name, arg, lineno): + if not isinstance(name, str): + raise TypeError("operation name must be a str") + try: + opcode = _opcode.opmap[name] + except KeyError: + raise ValueError("invalid operation name") + + # check lineno + if lineno is not None: + _check_lineno(lineno) + + self._check_arg(name, opcode, arg) + + self._name = name + self._opcode = opcode + self._arg = arg + self._lineno = lineno + + def set(self, name, arg=UNSET): + """Modify the instruction in-place. + + Replace name and arg attributes. Don't modify lineno. + """ + self._set(name, arg, self._lineno) + + def require_arg(self): + """Does the instruction require an argument?""" + return self._opcode >= _opcode.HAVE_ARGUMENT + + @property + def name(self): + return self._name + + @name.setter + def name(self, name): + self._set(name, self._arg, self._lineno) + + @property + def opcode(self): + return self._opcode + + @opcode.setter + def opcode(self, op): + if not isinstance(op, int): + raise TypeError("operator code must be an int") + if 0 <= op <= 255: + name = _opcode.opname[op] + valid = name != "<%r>" % op + else: + valid = False + if not valid: + raise ValueError("invalid operator code") + + self._set(name, self._arg, self._lineno) + + @property + def arg(self): + return self._arg + + @arg.setter + def arg(self, arg): + self._set(self._name, arg, self._lineno) + + @property + def lineno(self): + return self._lineno + + @lineno.setter + def lineno(self, lineno): + self._set(self._name, self._arg, lineno) + + def stack_effect(self, jump=None): + if self._opcode < _opcode.HAVE_ARGUMENT: + arg = None + elif not isinstance(self._arg, int) or self._opcode in _opcode.hasconst: + # Argument is either a non-integer or an integer constant, + # not oparg. + arg = 0 + else: + arg = self._arg + + if sys.version_info < (3, 8): + effect = _stack_effects.get(self._opcode, None) + if effect is not None: + return max(effect) if jump is None else effect[jump] + return dis.stack_effect(self._opcode, arg) + else: + return dis.stack_effect(self._opcode, arg, jump=jump) + + def pre_and_post_stack_effect(self, jump=None): + _effect = self.stack_effect(jump=jump) + + # To compute pre size and post size to avoid segfault cause by not enough + # stack element + _opname = _opcode.opname[self._opcode] + if _opname.startswith("DUP_TOP"): + return _effect * -1, _effect * 2 + if _pushes_back(_opname): + # if the op pushes value back to the stack, then the stack effect given + # by dis.stack_effect actually equals pre + post effect, therefore we need + # -1 from the stack effect as a pre condition + return _effect - 1, 1 + if _opname.startswith("UNPACK_"): + # Instr(UNPACK_* , n) pops 1 and pushes n + # _effect = n - 1 + # hence we return -1, _effect + 1 + return -1, _effect + 1 + if _opname == "FOR_ITER" and not jump: + # Since FOR_ITER needs TOS to be an iterator, which basically means + # a prerequisite of 1 on the stack + return -1, 2 + if _opname == "ROT_N": + return (-self._arg, self._arg) + return {"ROT_TWO": (-2, 2), "ROT_THREE": (-3, 3), "ROT_FOUR": (-4, 4)}.get(_opname, (_effect, 0)) + + def copy(self): + return self.__class__(self._name, self._arg, lineno=self._lineno, offset=self.offset) + + def __repr__(self): + if self._arg is not UNSET: + return "<%s arg=%r lineno=%s>" % (self._name, self._arg, self._lineno) + else: + return "<%s lineno=%s>" % (self._name, self._lineno) + + def _cmp_key(self, labels=None): + arg = self._arg + if self._opcode in _opcode.hasconst: + arg = const_key(arg) + elif isinstance(arg, Label) and labels is not None: + arg = labels[arg] + return (self._lineno, self._name, arg) + + def __eq__(self, other): + if type(self) != type(other): + return False + return self._cmp_key() == other._cmp_key() + + @staticmethod + def _has_jump(opcode): + return opcode in _opcode.hasjrel or opcode in _opcode.hasjabs + + def has_jump(self): + return self._has_jump(self._opcode) + + def is_cond_jump(self): + """Is a conditional jump?""" + # Ex: POP_JUMP_IF_TRUE, JUMP_IF_FALSE_OR_POP + return "JUMP_IF_" in self._name + + def is_uncond_jump(self): + """Is an unconditional jump?""" + return self.name in {"JUMP_FORWARD", "JUMP_ABSOLUTE"} + + def is_final(self): + if self._name in { + "RETURN_VALUE", + "RAISE_VARARGS", + "RERAISE", + "BREAK_LOOP", + "CONTINUE_LOOP", + }: + return True + if self.is_uncond_jump(): + return True + return False diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py new file mode 100644 index 0000000..4ed147f --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py @@ -0,0 +1,488 @@ +""" +Peephole optimizer of CPython 3.6 reimplemented in pure Python using +the bytecode module. +""" +import opcode +import operator +import sys +from _pydevd_frame_eval.vendored.bytecode import Instr, Bytecode, ControlFlowGraph, BasicBlock, Compare + +JUMPS_ON_TRUE = frozenset( + ( + "POP_JUMP_IF_TRUE", + "JUMP_IF_TRUE_OR_POP", + ) +) + +NOT_COMPARE = { + Compare.IN: Compare.NOT_IN, + Compare.NOT_IN: Compare.IN, + Compare.IS: Compare.IS_NOT, + Compare.IS_NOT: Compare.IS, +} + +MAX_SIZE = 20 + + +class ExitUnchanged(Exception): + """Exception used to skip the peephole optimizer""" + + pass + + +class PeepholeOptimizer: + """Python reimplementation of the peephole optimizer. + + Copy of the C comment: + + Perform basic peephole optimizations to components of a code object. + The consts object should still be in list form to allow new constants + to be appended. + + To keep the optimizer simple, it bails out (does nothing) for code that + has a length over 32,700, and does not calculate extended arguments. + That allows us to avoid overflow and sign issues. Likewise, it bails when + the lineno table has complex encoding for gaps >= 255. EXTENDED_ARG can + appear before MAKE_FUNCTION; in this case both opcodes are skipped. + EXTENDED_ARG preceding any other opcode causes the optimizer to bail. + + Optimizations are restricted to simple transformations occuring within a + single basic block. All transformations keep the code size the same or + smaller. For those that reduce size, the gaps are initially filled with + NOPs. Later those NOPs are removed and the jump addresses retargeted in + a single pass. Code offset is adjusted accordingly. + """ + + def __init__(self): + # bytecode.ControlFlowGraph instance + self.code = None + self.const_stack = None + self.block_index = None + self.block = None + # index of the current instruction in self.block instructions + self.index = None + # whether we are in a LOAD_CONST sequence + self.in_consts = False + + def check_result(self, value): + try: + size = len(value) + except TypeError: + return True + return size <= MAX_SIZE + + def replace_load_const(self, nconst, instr, result): + # FIXME: remove temporary computed constants? + # FIXME: or at least reuse existing constants? + + self.in_consts = True + + load_const = Instr("LOAD_CONST", result, lineno=instr.lineno) + start = self.index - nconst - 1 + self.block[start : self.index] = (load_const,) + self.index -= nconst + + if nconst: + del self.const_stack[-nconst:] + self.const_stack.append(result) + self.in_consts = True + + def eval_LOAD_CONST(self, instr): + self.in_consts = True + value = instr.arg + self.const_stack.append(value) + self.in_consts = True + + def unaryop(self, op, instr): + try: + value = self.const_stack[-1] + result = op(value) + except IndexError: + return + + if not self.check_result(result): + return + + self.replace_load_const(1, instr, result) + + def eval_UNARY_POSITIVE(self, instr): + return self.unaryop(operator.pos, instr) + + def eval_UNARY_NEGATIVE(self, instr): + return self.unaryop(operator.neg, instr) + + def eval_UNARY_INVERT(self, instr): + return self.unaryop(operator.invert, instr) + + def get_next_instr(self, name): + try: + next_instr = self.block[self.index] + except IndexError: + return None + if next_instr.name == name: + return next_instr + return None + + def eval_UNARY_NOT(self, instr): + # Note: UNARY_NOT is not optimized + + next_instr = self.get_next_instr("POP_JUMP_IF_FALSE") + if next_instr is None: + return None + + # Replace UNARY_NOT+POP_JUMP_IF_FALSE with POP_JUMP_IF_TRUE + instr.set("POP_JUMP_IF_TRUE", next_instr.arg) + del self.block[self.index] + + def binop(self, op, instr): + try: + left = self.const_stack[-2] + right = self.const_stack[-1] + except IndexError: + return + + try: + result = op(left, right) + except Exception: + return + + if not self.check_result(result): + return + + self.replace_load_const(2, instr, result) + + def eval_BINARY_ADD(self, instr): + return self.binop(operator.add, instr) + + def eval_BINARY_SUBTRACT(self, instr): + return self.binop(operator.sub, instr) + + def eval_BINARY_MULTIPLY(self, instr): + return self.binop(operator.mul, instr) + + def eval_BINARY_TRUE_DIVIDE(self, instr): + return self.binop(operator.truediv, instr) + + def eval_BINARY_FLOOR_DIVIDE(self, instr): + return self.binop(operator.floordiv, instr) + + def eval_BINARY_MODULO(self, instr): + return self.binop(operator.mod, instr) + + def eval_BINARY_POWER(self, instr): + return self.binop(operator.pow, instr) + + def eval_BINARY_LSHIFT(self, instr): + return self.binop(operator.lshift, instr) + + def eval_BINARY_RSHIFT(self, instr): + return self.binop(operator.rshift, instr) + + def eval_BINARY_AND(self, instr): + return self.binop(operator.and_, instr) + + def eval_BINARY_OR(self, instr): + return self.binop(operator.or_, instr) + + def eval_BINARY_XOR(self, instr): + return self.binop(operator.xor, instr) + + def eval_BINARY_SUBSCR(self, instr): + return self.binop(operator.getitem, instr) + + def replace_container_of_consts(self, instr, container_type): + items = self.const_stack[-instr.arg :] + value = container_type(items) + self.replace_load_const(instr.arg, instr, value) + + def build_tuple_unpack_seq(self, instr): + next_instr = self.get_next_instr("UNPACK_SEQUENCE") + if next_instr is None or next_instr.arg != instr.arg: + return + + if instr.arg < 1: + return + + if self.const_stack and instr.arg <= len(self.const_stack): + nconst = instr.arg + start = self.index - 1 + + # Rewrite LOAD_CONST instructions in the reverse order + load_consts = self.block[start - nconst : start] + self.block[start - nconst : start] = reversed(load_consts) + + # Remove BUILD_TUPLE+UNPACK_SEQUENCE + self.block[start : start + 2] = () + self.index -= 2 + self.const_stack.clear() + return + + if instr.arg == 1: + # Replace BUILD_TUPLE 1 + UNPACK_SEQUENCE 1 with NOP + del self.block[self.index - 1 : self.index + 1] + elif instr.arg == 2: + # Replace BUILD_TUPLE 2 + UNPACK_SEQUENCE 2 with ROT_TWO + rot2 = Instr("ROT_TWO", lineno=instr.lineno) + self.block[self.index - 1 : self.index + 1] = (rot2,) + self.index -= 1 + self.const_stack.clear() + elif instr.arg == 3: + # Replace BUILD_TUPLE 3 + UNPACK_SEQUENCE 3 + # with ROT_THREE + ROT_TWO + rot3 = Instr("ROT_THREE", lineno=instr.lineno) + rot2 = Instr("ROT_TWO", lineno=instr.lineno) + self.block[self.index - 1 : self.index + 1] = (rot3, rot2) + self.index -= 1 + self.const_stack.clear() + + def build_tuple(self, instr, container_type): + if instr.arg > len(self.const_stack): + return + + next_instr = self.get_next_instr("COMPARE_OP") + if next_instr is None or next_instr.arg not in (Compare.IN, Compare.NOT_IN): + return + + self.replace_container_of_consts(instr, container_type) + return True + + def eval_BUILD_TUPLE(self, instr): + if not instr.arg: + return + + if instr.arg <= len(self.const_stack): + self.replace_container_of_consts(instr, tuple) + else: + self.build_tuple_unpack_seq(instr) + + def eval_BUILD_LIST(self, instr): + if not instr.arg: + return + + if not self.build_tuple(instr, tuple): + self.build_tuple_unpack_seq(instr) + + def eval_BUILD_SET(self, instr): + if not instr.arg: + return + + self.build_tuple(instr, frozenset) + + # Note: BUILD_SLICE is not optimized + + def eval_COMPARE_OP(self, instr): + # Note: COMPARE_OP: 2 < 3 is not optimized + + try: + new_arg = NOT_COMPARE[instr.arg] + except KeyError: + return + + if self.get_next_instr("UNARY_NOT") is None: + return + + # not (a is b) --> a is not b + # not (a in b) --> a not in b + # not (a is not b) --> a is b + # not (a not in b) --> a in b + instr.arg = new_arg + self.block[self.index - 1 : self.index + 1] = (instr,) + + def jump_if_or_pop(self, instr): + # Simplify conditional jump to conditional jump where the + # result of the first test implies the success of a similar + # test or the failure of the opposite test. + # + # Arises in code like: + # "if a and b:" + # "if a or b:" + # "a and b or c" + # "(a and b) and c" + # + # x:JUMP_IF_FALSE_OR_POP y y:JUMP_IF_FALSE_OR_POP z + # --> x:JUMP_IF_FALSE_OR_POP z + # + # x:JUMP_IF_FALSE_OR_POP y y:JUMP_IF_TRUE_OR_POP z + # --> x:POP_JUMP_IF_FALSE y+3 + # where y+3 is the instruction following the second test. + target_block = instr.arg + try: + target_instr = target_block[0] + except IndexError: + return + + if not target_instr.is_cond_jump(): + self.optimize_jump_to_cond_jump(instr) + return + + if (target_instr.name in JUMPS_ON_TRUE) == (instr.name in JUMPS_ON_TRUE): + # The second jump will be taken iff the first is. + + target2 = target_instr.arg + # The current opcode inherits its target's stack behaviour + instr.name = target_instr.name + instr.arg = target2 + self.block[self.index - 1] = instr + self.index -= 1 + else: + # The second jump is not taken if the first is (so jump past it), + # and all conditional jumps pop their argument when they're not + # taken (so change the first jump to pop its argument when it's + # taken). + if instr.name in JUMPS_ON_TRUE: + name = "POP_JUMP_IF_TRUE" + else: + name = "POP_JUMP_IF_FALSE" + + new_label = self.code.split_block(target_block, 1) + + instr.name = name + instr.arg = new_label + self.block[self.index - 1] = instr + self.index -= 1 + + def eval_JUMP_IF_FALSE_OR_POP(self, instr): + self.jump_if_or_pop(instr) + + def eval_JUMP_IF_TRUE_OR_POP(self, instr): + self.jump_if_or_pop(instr) + + def eval_NOP(self, instr): + # Remove NOP + del self.block[self.index - 1] + self.index -= 1 + + def optimize_jump_to_cond_jump(self, instr): + # Replace jumps to unconditional jumps + jump_label = instr.arg + assert isinstance(jump_label, BasicBlock), jump_label + + try: + target_instr = jump_label[0] + except IndexError: + return + + if instr.is_uncond_jump() and target_instr.name == "RETURN_VALUE": + # Replace JUMP_ABSOLUTE => RETURN_VALUE with RETURN_VALUE + self.block[self.index - 1] = target_instr + + elif target_instr.is_uncond_jump(): + # Replace JUMP_FORWARD t1 jumping to JUMP_FORWARD t2 + # with JUMP_ABSOLUTE t2 + jump_target2 = target_instr.arg + + name = instr.name + if instr.name == "JUMP_FORWARD": + name = "JUMP_ABSOLUTE" + else: + # FIXME: reimplement this check + # if jump_target2 < 0: + # # No backward relative jumps + # return + + # FIXME: remove this workaround and implement comment code ^^ + if instr.opcode in opcode.hasjrel: + return + + instr.name = name + instr.arg = jump_target2 + self.block[self.index - 1] = instr + + def optimize_jump(self, instr): + if instr.is_uncond_jump() and self.index == len(self.block): + # JUMP_ABSOLUTE at the end of a block which points to the + # following block: remove the jump, link the current block + # to the following block + block_index = self.block_index + target_block = instr.arg + target_block_index = self.code.get_block_index(target_block) + if target_block_index == block_index: + del self.block[self.index - 1] + self.block.next_block = target_block + return + + self.optimize_jump_to_cond_jump(instr) + + def iterblock(self, block): + self.block = block + self.index = 0 + while self.index < len(block): + instr = self.block[self.index] + self.index += 1 + yield instr + + def optimize_block(self, block): + self.const_stack.clear() + self.in_consts = False + + for instr in self.iterblock(block): + if not self.in_consts: + self.const_stack.clear() + self.in_consts = False + + meth_name = "eval_%s" % instr.name + meth = getattr(self, meth_name, None) + if meth is not None: + meth(instr) + elif instr.has_jump(): + self.optimize_jump(instr) + + # Note: Skipping over LOAD_CONST trueconst; POP_JUMP_IF_FALSE + # is not implemented, since it looks like the optimization + # is never trigerred in practice. The compiler already optimizes if + # and while statements. + + def remove_dead_blocks(self): + # FIXME: remove empty blocks? + + used_blocks = {id(self.code[0])} + for block in self.code: + if block.next_block is not None: + used_blocks.add(id(block.next_block)) + for instr in block: + if isinstance(instr, Instr) and isinstance(instr.arg, BasicBlock): + used_blocks.add(id(instr.arg)) + + block_index = 0 + while block_index < len(self.code): + block = self.code[block_index] + if id(block) not in used_blocks: + del self.code[block_index] + else: + block_index += 1 + + # FIXME: merge following blocks if block1 does not contain any + # jump and block1.next_block is block2 + + def optimize_cfg(self, cfg): + self.code = cfg + self.const_stack = [] + + self.remove_dead_blocks() + + self.block_index = 0 + while self.block_index < len(self.code): + block = self.code[self.block_index] + self.block_index += 1 + self.optimize_block(block) + + def optimize(self, code_obj): + bytecode = Bytecode.from_code(code_obj) + cfg = ControlFlowGraph.from_bytecode(bytecode) + + self.optimize_cfg(cfg) + + bytecode = cfg.to_bytecode() + code = bytecode.to_code() + return code + + +# Code transformer for the PEP 511 +class CodeTransformer: + name = "pyopt" + + def code_transformer(self, code, context): + if sys.flags.verbose: + print("Optimize %s:%s: %s" % (code.co_filename, code.co_firstlineno, code.co_name)) + optimizer = PeepholeOptimizer() + return optimizer.optimize(code) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py new file mode 100644 index 0000000..cc33b30 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py @@ -0,0 +1,150 @@ +import sys +import textwrap +import types +import unittest + +from _pydevd_frame_eval.vendored.bytecode import ( + UNSET, + Label, + Instr, + ConcreteInstr, + BasicBlock, # noqa + Bytecode, + ControlFlowGraph, + ConcreteBytecode, +) + + +def _format_instr_list(block, labels, lineno): + instr_list = [] + for instr in block: + if not isinstance(instr, Label): + if isinstance(instr, ConcreteInstr): + cls_name = "ConcreteInstr" + else: + cls_name = "Instr" + arg = instr.arg + if arg is not UNSET: + if isinstance(arg, Label): + arg = labels[arg] + elif isinstance(arg, BasicBlock): + arg = labels[id(arg)] + else: + arg = repr(arg) + if lineno: + text = "%s(%r, %s, lineno=%s)" % ( + cls_name, + instr.name, + arg, + instr.lineno, + ) + else: + text = "%s(%r, %s)" % (cls_name, instr.name, arg) + else: + if lineno: + text = "%s(%r, lineno=%s)" % (cls_name, instr.name, instr.lineno) + else: + text = "%s(%r)" % (cls_name, instr.name) + else: + text = labels[instr] + instr_list.append(text) + return "[%s]" % ",\n ".join(instr_list) + + +def dump_bytecode(code, lineno=False): + """ + Use this function to write unit tests: copy/paste its output to + write a self.assertBlocksEqual() check. + """ + print() + + if isinstance(code, (Bytecode, ConcreteBytecode)): + is_concrete = isinstance(code, ConcreteBytecode) + if is_concrete: + block = list(code) + else: + block = code + + indent = " " * 8 + labels = {} + for index, instr in enumerate(block): + if isinstance(instr, Label): + name = "label_instr%s" % index + labels[instr] = name + + if is_concrete: + name = "ConcreteBytecode" + print(indent + "code = %s()" % name) + if code.argcount: + print(indent + "code.argcount = %s" % code.argcount) + if sys.version_info > (3, 8): + if code.posonlyargcount: + print(indent + "code.posonlyargcount = %s" % code.posonlyargcount) + if code.kwonlyargcount: + print(indent + "code.kwargonlycount = %s" % code.kwonlyargcount) + print(indent + "code.flags = %#x" % code.flags) + if code.consts: + print(indent + "code.consts = %r" % code.consts) + if code.names: + print(indent + "code.names = %r" % code.names) + if code.varnames: + print(indent + "code.varnames = %r" % code.varnames) + + for name in sorted(labels.values()): + print(indent + "%s = Label()" % name) + + if is_concrete: + text = indent + "code.extend(" + indent = " " * len(text) + else: + text = indent + "code = Bytecode(" + indent = " " * len(text) + + lines = _format_instr_list(code, labels, lineno).splitlines() + last_line = len(lines) - 1 + for index, line in enumerate(lines): + if index == 0: + print(text + lines[0]) + elif index == last_line: + print(indent + line + ")") + else: + print(indent + line) + + print() + else: + assert isinstance(code, ControlFlowGraph) + labels = {} + for block_index, block in enumerate(code): + labels[id(block)] = "code[%s]" % block_index + + for block_index, block in enumerate(code): + text = _format_instr_list(block, labels, lineno) + if block_index != len(code) - 1: + text += "," + print(text) + print() + + +def get_code(source, *, filename="", function=False): + source = textwrap.dedent(source).strip() + code = compile(source, filename, "exec") + if function: + sub_code = [const for const in code.co_consts if isinstance(const, types.CodeType)] + if len(sub_code) != 1: + raise ValueError("unable to find function code") + code = sub_code[0] + return code + + +def disassemble(source, *, filename="", function=False): + code = get_code(source, filename=filename, function=function) + return Bytecode.from_code(code) + + +class TestCase(unittest.TestCase): + def assertBlocksEqual(self, code, *expected_blocks): + self.assertEqual(len(code), len(expected_blocks)) + + for block1, block2 in zip(code, expected_blocks): + block_index = code.get_block_index(block1) + self.assertListEqual(list(block1), block2, "Block #%s is different" % block_index) diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/__init__.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..c3fd388 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/__init__.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_bytecode.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_bytecode.cpython-312.pyc new file mode 100644 index 0000000..aac3270 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_bytecode.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_cfg.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_cfg.cpython-312.pyc new file mode 100644 index 0000000..98d1d9b Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_cfg.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_code.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_code.cpython-312.pyc new file mode 100644 index 0000000..592271c Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_code.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_concrete.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_concrete.cpython-312.pyc new file mode 100644 index 0000000..880ce31 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_concrete.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_flags.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_flags.cpython-312.pyc new file mode 100644 index 0000000..250ffbe Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_flags.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_instr.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_instr.cpython-312.pyc new file mode 100644 index 0000000..cc533ca Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_instr.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_misc.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_misc.cpython-312.pyc new file mode 100644 index 0000000..27fa12d Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_misc.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_peephole_opt.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_peephole_opt.cpython-312.pyc new file mode 100644 index 0000000..4080fc1 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/test_peephole_opt.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/util_annotation.cpython-312.pyc b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/util_annotation.cpython-312.pyc new file mode 100644 index 0000000..2f0d060 Binary files /dev/null and b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__pycache__/util_annotation.cpython-312.pyc differ diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py new file mode 100644 index 0000000..e219643 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py @@ -0,0 +1,486 @@ +import pytest +from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON +from tests_python.debug_constants import TEST_CYTHON + +pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason="Requires CPython >= 3.6") +#!/usr/bin/env python3 +import sys +import textwrap +import unittest +from _pydevd_frame_eval.vendored.bytecode import Label, Instr, FreeVar, Bytecode, SetLineno, ConcreteInstr +from _pydevd_frame_eval.vendored.bytecode.tests import TestCase, get_code + + +class BytecodeTests(TestCase): + maxDiff = 80 * 100 + + def test_constructor(self): + code = Bytecode() + self.assertEqual(code.name, "") + self.assertEqual(code.filename, "") + self.assertEqual(code.flags, 0) + self.assertEqual(code, []) + + def test_invalid_types(self): + code = Bytecode() + code.append(123) + with self.assertRaises(ValueError): + list(code) + with self.assertRaises(ValueError): + code.legalize() + with self.assertRaises(ValueError): + Bytecode([123]) + + def test_legalize(self): + code = Bytecode() + code.first_lineno = 3 + code.extend( + [ + Instr("LOAD_CONST", 7), + Instr("STORE_NAME", "x"), + Instr("LOAD_CONST", 8, lineno=4), + Instr("STORE_NAME", "y"), + Label(), + SetLineno(5), + Instr("LOAD_CONST", 9, lineno=6), + Instr("STORE_NAME", "z"), + ] + ) + + code.legalize() + self.assertListEqual( + code, + [ + Instr("LOAD_CONST", 7, lineno=3), + Instr("STORE_NAME", "x", lineno=3), + Instr("LOAD_CONST", 8, lineno=4), + Instr("STORE_NAME", "y", lineno=4), + Label(), + Instr("LOAD_CONST", 9, lineno=5), + Instr("STORE_NAME", "z", lineno=5), + ], + ) + + def test_slice(self): + code = Bytecode() + code.first_lineno = 3 + code.extend( + [ + Instr("LOAD_CONST", 7), + Instr("STORE_NAME", "x"), + SetLineno(4), + Instr("LOAD_CONST", 8), + Instr("STORE_NAME", "y"), + SetLineno(5), + Instr("LOAD_CONST", 9), + Instr("STORE_NAME", "z"), + ] + ) + sliced_code = code[:] + self.assertEqual(code, sliced_code) + for name in ( + "argcount", + "posonlyargcount", + "kwonlyargcount", + "first_lineno", + "name", + "filename", + "docstring", + "cellvars", + "freevars", + "argnames", + ): + self.assertEqual(getattr(code, name, None), getattr(sliced_code, name, None)) + + def test_copy(self): + code = Bytecode() + code.first_lineno = 3 + code.extend( + [ + Instr("LOAD_CONST", 7), + Instr("STORE_NAME", "x"), + SetLineno(4), + Instr("LOAD_CONST", 8), + Instr("STORE_NAME", "y"), + SetLineno(5), + Instr("LOAD_CONST", 9), + Instr("STORE_NAME", "z"), + ] + ) + + copy_code = code.copy() + self.assertEqual(code, copy_code) + for name in ( + "argcount", + "posonlyargcount", + "kwonlyargcount", + "first_lineno", + "name", + "filename", + "docstring", + "cellvars", + "freevars", + "argnames", + ): + self.assertEqual(getattr(code, name, None), getattr(copy_code, name, None)) + + def test_from_code(self): + code = get_code( + """ + if test: + x = 1 + else: + x = 2 + """ + ) + bytecode = Bytecode.from_code(code) + label_else = Label() + label_exit = Label() + if sys.version_info < (3, 10): + self.assertEqual( + bytecode, + [ + Instr("LOAD_NAME", "test", lineno=1), + Instr("POP_JUMP_IF_FALSE", label_else, lineno=1), + Instr("LOAD_CONST", 1, lineno=2), + Instr("STORE_NAME", "x", lineno=2), + Instr("JUMP_FORWARD", label_exit, lineno=2), + label_else, + Instr("LOAD_CONST", 2, lineno=4), + Instr("STORE_NAME", "x", lineno=4), + label_exit, + Instr("LOAD_CONST", None, lineno=4), + Instr("RETURN_VALUE", lineno=4), + ], + ) + # Control flow handling appears to have changed under Python 3.10 + else: + self.assertEqual( + bytecode, + [ + Instr("LOAD_NAME", "test", lineno=1), + Instr("POP_JUMP_IF_FALSE", label_else, lineno=1), + Instr("LOAD_CONST", 1, lineno=2), + Instr("STORE_NAME", "x", lineno=2), + Instr("LOAD_CONST", None, lineno=2), + Instr("RETURN_VALUE", lineno=2), + label_else, + Instr("LOAD_CONST", 2, lineno=4), + Instr("STORE_NAME", "x", lineno=4), + Instr("LOAD_CONST", None, lineno=4), + Instr("RETURN_VALUE", lineno=4), + ], + ) + + def test_from_code_freevars(self): + ns = {} + exec( + textwrap.dedent( + """ + def create_func(): + x = 1 + def func(): + return x + return func + + func = create_func() + """ + ), + ns, + ns, + ) + code = ns["func"].__code__ + + bytecode = Bytecode.from_code(code) + self.assertEqual( + bytecode, + [ + Instr("LOAD_DEREF", FreeVar("x"), lineno=5), + Instr("RETURN_VALUE", lineno=5), + ], + ) + + def test_from_code_load_fast(self): + code = get_code( + """ + def func(): + x = 33 + y = x + """, + function=True, + ) + code = Bytecode.from_code(code) + self.assertEqual( + code, + [ + Instr("LOAD_CONST", 33, lineno=2), + Instr("STORE_FAST", "x", lineno=2), + Instr("LOAD_FAST", "x", lineno=3), + Instr("STORE_FAST", "y", lineno=3), + Instr("LOAD_CONST", None, lineno=3), + Instr("RETURN_VALUE", lineno=3), + ], + ) + + def test_setlineno(self): + # x = 7 + # y = 8 + # z = 9 + code = Bytecode() + code.first_lineno = 3 + code.extend( + [ + Instr("LOAD_CONST", 7), + Instr("STORE_NAME", "x"), + SetLineno(4), + Instr("LOAD_CONST", 8), + Instr("STORE_NAME", "y"), + SetLineno(5), + Instr("LOAD_CONST", 9), + Instr("STORE_NAME", "z"), + ] + ) + + concrete = code.to_concrete_bytecode() + self.assertEqual(concrete.consts, [7, 8, 9]) + self.assertEqual(concrete.names, ["x", "y", "z"]) + self.assertListEqual( + list(concrete), + [ + ConcreteInstr("LOAD_CONST", 0, lineno=3), + ConcreteInstr("STORE_NAME", 0, lineno=3), + ConcreteInstr("LOAD_CONST", 1, lineno=4), + ConcreteInstr("STORE_NAME", 1, lineno=4), + ConcreteInstr("LOAD_CONST", 2, lineno=5), + ConcreteInstr("STORE_NAME", 2, lineno=5), + ], + ) + + def test_to_code(self): + code = Bytecode() + code.first_lineno = 50 + code.extend( + [ + Instr("LOAD_NAME", "print"), + Instr("LOAD_CONST", "%s"), + Instr("LOAD_GLOBAL", "a"), + Instr("BINARY_MODULO"), + Instr("CALL_FUNCTION", 1), + Instr("RETURN_VALUE"), + ] + ) + co = code.to_code() + # hopefully this is obvious from inspection? :-) + self.assertEqual(co.co_stacksize, 3) + + co = code.to_code(stacksize=42) + self.assertEqual(co.co_stacksize, 42) + + def test_negative_size_unary(self): + opnames = ( + "UNARY_POSITIVE", + "UNARY_NEGATIVE", + "UNARY_NOT", + "UNARY_INVERT", + ) + for opname in opnames: + with self.subTest(): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr(opname)]) + with self.assertRaises(RuntimeError): + code.compute_stacksize() + + def test_negative_size_unary_with_disable_check_of_pre_and_post(self): + opnames = ( + "UNARY_POSITIVE", + "UNARY_NEGATIVE", + "UNARY_NOT", + "UNARY_INVERT", + ) + for opname in opnames: + with self.subTest(): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr(opname)]) + co = code.to_code(check_pre_and_post=False) + self.assertEqual(co.co_stacksize, 0) + + def test_negative_size_binary(self): + opnames = ( + "BINARY_POWER", + "BINARY_MULTIPLY", + "BINARY_MATRIX_MULTIPLY", + "BINARY_FLOOR_DIVIDE", + "BINARY_TRUE_DIVIDE", + "BINARY_MODULO", + "BINARY_ADD", + "BINARY_SUBTRACT", + "BINARY_SUBSCR", + "BINARY_LSHIFT", + "BINARY_RSHIFT", + "BINARY_AND", + "BINARY_XOR", + "BINARY_OR", + ) + for opname in opnames: + with self.subTest(): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr("LOAD_CONST", 1), Instr(opname)]) + with self.assertRaises(RuntimeError): + code.compute_stacksize() + + def test_negative_size_binary_with_disable_check_of_pre_and_post(self): + opnames = ( + "BINARY_POWER", + "BINARY_MULTIPLY", + "BINARY_MATRIX_MULTIPLY", + "BINARY_FLOOR_DIVIDE", + "BINARY_TRUE_DIVIDE", + "BINARY_MODULO", + "BINARY_ADD", + "BINARY_SUBTRACT", + "BINARY_SUBSCR", + "BINARY_LSHIFT", + "BINARY_RSHIFT", + "BINARY_AND", + "BINARY_XOR", + "BINARY_OR", + ) + for opname in opnames: + with self.subTest(): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr("LOAD_CONST", 1), Instr(opname)]) + co = code.to_code(check_pre_and_post=False) + self.assertEqual(co.co_stacksize, 1) + + def test_negative_size_call(self): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr("CALL_FUNCTION", 0)]) + with self.assertRaises(RuntimeError): + code.compute_stacksize() + + def test_negative_size_unpack(self): + opnames = ( + "UNPACK_SEQUENCE", + "UNPACK_EX", + ) + for opname in opnames: + with self.subTest(): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr(opname, 1)]) + with self.assertRaises(RuntimeError): + code.compute_stacksize() + + def test_negative_size_build(self): + opnames = ( + "BUILD_TUPLE", + "BUILD_LIST", + "BUILD_SET", + ) + if sys.version_info >= (3, 6): + opnames = (*opnames, "BUILD_STRING") + + for opname in opnames: + with self.subTest(): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr(opname, 1)]) + with self.assertRaises(RuntimeError): + code.compute_stacksize() + + def test_negative_size_build_map(self): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr("LOAD_CONST", 1), Instr("BUILD_MAP", 1)]) + with self.assertRaises(RuntimeError): + code.compute_stacksize() + + def test_negative_size_build_map_with_disable_check_of_pre_and_post(self): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr("LOAD_CONST", 1), Instr("BUILD_MAP", 1)]) + co = code.to_code(check_pre_and_post=False) + self.assertEqual(co.co_stacksize, 1) + + @unittest.skipIf(sys.version_info < (3, 6), "Inexistent opcode") + def test_negative_size_build_const_map(self): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr("LOAD_CONST", ("a",)), Instr("BUILD_CONST_KEY_MAP", 1)]) + with self.assertRaises(RuntimeError): + code.compute_stacksize() + + @unittest.skipIf(sys.version_info < (3, 6), "Inexistent opcode") + def test_negative_size_build_const_map_with_disable_check_of_pre_and_post(self): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr("LOAD_CONST", ("a",)), Instr("BUILD_CONST_KEY_MAP", 1)]) + co = code.to_code(check_pre_and_post=False) + self.assertEqual(co.co_stacksize, 1) + + def test_empty_dup(self): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr("DUP_TOP")]) + with self.assertRaises(RuntimeError): + code.compute_stacksize() + + def test_not_enough_dup(self): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr("LOAD_CONST", 1), Instr("DUP_TOP_TWO")]) + with self.assertRaises(RuntimeError): + code.compute_stacksize() + + def test_not_enough_rot(self): + opnames = ["ROT_TWO", "ROT_THREE"] + if sys.version_info >= (3, 8): + opnames.append("ROT_FOUR") + for opname in opnames: + with self.subTest(): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr("LOAD_CONST", 1), Instr(opname)]) + with self.assertRaises(RuntimeError): + code.compute_stacksize() + + def test_not_enough_rot_with_disable_check_of_pre_and_post(self): + opnames = ["ROT_TWO", "ROT_THREE"] + if sys.version_info >= (3, 8): + opnames.append("ROT_FOUR") + for opname in opnames: + with self.subTest(): + code = Bytecode() + code.first_lineno = 1 + code.extend([Instr("LOAD_CONST", 1), Instr(opname)]) + co = code.to_code(check_pre_and_post=False) + self.assertEqual(co.co_stacksize, 1) + + def test_for_iter_stack_effect_computation(self): + with self.subTest(): + code = Bytecode() + code.first_lineno = 1 + lab1 = Label() + lab2 = Label() + code.extend( + [ + lab1, + Instr("FOR_ITER", lab2), + Instr("STORE_FAST", "i"), + Instr("JUMP_ABSOLUTE", lab1), + lab2, + ] + ) + with self.assertRaises(RuntimeError): + # Use compute_stacksize since the code is so broken that conversion + # to from concrete is actually broken + code.compute_stacksize(check_pre_and_post=False) + + +if __name__ == "__main__": + unittest.main() # pragma: no cover diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py new file mode 100644 index 0000000..6cc731a --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py @@ -0,0 +1,816 @@ +import pytest +from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON +from tests_python.debug_constants import TEST_CYTHON + +pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason="Requires CPython >= 3.6") +#!/usr/bin/env python3 +import io +import sys +import unittest +import contextlib +from _pydevd_frame_eval.vendored.bytecode import ( + Label, + Compare, + SetLineno, + Instr, + Bytecode, + BasicBlock, + ControlFlowGraph, +) +from _pydevd_frame_eval.vendored.bytecode.concrete import OFFSET_AS_INSTRUCTION +from _pydevd_frame_eval.vendored.bytecode.tests import disassemble as _disassemble, TestCase + + +def disassemble(source, *, filename="", function=False, remove_last_return_none=False): + code = _disassemble(source, filename=filename, function=function) + blocks = ControlFlowGraph.from_bytecode(code) + if remove_last_return_none: + # drop LOAD_CONST+RETURN_VALUE to only keep 2 instructions, + # to make unit tests shorter + block = blocks[-1] + test = block[-2].name == "LOAD_CONST" and block[-2].arg is None and block[-1].name == "RETURN_VALUE" + if not test: + raise ValueError("unable to find implicit RETURN_VALUE : %s" % block[-2:]) + del block[-2:] + return blocks + + +class BlockTests(unittest.TestCase): + def test_iter_invalid_types(self): + # Labels are not allowed in basic blocks + block = BasicBlock() + block.append(Label()) + with self.assertRaises(ValueError): + list(block) + with self.assertRaises(ValueError): + block.legalize(1) + + # Only one jump allowed and only at the end + block = BasicBlock() + block2 = BasicBlock() + block.extend([Instr("JUMP_ABSOLUTE", block2), Instr("NOP")]) + with self.assertRaises(ValueError): + list(block) + with self.assertRaises(ValueError): + block.legalize(1) + + # jump target must be a BasicBlock + block = BasicBlock() + label = Label() + block.extend([Instr("JUMP_ABSOLUTE", label)]) + with self.assertRaises(ValueError): + list(block) + with self.assertRaises(ValueError): + block.legalize(1) + + def test_slice(self): + block = BasicBlock([Instr("NOP")]) + next_block = BasicBlock() + block.next_block = next_block + self.assertEqual(block, block[:]) + self.assertIs(next_block, block[:].next_block) + + def test_copy(self): + block = BasicBlock([Instr("NOP")]) + next_block = BasicBlock() + block.next_block = next_block + self.assertEqual(block, block.copy()) + self.assertIs(next_block, block.copy().next_block) + + +class BytecodeBlocksTests(TestCase): + maxDiff = 80 * 100 + + def test_constructor(self): + code = ControlFlowGraph() + self.assertEqual(code.name, "") + self.assertEqual(code.filename, "") + self.assertEqual(code.flags, 0) + self.assertBlocksEqual(code, []) + + def test_attr(self): + source = """ + first_line = 1 + + def func(arg1, arg2, *, arg3): + x = 1 + y = 2 + return arg1 + """ + code = disassemble(source, filename="hello.py", function=True) + self.assertEqual(code.argcount, 2) + self.assertEqual(code.filename, "hello.py") + self.assertEqual(code.first_lineno, 3) + if sys.version_info > (3, 8): + self.assertEqual(code.posonlyargcount, 0) + self.assertEqual(code.kwonlyargcount, 1) + self.assertEqual(code.name, "func") + self.assertEqual(code.cellvars, []) + + code.name = "name" + code.filename = "filename" + code.flags = 123 + self.assertEqual(code.name, "name") + self.assertEqual(code.filename, "filename") + self.assertEqual(code.flags, 123) + + # FIXME: test non-empty cellvars + + def test_add_del_block(self): + code = ControlFlowGraph() + code[0].append(Instr("LOAD_CONST", 0)) + + block = code.add_block() + self.assertEqual(len(code), 2) + self.assertIs(block, code[1]) + + code[1].append(Instr("LOAD_CONST", 2)) + self.assertBlocksEqual(code, [Instr("LOAD_CONST", 0)], [Instr("LOAD_CONST", 2)]) + + del code[0] + self.assertBlocksEqual(code, [Instr("LOAD_CONST", 2)]) + + del code[0] + self.assertEqual(len(code), 0) + + def test_setlineno(self): + # x = 7 + # y = 8 + # z = 9 + code = Bytecode() + code.first_lineno = 3 + code.extend( + [ + Instr("LOAD_CONST", 7), + Instr("STORE_NAME", "x"), + SetLineno(4), + Instr("LOAD_CONST", 8), + Instr("STORE_NAME", "y"), + SetLineno(5), + Instr("LOAD_CONST", 9), + Instr("STORE_NAME", "z"), + ] + ) + + blocks = ControlFlowGraph.from_bytecode(code) + self.assertBlocksEqual( + blocks, + [ + Instr("LOAD_CONST", 7), + Instr("STORE_NAME", "x"), + SetLineno(4), + Instr("LOAD_CONST", 8), + Instr("STORE_NAME", "y"), + SetLineno(5), + Instr("LOAD_CONST", 9), + Instr("STORE_NAME", "z"), + ], + ) + + def test_legalize(self): + code = Bytecode() + code.first_lineno = 3 + code.extend( + [ + Instr("LOAD_CONST", 7), + Instr("STORE_NAME", "x"), + Instr("LOAD_CONST", 8, lineno=4), + Instr("STORE_NAME", "y"), + SetLineno(5), + Instr("LOAD_CONST", 9, lineno=6), + Instr("STORE_NAME", "z"), + ] + ) + + blocks = ControlFlowGraph.from_bytecode(code) + blocks.legalize() + self.assertBlocksEqual( + blocks, + [ + Instr("LOAD_CONST", 7, lineno=3), + Instr("STORE_NAME", "x", lineno=3), + Instr("LOAD_CONST", 8, lineno=4), + Instr("STORE_NAME", "y", lineno=4), + Instr("LOAD_CONST", 9, lineno=5), + Instr("STORE_NAME", "z", lineno=5), + ], + ) + + def test_repr(self): + r = repr(ControlFlowGraph()) + self.assertIn("ControlFlowGraph", r) + self.assertIn("1", r) + + def test_to_bytecode(self): + # if test: + # x = 2 + # x = 5 + blocks = ControlFlowGraph() + blocks.add_block() + blocks.add_block() + blocks[0].extend( + [ + Instr("LOAD_NAME", "test", lineno=1), + Instr("POP_JUMP_IF_FALSE", blocks[2], lineno=1), + ] + ) + + blocks[1].extend( + [ + Instr("LOAD_CONST", 5, lineno=2), + Instr("STORE_NAME", "x", lineno=2), + Instr("JUMP_FORWARD", blocks[2], lineno=2), + ] + ) + + blocks[2].extend( + [ + Instr("LOAD_CONST", 7, lineno=3), + Instr("STORE_NAME", "x", lineno=3), + Instr("LOAD_CONST", None, lineno=3), + Instr("RETURN_VALUE", lineno=3), + ] + ) + + bytecode = blocks.to_bytecode() + label = Label() + self.assertEqual( + bytecode, + [ + Instr("LOAD_NAME", "test", lineno=1), + Instr("POP_JUMP_IF_FALSE", label, lineno=1), + Instr("LOAD_CONST", 5, lineno=2), + Instr("STORE_NAME", "x", lineno=2), + Instr("JUMP_FORWARD", label, lineno=2), + label, + Instr("LOAD_CONST", 7, lineno=3), + Instr("STORE_NAME", "x", lineno=3), + Instr("LOAD_CONST", None, lineno=3), + Instr("RETURN_VALUE", lineno=3), + ], + ) + # FIXME: test other attributes + + def test_label_at_the_end(self): + label = Label() + code = Bytecode( + [ + Instr("LOAD_NAME", "x"), + Instr("UNARY_NOT"), + Instr("POP_JUMP_IF_FALSE", label), + Instr("LOAD_CONST", 9), + Instr("STORE_NAME", "y"), + label, + ] + ) + + cfg = ControlFlowGraph.from_bytecode(code) + self.assertBlocksEqual( + cfg, + [ + Instr("LOAD_NAME", "x"), + Instr("UNARY_NOT"), + Instr("POP_JUMP_IF_FALSE", cfg[2]), + ], + [Instr("LOAD_CONST", 9), Instr("STORE_NAME", "y")], + [], + ) + + def test_from_bytecode(self): + bytecode = Bytecode() + label = Label() + bytecode.extend( + [ + Instr("LOAD_NAME", "test", lineno=1), + Instr("POP_JUMP_IF_FALSE", label, lineno=1), + Instr("LOAD_CONST", 5, lineno=2), + Instr("STORE_NAME", "x", lineno=2), + Instr("JUMP_FORWARD", label, lineno=2), + # dead code! + Instr("LOAD_CONST", 7, lineno=4), + Instr("STORE_NAME", "x", lineno=4), + Label(), # unused label + label, + Label(), # unused label + Instr("LOAD_CONST", None, lineno=4), + Instr("RETURN_VALUE", lineno=4), + ] + ) + + blocks = ControlFlowGraph.from_bytecode(bytecode) + label2 = blocks[3] + self.assertBlocksEqual( + blocks, + [ + Instr("LOAD_NAME", "test", lineno=1), + Instr("POP_JUMP_IF_FALSE", label2, lineno=1), + ], + [ + Instr("LOAD_CONST", 5, lineno=2), + Instr("STORE_NAME", "x", lineno=2), + Instr("JUMP_FORWARD", label2, lineno=2), + ], + [Instr("LOAD_CONST", 7, lineno=4), Instr("STORE_NAME", "x", lineno=4)], + [Instr("LOAD_CONST", None, lineno=4), Instr("RETURN_VALUE", lineno=4)], + ) + # FIXME: test other attributes + + def test_from_bytecode_loop(self): + # for x in (1, 2, 3): + # if x == 2: + # break + # continue + + if sys.version_info < (3, 8): + label_loop_start = Label() + label_loop_exit = Label() + label_loop_end = Label() + + code = Bytecode() + code.extend( + ( + Instr("SETUP_LOOP", label_loop_end, lineno=1), + Instr("LOAD_CONST", (1, 2, 3), lineno=1), + Instr("GET_ITER", lineno=1), + label_loop_start, + Instr("FOR_ITER", label_loop_exit, lineno=1), + Instr("STORE_NAME", "x", lineno=1), + Instr("LOAD_NAME", "x", lineno=2), + Instr("LOAD_CONST", 2, lineno=2), + Instr("COMPARE_OP", Compare.EQ, lineno=2), + Instr("POP_JUMP_IF_FALSE", label_loop_start, lineno=2), + Instr("BREAK_LOOP", lineno=3), + Instr("JUMP_ABSOLUTE", label_loop_start, lineno=4), + Instr("JUMP_ABSOLUTE", label_loop_start, lineno=4), + label_loop_exit, + Instr("POP_BLOCK", lineno=4), + label_loop_end, + Instr("LOAD_CONST", None, lineno=4), + Instr("RETURN_VALUE", lineno=4), + ) + ) + blocks = ControlFlowGraph.from_bytecode(code) + + expected = [ + [Instr("SETUP_LOOP", blocks[8], lineno=1)], + [Instr("LOAD_CONST", (1, 2, 3), lineno=1), Instr("GET_ITER", lineno=1)], + [Instr("FOR_ITER", blocks[7], lineno=1)], + [ + Instr("STORE_NAME", "x", lineno=1), + Instr("LOAD_NAME", "x", lineno=2), + Instr("LOAD_CONST", 2, lineno=2), + Instr("COMPARE_OP", Compare.EQ, lineno=2), + Instr("POP_JUMP_IF_FALSE", blocks[2], lineno=2), + ], + [Instr("BREAK_LOOP", lineno=3)], + [Instr("JUMP_ABSOLUTE", blocks[2], lineno=4)], + [Instr("JUMP_ABSOLUTE", blocks[2], lineno=4)], + [Instr("POP_BLOCK", lineno=4)], + [Instr("LOAD_CONST", None, lineno=4), Instr("RETURN_VALUE", lineno=4)], + ] + self.assertBlocksEqual(blocks, *expected) + else: + label_loop_start = Label() + label_loop_exit = Label() + + code = Bytecode() + code.extend( + ( + Instr("LOAD_CONST", (1, 2, 3), lineno=1), + Instr("GET_ITER", lineno=1), + label_loop_start, + Instr("FOR_ITER", label_loop_exit, lineno=1), + Instr("STORE_NAME", "x", lineno=1), + Instr("LOAD_NAME", "x", lineno=2), + Instr("LOAD_CONST", 2, lineno=2), + Instr("COMPARE_OP", Compare.EQ, lineno=2), + Instr("POP_JUMP_IF_FALSE", label_loop_start, lineno=2), + Instr("JUMP_ABSOLUTE", label_loop_exit, lineno=3), + Instr("JUMP_ABSOLUTE", label_loop_start, lineno=4), + Instr("JUMP_ABSOLUTE", label_loop_start, lineno=4), + label_loop_exit, + Instr("LOAD_CONST", None, lineno=4), + Instr("RETURN_VALUE", lineno=4), + ) + ) + blocks = ControlFlowGraph.from_bytecode(code) + + expected = [ + [Instr("LOAD_CONST", (1, 2, 3), lineno=1), Instr("GET_ITER", lineno=1)], + [Instr("FOR_ITER", blocks[6], lineno=1)], + [ + Instr("STORE_NAME", "x", lineno=1), + Instr("LOAD_NAME", "x", lineno=2), + Instr("LOAD_CONST", 2, lineno=2), + Instr("COMPARE_OP", Compare.EQ, lineno=2), + Instr("POP_JUMP_IF_FALSE", blocks[1], lineno=2), + ], + [Instr("JUMP_ABSOLUTE", blocks[6], lineno=3)], + [Instr("JUMP_ABSOLUTE", blocks[1], lineno=4)], + [Instr("JUMP_ABSOLUTE", blocks[1], lineno=4)], + [Instr("LOAD_CONST", None, lineno=4), Instr("RETURN_VALUE", lineno=4)], + ] + self.assertBlocksEqual(blocks, *expected) + + +class BytecodeBlocksFunctionalTests(TestCase): + def test_eq(self): + # compare codes with multiple blocks and labels, + # Code.__eq__() renumbers labels to get equal labels + source = "x = 1 if test else 2" + code1 = disassemble(source) + code2 = disassemble(source) + self.assertEqual(code1, code2) + + # Type mismatch + self.assertFalse(code1 == 1) + + # argnames mismatch + cfg = ControlFlowGraph() + cfg.argnames = 10 + self.assertFalse(code1 == cfg) + + # instr mismatch + cfg = ControlFlowGraph() + cfg.argnames = code1.argnames + self.assertFalse(code1 == cfg) + + def check_getitem(self, code): + # check internal Code block indexes (index by index, index by label) + for block_index, block in enumerate(code): + self.assertIs(code[block_index], block) + self.assertIs(code[block], block) + self.assertEqual(code.get_block_index(block), block_index) + + def test_delitem(self): + cfg = ControlFlowGraph() + b = cfg.add_block() + del cfg[b] + self.assertEqual(len(cfg.get_instructions()), 0) + + def sample_code(self): + code = disassemble("x = 1", remove_last_return_none=True) + self.assertBlocksEqual(code, [Instr("LOAD_CONST", 1, lineno=1), Instr("STORE_NAME", "x", lineno=1)]) + return code + + def test_split_block(self): + code = self.sample_code() + code[0].append(Instr("NOP", lineno=1)) + + label = code.split_block(code[0], 2) + self.assertIs(label, code[1]) + self.assertBlocksEqual( + code, + [Instr("LOAD_CONST", 1, lineno=1), Instr("STORE_NAME", "x", lineno=1)], + [Instr("NOP", lineno=1)], + ) + self.check_getitem(code) + + label2 = code.split_block(code[0], 1) + self.assertIs(label2, code[1]) + self.assertBlocksEqual( + code, + [Instr("LOAD_CONST", 1, lineno=1)], + [Instr("STORE_NAME", "x", lineno=1)], + [Instr("NOP", lineno=1)], + ) + self.check_getitem(code) + + with self.assertRaises(TypeError): + code.split_block(1, 1) + + with self.assertRaises(ValueError) as e: + code.split_block(code[0], -2) + self.assertIn("positive", e.exception.args[0]) + + def test_split_block_end(self): + code = self.sample_code() + + # split at the end of the last block requires to add a new empty block + label = code.split_block(code[0], 2) + self.assertIs(label, code[1]) + self.assertBlocksEqual( + code, + [Instr("LOAD_CONST", 1, lineno=1), Instr("STORE_NAME", "x", lineno=1)], + [], + ) + self.check_getitem(code) + + # split at the end of a block which is not the end doesn't require to + # add a new block + label = code.split_block(code[0], 2) + self.assertIs(label, code[1]) + self.assertBlocksEqual( + code, + [Instr("LOAD_CONST", 1, lineno=1), Instr("STORE_NAME", "x", lineno=1)], + [], + ) + + def test_split_block_dont_split(self): + code = self.sample_code() + + # FIXME: is it really useful to support that? + block = code.split_block(code[0], 0) + self.assertIs(block, code[0]) + self.assertBlocksEqual(code, [Instr("LOAD_CONST", 1, lineno=1), Instr("STORE_NAME", "x", lineno=1)]) + + def test_split_block_error(self): + code = self.sample_code() + + with self.assertRaises(ValueError): + # invalid index + code.split_block(code[0], 3) + + def test_to_code(self): + # test resolution of jump labels + bytecode = ControlFlowGraph() + bytecode.first_lineno = 3 + bytecode.argcount = 3 + if sys.version_info > (3, 8): + bytecode.posonlyargcount = 0 + bytecode.kwonlyargcount = 2 + bytecode.name = "func" + bytecode.filename = "hello.py" + bytecode.flags = 0x43 + bytecode.argnames = ("arg", "arg2", "arg3", "kwonly", "kwonly2") + bytecode.docstring = None + block0 = bytecode[0] + block1 = bytecode.add_block() + block2 = bytecode.add_block() + block0.extend( + [ + Instr("LOAD_FAST", "x", lineno=4), + Instr("POP_JUMP_IF_FALSE", block2, lineno=4), + ] + ) + block1.extend([Instr("LOAD_FAST", "arg", lineno=5), Instr("STORE_FAST", "x", lineno=5)]) + block2.extend( + [ + Instr("LOAD_CONST", 3, lineno=6), + Instr("STORE_FAST", "x", lineno=6), + Instr("LOAD_FAST", "x", lineno=7), + Instr("RETURN_VALUE", lineno=7), + ] + ) + + if OFFSET_AS_INSTRUCTION: + # The argument of the jump is divided by 2 + expected = b"|\x05" b"r\x04" b"|\x00" b"}\x05" b"d\x01" b"}\x05" b"|\x05" b"S\x00" + else: + expected = b"|\x05" b"r\x08" b"|\x00" b"}\x05" b"d\x01" b"}\x05" b"|\x05" b"S\x00" + + code = bytecode.to_code() + self.assertEqual(code.co_consts, (None, 3)) + self.assertEqual(code.co_argcount, 3) + if sys.version_info > (3, 8): + self.assertEqual(code.co_posonlyargcount, 0) + self.assertEqual(code.co_kwonlyargcount, 2) + self.assertEqual(code.co_nlocals, 6) + self.assertEqual(code.co_stacksize, 1) + # FIXME: don't use hardcoded constants + self.assertEqual(code.co_flags, 0x43) + self.assertEqual(code.co_code, expected) + self.assertEqual(code.co_names, ()) + self.assertEqual(code.co_varnames, ("arg", "arg2", "arg3", "kwonly", "kwonly2", "x")) + self.assertEqual(code.co_filename, "hello.py") + self.assertEqual(code.co_name, "func") + self.assertEqual(code.co_firstlineno, 3) + + # verify stacksize argument is honored + explicit_stacksize = code.co_stacksize + 42 + code = bytecode.to_code(stacksize=explicit_stacksize) + self.assertEqual(code.co_stacksize, explicit_stacksize) + + def test_get_block_index(self): + blocks = ControlFlowGraph() + block0 = blocks[0] + block1 = blocks.add_block() + block2 = blocks.add_block() + self.assertEqual(blocks.get_block_index(block0), 0) + self.assertEqual(blocks.get_block_index(block1), 1) + self.assertEqual(blocks.get_block_index(block2), 2) + + other_block = BasicBlock() + self.assertRaises(ValueError, blocks.get_block_index, other_block) + + +class CFGStacksizeComputationTests(TestCase): + def check_stack_size(self, func): + code = func.__code__ + bytecode = Bytecode.from_code(code) + cfg = ControlFlowGraph.from_bytecode(bytecode) + self.assertEqual(code.co_stacksize, cfg.compute_stacksize()) + + def test_empty_code(self): + cfg = ControlFlowGraph() + del cfg[0] + self.assertEqual(cfg.compute_stacksize(), 0) + + def test_handling_of_set_lineno(self): + code = Bytecode() + code.first_lineno = 3 + code.extend( + [ + Instr("LOAD_CONST", 7), + Instr("STORE_NAME", "x"), + SetLineno(4), + Instr("LOAD_CONST", 8), + Instr("STORE_NAME", "y"), + SetLineno(5), + Instr("LOAD_CONST", 9), + Instr("STORE_NAME", "z"), + ] + ) + self.assertEqual(code.compute_stacksize(), 1) + + def test_invalid_stacksize(self): + code = Bytecode() + code.extend([Instr("STORE_NAME", "x")]) + with self.assertRaises(RuntimeError): + code.compute_stacksize() + + def test_stack_size_computation_and(self): + def test(arg1, *args, **kwargs): # pragma: no cover + return arg1 and args # Test JUMP_IF_FALSE_OR_POP + + self.check_stack_size(test) + + def test_stack_size_computation_or(self): + def test(arg1, *args, **kwargs): # pragma: no cover + return arg1 or args # Test JUMP_IF_TRUE_OR_POP + + self.check_stack_size(test) + + def test_stack_size_computation_if_else(self): + def test(arg1, *args, **kwargs): # pragma: no cover + if args: + return 0 + elif kwargs: + return 1 + else: + return 2 + + self.check_stack_size(test) + + def test_stack_size_computation_for_loop_continue(self): + def test(arg1, *args, **kwargs): # pragma: no cover + for k in kwargs: + if k in args: + continue + else: + return 1 + + self.check_stack_size(test) + + def test_stack_size_computation_while_loop_break(self): + def test(arg1, *args, **kwargs): # pragma: no cover + while True: + if arg1: + break + + self.check_stack_size(test) + + def test_stack_size_computation_with(self): + def test(arg1, *args, **kwargs): # pragma: no cover + with open(arg1) as f: + return f.read() + + self.check_stack_size(test) + + def test_stack_size_computation_try_except(self): + def test(arg1, *args, **kwargs): # pragma: no cover + try: + return args[0] + except Exception: + return 2 + + self.check_stack_size(test) + + def test_stack_size_computation_try_finally(self): + def test(arg1, *args, **kwargs): # pragma: no cover + try: + return args[0] + finally: + return 2 + + self.check_stack_size(test) + + def test_stack_size_computation_try_except_finally(self): + def test(arg1, *args, **kwargs): # pragma: no cover + try: + return args[0] + except Exception: + return 2 + finally: + print("Interrupt") + + self.check_stack_size(test) + + def test_stack_size_computation_try_except_else_finally(self): + def test(arg1, *args, **kwargs): # pragma: no cover + try: + return args[0] + except Exception: + return 2 + else: + return arg1 + finally: + print("Interrupt") + + self.check_stack_size(test) + + def test_stack_size_computation_nested_try_except_finally(self): + def test(arg1, *args, **kwargs): # pragma: no cover + k = 1 + try: + getattr(arg1, k) + except AttributeError: + pass + except Exception: + try: + assert False + except Exception: + return 2 + finally: + print("unexpected") + finally: + print("attempted to get {}".format(k)) + + self.check_stack_size(test) + + def test_stack_size_computation_nested_try_except_else_finally(self): + def test(*args, **kwargs): + try: + v = args[1] + except IndexError: + try: + w = kwargs["value"] + except KeyError: + return -1 + else: + return w + finally: + print("second finally") + else: + return v + finally: + print("first finally") + + # A direct comparison of the stack depth fails because CPython + # generate dead code that is used in stack computation. + cpython_stacksize = test.__code__.co_stacksize + test.__code__ = Bytecode.from_code(test.__code__).to_code() + self.assertLessEqual(test.__code__.co_stacksize, cpython_stacksize) + with contextlib.redirect_stdout(io.StringIO()) as stdout: + self.assertEqual(test(1, 4), 4) + self.assertEqual(stdout.getvalue(), "first finally\n") + + with contextlib.redirect_stdout(io.StringIO()) as stdout: + self.assertEqual(test([], value=3), 3) + self.assertEqual(stdout.getvalue(), "second finally\nfirst finally\n") + + with contextlib.redirect_stdout(io.StringIO()) as stdout: + self.assertEqual(test([], name=None), -1) + self.assertEqual(stdout.getvalue(), "second finally\nfirst finally\n") + + def test_stack_size_with_dead_code(self): + # Simply demonstrate more directly the previously mentioned issue. + def test(*args): # pragma: no cover + return 0 + try: + a = args[0] + except IndexError: + return -1 + else: + return a + + test.__code__ = Bytecode.from_code(test.__code__).to_code() + self.assertEqual(test.__code__.co_stacksize, 1) + self.assertEqual(test(1), 0) + + def test_huge_code_with_numerous_blocks(self): + def base_func(x): + pass + + def mk_if_then_else(depth): + instructions = [] + for i in range(depth): + label_else = Label() + instructions.extend( + [ + Instr("LOAD_FAST", "x"), + Instr("POP_JUMP_IF_FALSE", label_else), + Instr("LOAD_GLOBAL", "f{}".format(i)), + Instr("RETURN_VALUE"), + label_else, + ] + ) + instructions.extend([Instr("LOAD_CONST", None), Instr("RETURN_VALUE")]) + return instructions + + bytecode = Bytecode(mk_if_then_else(5000)) + bytecode.compute_stacksize() + + +if __name__ == "__main__": + unittest.main() # pragma: no cover diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py new file mode 100644 index 0000000..4820e87 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py @@ -0,0 +1,93 @@ +import pytest +from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON +from tests_python.debug_constants import TEST_CYTHON + +pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason="Requires CPython >= 3.6") +import unittest + +from _pydevd_frame_eval.vendored.bytecode import ConcreteBytecode, Bytecode, ControlFlowGraph +from _pydevd_frame_eval.vendored.bytecode.tests import get_code + + +class CodeTests(unittest.TestCase): + """Check that bytecode.from_code(code).to_code() returns code.""" + + def check(self, source, function=False): + ref_code = get_code(source, function=function) + + code = ConcreteBytecode.from_code(ref_code).to_code() + self.assertEqual(code, ref_code) + + code = Bytecode.from_code(ref_code).to_code() + self.assertEqual(code, ref_code) + + bytecode = Bytecode.from_code(ref_code) + blocks = ControlFlowGraph.from_bytecode(bytecode) + code = blocks.to_bytecode().to_code() + self.assertEqual(code, ref_code) + + def test_loop(self): + self.check( + """ + for x in range(1, 10): + x += 1 + if x == 3: + continue + x -= 1 + if x > 7: + break + x = 0 + print(x) + """ + ) + + def test_varargs(self): + self.check( + """ + def func(a, b, *varargs): + pass + """, + function=True, + ) + + def test_kwargs(self): + self.check( + """ + def func(a, b, **kwargs): + pass + """, + function=True, + ) + + def test_kwonlyargs(self): + self.check( + """ + def func(*, arg, arg2): + pass + """, + function=True, + ) + + # Added because Python 3.10 added some special beahavior with respect to + # generators in term of stack size + def test_generator_func(self): + self.check( + """ + def func(arg, arg2): + yield + """, + function=True, + ) + + def test_async_func(self): + self.check( + """ + async def func(arg, arg2): + pass + """, + function=True, + ) + + +if __name__ == "__main__": + unittest.main() # pragma: no cover diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py new file mode 100644 index 0000000..f1fe5e6 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py @@ -0,0 +1,1486 @@ +import pytest +from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON +from tests_python.debug_constants import TEST_CYTHON + +pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason="Requires CPython >= 3.6") +#!/usr/bin/env python3 +import opcode +import sys +import textwrap +import types +import unittest + +from _pydevd_frame_eval.vendored.bytecode import ( + UNSET, + Label, + Instr, + SetLineno, + Bytecode, + CellVar, + FreeVar, + CompilerFlags, + ConcreteInstr, + ConcreteBytecode, +) +from _pydevd_frame_eval.vendored.bytecode.concrete import OFFSET_AS_INSTRUCTION +from _pydevd_frame_eval.vendored.bytecode.tests import get_code, TestCase + + +class ConcreteInstrTests(TestCase): + def test_constructor(self): + with self.assertRaises(ValueError): + # need an argument + ConcreteInstr("LOAD_CONST") + with self.assertRaises(ValueError): + # must not have an argument + ConcreteInstr("ROT_TWO", 33) + + # invalid argument + with self.assertRaises(TypeError): + ConcreteInstr("LOAD_CONST", 1.0) + with self.assertRaises(ValueError): + ConcreteInstr("LOAD_CONST", -1) + with self.assertRaises(TypeError): + ConcreteInstr("LOAD_CONST", 5, lineno=1.0) + with self.assertRaises(ValueError): + ConcreteInstr("LOAD_CONST", 5, lineno=-1) + + # test maximum argument + with self.assertRaises(ValueError): + ConcreteInstr("LOAD_CONST", 2147483647 + 1) + instr = ConcreteInstr("LOAD_CONST", 2147483647) + self.assertEqual(instr.arg, 2147483647) + + # test meaningless extended args + instr = ConcreteInstr("LOAD_FAST", 8, lineno=3, extended_args=1) + self.assertEqual(instr.name, "LOAD_FAST") + self.assertEqual(instr.arg, 8) + self.assertEqual(instr.lineno, 3) + self.assertEqual(instr.size, 4) + + def test_attr(self): + instr = ConcreteInstr("LOAD_CONST", 5, lineno=12) + self.assertEqual(instr.name, "LOAD_CONST") + self.assertEqual(instr.opcode, 100) + self.assertEqual(instr.arg, 5) + self.assertEqual(instr.lineno, 12) + self.assertEqual(instr.size, 2) + + def test_set(self): + instr = ConcreteInstr("LOAD_CONST", 5, lineno=3) + + instr.set("NOP") + self.assertEqual(instr.name, "NOP") + self.assertIs(instr.arg, UNSET) + self.assertEqual(instr.lineno, 3) + + instr.set("LOAD_FAST", 8) + self.assertEqual(instr.name, "LOAD_FAST") + self.assertEqual(instr.arg, 8) + self.assertEqual(instr.lineno, 3) + + # invalid + with self.assertRaises(ValueError): + instr.set("LOAD_CONST") + with self.assertRaises(ValueError): + instr.set("NOP", 5) + + def test_set_attr(self): + instr = ConcreteInstr("LOAD_CONST", 5, lineno=12) + + # operator name + instr.name = "LOAD_FAST" + self.assertEqual(instr.name, "LOAD_FAST") + self.assertEqual(instr.opcode, 124) + self.assertRaises(TypeError, setattr, instr, "name", 3) + self.assertRaises(ValueError, setattr, instr, "name", "xxx") + + # operator code + instr.opcode = 100 + self.assertEqual(instr.name, "LOAD_CONST") + self.assertEqual(instr.opcode, 100) + self.assertRaises(ValueError, setattr, instr, "opcode", -12) + self.assertRaises(TypeError, setattr, instr, "opcode", "abc") + + # extended argument + instr.arg = 0x1234ABCD + self.assertEqual(instr.arg, 0x1234ABCD) + self.assertEqual(instr.size, 8) + + # small argument + instr.arg = 0 + self.assertEqual(instr.arg, 0) + self.assertEqual(instr.size, 2) + + # invalid argument + self.assertRaises(ValueError, setattr, instr, "arg", -1) + self.assertRaises(ValueError, setattr, instr, "arg", 2147483647 + 1) + + # size attribute is read-only + self.assertRaises(AttributeError, setattr, instr, "size", 3) + + # lineno + instr.lineno = 33 + self.assertEqual(instr.lineno, 33) + self.assertRaises(TypeError, setattr, instr, "lineno", 1.0) + self.assertRaises(ValueError, setattr, instr, "lineno", -1) + + def test_size(self): + self.assertEqual(ConcreteInstr("ROT_TWO").size, 2) + self.assertEqual(ConcreteInstr("LOAD_CONST", 3).size, 2) + self.assertEqual(ConcreteInstr("LOAD_CONST", 0x1234ABCD).size, 8) + + def test_disassemble(self): + code = b"\t\x00d\x03" + instr = ConcreteInstr.disassemble(1, code, 0) + self.assertEqual(instr, ConcreteInstr("NOP", lineno=1)) + + instr = ConcreteInstr.disassemble(2, code, 1 if OFFSET_AS_INSTRUCTION else 2) + self.assertEqual(instr, ConcreteInstr("LOAD_CONST", 3, lineno=2)) + + code = b"\x90\x12\x904\x90\xabd\xcd" + + instr = ConcreteInstr.disassemble(3, code, 0) + self.assertEqual(instr, ConcreteInstr("EXTENDED_ARG", 0x12, lineno=3)) + + def test_assemble(self): + instr = ConcreteInstr("NOP") + self.assertEqual(instr.assemble(), b"\t\x00") + + instr = ConcreteInstr("LOAD_CONST", 3) + self.assertEqual(instr.assemble(), b"d\x03") + + instr = ConcreteInstr("LOAD_CONST", 0x1234ABCD) + self.assertEqual( + instr.assemble(), + (b"\x90\x12\x904\x90\xabd\xcd"), + ) + + instr = ConcreteInstr("LOAD_CONST", 3, extended_args=1) + self.assertEqual( + instr.assemble(), + (b"\x90\x00d\x03"), + ) + + def test_get_jump_target(self): + jump_abs = ConcreteInstr("JUMP_ABSOLUTE", 3) + self.assertEqual(jump_abs.get_jump_target(100), 3) + + jump_forward = ConcreteInstr("JUMP_FORWARD", 5) + self.assertEqual(jump_forward.get_jump_target(10), 16 if OFFSET_AS_INSTRUCTION else 17) + + +class ConcreteBytecodeTests(TestCase): + def test_repr(self): + r = repr(ConcreteBytecode()) + self.assertIn("ConcreteBytecode", r) + self.assertIn("0", r) + + def test_eq(self): + code = ConcreteBytecode() + self.assertFalse(code == 1) + + for name, val in ( + ("names", ["a"]), + ("varnames", ["a"]), + ("consts", [1]), + ("argcount", 1), + ("kwonlyargcount", 2), + ("flags", CompilerFlags(CompilerFlags.GENERATOR)), + ("first_lineno", 10), + ("filename", "xxxx.py"), + ("name", "__x"), + ("docstring", "x-x-x"), + ("cellvars", [CellVar("x")]), + ("freevars", [FreeVar("x")]), + ): + c = ConcreteBytecode() + setattr(c, name, val) + # For obscure reasons using assertNotEqual here fail + self.assertFalse(code == c) + + if sys.version_info > (3, 8): + c = ConcreteBytecode() + c.posonlyargcount = 10 + self.assertFalse(code == c) + + c = ConcreteBytecode() + c.consts = [1] + code.consts = [1] + c.append(ConcreteInstr("LOAD_CONST", 0)) + self.assertFalse(code == c) + + def test_attr(self): + code_obj = get_code("x = 5") + code = ConcreteBytecode.from_code(code_obj) + self.assertEqual(code.consts, [5, None]) + self.assertEqual(code.names, ["x"]) + self.assertEqual(code.varnames, []) + self.assertEqual(code.freevars, []) + self.assertListEqual( + list(code), + [ + ConcreteInstr("LOAD_CONST", 0, lineno=1), + ConcreteInstr("STORE_NAME", 0, lineno=1), + ConcreteInstr("LOAD_CONST", 1, lineno=1), + ConcreteInstr("RETURN_VALUE", lineno=1), + ], + ) + # FIXME: test other attributes + + def test_invalid_types(self): + code = ConcreteBytecode() + code.append(Label()) + with self.assertRaises(ValueError): + list(code) + with self.assertRaises(ValueError): + code.legalize() + with self.assertRaises(ValueError): + ConcreteBytecode([Label()]) + + def test_to_code_lnotab(self): + # We use an actual function for the simple case to + # ensure we get lnotab right + def f(): + # + # + x = 7 # noqa + y = 8 # noqa + z = 9 # noqa + + fl = f.__code__.co_firstlineno + concrete = ConcreteBytecode() + concrete.consts = [None, 7, 8, 9] + concrete.varnames = ["x", "y", "z"] + concrete.first_lineno = fl + concrete.extend( + [ + SetLineno(fl + 3), + ConcreteInstr("LOAD_CONST", 1), + ConcreteInstr("STORE_FAST", 0), + SetLineno(fl + 4), + ConcreteInstr("LOAD_CONST", 2), + ConcreteInstr("STORE_FAST", 1), + SetLineno(fl + 5), + ConcreteInstr("LOAD_CONST", 3), + ConcreteInstr("STORE_FAST", 2), + ConcreteInstr("LOAD_CONST", 0), + ConcreteInstr("RETURN_VALUE"), + ] + ) + + code = concrete.to_code() + self.assertEqual(code.co_code, f.__code__.co_code) + self.assertEqual(code.co_lnotab, f.__code__.co_lnotab) + if sys.version_info >= (3, 10): + self.assertEqual(code.co_linetable, f.__code__.co_linetable) + + def test_negative_lnotab(self): + # x = 7 + # y = 8 + concrete = ConcreteBytecode( + [ + ConcreteInstr("LOAD_CONST", 0), + ConcreteInstr("STORE_NAME", 0), + # line number goes backward! + SetLineno(2), + ConcreteInstr("LOAD_CONST", 1), + ConcreteInstr("STORE_NAME", 1), + ] + ) + concrete.consts = [7, 8] + concrete.names = ["x", "y"] + concrete.first_lineno = 5 + + code = concrete.to_code() + expected = b"d\x00Z\x00d\x01Z\x01" + self.assertEqual(code.co_code, expected) + self.assertEqual(code.co_firstlineno, 5) + self.assertEqual(code.co_lnotab, b"\x04\xfd") + + def test_extended_lnotab(self): + # x = 7 + # 200 blank lines + # y = 8 + concrete = ConcreteBytecode( + [ + ConcreteInstr("LOAD_CONST", 0), + SetLineno(1 + 128), + ConcreteInstr("STORE_NAME", 0), + # line number goes backward! + SetLineno(1 + 129), + ConcreteInstr("LOAD_CONST", 1), + SetLineno(1), + ConcreteInstr("STORE_NAME", 1), + ] + ) + concrete.consts = [7, 8] + concrete.names = ["x", "y"] + concrete.first_lineno = 1 + + code = concrete.to_code() + expected = b"d\x00Z\x00d\x01Z\x01" + self.assertEqual(code.co_code, expected) + self.assertEqual(code.co_firstlineno, 1) + self.assertEqual(code.co_lnotab, b"\x02\x7f\x00\x01\x02\x01\x02\x80\x00\xff") + + def test_extended_lnotab2(self): + # x = 7 + # 200 blank lines + # y = 8 + base_code = compile("x = 7" + "\n" * 200 + "y = 8", "", "exec") + concrete = ConcreteBytecode( + [ + ConcreteInstr("LOAD_CONST", 0), + ConcreteInstr("STORE_NAME", 0), + SetLineno(201), + ConcreteInstr("LOAD_CONST", 1), + ConcreteInstr("STORE_NAME", 1), + ConcreteInstr("LOAD_CONST", 2), + ConcreteInstr("RETURN_VALUE"), + ] + ) + concrete.consts = [None, 7, 8] + concrete.names = ["x", "y"] + concrete.first_lineno = 1 + + code = concrete.to_code() + self.assertEqual(code.co_code, base_code.co_code) + self.assertEqual(code.co_firstlineno, base_code.co_firstlineno) + self.assertEqual(code.co_lnotab, base_code.co_lnotab) + if sys.version_info >= (3, 10): + self.assertEqual(code.co_linetable, base_code.co_linetable) + + def test_to_bytecode_consts(self): + # x = -0.0 + # x = +0.0 + # + # code optimized by the CPython 3.6 peephole optimizer which emits + # duplicated constants (0.0 is twice in consts). + code = ConcreteBytecode() + code.consts = [0.0, None, -0.0, 0.0] + code.names = ["x", "y"] + code.extend( + [ + ConcreteInstr("LOAD_CONST", 2, lineno=1), + ConcreteInstr("STORE_NAME", 0, lineno=1), + ConcreteInstr("LOAD_CONST", 3, lineno=2), + ConcreteInstr("STORE_NAME", 1, lineno=2), + ConcreteInstr("LOAD_CONST", 1, lineno=2), + ConcreteInstr("RETURN_VALUE", lineno=2), + ] + ) + + code = code.to_bytecode().to_concrete_bytecode() + # the conversion changes the constant order: the order comes from + # the order of LOAD_CONST instructions + self.assertEqual(code.consts, [-0.0, 0.0, None]) + code.names = ["x", "y"] + self.assertListEqual( + list(code), + [ + ConcreteInstr("LOAD_CONST", 0, lineno=1), + ConcreteInstr("STORE_NAME", 0, lineno=1), + ConcreteInstr("LOAD_CONST", 1, lineno=2), + ConcreteInstr("STORE_NAME", 1, lineno=2), + ConcreteInstr("LOAD_CONST", 2, lineno=2), + ConcreteInstr("RETURN_VALUE", lineno=2), + ], + ) + + def test_cellvar(self): + concrete = ConcreteBytecode() + concrete.cellvars = ["x"] + concrete.append(ConcreteInstr("LOAD_DEREF", 0)) + code = concrete.to_code() + + concrete = ConcreteBytecode.from_code(code) + self.assertEqual(concrete.cellvars, ["x"]) + self.assertEqual(concrete.freevars, []) + self.assertEqual(list(concrete), [ConcreteInstr("LOAD_DEREF", 0, lineno=1)]) + + bytecode = concrete.to_bytecode() + self.assertEqual(bytecode.cellvars, ["x"]) + self.assertEqual(list(bytecode), [Instr("LOAD_DEREF", CellVar("x"), lineno=1)]) + + def test_freevar(self): + concrete = ConcreteBytecode() + concrete.freevars = ["x"] + concrete.append(ConcreteInstr("LOAD_DEREF", 0)) + code = concrete.to_code() + + concrete = ConcreteBytecode.from_code(code) + self.assertEqual(concrete.cellvars, []) + self.assertEqual(concrete.freevars, ["x"]) + self.assertEqual(list(concrete), [ConcreteInstr("LOAD_DEREF", 0, lineno=1)]) + + bytecode = concrete.to_bytecode() + self.assertEqual(bytecode.cellvars, []) + self.assertEqual(list(bytecode), [Instr("LOAD_DEREF", FreeVar("x"), lineno=1)]) + + def test_cellvar_freevar(self): + concrete = ConcreteBytecode() + concrete.cellvars = ["cell"] + concrete.freevars = ["free"] + concrete.append(ConcreteInstr("LOAD_DEREF", 0)) + concrete.append(ConcreteInstr("LOAD_DEREF", 1)) + code = concrete.to_code() + + concrete = ConcreteBytecode.from_code(code) + self.assertEqual(concrete.cellvars, ["cell"]) + self.assertEqual(concrete.freevars, ["free"]) + self.assertEqual( + list(concrete), + [ + ConcreteInstr("LOAD_DEREF", 0, lineno=1), + ConcreteInstr("LOAD_DEREF", 1, lineno=1), + ], + ) + + bytecode = concrete.to_bytecode() + self.assertEqual(bytecode.cellvars, ["cell"]) + self.assertEqual( + list(bytecode), + [ + Instr("LOAD_DEREF", CellVar("cell"), lineno=1), + Instr("LOAD_DEREF", FreeVar("free"), lineno=1), + ], + ) + + def test_load_classderef(self): + concrete = ConcreteBytecode() + concrete.cellvars = ["__class__"] + concrete.freevars = ["__class__"] + concrete.extend([ConcreteInstr("LOAD_CLASSDEREF", 1), ConcreteInstr("STORE_DEREF", 1)]) + + bytecode = concrete.to_bytecode() + self.assertEqual(bytecode.freevars, ["__class__"]) + self.assertEqual(bytecode.cellvars, ["__class__"]) + self.assertEqual( + list(bytecode), + [ + Instr("LOAD_CLASSDEREF", FreeVar("__class__"), lineno=1), + Instr("STORE_DEREF", FreeVar("__class__"), lineno=1), + ], + ) + + concrete = bytecode.to_concrete_bytecode() + self.assertEqual(concrete.freevars, ["__class__"]) + self.assertEqual(concrete.cellvars, ["__class__"]) + self.assertEqual( + list(concrete), + [ + ConcreteInstr("LOAD_CLASSDEREF", 1, lineno=1), + ConcreteInstr("STORE_DEREF", 1, lineno=1), + ], + ) + + code = concrete.to_code() + self.assertEqual(code.co_freevars, ("__class__",)) + self.assertEqual(code.co_cellvars, ("__class__",)) + self.assertEqual( + code.co_code, + b"\x94\x01\x89\x01", + ) + + def test_explicit_stacksize(self): + # Passing stacksize=... to ConcreteBytecode.to_code should result in a + # code object with the specified stacksize. We pass some silly values + # and assert that they are honored. + code_obj = get_code("print('%s' % (a,b,c))") + original_stacksize = code_obj.co_stacksize + concrete = ConcreteBytecode.from_code(code_obj) + + # First with something bigger than necessary. + explicit_stacksize = original_stacksize + 42 + new_code_obj = concrete.to_code(stacksize=explicit_stacksize) + self.assertEqual(new_code_obj.co_stacksize, explicit_stacksize) + + # Then with something bogus. We probably don't want to advertise this + # in the documentation. If this fails then decide if it's for good + # reason, and remove if so. + explicit_stacksize = 0 + new_code_obj = concrete.to_code(stacksize=explicit_stacksize) + self.assertEqual(new_code_obj.co_stacksize, explicit_stacksize) + + def test_legalize(self): + concrete = ConcreteBytecode() + concrete.first_lineno = 3 + concrete.consts = [7, 8, 9] + concrete.names = ["x", "y", "z"] + concrete.extend( + [ + ConcreteInstr("LOAD_CONST", 0), + ConcreteInstr("STORE_NAME", 0), + ConcreteInstr("LOAD_CONST", 1, lineno=4), + ConcreteInstr("STORE_NAME", 1), + SetLineno(5), + ConcreteInstr("LOAD_CONST", 2, lineno=6), + ConcreteInstr("STORE_NAME", 2), + ] + ) + + concrete.legalize() + self.assertListEqual( + list(concrete), + [ + ConcreteInstr("LOAD_CONST", 0, lineno=3), + ConcreteInstr("STORE_NAME", 0, lineno=3), + ConcreteInstr("LOAD_CONST", 1, lineno=4), + ConcreteInstr("STORE_NAME", 1, lineno=4), + ConcreteInstr("LOAD_CONST", 2, lineno=5), + ConcreteInstr("STORE_NAME", 2, lineno=5), + ], + ) + + def test_slice(self): + concrete = ConcreteBytecode() + concrete.first_lineno = 3 + concrete.consts = [7, 8, 9] + concrete.names = ["x", "y", "z"] + concrete.extend( + [ + ConcreteInstr("LOAD_CONST", 0), + ConcreteInstr("STORE_NAME", 0), + SetLineno(4), + ConcreteInstr("LOAD_CONST", 1), + ConcreteInstr("STORE_NAME", 1), + SetLineno(5), + ConcreteInstr("LOAD_CONST", 2), + ConcreteInstr("STORE_NAME", 2), + ] + ) + self.assertEqual(concrete, concrete[:]) + + def test_copy(self): + concrete = ConcreteBytecode() + concrete.first_lineno = 3 + concrete.consts = [7, 8, 9] + concrete.names = ["x", "y", "z"] + concrete.extend( + [ + ConcreteInstr("LOAD_CONST", 0), + ConcreteInstr("STORE_NAME", 0), + SetLineno(4), + ConcreteInstr("LOAD_CONST", 1), + ConcreteInstr("STORE_NAME", 1), + SetLineno(5), + ConcreteInstr("LOAD_CONST", 2), + ConcreteInstr("STORE_NAME", 2), + ] + ) + self.assertEqual(concrete, concrete.copy()) + + +class ConcreteFromCodeTests(TestCase): + def test_extended_arg(self): + # Create a code object from arbitrary bytecode + co_code = b"\x90\x12\x904\x90\xabd\xcd" + code = get_code("x=1") + args = (code.co_argcount,) if sys.version_info < (3, 8) else (code.co_argcount, code.co_posonlyargcount) + args += ( + code.co_kwonlyargcount, + code.co_nlocals, + code.co_stacksize, + code.co_flags, + co_code, + code.co_consts, + code.co_names, + code.co_varnames, + code.co_filename, + code.co_name, + code.co_firstlineno, + code.co_linetable if sys.version_info >= (3, 10) else code.co_lnotab, + code.co_freevars, + code.co_cellvars, + ) + + code = types.CodeType(*args) + + # without EXTENDED_ARG opcode + bytecode = ConcreteBytecode.from_code(code) + self.assertListEqual(list(bytecode), [ConcreteInstr("LOAD_CONST", 0x1234ABCD, lineno=1)]) + + # with EXTENDED_ARG opcode + bytecode = ConcreteBytecode.from_code(code, extended_arg=True) + expected = [ + ConcreteInstr("EXTENDED_ARG", 0x12, lineno=1), + ConcreteInstr("EXTENDED_ARG", 0x34, lineno=1), + ConcreteInstr("EXTENDED_ARG", 0xAB, lineno=1), + ConcreteInstr("LOAD_CONST", 0xCD, lineno=1), + ] + self.assertListEqual(list(bytecode), expected) + + def test_extended_arg_make_function(self): + if (3, 9) <= sys.version_info < (3, 10): + from _pydevd_frame_eval.vendored.bytecode.tests.util_annotation import get_code as get_code_future + + code_obj = get_code_future( + """ + def foo(x: int, y: int): + pass + """ + ) + else: + code_obj = get_code( + """ + def foo(x: int, y: int): + pass + """ + ) + + # without EXTENDED_ARG + concrete = ConcreteBytecode.from_code(code_obj) + if sys.version_info >= (3, 10): + func_code = concrete.consts[2] + names = ["int", "foo"] + consts = ["x", "y", func_code, "foo", None] + const_offset = 1 + name_offset = 1 + first_instrs = [ + ConcreteInstr("LOAD_CONST", 0, lineno=1), + ConcreteInstr("LOAD_NAME", 0, lineno=1), + ConcreteInstr("LOAD_CONST", 1, lineno=1), + ConcreteInstr("LOAD_NAME", 0, lineno=1), + ConcreteInstr("BUILD_TUPLE", 4, lineno=1), + ] + elif sys.version_info >= (3, 7) and concrete.flags & CompilerFlags.FUTURE_ANNOTATIONS: + func_code = concrete.consts[2] + names = ["foo"] + consts = ["int", ("x", "y"), func_code, "foo", None] + const_offset = 1 + name_offset = 0 + first_instrs = [ + ConcreteInstr("LOAD_CONST", 0, lineno=1), + ConcreteInstr("LOAD_CONST", 0, lineno=1), + ConcreteInstr("LOAD_CONST", 0 + const_offset, lineno=1), + ConcreteInstr("BUILD_CONST_KEY_MAP", 2, lineno=1), + ] + else: + func_code = concrete.consts[1] + names = ["int", "foo"] + consts = [("x", "y"), func_code, "foo", None] + const_offset = 0 + name_offset = 1 + first_instrs = [ + ConcreteInstr("LOAD_NAME", 0, lineno=1), + ConcreteInstr("LOAD_NAME", 0, lineno=1), + ConcreteInstr("LOAD_CONST", 0 + const_offset, lineno=1), + ConcreteInstr("BUILD_CONST_KEY_MAP", 2, lineno=1), + ] + + self.assertEqual(concrete.names, names) + self.assertEqual(concrete.consts, consts) + expected = first_instrs + [ + ConcreteInstr("LOAD_CONST", 1 + const_offset, lineno=1), + ConcreteInstr("LOAD_CONST", 2 + const_offset, lineno=1), + ConcreteInstr("MAKE_FUNCTION", 4, lineno=1), + ConcreteInstr("STORE_NAME", name_offset, lineno=1), + ConcreteInstr("LOAD_CONST", 3 + const_offset, lineno=1), + ConcreteInstr("RETURN_VALUE", lineno=1), + ] + self.assertListEqual(list(concrete), expected) + + # with EXTENDED_ARG + concrete = ConcreteBytecode.from_code(code_obj, extended_arg=True) + # With future annotation the int annotation is stringified and + # stored as constant this the default behavior under Python 3.10 + if sys.version_info >= (3, 10): + func_code = concrete.consts[2] + names = ["int", "foo"] + consts = ["x", "y", func_code, "foo", None] + elif concrete.flags & CompilerFlags.FUTURE_ANNOTATIONS: + func_code = concrete.consts[2] + names = ["foo"] + consts = ["int", ("x", "y"), func_code, "foo", None] + else: + func_code = concrete.consts[1] + names = ["int", "foo"] + consts = [("x", "y"), func_code, "foo", None] + + self.assertEqual(concrete.names, names) + self.assertEqual(concrete.consts, consts) + self.assertListEqual(list(concrete), expected) + + # The next three tests ensure we can round trip ConcreteBytecode generated + # with extended_args=True + + def test_extended_arg_unpack_ex(self): + def test(): + p = [1, 2, 3, 4, 5, 6] + q, r, *s, t = p + return q, r, s, t + + cpython_stacksize = test.__code__.co_stacksize + test.__code__ = ConcreteBytecode.from_code(test.__code__, extended_arg=True).to_code() + self.assertEqual(test.__code__.co_stacksize, cpython_stacksize) + self.assertEqual(test(), (1, 2, [3, 4, 5], 6)) + + def test_expected_arg_with_many_consts(self): + def test(): + var = 0 + var = 1 + var = 2 + var = 3 + var = 4 + var = 5 + var = 6 + var = 7 + var = 8 + var = 9 + var = 10 + var = 11 + var = 12 + var = 13 + var = 14 + var = 15 + var = 16 + var = 17 + var = 18 + var = 19 + var = 20 + var = 21 + var = 22 + var = 23 + var = 24 + var = 25 + var = 26 + var = 27 + var = 28 + var = 29 + var = 30 + var = 31 + var = 32 + var = 33 + var = 34 + var = 35 + var = 36 + var = 37 + var = 38 + var = 39 + var = 40 + var = 41 + var = 42 + var = 43 + var = 44 + var = 45 + var = 46 + var = 47 + var = 48 + var = 49 + var = 50 + var = 51 + var = 52 + var = 53 + var = 54 + var = 55 + var = 56 + var = 57 + var = 58 + var = 59 + var = 60 + var = 61 + var = 62 + var = 63 + var = 64 + var = 65 + var = 66 + var = 67 + var = 68 + var = 69 + var = 70 + var = 71 + var = 72 + var = 73 + var = 74 + var = 75 + var = 76 + var = 77 + var = 78 + var = 79 + var = 80 + var = 81 + var = 82 + var = 83 + var = 84 + var = 85 + var = 86 + var = 87 + var = 88 + var = 89 + var = 90 + var = 91 + var = 92 + var = 93 + var = 94 + var = 95 + var = 96 + var = 97 + var = 98 + var = 99 + var = 100 + var = 101 + var = 102 + var = 103 + var = 104 + var = 105 + var = 106 + var = 107 + var = 108 + var = 109 + var = 110 + var = 111 + var = 112 + var = 113 + var = 114 + var = 115 + var = 116 + var = 117 + var = 118 + var = 119 + var = 120 + var = 121 + var = 122 + var = 123 + var = 124 + var = 125 + var = 126 + var = 127 + var = 128 + var = 129 + var = 130 + var = 131 + var = 132 + var = 133 + var = 134 + var = 135 + var = 136 + var = 137 + var = 138 + var = 139 + var = 140 + var = 141 + var = 142 + var = 143 + var = 144 + var = 145 + var = 146 + var = 147 + var = 148 + var = 149 + var = 150 + var = 151 + var = 152 + var = 153 + var = 154 + var = 155 + var = 156 + var = 157 + var = 158 + var = 159 + var = 160 + var = 161 + var = 162 + var = 163 + var = 164 + var = 165 + var = 166 + var = 167 + var = 168 + var = 169 + var = 170 + var = 171 + var = 172 + var = 173 + var = 174 + var = 175 + var = 176 + var = 177 + var = 178 + var = 179 + var = 180 + var = 181 + var = 182 + var = 183 + var = 184 + var = 185 + var = 186 + var = 187 + var = 188 + var = 189 + var = 190 + var = 191 + var = 192 + var = 193 + var = 194 + var = 195 + var = 196 + var = 197 + var = 198 + var = 199 + var = 200 + var = 201 + var = 202 + var = 203 + var = 204 + var = 205 + var = 206 + var = 207 + var = 208 + var = 209 + var = 210 + var = 211 + var = 212 + var = 213 + var = 214 + var = 215 + var = 216 + var = 217 + var = 218 + var = 219 + var = 220 + var = 221 + var = 222 + var = 223 + var = 224 + var = 225 + var = 226 + var = 227 + var = 228 + var = 229 + var = 230 + var = 231 + var = 232 + var = 233 + var = 234 + var = 235 + var = 236 + var = 237 + var = 238 + var = 239 + var = 240 + var = 241 + var = 242 + var = 243 + var = 244 + var = 245 + var = 246 + var = 247 + var = 248 + var = 249 + var = 250 + var = 251 + var = 252 + var = 253 + var = 254 + var = 255 + var = 256 + var = 257 + var = 258 + var = 259 + + return var + + test.__code__ = ConcreteBytecode.from_code(test.__code__, extended_arg=True).to_code() + self.assertEqual(test.__code__.co_stacksize, 1) + self.assertEqual(test(), 259) + + if sys.version_info >= (3, 6): + + def test_fail_extended_arg_jump(self): + def test(): + var = None + for _ in range(0, 1): + var = 0 + var = 1 + var = 2 + var = 3 + var = 4 + var = 5 + var = 6 + var = 7 + var = 8 + var = 9 + var = 10 + var = 11 + var = 12 + var = 13 + var = 14 + var = 15 + var = 16 + var = 17 + var = 18 + var = 19 + var = 20 + var = 21 + var = 22 + var = 23 + var = 24 + var = 25 + var = 26 + var = 27 + var = 28 + var = 29 + var = 30 + var = 31 + var = 32 + var = 33 + var = 34 + var = 35 + var = 36 + var = 37 + var = 38 + var = 39 + var = 40 + var = 41 + var = 42 + var = 43 + var = 44 + var = 45 + var = 46 + var = 47 + var = 48 + var = 49 + var = 50 + var = 51 + var = 52 + var = 53 + var = 54 + var = 55 + var = 56 + var = 57 + var = 58 + var = 59 + var = 60 + var = 61 + var = 62 + var = 63 + var = 64 + var = 65 + var = 66 + var = 67 + var = 68 + var = 69 + var = 70 + return var + + # Generate the bytecode with extended arguments + bytecode = ConcreteBytecode.from_code(test.__code__, extended_arg=True) + bytecode.to_code() + + +class BytecodeToConcreteTests(TestCase): + def test_label(self): + code = Bytecode() + label = Label() + code.extend( + [ + Instr("LOAD_CONST", "hello", lineno=1), + Instr("JUMP_FORWARD", label, lineno=1), + label, + Instr("POP_TOP", lineno=1), + ] + ) + + code = code.to_concrete_bytecode() + expected = [ + ConcreteInstr("LOAD_CONST", 0, lineno=1), + ConcreteInstr("JUMP_FORWARD", 0, lineno=1), + ConcreteInstr("POP_TOP", lineno=1), + ] + self.assertListEqual(list(code), expected) + self.assertListEqual(code.consts, ["hello"]) + + def test_label2(self): + bytecode = Bytecode() + label = Label() + bytecode.extend( + [ + Instr("LOAD_NAME", "test", lineno=1), + Instr("POP_JUMP_IF_FALSE", label), + Instr("LOAD_CONST", 5, lineno=2), + Instr("STORE_NAME", "x"), + Instr("JUMP_FORWARD", label), + Instr("LOAD_CONST", 7, lineno=4), + Instr("STORE_NAME", "x"), + label, + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE"), + ] + ) + + concrete = bytecode.to_concrete_bytecode() + expected = [ + ConcreteInstr("LOAD_NAME", 0, lineno=1), + ConcreteInstr("POP_JUMP_IF_FALSE", 7 if OFFSET_AS_INSTRUCTION else 14, lineno=1), + ConcreteInstr("LOAD_CONST", 0, lineno=2), + ConcreteInstr("STORE_NAME", 1, lineno=2), + ConcreteInstr("JUMP_FORWARD", 2 if OFFSET_AS_INSTRUCTION else 4, lineno=2), + ConcreteInstr("LOAD_CONST", 1, lineno=4), + ConcreteInstr("STORE_NAME", 1, lineno=4), + ConcreteInstr("LOAD_CONST", 2, lineno=4), + ConcreteInstr("RETURN_VALUE", lineno=4), + ] + self.assertListEqual(list(concrete), expected) + self.assertListEqual(concrete.consts, [5, 7, None]) + self.assertListEqual(concrete.names, ["test", "x"]) + self.assertListEqual(concrete.varnames, []) + + def test_label3(self): + """ + CPython generates useless EXTENDED_ARG 0 in some cases. We need to + properly track them as otherwise we can end up with broken offset for + jumps. + """ + source = """ + def func(x): + if x == 1: + return x + 0 + elif x == 2: + return x + 1 + elif x == 3: + return x + 2 + elif x == 4: + return x + 3 + elif x == 5: + return x + 4 + elif x == 6: + return x + 5 + elif x == 7: + return x + 6 + elif x == 8: + return x + 7 + elif x == 9: + return x + 8 + elif x == 10: + return x + 9 + elif x == 11: + return x + 10 + elif x == 12: + return x + 11 + elif x == 13: + return x + 12 + elif x == 14: + return x + 13 + elif x == 15: + return x + 14 + elif x == 16: + return x + 15 + elif x == 17: + return x + 16 + return -1 + """ + code = get_code(source, function=True) + bcode = Bytecode.from_code(code) + concrete = bcode.to_concrete_bytecode() + self.assertIsInstance(concrete, ConcreteBytecode) + + # Ensure that we do not generate broken code + loc = {} + exec(textwrap.dedent(source), loc) + func = loc["func"] + func.__code__ = bcode.to_code() + for i, x in enumerate(range(1, 18)): + self.assertEqual(func(x), x + i) + self.assertEqual(func(18), -1) + + # Ensure that we properly round trip in such cases + self.assertEqual(ConcreteBytecode.from_code(code).to_code().co_code, code.co_code) + + def test_setlineno(self): + # x = 7 + # y = 8 + # z = 9 + concrete = ConcreteBytecode() + concrete.consts = [7, 8, 9] + concrete.names = ["x", "y", "z"] + concrete.first_lineno = 3 + concrete.extend( + [ + ConcreteInstr("LOAD_CONST", 0), + ConcreteInstr("STORE_NAME", 0), + SetLineno(4), + ConcreteInstr("LOAD_CONST", 1), + ConcreteInstr("STORE_NAME", 1), + SetLineno(5), + ConcreteInstr("LOAD_CONST", 2), + ConcreteInstr("STORE_NAME", 2), + ] + ) + + code = concrete.to_bytecode() + self.assertEqual( + code, + [ + Instr("LOAD_CONST", 7, lineno=3), + Instr("STORE_NAME", "x", lineno=3), + Instr("LOAD_CONST", 8, lineno=4), + Instr("STORE_NAME", "y", lineno=4), + Instr("LOAD_CONST", 9, lineno=5), + Instr("STORE_NAME", "z", lineno=5), + ], + ) + + def test_extended_jump(self): + NOP = bytes((opcode.opmap["NOP"],)) + + class BigInstr(ConcreteInstr): + def __init__(self, size): + super().__init__("NOP") + self._size = size + + def copy(self): + return self + + def assemble(self): + return NOP * self._size + + # (invalid) code using jumps > 0xffff to test extended arg + label = Label() + nb_nop = 2**16 + code = Bytecode( + [ + Instr("JUMP_ABSOLUTE", label), + BigInstr(nb_nop), + label, + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE"), + ] + ) + + code_obj = code.to_code() + if OFFSET_AS_INSTRUCTION: + expected = b"\x90\x80q\x02" + NOP * nb_nop + b"d\x00S\x00" + else: + expected = b"\x90\x01\x90\x00q\x06" + NOP * nb_nop + b"d\x00S\x00" + self.assertEqual(code_obj.co_code, expected) + + def test_jumps(self): + # if test: + # x = 12 + # else: + # x = 37 + code = Bytecode() + label_else = Label() + label_return = Label() + code.extend( + [ + Instr("LOAD_NAME", "test", lineno=1), + Instr("POP_JUMP_IF_FALSE", label_else), + Instr("LOAD_CONST", 12, lineno=2), + Instr("STORE_NAME", "x"), + Instr("JUMP_FORWARD", label_return), + label_else, + Instr("LOAD_CONST", 37, lineno=4), + Instr("STORE_NAME", "x"), + label_return, + Instr("LOAD_CONST", None, lineno=4), + Instr("RETURN_VALUE"), + ] + ) + + code = code.to_concrete_bytecode() + expected = [ + ConcreteInstr("LOAD_NAME", 0, lineno=1), + ConcreteInstr("POP_JUMP_IF_FALSE", 5 if OFFSET_AS_INSTRUCTION else 10, lineno=1), + ConcreteInstr("LOAD_CONST", 0, lineno=2), + ConcreteInstr("STORE_NAME", 1, lineno=2), + ConcreteInstr("JUMP_FORWARD", 2 if OFFSET_AS_INSTRUCTION else 4, lineno=2), + ConcreteInstr("LOAD_CONST", 1, lineno=4), + ConcreteInstr("STORE_NAME", 1, lineno=4), + ConcreteInstr("LOAD_CONST", 2, lineno=4), + ConcreteInstr("RETURN_VALUE", lineno=4), + ] + self.assertListEqual(list(code), expected) + self.assertListEqual(code.consts, [12, 37, None]) + self.assertListEqual(code.names, ["test", "x"]) + self.assertListEqual(code.varnames, []) + + def test_dont_merge_constants(self): + # test two constants which are equal but have a different type + code = Bytecode() + code.extend( + [ + Instr("LOAD_CONST", 5, lineno=1), + Instr("LOAD_CONST", 5.0, lineno=1), + Instr("LOAD_CONST", -0.0, lineno=1), + Instr("LOAD_CONST", +0.0, lineno=1), + ] + ) + + code = code.to_concrete_bytecode() + expected = [ + ConcreteInstr("LOAD_CONST", 0, lineno=1), + ConcreteInstr("LOAD_CONST", 1, lineno=1), + ConcreteInstr("LOAD_CONST", 2, lineno=1), + ConcreteInstr("LOAD_CONST", 3, lineno=1), + ] + self.assertListEqual(list(code), expected) + self.assertListEqual(code.consts, [5, 5.0, -0.0, +0.0]) + + def test_cellvars(self): + code = Bytecode() + code.cellvars = ["x"] + code.freevars = ["y"] + code.extend( + [ + Instr("LOAD_DEREF", CellVar("x"), lineno=1), + Instr("LOAD_DEREF", FreeVar("y"), lineno=1), + ] + ) + concrete = code.to_concrete_bytecode() + self.assertEqual(concrete.cellvars, ["x"]) + self.assertEqual(concrete.freevars, ["y"]) + code.extend( + [ + ConcreteInstr("LOAD_DEREF", 0, lineno=1), + ConcreteInstr("LOAD_DEREF", 1, lineno=1), + ] + ) + + def test_compute_jumps_convergence(self): + # Consider the following sequence of instructions: + # + # JUMP_ABSOLUTE Label1 + # JUMP_ABSOLUTE Label2 + # ...126 instructions... + # Label1: Offset 254 on first pass, 256 second pass + # NOP + # ... many more instructions ... + # Label2: Offset > 256 on first pass + # + # On first pass of compute_jumps(), Label2 will be at address 254, so + # that value encodes into the single byte arg of JUMP_ABSOLUTE. + # + # On second pass compute_jumps() the instr at Label1 will have offset + # of 256 so will also be given an EXTENDED_ARG. + # + # Thus we need to make an additional pass. This test only verifies + # case where 2 passes is insufficient but three is enough. + # + # On Python > 3.10 we need to double the number since the offset is now + # in term of instructions and not bytes. + + # Create code from comment above. + code = Bytecode() + label1 = Label() + label2 = Label() + nop = "NOP" + code.append(Instr("JUMP_ABSOLUTE", label1)) + code.append(Instr("JUMP_ABSOLUTE", label2)) + # Need 254 * 2 + 2 since the arg will change by 1 instruction rather than 2 + # bytes. + for x in range(4, 510 if OFFSET_AS_INSTRUCTION else 254, 2): + code.append(Instr(nop)) + code.append(label1) + code.append(Instr(nop)) + for x in range( + 514 if OFFSET_AS_INSTRUCTION else 256, + 600 if OFFSET_AS_INSTRUCTION else 300, + 2, + ): + code.append(Instr(nop)) + code.append(label2) + code.append(Instr(nop)) + + # This should pass by default. + code.to_code() + + # Try with max of two passes: it should raise + with self.assertRaises(RuntimeError): + code.to_code(compute_jumps_passes=2) + + def test_extreme_compute_jumps_convergence(self): + """Test of compute_jumps() requiring absurd number of passes. + + NOTE: This test also serves to demonstrate that there is no worst + case: the number of passes can be unlimited (or, actually, limited by + the size of the provided code). + + This is an extension of test_compute_jumps_convergence. Instead of + two jumps, where the earlier gets extended after the latter, we + instead generate a series of many jumps. Each pass of compute_jumps() + extends one more instruction, which in turn causes the one behind it + to be extended on the next pass. + + """ + + # N: the number of unextended instructions that can be squeezed into a + # set of bytes adressable by the arg of an unextended instruction. + # The answer is "128", but here's how we arrive at it. + max_unextended_offset = 1 << 8 + unextended_branch_instr_size = 2 + N = max_unextended_offset // unextended_branch_instr_size + + # When using instruction rather than bytes in the offset multiply by 2 + if OFFSET_AS_INSTRUCTION: + N *= 2 + + nop = "UNARY_POSITIVE" # don't use NOP, dis.stack_effect will raise + + # The number of jumps will be equal to the number of labels. The + # number of passes of compute_jumps() required will be one greater + # than this. + labels = [Label() for x in range(0, 3 * N)] + + code = Bytecode() + code.extend(Instr("JUMP_FORWARD", labels[len(labels) - x - 1]) for x in range(0, len(labels))) + end_of_jumps = len(code) + code.extend(Instr(nop) for x in range(0, N)) + + # Now insert the labels. The first is N instructions (i.e. 256 + # bytes) after the last jump. Then they proceed to earlier positions + # 4 bytes at a time. While the targets are in the range of the nop + # instructions, 4 bytes is two instructions. When the targets are in + # the range of JUMP_FORWARD instructions we have to allow for the fact + # that the instructions will have been extended to four bytes each, so + # working backwards 4 bytes per label means just one instruction per + # label. + offset = end_of_jumps + N + for index in range(0, len(labels)): + code.insert(offset, labels[index]) + if offset <= end_of_jumps: + offset -= 1 + else: + offset -= 2 + + code.insert(0, Instr("LOAD_CONST", 0)) + del end_of_jumps + code.append(Instr("RETURN_VALUE")) + + code.to_code(compute_jumps_passes=(len(labels) + 1)) + + def test_general_constants(self): + """Test if general object could be linked as constants.""" + + class CustomObject: + pass + + class UnHashableCustomObject: + __hash__ = None + + obj1 = [1, 2, 3] + obj2 = {1, 2, 3} + obj3 = CustomObject() + obj4 = UnHashableCustomObject() + code = Bytecode( + [ + Instr("LOAD_CONST", obj1, lineno=1), + Instr("LOAD_CONST", obj2, lineno=1), + Instr("LOAD_CONST", obj3, lineno=1), + Instr("LOAD_CONST", obj4, lineno=1), + Instr("BUILD_TUPLE", 4, lineno=1), + Instr("RETURN_VALUE", lineno=1), + ] + ) + self.assertEqual(code.to_code().co_consts, (obj1, obj2, obj3, obj4)) + + def f(): + return # pragma: no cover + + f.__code__ = code.to_code() + self.assertEqual(f(), (obj1, obj2, obj3, obj4)) + + +if __name__ == "__main__": + unittest.main() # pragma: no cover diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py new file mode 100644 index 0000000..08c7cb2 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py @@ -0,0 +1,157 @@ +import pytest +from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON +from tests_python.debug_constants import TEST_CYTHON + +pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason="Requires CPython >= 3.6") +#!/usr/bin/env python3 +import unittest +from _pydevd_frame_eval.vendored.bytecode import ( + CompilerFlags, + ConcreteBytecode, + ConcreteInstr, + Bytecode, + ControlFlowGraph, +) +from _pydevd_frame_eval.vendored.bytecode.flags import infer_flags + + +class FlagsTests(unittest.TestCase): + def test_type_validation_on_inference(self): + with self.assertRaises(ValueError): + infer_flags(1) + + def test_flag_inference(self): + # Check no loss of non-infered flags + code = ControlFlowGraph() + code.flags |= ( + CompilerFlags.NEWLOCALS + | CompilerFlags.VARARGS + | CompilerFlags.VARKEYWORDS + | CompilerFlags.NESTED + | CompilerFlags.FUTURE_GENERATOR_STOP + ) + code.update_flags() + for f in ( + CompilerFlags.NEWLOCALS, + CompilerFlags.VARARGS, + CompilerFlags.VARKEYWORDS, + CompilerFlags.NESTED, + CompilerFlags.NOFREE, + CompilerFlags.OPTIMIZED, + CompilerFlags.FUTURE_GENERATOR_STOP, + ): + self.assertTrue(bool(code.flags & f)) + + # Infer optimized and nofree + code = Bytecode() + flags = infer_flags(code) + self.assertTrue(bool(flags & CompilerFlags.OPTIMIZED)) + self.assertTrue(bool(flags & CompilerFlags.NOFREE)) + code.append(ConcreteInstr("STORE_NAME", 1)) + flags = infer_flags(code) + self.assertFalse(bool(flags & CompilerFlags.OPTIMIZED)) + self.assertTrue(bool(flags & CompilerFlags.NOFREE)) + code.append(ConcreteInstr("STORE_DEREF", 2)) + code.update_flags() + self.assertFalse(bool(code.flags & CompilerFlags.OPTIMIZED)) + self.assertFalse(bool(code.flags & CompilerFlags.NOFREE)) + + def test_async_gen_no_flag_is_async_None(self): + # Test inference in the absence of any flag set on the bytecode + + # Infer generator + code = ConcreteBytecode() + code.append(ConcreteInstr("YIELD_VALUE")) + code.update_flags() + self.assertTrue(bool(code.flags & CompilerFlags.GENERATOR)) + + # Infer coroutine + code = ConcreteBytecode() + code.append(ConcreteInstr("GET_AWAITABLE")) + code.update_flags() + self.assertTrue(bool(code.flags & CompilerFlags.COROUTINE)) + + # Infer coroutine or async generator + for i, expected in ( + ("YIELD_VALUE", CompilerFlags.ASYNC_GENERATOR), + ("YIELD_FROM", CompilerFlags.COROUTINE), + ): + code = ConcreteBytecode() + code.append(ConcreteInstr("GET_AWAITABLE")) + code.append(ConcreteInstr(i)) + code.update_flags() + self.assertTrue(bool(code.flags & expected)) + + def test_async_gen_no_flag_is_async_True(self): + # Test inference when we request an async function + + # Force coroutine + code = ConcreteBytecode() + code.update_flags(is_async=True) + self.assertTrue(bool(code.flags & CompilerFlags.COROUTINE)) + + # Infer coroutine or async generator + for i, expected in ( + ("YIELD_VALUE", CompilerFlags.ASYNC_GENERATOR), + ("YIELD_FROM", CompilerFlags.COROUTINE), + ): + code = ConcreteBytecode() + code.append(ConcreteInstr(i)) + code.update_flags(is_async=True) + self.assertTrue(bool(code.flags & expected)) + + def test_async_gen_no_flag_is_async_False(self): + # Test inference when we request a non-async function + + # Infer generator + code = ConcreteBytecode() + code.append(ConcreteInstr("YIELD_VALUE")) + code.flags = CompilerFlags(CompilerFlags.COROUTINE) + code.update_flags(is_async=False) + self.assertTrue(bool(code.flags & CompilerFlags.GENERATOR)) + + # Abort on coroutine + code = ConcreteBytecode() + code.append(ConcreteInstr("GET_AWAITABLE")) + code.flags = CompilerFlags(CompilerFlags.COROUTINE) + with self.assertRaises(ValueError): + code.update_flags(is_async=False) + + def test_async_gen_flags(self): + # Test inference in the presence of pre-existing flags + + for is_async in (None, True): + # Infer generator + code = ConcreteBytecode() + code.append(ConcreteInstr("YIELD_VALUE")) + for f, expected in ( + (CompilerFlags.COROUTINE, CompilerFlags.ASYNC_GENERATOR), + (CompilerFlags.ASYNC_GENERATOR, CompilerFlags.ASYNC_GENERATOR), + (CompilerFlags.ITERABLE_COROUTINE, CompilerFlags.ITERABLE_COROUTINE), + ): + code.flags = CompilerFlags(f) + code.update_flags(is_async=is_async) + self.assertTrue(bool(code.flags & expected)) + + # Infer coroutine + code = ConcreteBytecode() + code.append(ConcreteInstr("YIELD_FROM")) + for f, expected in ( + (CompilerFlags.COROUTINE, CompilerFlags.COROUTINE), + (CompilerFlags.ASYNC_GENERATOR, CompilerFlags.COROUTINE), + (CompilerFlags.ITERABLE_COROUTINE, CompilerFlags.ITERABLE_COROUTINE), + ): + code.flags = CompilerFlags(f) + code.update_flags(is_async=is_async) + self.assertTrue(bool(code.flags & expected)) + + # Crash on ITERABLE_COROUTINE with async bytecode + code = ConcreteBytecode() + code.append(ConcreteInstr("GET_AWAITABLE")) + code.flags = CompilerFlags(CompilerFlags.ITERABLE_COROUTINE) + with self.assertRaises(ValueError): + code.update_flags(is_async=is_async) + + +if __name__ == "__main__": + unittest.main() # pragma: no cover diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py new file mode 100644 index 0000000..bc5db52 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py @@ -0,0 +1,351 @@ +import pytest +from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON +from tests_python.debug_constants import TEST_CYTHON + +pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason="Requires CPython >= 3.6") +#!/usr/bin/env python3 +import opcode +import unittest +from _pydevd_frame_eval.vendored.bytecode import ( + UNSET, + Label, + Instr, + CellVar, + FreeVar, + BasicBlock, + SetLineno, + Compare, +) +from _pydevd_frame_eval.vendored.bytecode.tests import TestCase + + +class SetLinenoTests(TestCase): + def test_lineno(self): + lineno = SetLineno(1) + self.assertEqual(lineno.lineno, 1) + + def test_equality(self): + lineno = SetLineno(1) + self.assertNotEqual(lineno, 1) + self.assertEqual(lineno, SetLineno(1)) + self.assertNotEqual(lineno, SetLineno(2)) + + +class VariableTests(TestCase): + def test_str(self): + for cls in (CellVar, FreeVar): + var = cls("a") + self.assertEqual(str(var), "a") + + def test_repr(self): + for cls in (CellVar, FreeVar): + var = cls("_a_x_a_") + r = repr(var) + self.assertIn("_a_x_a_", r) + self.assertIn(cls.__name__, r) + + def test_eq(self): + f1 = FreeVar("a") + f2 = FreeVar("b") + c1 = CellVar("a") + c2 = CellVar("b") + + for v1, v2, eq in ( + (f1, f1, True), + (f1, f2, False), + (f1, c1, False), + (c1, c1, True), + (c1, c2, False), + ): + if eq: + self.assertEqual(v1, v2) + else: + self.assertNotEqual(v1, v2) + + +class InstrTests(TestCase): + def test_constructor(self): + # invalid line number + with self.assertRaises(TypeError): + Instr("NOP", lineno="x") + with self.assertRaises(ValueError): + Instr("NOP", lineno=0) + + # invalid name + with self.assertRaises(TypeError): + Instr(1) + with self.assertRaises(ValueError): + Instr("xxx") + + def test_repr(self): + # No arg + r = repr(Instr("NOP", lineno=10)) + self.assertIn("NOP", r) + self.assertIn("10", r) + self.assertIn("lineno", r) + + # Arg + r = repr(Instr("LOAD_FAST", "_x_", lineno=10)) + self.assertIn("LOAD_FAST", r) + self.assertIn("lineno", r) + self.assertIn("10", r) + self.assertIn("arg", r) + self.assertIn("_x_", r) + + def test_invalid_arg(self): + label = Label() + block = BasicBlock() + + # EXTENDED_ARG + self.assertRaises(ValueError, Instr, "EXTENDED_ARG", 0) + + # has_jump() + self.assertRaises(TypeError, Instr, "JUMP_ABSOLUTE", 1) + self.assertRaises(TypeError, Instr, "JUMP_ABSOLUTE", 1.0) + Instr("JUMP_ABSOLUTE", label) + Instr("JUMP_ABSOLUTE", block) + + # hasfree + self.assertRaises(TypeError, Instr, "LOAD_DEREF", "x") + Instr("LOAD_DEREF", CellVar("x")) + Instr("LOAD_DEREF", FreeVar("x")) + + # haslocal + self.assertRaises(TypeError, Instr, "LOAD_FAST", 1) + Instr("LOAD_FAST", "x") + + # hasname + self.assertRaises(TypeError, Instr, "LOAD_NAME", 1) + Instr("LOAD_NAME", "x") + + # hasconst + self.assertRaises(ValueError, Instr, "LOAD_CONST") # UNSET + self.assertRaises(ValueError, Instr, "LOAD_CONST", label) + self.assertRaises(ValueError, Instr, "LOAD_CONST", block) + Instr("LOAD_CONST", 1.0) + Instr("LOAD_CONST", object()) + + # hascompare + self.assertRaises(TypeError, Instr, "COMPARE_OP", 1) + Instr("COMPARE_OP", Compare.EQ) + + # HAVE_ARGUMENT + self.assertRaises(ValueError, Instr, "CALL_FUNCTION", -1) + self.assertRaises(TypeError, Instr, "CALL_FUNCTION", 3.0) + Instr("CALL_FUNCTION", 3) + + # test maximum argument + self.assertRaises(ValueError, Instr, "CALL_FUNCTION", 2147483647 + 1) + instr = Instr("CALL_FUNCTION", 2147483647) + self.assertEqual(instr.arg, 2147483647) + + # not HAVE_ARGUMENT + self.assertRaises(ValueError, Instr, "NOP", 0) + Instr("NOP") + + def test_require_arg(self): + i = Instr("CALL_FUNCTION", 3) + self.assertTrue(i.require_arg()) + i = Instr("NOP") + self.assertFalse(i.require_arg()) + + def test_attr(self): + instr = Instr("LOAD_CONST", 3, lineno=5) + self.assertEqual(instr.name, "LOAD_CONST") + self.assertEqual(instr.opcode, 100) + self.assertEqual(instr.arg, 3) + self.assertEqual(instr.lineno, 5) + + # invalid values/types + self.assertRaises(ValueError, setattr, instr, "lineno", 0) + self.assertRaises(TypeError, setattr, instr, "lineno", 1.0) + self.assertRaises(TypeError, setattr, instr, "name", 5) + self.assertRaises(TypeError, setattr, instr, "opcode", 1.0) + self.assertRaises(ValueError, setattr, instr, "opcode", -1) + self.assertRaises(ValueError, setattr, instr, "opcode", 255) + + # arg can take any attribute but cannot be deleted + instr.arg = -8 + instr.arg = object() + self.assertRaises(AttributeError, delattr, instr, "arg") + + # no argument + instr = Instr("ROT_TWO") + self.assertIs(instr.arg, UNSET) + + def test_modify_op(self): + instr = Instr("LOAD_NAME", "x") + load_fast = opcode.opmap["LOAD_FAST"] + instr.opcode = load_fast + self.assertEqual(instr.name, "LOAD_FAST") + self.assertEqual(instr.opcode, load_fast) + + def test_extended_arg(self): + instr = Instr("LOAD_CONST", 0x1234ABCD) + self.assertEqual(instr.arg, 0x1234ABCD) + + def test_slots(self): + instr = Instr("NOP") + with self.assertRaises(AttributeError): + instr.myattr = 1 + + def test_compare(self): + instr = Instr("LOAD_CONST", 3, lineno=7) + self.assertEqual(instr, Instr("LOAD_CONST", 3, lineno=7)) + self.assertNotEqual(instr, 1) + + # different lineno + self.assertNotEqual(instr, Instr("LOAD_CONST", 3)) + self.assertNotEqual(instr, Instr("LOAD_CONST", 3, lineno=6)) + # different op + self.assertNotEqual(instr, Instr("LOAD_FAST", "x", lineno=7)) + # different arg + self.assertNotEqual(instr, Instr("LOAD_CONST", 4, lineno=7)) + + def test_has_jump(self): + label = Label() + jump = Instr("JUMP_ABSOLUTE", label) + self.assertTrue(jump.has_jump()) + + instr = Instr("LOAD_FAST", "x") + self.assertFalse(instr.has_jump()) + + def test_is_cond_jump(self): + label = Label() + jump = Instr("POP_JUMP_IF_TRUE", label) + self.assertTrue(jump.is_cond_jump()) + + instr = Instr("LOAD_FAST", "x") + self.assertFalse(instr.is_cond_jump()) + + def test_is_uncond_jump(self): + label = Label() + jump = Instr("JUMP_ABSOLUTE", label) + self.assertTrue(jump.is_uncond_jump()) + + instr = Instr("POP_JUMP_IF_TRUE", label) + self.assertFalse(instr.is_uncond_jump()) + + def test_const_key_not_equal(self): + def check(value): + self.assertEqual(Instr("LOAD_CONST", value), Instr("LOAD_CONST", value)) + + def func(): + pass + + check(None) + check(0) + check(0.0) + check(b"bytes") + check("text") + check(Ellipsis) + check((1, 2, 3)) + check(frozenset({1, 2, 3})) + check(func.__code__) + check(object()) + + def test_const_key_equal(self): + neg_zero = -0.0 + pos_zero = +0.0 + + # int and float: 0 == 0.0 + self.assertNotEqual(Instr("LOAD_CONST", 0), Instr("LOAD_CONST", 0.0)) + + # float: -0.0 == +0.0 + self.assertNotEqual(Instr("LOAD_CONST", neg_zero), Instr("LOAD_CONST", pos_zero)) + + # complex + self.assertNotEqual( + Instr("LOAD_CONST", complex(neg_zero, 1.0)), + Instr("LOAD_CONST", complex(pos_zero, 1.0)), + ) + self.assertNotEqual( + Instr("LOAD_CONST", complex(1.0, neg_zero)), + Instr("LOAD_CONST", complex(1.0, pos_zero)), + ) + + # tuple + self.assertNotEqual(Instr("LOAD_CONST", (0,)), Instr("LOAD_CONST", (0.0,))) + nested_tuple1 = (0,) + nested_tuple1 = (nested_tuple1,) + nested_tuple2 = (0.0,) + nested_tuple2 = (nested_tuple2,) + self.assertNotEqual(Instr("LOAD_CONST", nested_tuple1), Instr("LOAD_CONST", nested_tuple2)) + + # frozenset + self.assertNotEqual(Instr("LOAD_CONST", frozenset({0})), Instr("LOAD_CONST", frozenset({0.0}))) + + def test_stack_effects(self): + # Verify all opcodes are handled and that "jump=None" really returns + # the max of the other cases. + from _pydevd_frame_eval.vendored.bytecode.concrete import ConcreteInstr + + def check(instr): + jump = instr.stack_effect(jump=True) + no_jump = instr.stack_effect(jump=False) + max_effect = instr.stack_effect(jump=None) + self.assertEqual(instr.stack_effect(), max_effect) + self.assertEqual(max_effect, max(jump, no_jump)) + + if not instr.has_jump(): + self.assertEqual(jump, no_jump) + + for name, op in opcode.opmap.items(): + with self.subTest(name): + # Use ConcreteInstr instead of Instr because it doesn't care + # what kind of argument it is constructed with. + if op < opcode.HAVE_ARGUMENT: + check(ConcreteInstr(name)) + else: + for arg in range(256): + check(ConcreteInstr(name, arg)) + + # LOAD_CONST uses a concrete python object as its oparg, however, in + # dis.stack_effect(opcode.opmap['LOAD_CONST'], oparg), + # oparg should be the index of that python object in the constants. + # + # Fortunately, for an instruction whose oparg isn't equivalent to its + # form in binary files(pyc format), the stack effect is a + # constant which does not depend on its oparg. + # + # The second argument of dis.stack_effect cannot be + # more than 2**31 - 1. If stack effect of an instruction is + # independent of its oparg, we pass 0 as the second argument + # of dis.stack_effect. + # (As a result we can calculate stack_effect for + # any LOAD_CONST instructions, even for large integers) + + for arg in 2**31, 2**32, 2**63, 2**64, -1: + self.assertEqual(Instr("LOAD_CONST", arg).stack_effect(), 1) + + def test_code_object_containing_mutable_data(self): + from _pydevd_frame_eval.vendored.bytecode import Bytecode, Instr + from types import CodeType + + def f(): + def g(): + return "value" + + return g + + f_code = Bytecode.from_code(f.__code__) + instr_load_code = None + mutable_datum = [4, 2] + + for each in f_code: + if isinstance(each, Instr) and each.name == "LOAD_CONST" and isinstance(each.arg, CodeType): + instr_load_code = each + break + + self.assertIsNotNone(instr_load_code) + + g_code = Bytecode.from_code(instr_load_code.arg) + g_code[0].arg = mutable_datum + instr_load_code.arg = g_code.to_code() + f.__code__ = f_code.to_code() + + self.assertIs(f()(), mutable_datum) + + +if __name__ == "__main__": + unittest.main() # pragma: no cover diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py new file mode 100644 index 0000000..6a700e9 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py @@ -0,0 +1,258 @@ +import pytest +from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON +from tests_python.debug_constants import TEST_CYTHON + +pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason="Requires CPython >= 3.6") +#!/usr/bin/env python3 +import contextlib +import io +import sys +import textwrap +import unittest + +from _pydevd_frame_eval.vendored import bytecode +from _pydevd_frame_eval.vendored.bytecode import Label, Instr, Bytecode, BasicBlock, ControlFlowGraph +from _pydevd_frame_eval.vendored.bytecode.concrete import OFFSET_AS_INSTRUCTION +from _pydevd_frame_eval.vendored.bytecode.tests import disassemble + + +class DumpCodeTests(unittest.TestCase): + maxDiff = 80 * 100 + + def check_dump_bytecode(self, code, expected, lineno=None): + with contextlib.redirect_stdout(io.StringIO()) as stderr: + if lineno is not None: + bytecode.dump_bytecode(code, lineno=True) + else: + bytecode.dump_bytecode(code) + output = stderr.getvalue() + + self.assertEqual(output, expected) + + def test_bytecode(self): + source = """ + def func(test): + if test == 1: + return 1 + elif test == 2: + return 2 + return 3 + """ + code = disassemble(source, function=True) + + # without line numbers + enum_repr = "" + expected = f""" + LOAD_FAST 'test' + LOAD_CONST 1 + COMPARE_OP {enum_repr} + POP_JUMP_IF_FALSE + LOAD_CONST 1 + RETURN_VALUE + +label_instr6: + LOAD_FAST 'test' + LOAD_CONST 2 + COMPARE_OP {enum_repr} + POP_JUMP_IF_FALSE + LOAD_CONST 2 + RETURN_VALUE + +label_instr13: + LOAD_CONST 3 + RETURN_VALUE + + """[1:].rstrip(" ") + self.check_dump_bytecode(code, expected) + + # with line numbers + expected = f""" + L. 2 0: LOAD_FAST 'test' + 1: LOAD_CONST 1 + 2: COMPARE_OP {enum_repr} + 3: POP_JUMP_IF_FALSE + L. 3 4: LOAD_CONST 1 + 5: RETURN_VALUE + +label_instr6: + L. 4 7: LOAD_FAST 'test' + 8: LOAD_CONST 2 + 9: COMPARE_OP {enum_repr} + 10: POP_JUMP_IF_FALSE + L. 5 11: LOAD_CONST 2 + 12: RETURN_VALUE + +label_instr13: + L. 6 14: LOAD_CONST 3 + 15: RETURN_VALUE + + """[1:].rstrip(" ") + self.check_dump_bytecode(code, expected, lineno=True) + + def test_bytecode_broken_label(self): + label = Label() + code = Bytecode([Instr("JUMP_ABSOLUTE", label)]) + + expected = " JUMP_ABSOLUTE \n\n" + self.check_dump_bytecode(code, expected) + + def test_blocks_broken_jump(self): + block = BasicBlock() + code = ControlFlowGraph() + code[0].append(Instr("JUMP_ABSOLUTE", block)) + + expected = textwrap.dedent( + """ + block1: + JUMP_ABSOLUTE + + """ + ).lstrip("\n") + self.check_dump_bytecode(code, expected) + + def test_bytecode_blocks(self): + source = """ + def func(test): + if test == 1: + return 1 + elif test == 2: + return 2 + return 3 + """ + code = disassemble(source, function=True) + code = ControlFlowGraph.from_bytecode(code) + + # without line numbers + enum_repr = "" + expected = textwrap.dedent( + f""" + block1: + LOAD_FAST 'test' + LOAD_CONST 1 + COMPARE_OP {enum_repr} + POP_JUMP_IF_FALSE + -> block2 + + block2: + LOAD_CONST 1 + RETURN_VALUE + + block3: + LOAD_FAST 'test' + LOAD_CONST 2 + COMPARE_OP {enum_repr} + POP_JUMP_IF_FALSE + -> block4 + + block4: + LOAD_CONST 2 + RETURN_VALUE + + block5: + LOAD_CONST 3 + RETURN_VALUE + + """ + ).lstrip() + self.check_dump_bytecode(code, expected) + + # with line numbers + expected = textwrap.dedent( + f""" + block1: + L. 2 0: LOAD_FAST 'test' + 1: LOAD_CONST 1 + 2: COMPARE_OP {enum_repr} + 3: POP_JUMP_IF_FALSE + -> block2 + + block2: + L. 3 0: LOAD_CONST 1 + 1: RETURN_VALUE + + block3: + L. 4 0: LOAD_FAST 'test' + 1: LOAD_CONST 2 + 2: COMPARE_OP {enum_repr} + 3: POP_JUMP_IF_FALSE + -> block4 + + block4: + L. 5 0: LOAD_CONST 2 + 1: RETURN_VALUE + + block5: + L. 6 0: LOAD_CONST 3 + 1: RETURN_VALUE + + """ + ).lstrip() + self.check_dump_bytecode(code, expected, lineno=True) + + def test_concrete_bytecode(self): + source = """ + def func(test): + if test == 1: + return 1 + elif test == 2: + return 2 + return 3 + """ + code = disassemble(source, function=True) + code = code.to_concrete_bytecode() + + # without line numbers + expected = f""" + 0 LOAD_FAST 0 + 2 LOAD_CONST 1 + 4 COMPARE_OP 2 + 6 POP_JUMP_IF_FALSE {6 if OFFSET_AS_INSTRUCTION else 12} + 8 LOAD_CONST 1 + 10 RETURN_VALUE + 12 LOAD_FAST 0 + 14 LOAD_CONST 2 + 16 COMPARE_OP 2 + 18 POP_JUMP_IF_FALSE {12 if OFFSET_AS_INSTRUCTION else 24} + 20 LOAD_CONST 2 + 22 RETURN_VALUE + 24 LOAD_CONST 3 + 26 RETURN_VALUE +""".lstrip("\n") + self.check_dump_bytecode(code, expected) + + # with line numbers + expected = f""" +L. 2 0: LOAD_FAST 0 + 2: LOAD_CONST 1 + 4: COMPARE_OP 2 + 6: POP_JUMP_IF_FALSE {6 if OFFSET_AS_INSTRUCTION else 12} +L. 3 8: LOAD_CONST 1 + 10: RETURN_VALUE +L. 4 12: LOAD_FAST 0 + 14: LOAD_CONST 2 + 16: COMPARE_OP 2 + 18: POP_JUMP_IF_FALSE {12 if OFFSET_AS_INSTRUCTION else 24} +L. 5 20: LOAD_CONST 2 + 22: RETURN_VALUE +L. 6 24: LOAD_CONST 3 + 26: RETURN_VALUE +""".lstrip("\n") + self.check_dump_bytecode(code, expected, lineno=True) + + def test_type_validation(self): + class T: + first_lineno = 1 + + with self.assertRaises(TypeError): + bytecode.dump_bytecode(T()) + + +class MiscTests(unittest.TestCase): + def skip_test_version(self): + import setup + + self.assertEqual(bytecode.__version__, setup.VERSION) + + +if __name__ == "__main__": + unittest.main() # pragma: no cover diff --git a/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py new file mode 100644 index 0000000..4689b28 --- /dev/null +++ b/myenv/lib/python3.12/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py @@ -0,0 +1,974 @@ +import pytest +from tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON +from tests_python.debug_constants import TEST_CYTHON + +pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason="Requires CPython >= 3.6") +import sys +import unittest +from _pydevd_frame_eval.vendored.bytecode import Label, Instr, Compare, Bytecode, ControlFlowGraph +from _pydevd_frame_eval.vendored.bytecode import peephole_opt +from _pydevd_frame_eval.vendored.bytecode.tests import TestCase, dump_bytecode +from unittest import mock + + +class Tests(TestCase): + maxDiff = 80 * 100 + + def optimize_blocks(self, code): + if isinstance(code, Bytecode): + code = ControlFlowGraph.from_bytecode(code) + optimizer = peephole_opt.PeepholeOptimizer() + optimizer.optimize_cfg(code) + return code + + def check(self, code, *expected): + if isinstance(code, Bytecode): + code = ControlFlowGraph.from_bytecode(code) + optimizer = peephole_opt.PeepholeOptimizer() + optimizer.optimize_cfg(code) + code = code.to_bytecode() + + try: + self.assertEqual(code, expected) + except AssertionError: + print("Optimized code:") + dump_bytecode(code) + + print("Expected code:") + for instr in expected: + print(instr) + + raise + + def check_dont_optimize(self, code): + code = ControlFlowGraph.from_bytecode(code) + noopt = code.to_bytecode() + + optim = self.optimize_blocks(code) + optim = optim.to_bytecode() + self.assertEqual(optim, noopt) + + def test_unary_op(self): + def check_unary_op(op, value, result): + code = Bytecode([Instr("LOAD_CONST", value), Instr(op), Instr("STORE_NAME", "x")]) + self.check(code, Instr("LOAD_CONST", result), Instr("STORE_NAME", "x")) + + check_unary_op("UNARY_POSITIVE", 2, 2) + check_unary_op("UNARY_NEGATIVE", 3, -3) + check_unary_op("UNARY_INVERT", 5, -6) + + def test_binary_op(self): + def check_bin_op(left, op, right, result): + code = Bytecode( + [ + Instr("LOAD_CONST", left), + Instr("LOAD_CONST", right), + Instr(op), + Instr("STORE_NAME", "x"), + ] + ) + self.check(code, Instr("LOAD_CONST", result), Instr("STORE_NAME", "x")) + + check_bin_op(10, "BINARY_ADD", 20, 30) + check_bin_op(5, "BINARY_SUBTRACT", 1, 4) + check_bin_op(5, "BINARY_MULTIPLY", 3, 15) + check_bin_op(10, "BINARY_TRUE_DIVIDE", 3, 10 / 3) + check_bin_op(10, "BINARY_FLOOR_DIVIDE", 3, 3) + check_bin_op(10, "BINARY_MODULO", 3, 1) + check_bin_op(2, "BINARY_POWER", 8, 256) + check_bin_op(1, "BINARY_LSHIFT", 3, 8) + check_bin_op(16, "BINARY_RSHIFT", 3, 2) + check_bin_op(10, "BINARY_AND", 3, 2) + check_bin_op(2, "BINARY_OR", 3, 3) + check_bin_op(2, "BINARY_XOR", 3, 1) + + def test_combined_unary_bin_ops(self): + # x = 1 + 3 + 7 + code = Bytecode( + [ + Instr("LOAD_CONST", 1), + Instr("LOAD_CONST", 3), + Instr("BINARY_ADD"), + Instr("LOAD_CONST", 7), + Instr("BINARY_ADD"), + Instr("STORE_NAME", "x"), + ] + ) + self.check(code, Instr("LOAD_CONST", 11), Instr("STORE_NAME", "x")) + + # x = ~(~(5)) + code = Bytecode( + [ + Instr("LOAD_CONST", 5), + Instr("UNARY_INVERT"), + Instr("UNARY_INVERT"), + Instr("STORE_NAME", "x"), + ] + ) + self.check(code, Instr("LOAD_CONST", 5), Instr("STORE_NAME", "x")) + + # "events = [(0, 'call'), (1, 'line'), (-(3), 'call')]" + code = Bytecode( + [ + Instr("LOAD_CONST", 0), + Instr("LOAD_CONST", "call"), + Instr("BUILD_TUPLE", 2), + Instr("LOAD_CONST", 1), + Instr("LOAD_CONST", "line"), + Instr("BUILD_TUPLE", 2), + Instr("LOAD_CONST", 3), + Instr("UNARY_NEGATIVE"), + Instr("LOAD_CONST", "call"), + Instr("BUILD_TUPLE", 2), + Instr("BUILD_LIST", 3), + Instr("STORE_NAME", "events"), + ] + ) + self.check( + code, + Instr("LOAD_CONST", (0, "call")), + Instr("LOAD_CONST", (1, "line")), + Instr("LOAD_CONST", (-3, "call")), + Instr("BUILD_LIST", 3), + Instr("STORE_NAME", "events"), + ) + + # 'x = (1,) + (0,) * 8' + code = Bytecode( + [ + Instr("LOAD_CONST", 1), + Instr("BUILD_TUPLE", 1), + Instr("LOAD_CONST", 0), + Instr("BUILD_TUPLE", 1), + Instr("LOAD_CONST", 8), + Instr("BINARY_MULTIPLY"), + Instr("BINARY_ADD"), + Instr("STORE_NAME", "x"), + ] + ) + zeros = (0,) * 8 + result = (1,) + zeros + self.check(code, Instr("LOAD_CONST", result), Instr("STORE_NAME", "x")) + + def test_max_size(self): + max_size = 3 + with mock.patch.object(peephole_opt, "MAX_SIZE", max_size): + # optimized binary operation: size <= maximum size + # + # (9,) * size + size = max_size + result = (9,) * size + code = Bytecode( + [ + Instr("LOAD_CONST", 9), + Instr("BUILD_TUPLE", 1), + Instr("LOAD_CONST", size), + Instr("BINARY_MULTIPLY"), + Instr("STORE_NAME", "x"), + ] + ) + self.check(code, Instr("LOAD_CONST", result), Instr("STORE_NAME", "x")) + + # don't optimize binary operation: size > maximum size + # + # x = (9,) * size + size = max_size + 1 + code = Bytecode( + [ + Instr("LOAD_CONST", 9), + Instr("BUILD_TUPLE", 1), + Instr("LOAD_CONST", size), + Instr("BINARY_MULTIPLY"), + Instr("STORE_NAME", "x"), + ] + ) + self.check( + code, + Instr("LOAD_CONST", (9,)), + Instr("LOAD_CONST", size), + Instr("BINARY_MULTIPLY"), + Instr("STORE_NAME", "x"), + ) + + def test_bin_op_dont_optimize(self): + # 1 / 0 + code = Bytecode( + [ + Instr("LOAD_CONST", 1), + Instr("LOAD_CONST", 0), + Instr("BINARY_TRUE_DIVIDE"), + Instr("POP_TOP"), + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE"), + ] + ) + self.check_dont_optimize(code) + + # 1 // 0 + code = Bytecode( + [ + Instr("LOAD_CONST", 1), + Instr("LOAD_CONST", 0), + Instr("BINARY_FLOOR_DIVIDE"), + Instr("POP_TOP"), + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE"), + ] + ) + self.check_dont_optimize(code) + + # 1 % 0 + code = Bytecode( + [ + Instr("LOAD_CONST", 1), + Instr("LOAD_CONST", 0), + Instr("BINARY_MODULO"), + Instr("POP_TOP"), + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE"), + ] + ) + self.check_dont_optimize(code) + + # 1 % 1j + code = Bytecode( + [ + Instr("LOAD_CONST", 1), + Instr("LOAD_CONST", 1j), + Instr("BINARY_MODULO"), + Instr("POP_TOP"), + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE"), + ] + ) + self.check_dont_optimize(code) + + def test_build_tuple(self): + # x = (1, 2, 3) + code = Bytecode( + [ + Instr("LOAD_CONST", 1), + Instr("LOAD_CONST", 2), + Instr("LOAD_CONST", 3), + Instr("BUILD_TUPLE", 3), + Instr("STORE_NAME", "x"), + ] + ) + self.check(code, Instr("LOAD_CONST", (1, 2, 3)), Instr("STORE_NAME", "x")) + + def test_build_list(self): + # test = x in [1, 2, 3] + code = Bytecode( + [ + Instr("LOAD_NAME", "x"), + Instr("LOAD_CONST", 1), + Instr("LOAD_CONST", 2), + Instr("LOAD_CONST", 3), + Instr("BUILD_LIST", 3), + Instr("COMPARE_OP", Compare.IN), + Instr("STORE_NAME", "test"), + ] + ) + + self.check( + code, + Instr("LOAD_NAME", "x"), + Instr("LOAD_CONST", (1, 2, 3)), + Instr("COMPARE_OP", Compare.IN), + Instr("STORE_NAME", "test"), + ) + + def test_build_list_unpack_seq(self): + for build_list in ("BUILD_TUPLE", "BUILD_LIST"): + # x, = [a] + code = Bytecode( + [ + Instr("LOAD_NAME", "a"), + Instr(build_list, 1), + Instr("UNPACK_SEQUENCE", 1), + Instr("STORE_NAME", "x"), + ] + ) + self.check(code, Instr("LOAD_NAME", "a"), Instr("STORE_NAME", "x")) + + # x, y = [a, b] + code = Bytecode( + [ + Instr("LOAD_NAME", "a"), + Instr("LOAD_NAME", "b"), + Instr(build_list, 2), + Instr("UNPACK_SEQUENCE", 2), + Instr("STORE_NAME", "x"), + Instr("STORE_NAME", "y"), + ] + ) + self.check( + code, + Instr("LOAD_NAME", "a"), + Instr("LOAD_NAME", "b"), + Instr("ROT_TWO"), + Instr("STORE_NAME", "x"), + Instr("STORE_NAME", "y"), + ) + + # x, y, z = [a, b, c] + code = Bytecode( + [ + Instr("LOAD_NAME", "a"), + Instr("LOAD_NAME", "b"), + Instr("LOAD_NAME", "c"), + Instr(build_list, 3), + Instr("UNPACK_SEQUENCE", 3), + Instr("STORE_NAME", "x"), + Instr("STORE_NAME", "y"), + Instr("STORE_NAME", "z"), + ] + ) + self.check( + code, + Instr("LOAD_NAME", "a"), + Instr("LOAD_NAME", "b"), + Instr("LOAD_NAME", "c"), + Instr("ROT_THREE"), + Instr("ROT_TWO"), + Instr("STORE_NAME", "x"), + Instr("STORE_NAME", "y"), + Instr("STORE_NAME", "z"), + ) + + def test_build_tuple_unpack_seq_const(self): + # x, y = (3, 4) + code = Bytecode( + [ + Instr("LOAD_CONST", 3), + Instr("LOAD_CONST", 4), + Instr("BUILD_TUPLE", 2), + Instr("UNPACK_SEQUENCE", 2), + Instr("STORE_NAME", "x"), + Instr("STORE_NAME", "y"), + ] + ) + self.check( + code, + Instr("LOAD_CONST", (3, 4)), + Instr("UNPACK_SEQUENCE", 2), + Instr("STORE_NAME", "x"), + Instr("STORE_NAME", "y"), + ) + + def test_build_list_unpack_seq_const(self): + # x, y, z = [3, 4, 5] + code = Bytecode( + [ + Instr("LOAD_CONST", 3), + Instr("LOAD_CONST", 4), + Instr("LOAD_CONST", 5), + Instr("BUILD_LIST", 3), + Instr("UNPACK_SEQUENCE", 3), + Instr("STORE_NAME", "x"), + Instr("STORE_NAME", "y"), + Instr("STORE_NAME", "z"), + ] + ) + self.check( + code, + Instr("LOAD_CONST", 5), + Instr("LOAD_CONST", 4), + Instr("LOAD_CONST", 3), + Instr("STORE_NAME", "x"), + Instr("STORE_NAME", "y"), + Instr("STORE_NAME", "z"), + ) + + def test_build_set(self): + # test = x in {1, 2, 3} + code = Bytecode( + [ + Instr("LOAD_NAME", "x"), + Instr("LOAD_CONST", 1), + Instr("LOAD_CONST", 2), + Instr("LOAD_CONST", 3), + Instr("BUILD_SET", 3), + Instr("COMPARE_OP", Compare.IN), + Instr("STORE_NAME", "test"), + ] + ) + + self.check( + code, + Instr("LOAD_NAME", "x"), + Instr("LOAD_CONST", frozenset((1, 2, 3))), + Instr("COMPARE_OP", Compare.IN), + Instr("STORE_NAME", "test"), + ) + + def test_compare_op_unary_not(self): + for op, not_op in ( + (Compare.IN, Compare.NOT_IN), # in => not in + (Compare.NOT_IN, Compare.IN), # not in => in + (Compare.IS, Compare.IS_NOT), # is => is not + (Compare.IS_NOT, Compare.IS), # is not => is + ): + code = Bytecode( + [ + Instr("LOAD_NAME", "a"), + Instr("LOAD_NAME", "b"), + Instr("COMPARE_OP", op), + Instr("UNARY_NOT"), + Instr("STORE_NAME", "x"), + ] + ) + self.check( + code, + Instr("LOAD_NAME", "a"), + Instr("LOAD_NAME", "b"), + Instr("COMPARE_OP", not_op), + Instr("STORE_NAME", "x"), + ) + + # don't optimize: + # x = not (a and b is True) + label_instr5 = Label() + code = Bytecode( + [ + Instr("LOAD_NAME", "a"), + Instr("JUMP_IF_FALSE_OR_POP", label_instr5), + Instr("LOAD_NAME", "b"), + Instr("LOAD_CONST", True), + Instr("COMPARE_OP", Compare.IS), + label_instr5, + Instr("UNARY_NOT"), + Instr("STORE_NAME", "x"), + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE"), + ] + ) + self.check_dont_optimize(code) + + def test_dont_optimize(self): + # x = 3 < 5 + code = Bytecode( + [ + Instr("LOAD_CONST", 3), + Instr("LOAD_CONST", 5), + Instr("COMPARE_OP", Compare.LT), + Instr("STORE_NAME", "x"), + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE"), + ] + ) + self.check_dont_optimize(code) + + # x = (10, 20, 30)[1:] + code = Bytecode( + [ + Instr("LOAD_CONST", (10, 20, 30)), + Instr("LOAD_CONST", 1), + Instr("LOAD_CONST", None), + Instr("BUILD_SLICE", 2), + Instr("BINARY_SUBSCR"), + Instr("STORE_NAME", "x"), + ] + ) + self.check_dont_optimize(code) + + def test_optimize_code_obj(self): + # Test optimize() method with a code object + # + # x = 3 + 5 => x = 8 + noopt = Bytecode( + [ + Instr("LOAD_CONST", 3), + Instr("LOAD_CONST", 5), + Instr("BINARY_ADD"), + Instr("STORE_NAME", "x"), + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE"), + ] + ) + noopt = noopt.to_code() + + optimizer = peephole_opt.PeepholeOptimizer() + optim = optimizer.optimize(noopt) + + code = Bytecode.from_code(optim) + self.assertEqual( + code, + [ + Instr("LOAD_CONST", 8, lineno=1), + Instr("STORE_NAME", "x", lineno=1), + Instr("LOAD_CONST", None, lineno=1), + Instr("RETURN_VALUE", lineno=1), + ], + ) + + def test_return_value(self): + # return+return: remove second return + # + # def func(): + # return 4 + # return 5 + code = Bytecode( + [ + Instr("LOAD_CONST", 4, lineno=2), + Instr("RETURN_VALUE", lineno=2), + Instr("LOAD_CONST", 5, lineno=3), + Instr("RETURN_VALUE", lineno=3), + ] + ) + code = ControlFlowGraph.from_bytecode(code) + self.check(code, Instr("LOAD_CONST", 4, lineno=2), Instr("RETURN_VALUE", lineno=2)) + + # return+return + return+return: remove second and fourth return + # + # def func(): + # return 4 + # return 5 + # return 6 + # return 7 + code = Bytecode( + [ + Instr("LOAD_CONST", 4, lineno=2), + Instr("RETURN_VALUE", lineno=2), + Instr("LOAD_CONST", 5, lineno=3), + Instr("RETURN_VALUE", lineno=3), + Instr("LOAD_CONST", 6, lineno=4), + Instr("RETURN_VALUE", lineno=4), + Instr("LOAD_CONST", 7, lineno=5), + Instr("RETURN_VALUE", lineno=5), + ] + ) + code = ControlFlowGraph.from_bytecode(code) + self.check(code, Instr("LOAD_CONST", 4, lineno=2), Instr("RETURN_VALUE", lineno=2)) + + # return + JUMP_ABSOLUTE: remove JUMP_ABSOLUTE + # while 1: + # return 7 + if sys.version_info < (3, 8): + setup_loop = Label() + return_label = Label() + code = Bytecode( + [ + setup_loop, + Instr("SETUP_LOOP", return_label, lineno=2), + Instr("LOAD_CONST", 7, lineno=3), + Instr("RETURN_VALUE", lineno=3), + Instr("JUMP_ABSOLUTE", setup_loop, lineno=3), + Instr("POP_BLOCK", lineno=3), + return_label, + Instr("LOAD_CONST", None, lineno=3), + Instr("RETURN_VALUE", lineno=3), + ] + ) + code = ControlFlowGraph.from_bytecode(code) + + end_loop = Label() + self.check( + code, + Instr("SETUP_LOOP", end_loop, lineno=2), + Instr("LOAD_CONST", 7, lineno=3), + Instr("RETURN_VALUE", lineno=3), + end_loop, + Instr("LOAD_CONST", None, lineno=3), + Instr("RETURN_VALUE", lineno=3), + ) + else: + setup_loop = Label() + return_label = Label() + code = Bytecode( + [ + setup_loop, + Instr("LOAD_CONST", 7, lineno=3), + Instr("RETURN_VALUE", lineno=3), + Instr("JUMP_ABSOLUTE", setup_loop, lineno=3), + Instr("LOAD_CONST", None, lineno=3), + Instr("RETURN_VALUE", lineno=3), + ] + ) + code = ControlFlowGraph.from_bytecode(code) + + self.check(code, Instr("LOAD_CONST", 7, lineno=3), Instr("RETURN_VALUE", lineno=3)) + + def test_not_jump_if_false(self): + # Replace UNARY_NOT+POP_JUMP_IF_FALSE with POP_JUMP_IF_TRUE + # + # if not x: + # y = 9 + label = Label() + code = Bytecode( + [ + Instr("LOAD_NAME", "x"), + Instr("UNARY_NOT"), + Instr("POP_JUMP_IF_FALSE", label), + Instr("LOAD_CONST", 9), + Instr("STORE_NAME", "y"), + label, + ] + ) + + code = self.optimize_blocks(code) + label = Label() + self.check( + code, + Instr("LOAD_NAME", "x"), + Instr("POP_JUMP_IF_TRUE", label), + Instr("LOAD_CONST", 9), + Instr("STORE_NAME", "y"), + label, + ) + + def test_unconditional_jump_to_return(self): + # def func(): + # if test: + # if test2: + # x = 10 + # else: + # x = 20 + # else: + # x = 30 + + label_instr11 = Label() + label_instr14 = Label() + label_instr7 = Label() + code = Bytecode( + [ + Instr("LOAD_GLOBAL", "test", lineno=2), + Instr("POP_JUMP_IF_FALSE", label_instr11, lineno=2), + Instr("LOAD_GLOBAL", "test2", lineno=3), + Instr("POP_JUMP_IF_FALSE", label_instr7, lineno=3), + Instr("LOAD_CONST", 10, lineno=4), + Instr("STORE_FAST", "x", lineno=4), + Instr("JUMP_ABSOLUTE", label_instr14, lineno=4), + label_instr7, + Instr("LOAD_CONST", 20, lineno=6), + Instr("STORE_FAST", "x", lineno=6), + Instr("JUMP_FORWARD", label_instr14, lineno=6), + label_instr11, + Instr("LOAD_CONST", 30, lineno=8), + Instr("STORE_FAST", "x", lineno=8), + label_instr14, + Instr("LOAD_CONST", None, lineno=8), + Instr("RETURN_VALUE", lineno=8), + ] + ) + + label1 = Label() + label3 = Label() + label4 = Label() + self.check( + code, + Instr("LOAD_GLOBAL", "test", lineno=2), + Instr("POP_JUMP_IF_FALSE", label3, lineno=2), + Instr("LOAD_GLOBAL", "test2", lineno=3), + Instr("POP_JUMP_IF_FALSE", label1, lineno=3), + Instr("LOAD_CONST", 10, lineno=4), + Instr("STORE_FAST", "x", lineno=4), + Instr("JUMP_ABSOLUTE", label4, lineno=4), + label1, + Instr("LOAD_CONST", 20, lineno=6), + Instr("STORE_FAST", "x", lineno=6), + Instr("JUMP_FORWARD", label4, lineno=6), + label3, + Instr("LOAD_CONST", 30, lineno=8), + Instr("STORE_FAST", "x", lineno=8), + label4, + Instr("LOAD_CONST", None, lineno=8), + Instr("RETURN_VALUE", lineno=8), + ) + + def test_unconditional_jumps(self): + # def func(): + # if x: + # if y: + # func() + label_instr7 = Label() + code = Bytecode( + [ + Instr("LOAD_GLOBAL", "x", lineno=2), + Instr("POP_JUMP_IF_FALSE", label_instr7, lineno=2), + Instr("LOAD_GLOBAL", "y", lineno=3), + Instr("POP_JUMP_IF_FALSE", label_instr7, lineno=3), + Instr("LOAD_GLOBAL", "func", lineno=4), + Instr("CALL_FUNCTION", 0, lineno=4), + Instr("POP_TOP", lineno=4), + label_instr7, + Instr("LOAD_CONST", None, lineno=4), + Instr("RETURN_VALUE", lineno=4), + ] + ) + + label_return = Label() + self.check( + code, + Instr("LOAD_GLOBAL", "x", lineno=2), + Instr("POP_JUMP_IF_FALSE", label_return, lineno=2), + Instr("LOAD_GLOBAL", "y", lineno=3), + Instr("POP_JUMP_IF_FALSE", label_return, lineno=3), + Instr("LOAD_GLOBAL", "func", lineno=4), + Instr("CALL_FUNCTION", 0, lineno=4), + Instr("POP_TOP", lineno=4), + label_return, + Instr("LOAD_CONST", None, lineno=4), + Instr("RETURN_VALUE", lineno=4), + ) + + def test_jump_to_return(self): + # def func(condition): + # return 'yes' if condition else 'no' + label_instr4 = Label() + label_instr6 = Label() + code = Bytecode( + [ + Instr("LOAD_FAST", "condition"), + Instr("POP_JUMP_IF_FALSE", label_instr4), + Instr("LOAD_CONST", "yes"), + Instr("JUMP_FORWARD", label_instr6), + label_instr4, + Instr("LOAD_CONST", "no"), + label_instr6, + Instr("RETURN_VALUE"), + ] + ) + + label = Label() + self.check( + code, + Instr("LOAD_FAST", "condition"), + Instr("POP_JUMP_IF_FALSE", label), + Instr("LOAD_CONST", "yes"), + Instr("RETURN_VALUE"), + label, + Instr("LOAD_CONST", "no"), + Instr("RETURN_VALUE"), + ) + + def test_jump_if_true_to_jump_if_false(self): + # Replace JUMP_IF_TRUE_OR_POP jumping to POP_JUMP_IF_FALSE + # with POP_JUMP_IF_TRUE + # + # if x or y: + # z = 1 + + label_instr3 = Label() + label_instr7 = Label() + code = Bytecode( + [ + Instr("LOAD_NAME", "x"), + Instr("JUMP_IF_TRUE_OR_POP", label_instr3), + Instr("LOAD_NAME", "y"), + label_instr3, + Instr("POP_JUMP_IF_FALSE", label_instr7), + Instr("LOAD_CONST", 1), + Instr("STORE_NAME", "z"), + label_instr7, + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE"), + ] + ) + + label_instr4 = Label() + label_instr7 = Label() + self.check( + code, + Instr("LOAD_NAME", "x"), + Instr("POP_JUMP_IF_TRUE", label_instr4), + Instr("LOAD_NAME", "y"), + Instr("POP_JUMP_IF_FALSE", label_instr7), + label_instr4, + Instr("LOAD_CONST", 1), + Instr("STORE_NAME", "z"), + label_instr7, + Instr("LOAD_CONST", None), + Instr("RETURN_VALUE"), + ) + + def test_jump_if_false_to_jump_if_false(self): + # Replace JUMP_IF_FALSE_OR_POP jumping to POP_JUMP_IF_FALSE