id int64 0 190k | prompt stringlengths 21 13.4M | docstring stringlengths 1 12k ⌀ |
|---|---|---|
177,773 | 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 ReturnInfo(object):
def __init__(s... | null |
177,774 | 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... | null |
177,775 | 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_... | null |
177,776 | 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
import ast as ast_module
The provided code ... | 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). |
177,777 | 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
import ast as ast_module
def collect_try_exc... | null |
177,778 | 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
import ast as ast_module
class _Disassembler... | 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/tar... |
177,779 | 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
from _pyde... | Runs a function as a pydevd daemon thread (without any tracing in place). |
177,780 | from _pydev_bundle import pydev_log
from types import CodeType
from _pydevd_frame_eval.vendored.bytecode.instr import _Variable
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 i... | 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 |
177,781 | 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_c... | null |
177,782 | 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_c... | null |
177,783 | 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_c... | null |
177,784 | 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, \
thr... | null |
177,785 | 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, \
thr... | null |
177,786 | 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... | null |
177,787 | 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... | This function should be called to patch the stackless module so that new tasklets are properly tracked in the debugger. |
177,788 | import linecache
import re
def default_should_trace_hook(frame, 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)
... | 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. |
177,789 | from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding
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_O... | null |
177,790 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
def version_... | null |
177,791 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
ENV_TRUE_LOWER_VALUES = ('yes', 'true', '1')
from _pydev_bundle._pydev_saved_m... | null |
177,792 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
def as_float... | null |
177,793 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
def as_int_i... | null |
177,794 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
The provided... | 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). |
177,795 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
def as_str(s... | null |
177,796 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
def filter_al... | null |
177,797 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
def _temp_tr... | null |
177,798 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
The provided... | Will throw an error when executing a line event |
177,799 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
_thread_id_lo... | null |
177,800 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
_thread_id_lo... | null |
177,801 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
The provided... | 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. |
177,802 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
QUOTED_LINE_P... | null |
177,803 | from __future__ import nested_scopes
import platform
import weakref
import struct
import warnings
import functools
from contextlib import contextmanager
import sys
import codecs as _codecs
import os
from _pydevd_bundle import pydevd_vm_type
from _pydev_bundle._pydev_saved_modules import thread, threading
JSON_PROTOCOL... | null |
177,804 | 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_th... | null |
177,805 | 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_th... | 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 pr... |
177,806 | 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_th... | 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 |
177,807 | 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_th... | 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 |
177,808 | 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_th... | 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) |
177,809 | 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_th... | 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). |
177,810 | 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_th... | null |
177,811 | from _pydevd_bundle.pydevd_constants import ForkSafeLock, get_global_debugger
import os
import sys
from contextlib import contextmanager
class _RedirectionsHolder:
_lock = ForkSafeLock(rlock=True)
_stack_stdout = []
_stack_stderr = []
_pydevd_stdout_redirect_ = None
_pydevd_stderr_redirect_ = None
... | null |
177,812 | from _pydevd_bundle.pydevd_comm import get_global_debugger
from _pydev_bundle import pydev_log
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, ... | null |
177,813 | import sys
import importlib.machinery
import importlib.util
import io
import types
import os
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 Non... | Execute a module's code without importing it Returns the resulting top level namespace dictionary |
177,814 | 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... | null |
177,815 | 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... | null |
177,816 | 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... | null |
177,817 |
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) | null |
177,818 | 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 (
Completi... | null |
177,819 | import sys
import traceback
import inspect
import __future__
from _pydev_bundle._pydev_saved_modules import threading
class InteractiveConsole(InteractiveInterpreter):
"""Closely emulate the behavior of the interactive Python interpreter.
This class builds on InteractiveInterpreter and adds prompting
using ... | 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 Interactiv... |
177,820 | from _pydevd_bundle.pydevd_constants import EXCEPTION_TYPE_USER_UNHANDLED, EXCEPTION_TYPE_UNHANDLED, \
IS_PY311_OR_GREATER
from _pydev_bundle import pydev_log
import itertools
from typing import Any, Dict
def remove_exception_from_frame(frame):
frame.f_locals.pop('__exception__', None) | null |
177,821 | from _pydevd_bundle.pydevd_constants import EXCEPTION_TYPE_USER_UNHANDLED, EXCEPTION_TYPE_UNHANDLED, \
IS_PY311_OR_GREATER
from _pydev_bundle import pydev_log
import itertools
from typing import Any, Dict
def cached_call(obj, func, *args):
cached_name = '_cached_' + func.__name__
if not hasattr(obj, cached... | null |
177,822 | from _pydevd_bundle.pydevd_constants import EXCEPTION_TYPE_USER_UNHANDLED, EXCEPTION_TYPE_UNHANDLED, \
IS_PY311_OR_GREATER
from _pydev_bundle import pydev_log
import itertools
from typing import Any, Dict
_utf8_with_2_bytes = 0x80
_utf8_with_3_bytes = 0x800
_utf8_with_4_bytes = 0x10000
def _utf8_byte_offset_to_cha... | null |
177,823 | from _pydevd_bundle.pydevd_constants import EXCEPTION_TYPE_USER_UNHANDLED, EXCEPTION_TYPE_UNHANDLED, \
IS_PY311_OR_GREATER
from _pydev_bundle import pydev_log
import itertools
from typing import Any, Dict
def _extract_caret_anchors_in_bytes_from_line_segment(segment: str):
import ast
try:
segment ... | null |
177,824 | from _pydevd_bundle.pydevd_constants import EXCEPTION_TYPE_USER_UNHANDLED, EXCEPTION_TYPE_UNHANDLED, \
IS_PY311_OR_GREATER
from _pydev_bundle import pydev_log
import itertools
from typing import Any, Dict
class FramesList(object):
def __init__(self):
self._frames = []
# If available, the line nu... | :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... |
177,825 | import types
from _pydev_bundle import pydev_log
from _pydevd_bundle import pydevd_trace_api
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 | null |
177,826 | import types
from _pydev_bundle import pydev_log
from _pydevd_bundle import pydevd_trace_api
def bind_func_to_method(func, obj, method_name):
bound_method = types.MethodType(func, obj)
setattr(obj, method_name, bound_method)
return bound_method | null |
177,827 | import types
from _pydev_bundle import pydev_log
from _pydevd_bundle import pydevd_trace_api
def create_dispatch(obj, name):
def dispatch(self, *args, **kwargs):
result = None
for p in self.active_plugins:
r = getattr(p, name)(self, *args, **kwargs)
if not result:
... | null |
177,828 | import sys
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 is... | 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 ... |
177,829 | import json
import urllib.parse as urllib_parse
def int_parser(s, default_value=0):
try:
return int(s)
except Exception:
return default_value | null |
177,830 | import json
import urllib.parse as urllib_parse
def bool_parser(s):
return s in ("True", "true", "1", True, 1) | null |
177,831 | import json
import urllib.parse as urllib_parse
def unquote(s):
return None if s is None else urllib_parse.unquote(s) | null |
177,832 | import json
import urllib.parse as urllib_parse
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_deb... | 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', d... |
177,833 | 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... | null |
177,834 | 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... | null |
177,835 | 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_bundl... | null |
177,836 | 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_bundl... | null |
177,837 | import sys
import threading
import traceback
import warnings
from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding
from _pydev_bundle.pydev_imports import xmlrpclib, _queue
from _pydevd_bundle.pydevd_constants import Null
Queue = _queue.Queue
class _ServerHolder:
'''
Helper so that we don't... | null |
177,838 | import sys
import threading
import traceback
import warnings
from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding
from _pydev_bundle.pydev_imports import xmlrpclib, _queue
from _pydevd_bundle.pydevd_constants import Null
class _ServerHolder:
def notifyTestsCollected(tests_count):
assert tests... | null |
177,839 | import sys
import threading
import traceback
import warnings
from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding
from _pydev_bundle.pydev_imports import xmlrpclib, _queue
from _pydevd_bundle.pydevd_constants import Null
class _ServerHolder:
'''
Helper so that we don't have to use a global... | @param file: the tests file (c:/temp/test.py) @param test: the test ran (i.e.: TestCase.test1) |
177,840 | import sys
import threading
import traceback
import warnings
from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding
from _pydev_bundle.pydev_imports import xmlrpclib, _queue
from _pydevd_bundle.pydevd_constants import Null
class _ServerHolder:
'''
Helper so that we don't have to use a global... | @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 |
177,841 | import sys
import threading
import traceback
import warnings
from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding
from _pydev_bundle.pydev_imports import xmlrpclib, _queue
from _pydevd_bundle.pydevd_constants import Null
class _ServerHolder:
'''
Helper so that we don't have to use a global... | null |
177,842 | import sys
import threading
import traceback
import warnings
from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding
from _pydev_bundle.pydev_imports import xmlrpclib, _queue
from _pydevd_bundle.pydevd_constants import Null
class _ServerHolder:
'''
Helper so that we don't have to use a global... | null |
177,843 | 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 *
import re
import time
class Configuration:
def __init__(
self,
files_or_dirs='',
verbosity=2,
i... | Parses command line and returns test directories, verbosity, test filter and test suites usage: runfiles.py -v|--verbosity <level> -t|--tests <Test.test1,Test2> 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 wil... |
177,844 | 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 *
import re
import time
DJANGO_TEST_SUITE_RUNNER = None
def get_django_test_suite_runner():
global DJANGO_TEST_SUITE_RUNNER
... | null |
177,845 | import os.path
import sys
from _pydevd_bundle.pydevd_constants import Null
def start_coverage_support_from_params(coverage_output_dir, coverage_output_file, jobs, coverage_include):
def start_coverage_support(configuration):
return start_coverage_support_from_params(
configuration.coverage_output_dir,
... | null |
177,846 | from nose.plugins.multiprocess import MultiProcessTestRunner from nose.plugins.base import Plugin
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 tr... | null |
177,847 | from nose.plugins.multiprocess import MultiProcessTestRunner from nose.plugins.base import Plugin
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 tr... | 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). |
177,848 | from _pydev_bundle.pydev_imports import xmlrpclib, _queue
import traceback
import sys
from _pydev_runfiles.pydev_runfiles_coverage import start_coverage_support_from_params
import threading
class KillServer(object):
pass
class ServerComm(threading.Thread):
def __init__(self, job_id, server):
self.notifi... | null |
177,849 | 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
def flatten_test_suite(test_suite, ret):
if isinstance(test_suite, unittest.TestSuite):
for t in test_suite._tests:... | @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... |
177,850 | import sys
def dict_contains(d, key):
return d.has_key(key) | null |
177,852 | import sys
if sys.version_info[0] < 3:
try:
#Redefine input and raw_input only after the original sitecustomize was executed
#(because otherwise, the original raw_input and input would still not be defined)
import __builtin__
original_raw_input = __builtin__.raw_input
origina... | null |
177,853 | import sys
if sys.version_info[0] < 3:
try:
#Redefine input and raw_input only after the original sitecustomize was executed
#(because otherwise, the original raw_input and input would still not be defined)
import __builtin__
original_raw_input = __builtin__.raw_input
origina... | null |
177,854 | import sys
def input(prompt=''):
#the original input would only remove a trailing \n, so, at
#this point if we had a \r\n the \r would remain (which is valid for eclipse)
#so, let's remove the remaining \r which python didn't expect.
ret = original_input(prompt)
... | null |
177,855 | import sys
def fix_get_pass():
try:
import getpass
except ImportError:
return #If we can't import it, we can't fix it
import warnings
fallback = getattr(getpass, 'fallback_getpass', None) # >= 2.6
if not fallback:
fallback = getpass.default_ge... | null |
177,856 | def is_valid_py_file(path):
'''
Checks whether the file can be read by the coverage module. This is especially
needed for .pyx files and .py files with syntax errors.
'''
import os
is_valid = False
if os.path.isfile(path) and not os.path.splitext(path)[1] == '.pyx':
try:
... | null |
177,857 | import sys
if sys.version_info[:2] < (3, 6):
raise RuntimeError('The PyDev.Debugger requires Python 3.6 onwards to be run. If you need to use an older Python version, use an older version of the debugger.')
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections im... | null |
177,858 | import sys
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections import defaultdict
from contextlib import contextmanager
from functools import partial
import itertools
import traceback
import weakref
import getpass as getpass_mod
import functools
import pydevd_file_... | Adds a listener for the DAP (debug adapter protocol) messages. :type dap_messages_listener: IDAPMessagesListener :note: messages from the xml backend are not notified through this API. :note: the notifications are sent from threads and they are not synchronized (so, it's possible that a message is sent and received fro... |
177,859 | import sys
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections import defaultdict
from contextlib import contextmanager
from functools import partial
import itertools
import traceback
import weakref
import getpass as getpass_mod
import functools
import pydevd_file_... | API to send some custom json message. :param dict|pydevd_schema.BaseSchema msg: The custom message to be sent. :return bool: True if the message was added to the queue to be sent and False otherwise. |
177,860 | import sys
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections import defaultdict
from contextlib import contextmanager
from functools import partial
import itertools
import traceback
import weakref
import getpass as getpass_mod
import functools
import pydevd_file_... | Helper to dump threads after a timeout. :param filename_template: A template filename, such as 'c:/temp/thread_dump_%s.txt', where the %s will be replaced by the time for the dump. :param timeout: The timeout (in seconds) for the dump. :param recurrent: If True we'll keep on doing thread dumps. |
177,861 | import sys
if sys.version_info[:2] < (3, 6):
raise RuntimeError('The PyDev.Debugger requires Python 3.6 onwards to be run. If you need to use an older Python version, use an older version of the debugger.')
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections im... | null |
177,862 | import sys
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections import defaultdict
from contextlib import contextmanager
from functools import partial
import itertools
import traceback
import weakref
import getpass as getpass_mod
import functools
import pydevd_file_... | Starts accepting connections at the given host/port. The debugger will not be initialized nor configured, it'll only start accepting connections (and will have the tracing setup in this thread). Meant to be used with the DAP (Debug Adapter Protocol) with _wait_for_attach(). :param address: (host, port) :type address: t... |
177,863 | import sys
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections import defaultdict
from contextlib import contextmanager
from functools import partial
import itertools
import traceback
import weakref
import getpass as getpass_mod
import functools
import pydevd_file_... | Meant to be called after _enable_attach() -- the current thread will only unblock after a connection is in place and the DAP (Debug Adapter Protocol) sends the ConfigurationDone request. |
177,864 | import sys
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections import defaultdict
from contextlib import contextmanager
from functools import partial
import itertools
import traceback
import weakref
import getpass as getpass_mod
import functools
import pydevd_file_... | Can be called any time to check if the connection was established and the DAP (Debug Adapter Protocol) has sent the ConfigurationDone request. |
177,865 | import sys
if sys.version_info[:2] < (3, 6):
raise RuntimeError('The PyDev.Debugger requires Python 3.6 onwards to be run. If you need to use an older Python version, use an older version of the debugger.')
import os
try:
# Just empty packages to check if they're in the PYTHONPATH.
import _pydev_bundle
exc... | null |
177,866 | import sys
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections import defaultdict
from contextlib import contextmanager
from functools import partial
import itertools
import traceback
import weakref
import getpass as getpass_mod
import functools
import pydevd_file_... | When creating a fork from a process in the debugger, we need to reset the whole debugger environment! |
177,867 | import sys
import os
try:
# Just empty packages to check if they're in the PYTHONPATH.
import _pydev_bundle
except ImportError:
# On the first import of a pydevd module, add pydevd itself to the PYTHONPATH
# if its dependencies cannot be imported.
sys.path.append(os.path.dirname(os.path.abspath(__f... | May be used to skip the monkey-patching that pydevd does to skip changing arguments to embed the debugger into child processes. i.e.: with pydevd.skip_subprocess_arg_patch(): subprocess.call(...) |
177,868 | import sys
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections import defaultdict
from contextlib import contextmanager
from functools import partial
import itertools
import traceback
import weakref
import getpass as getpass_mod
import functools
import pydevd_file_... | May be used to ask pydevd to skip the termination of some process when it's asked to terminate (debug adapter protocol only). :param int pid: The pid to be ignored. i.e.: process = subprocess.Popen(...) pydevd.add_dont_terminate_child_pid(process.pid) |
177,869 | import sys
if sys.version_info[:2] < (3, 6):
raise RuntimeError('The PyDev.Debugger requires Python 3.6 onwards to be run. If you need to use an older Python version, use an older version of the debugger.')
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections im... | :type setup_options: dict[str, bool] |
177,870 | import sys
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections import defaultdict
from contextlib import contextmanager
from functools import partial
import itertools
import traceback
import weakref
import getpass as getpass_mod
import functools
import pydevd_file_... | In pydevd it's possible to log by setting the following environment variables: PYDEVD_DEBUG=1 (sets the default log level to 3 along with other default options) PYDEVD_DEBUG_FILE=</path/to/file.log> Note that the file will have the pid of the process added to it (so, logging to /path/to/file.log would actually start lo... |
177,871 | import sys
if sys.version_info[:2] < (3, 6):
raise RuntimeError('The PyDev.Debugger requires Python 3.6 onwards to be run. If you need to use an older Python version, use an older version of the debugger.')
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections im... | null |
177,872 | import sys
import os
from _pydevd_bundle import pydevd_constants
import atexit
import dis
import io
from collections import defaultdict
from contextlib import contextmanager
from functools import partial
import itertools
import traceback
import weakref
import getpass as getpass_mod
import functools
import pydevd_file_... | null |
177,873 | import dis
import inspect
import opcode as _opcode
import struct
import sys
import types
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... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.