ipdb-0.12.2/0000755000076500000240000000000013520066043013101 5ustar gotchastaff00000000000000ipdb-0.12.2/AUTHORS0000644000076500000240000000034313520066043014151 0ustar gotchastaff00000000000000aldrik andreagrandi bmw dimasad emulbreh felixonmars gnebehay gotcha IxDay JamshedVesuna kynan lebedov marciomazza mauritsvanrees msabramo nikolas omergertel pgularski pjdelport Psycojoker sas23 steinnes Wilfred WouterVH zvodd ipdb-0.12.2/COPYING.txt0000644000076500000240000000272413520066043014757 0ustar gotchastaff00000000000000Copyright (c) 2007-2019 ipdb development team 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 ipdb 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. ipdb-0.12.2/HISTORY.txt0000644000076500000240000001130613520066043015004 0ustar gotchastaff00000000000000Changelog ========= 0.12.2 (2019-07-30) ------------------- - Avoid emitting term-title bytes [steinnes] 0.12.1 (2019-07-26) ------------------- - Fix --help [native-api] 0.12 (2019-03-20) ----------------- - Drop support for Python 3.3.x [bmw] - Stop deprecation warnings from being raised when IPython >= 5.1 is used. Support for IPython < 5.1 has been dropped. [bmw] 0.11 (2018-02-15) ----------------- - Simplify loading IPython and getting information from it. Drop support for python 2.6 Drop support for IPython < 5.0.0 [takluyver] 0.10.3 (2017-04-22) ------------------- - For users using python 2.6, do not install IPython >= 2.0.0. And for users using python 2.7, do not install IPython >= 6.0.0. [vphilippon] - Drop support for python 3.2. [vphilippon] - Command line usage consistent with pdb - Add argument commands [zvodd] 0.10.2 (2017-01-25) ------------------- - Ask IPython which debugger class to use. Closes https://github.com/gotcha/ipdb/issues/105 [gnebehay, JBKahn] - ipdb.set_trace() does not ignore context arg anymore. Closes https://github.com/gotcha/ipdb/issues/93. [gnebehay, Garrett-R] 0.10.1 (2016-06-14) ------------------- - Support IPython 5.0. [ngoldbaum] 0.10.0 (2016-04-29) ------------------- - Stop trying to magically guess when stdout needs to be captured. Like needed by `nose`. Rather, provide a set of function that can be called explicitely when needed. [gotcha] - drop support of IPython before 0.10.2 0.9.4 (2016-04-29) ------------------ - Fix Restart error when using `python -m ipdb` Closes https://github.com/gotcha/ipdb/issues/93. [gotcha] 0.9.3 (2016-04-15) ------------------ - Don't require users to pass a traceback to post_mortem. [Wilfred] 0.9.2 (2016-04-15) ------------------ - Closes https://github.com/gotcha/ipdb/issues/93. [gotcha] 0.9.1 (2016-04-12) ------------------ - Reset ``sys.modules['__main__']`` to original value. Closes https://github.com/gotcha/ipdb/issues/85 [gotcha] - Fix support of IPython versions 0.x [asivokon] 0.9.0 (2016-02-22) ------------------ - Switch to revised BSD license (with approval of all contributors). Closes https://github.com/gotcha/ipdb/issues/68 [lebedov, gotcha] 0.8.3 (2016-02-17) ------------------ - Don't pass sys.argv to IPython for configuration. [emulbreh] 0.8.2 (2016-02-15) ------------------ - Fix lexical comparison for version numbers. [sas23] - Allow configuring how many lines of code context are displayed by `set_trace` [JamshedVesuna] - If an instance of IPython is already running its configuration will be loaded. [IxDay] 0.8.1 (2015-06-03) ------------------ - Make Nose support less invasive. Closes https://github.com/gotcha/ipdb/issues/52 Closes https://github.com/gotcha/ipdb/issues/31 [blink1073, gotcha] - Fix for post_mortem in context manager. Closes https://github.com/gotcha/ipdb/issues/20 [omergertel] 0.8 (2013-09-19) ---------------- - More Python 3 compatibility; implies dropping Python 2.5 support. Closes https://github.com/gotcha/ipdb/issues/37 [gotcha] 0.7.1 (2013-09-19) ------------------ - IPython 1.0 compatibility. Closes https://github.com/gotcha/ipdb/issues/44 [pgularski] - Index into version_info in setup.py for Python 2.6 compatibility. [kynan] - Add Travis CI configuration. [kynan] 0.7 (2012-07-06) ---------------- - Add ``launch_ipdb_on_exception`` context manager. Implies dropping Python 2.4 support. [Psycojoker] - Wrap sys.excepthook only once. [marciomazza] - Add GPL file and refer in headers. [stan3] - Python 3 support. [Piet Delport] - Basic tests. [msabramo] - Added the functions ``runcall``, ``runeval`` and ``run``. [dimasad] 0.6.1 (2011-10-17) ------------------ - State dependency on IPython later or equal to 0.10. [gotcha] 0.6 (2011-09-01) ---------------- - Add setuptools ``console_scripts`` entry point. [akrito, gotcha] - Nose support. Closes https://github.com/gotcha/ipdb/issues/8 [akaihola, gotcha] 0.5 (2011-08-05) ---------------- - IPython 0.11 support. [lebedov] 0.4 (2011-06-13) ---------------- - When used from IPython, use its colors. Closes https://github.com/gotcha/ipdb/issues/1 [gotcha] - Fixed errors when exiting with "q". [gotcha] - Allow use of ``python -m ipdb mymodule.py``. Python 2.7 only. Closes https://github.com/gotcha/ipdb/issues/3 [gotcha] - Fixed post_mortem when the traceback is None. [maurits] 0.3 (2011-01-16) ---------------- - Add ``post_mortem()`` for ``Products.PDBDebugMode`` support. [Jean Jordaan] - Moved to github.com. 0.2 (2010-10-20) ---------------- - Added ``pm()``. [Paulo Benedict Ang] 0.1 (2010-04-26) ---------------- - First "non dev" release. ipdb-0.12.2/ipdb/0000755000076500000240000000000013520066043014017 5ustar gotchastaff00000000000000ipdb-0.12.2/ipdb/__init__.py0000644000076500000240000000077313520066043016137 0ustar gotchastaff00000000000000# Copyright (c) 2007-2016 Godefroid Chapelle and ipdb development team # # This file is part of ipdb. # Redistributable under the revised BSD license # https://opensource.org/licenses/BSD-3-Clause from ipdb.__main__ import set_trace, post_mortem, pm, run # noqa from ipdb.__main__ import runcall, runeval, launch_ipdb_on_exception # noqa from ipdb.stdout import sset_trace, spost_mortem, spm # noqa from ipdb.stdout import slaunch_ipdb_on_exception # noqa ipdb-0.12.2/ipdb/__main__.py0000644000076500000240000001270413520066043016115 0ustar gotchastaff00000000000000# Copyright (c) 2011-2016 Godefroid Chapelle and ipdb development team # # This file is part of ipdb. # Redistributable under the revised BSD license # https://opensource.org/licenses/BSD-3-Clause from __future__ import print_function import os import sys from contextlib import contextmanager __version__= "0.10.3" from IPython import get_ipython from IPython.core.debugger import BdbQuit_excepthook from IPython.terminal.ipapp import TerminalIPythonApp from IPython.terminal.embed import InteractiveShellEmbed shell = get_ipython() if shell is None: # Not inside IPython # Build a terminal app in order to force ipython to load the # configuration ipapp = TerminalIPythonApp() # Avoid output (banner, prints) ipapp.interact = False ipapp.initialize(['--no-term-title']) shell = ipapp.shell else: # Running inside IPython # Detect if embed shell or not and display a message if isinstance(shell, InteractiveShellEmbed): sys.stderr.write( "\nYou are currently into an embedded ipython shell,\n" "the configuration will not be loaded.\n\n" ) # Let IPython decide about which debugger class to use # This is especially important for tools that fiddle with stdout debugger_cls = shell.debugger_cls def _init_pdb(context=3, commands=[]): try: p = debugger_cls(context=context) except TypeError: p = debugger_cls() p.rcLines.extend(commands) return p def wrap_sys_excepthook(): # make sure we wrap it only once or we would end up with a cycle # BdbQuit_excepthook.excepthook_ori == BdbQuit_excepthook if sys.excepthook != BdbQuit_excepthook: BdbQuit_excepthook.excepthook_ori = sys.excepthook sys.excepthook = BdbQuit_excepthook def set_trace(frame=None, context=3): wrap_sys_excepthook() if frame is None: frame = sys._getframe().f_back p = _init_pdb(context).set_trace(frame) if p and hasattr(p, 'shell'): p.shell.restore_sys_module_state() def post_mortem(tb=None): wrap_sys_excepthook() p = _init_pdb() p.reset() if tb is None: # sys.exc_info() returns (type, value, traceback) if an exception is # being handled, otherwise it returns None tb = sys.exc_info()[2] if tb: p.interaction(None, tb) def pm(): post_mortem(sys.last_traceback) def run(statement, globals=None, locals=None): _init_pdb().run(statement, globals, locals) def runcall(*args, **kwargs): return _init_pdb().runcall(*args, **kwargs) def runeval(expression, globals=None, locals=None): return _init_pdb().runeval(expression, globals, locals) @contextmanager def launch_ipdb_on_exception(): try: yield except Exception: e, m, tb = sys.exc_info() print(m.__repr__(), file=sys.stderr) post_mortem(tb) finally: pass _usage = """\ usage: python -m ipdb [-c command] ... pyfile [arg] ... Debug the Python program given by pyfile. Initial commands are read from .pdbrc files in your home directory and in the current directory, if they exist. Commands supplied with -c are executed after commands from .pdbrc files. To let the script run until an exception occurs, use "-c continue". To let the script run up to a given line X in the debugged file, use "-c 'until X'" ipdb version %s.""" % __version__ def main(): import traceback import sys import getopt try: from pdb import Restart except ImportError: class Restart(Exception): pass opts, args = getopt.getopt(sys.argv[1:], 'hc:', ['help', 'command=']) commands = [] for opt, optarg in opts: if opt in ['-h', '--help']: print(_usage) sys.exit() elif opt in ['-c', '--command']: commands.append(optarg) if not args: print(_usage) sys.exit(2) mainpyfile = args[0] # Get script filename if not os.path.exists(mainpyfile): print('Error:', mainpyfile, 'does not exist') sys.exit(1) sys.argv = args # Hide "pdb.py" from argument list # Replace pdb's dir with script's dir in front of module search path. sys.path[0] = os.path.dirname(mainpyfile) # Note on saving/restoring sys.argv: it's a good idea when sys.argv was # modified by the script being debugged. It's a bad idea when it was # changed by the user from the command line. There is a "restart" command # which allows explicit specification of command line arguments. pdb = _init_pdb(commands=commands) while 1: try: pdb._runscript(mainpyfile) if pdb._user_requested_quit: break print("The program finished and will be restarted") except Restart: print("Restarting", mainpyfile, "with arguments:") print("\t" + " ".join(sys.argv[1:])) except SystemExit: # In most cases SystemExit does not warrant a post-mortem session. print("The program exited via sys.exit(). Exit status: ", end='') print(sys.exc_info()[1]) except: traceback.print_exc() print("Uncaught exception. Entering post mortem debugging") print("Running 'cont' or 'step' will restart the program") t = sys.exc_info()[2] pdb.interaction(None, t) print("Post mortem debugger finished. The " + mainpyfile + " will be restarted") if __name__ == '__main__': main() ipdb-0.12.2/ipdb/stdout.py0000644000076500000240000000144513520066043015717 0ustar gotchastaff00000000000000from __future__ import print_function import sys from contextlib import contextmanager from IPython.utils import io from .__main__ import set_trace from .__main__ import post_mortem def update_stdout(): # setup stdout to ensure output is available with nose io.stdout = sys.stdout = sys.__stdout__ def sset_trace(frame=None, context=3): update_stdout() if frame is None: frame = sys._getframe().f_back set_trace(frame, context) def spost_mortem(tb=None): update_stdout() post_mortem(tb) def spm(): spost_mortem(sys.last_traceback) @contextmanager def slaunch_ipdb_on_exception(): try: yield except Exception: e, m, tb = sys.exc_info() print(m.__repr__(), file=sys.stderr) spost_mortem(tb) finally: pass ipdb-0.12.2/ipdb.egg-info/0000755000076500000240000000000013520066043015511 5ustar gotchastaff00000000000000ipdb-0.12.2/ipdb.egg-info/dependency_links.txt0000644000076500000240000000000113520066043021557 0ustar gotchastaff00000000000000 ipdb-0.12.2/ipdb.egg-info/entry_points.txt0000644000076500000240000000005613520066043021010 0ustar gotchastaff00000000000000[console_scripts] ipdb3 = ipdb.__main__:main ipdb-0.12.2/ipdb.egg-info/PKG-INFO0000644000076500000240000002733213520066043016615 0ustar gotchastaff00000000000000Metadata-Version: 1.2 Name: ipdb Version: 0.12.2 Summary: IPython-enabled pdb Home-page: https://github.com/gotcha/ipdb Author: Godefroid Chapelle Author-email: gotcha@bubblenet.be License: BSD Description: IPython `pdb` ============= .. image:: https://travis-ci.org/gotcha/ipdb.png?branch=master :target: https://travis-ci.org/gotcha/ipdb .. image:: https://codecov.io/gh/gotcha/ipdb/branch/master/graphs/badge.svg?style=flat :target: https://codecov.io/gh/gotcha/ipdb?branch=master Use --- ipdb exports functions to access the IPython_ debugger, which features tab completion, syntax highlighting, better tracebacks, better introspection with the same interface as the `pdb` module. Example usage: .. code-block:: python import ipdb ipdb.set_trace() ipdb.set_trace(context=5) # will show five lines of code # instead of the default three lines ipdb.pm() ipdb.run('x[0] = 3') result = ipdb.runcall(function, arg0, arg1, kwarg='foo') result = ipdb.runeval('f(1,2) - 3') The post-mortem function, ``ipdb.pm()``, is equivalent to the magic function ``%debug``. .. _IPython: http://ipython.org If you install ``ipdb`` with a tool which supports ``setuptools`` entry points, an ``ipdb`` script is made for you. You can use it to debug your python 2 scripts like :: $ bin/ipdb mymodule.py And for python 3 :: $ bin/ipdb3 mymodule.py Alternatively with Python 2.7 only, you can also use :: $ python -m ipdb mymodule.py You can also enclose code with the ``with`` statement to launch ipdb if an exception is raised: .. code-block:: python from ipdb import launch_ipdb_on_exception with launch_ipdb_on_exception(): [...] .. warning:: Context managers were introduced in Python 2.5. Adding a context manager implies dropping Python 2.4 support. Use ``ipdb==0.6`` with 2.4. .. warning:: Using ``from future import print_function`` for Python 3 compat implies dropping Python 2.5 support. Use ``ipdb<=0.8`` with 2.5. Issues with ``stdout`` ---------------------- Some tools, like ``nose`` fiddle with ``stdout``. Until ``ipdb==0.9.4``, we tried to guess when we should also fiddle with ``stdout`` to support those tools. However, all strategies tried until 0.9.4 have proven brittle. If you use ``nose`` or another tool that fiddles with ``stdout``, you should explicitely ask for ``stdout`` fiddling by using ``ipdb`` like this .. code-block:: python import ipdb ipdb.sset_trace() ipdb.spm() from ipdb import slaunch_ipdb_on_exception with slaunch_ipdb_on_exception(): [...] Development ----------- ``ipdb`` source code and tracker are at https://github.com/gotcha/ipdb. Pull requests should take care of updating the changelog ``HISTORY.txt``. Third-party support ------------------- Products.PDBDebugMode +++++++++++++++++++++ Zope2 Products.PDBDebugMode_ uses ``ipdb``, if available, in place of ``pdb``. .. _Products.PDBDebugMode: http://pypi.python.org/pypi/Products.PDBDebugMode iw.debug ++++++++ iw.debug_ allows you to trigger an ``ipdb`` debugger on any published object of a Zope2 application. .. _iw.debug: http://pypi.python.org/pypi/iw.debug ipdbplugin ++++++++++ ipdbplugin_ is a nose_ test runner plugin that also uses the IPython debugger instead of ``pdb``. (It does not depend on ``ipdb`` anymore). .. _ipdbplugin: http://pypi.python.org/pypi/ipdbplugin .. _nose: http://readthedocs.org/docs/nose Changelog ========= 0.12.2 (2019-07-30) ------------------- - Avoid emitting term-title bytes [steinnes] 0.12.1 (2019-07-26) ------------------- - Fix --help [native-api] 0.12 (2019-03-20) ----------------- - Drop support for Python 3.3.x [bmw] - Stop deprecation warnings from being raised when IPython >= 5.1 is used. Support for IPython < 5.1 has been dropped. [bmw] 0.11 (2018-02-15) ----------------- - Simplify loading IPython and getting information from it. Drop support for python 2.6 Drop support for IPython < 5.0.0 [takluyver] 0.10.3 (2017-04-22) ------------------- - For users using python 2.6, do not install IPython >= 2.0.0. And for users using python 2.7, do not install IPython >= 6.0.0. [vphilippon] - Drop support for python 3.2. [vphilippon] - Command line usage consistent with pdb - Add argument commands [zvodd] 0.10.2 (2017-01-25) ------------------- - Ask IPython which debugger class to use. Closes https://github.com/gotcha/ipdb/issues/105 [gnebehay, JBKahn] - ipdb.set_trace() does not ignore context arg anymore. Closes https://github.com/gotcha/ipdb/issues/93. [gnebehay, Garrett-R] 0.10.1 (2016-06-14) ------------------- - Support IPython 5.0. [ngoldbaum] 0.10.0 (2016-04-29) ------------------- - Stop trying to magically guess when stdout needs to be captured. Like needed by `nose`. Rather, provide a set of function that can be called explicitely when needed. [gotcha] - drop support of IPython before 0.10.2 0.9.4 (2016-04-29) ------------------ - Fix Restart error when using `python -m ipdb` Closes https://github.com/gotcha/ipdb/issues/93. [gotcha] 0.9.3 (2016-04-15) ------------------ - Don't require users to pass a traceback to post_mortem. [Wilfred] 0.9.2 (2016-04-15) ------------------ - Closes https://github.com/gotcha/ipdb/issues/93. [gotcha] 0.9.1 (2016-04-12) ------------------ - Reset ``sys.modules['__main__']`` to original value. Closes https://github.com/gotcha/ipdb/issues/85 [gotcha] - Fix support of IPython versions 0.x [asivokon] 0.9.0 (2016-02-22) ------------------ - Switch to revised BSD license (with approval of all contributors). Closes https://github.com/gotcha/ipdb/issues/68 [lebedov, gotcha] 0.8.3 (2016-02-17) ------------------ - Don't pass sys.argv to IPython for configuration. [emulbreh] 0.8.2 (2016-02-15) ------------------ - Fix lexical comparison for version numbers. [sas23] - Allow configuring how many lines of code context are displayed by `set_trace` [JamshedVesuna] - If an instance of IPython is already running its configuration will be loaded. [IxDay] 0.8.1 (2015-06-03) ------------------ - Make Nose support less invasive. Closes https://github.com/gotcha/ipdb/issues/52 Closes https://github.com/gotcha/ipdb/issues/31 [blink1073, gotcha] - Fix for post_mortem in context manager. Closes https://github.com/gotcha/ipdb/issues/20 [omergertel] 0.8 (2013-09-19) ---------------- - More Python 3 compatibility; implies dropping Python 2.5 support. Closes https://github.com/gotcha/ipdb/issues/37 [gotcha] 0.7.1 (2013-09-19) ------------------ - IPython 1.0 compatibility. Closes https://github.com/gotcha/ipdb/issues/44 [pgularski] - Index into version_info in setup.py for Python 2.6 compatibility. [kynan] - Add Travis CI configuration. [kynan] 0.7 (2012-07-06) ---------------- - Add ``launch_ipdb_on_exception`` context manager. Implies dropping Python 2.4 support. [Psycojoker] - Wrap sys.excepthook only once. [marciomazza] - Add GPL file and refer in headers. [stan3] - Python 3 support. [Piet Delport] - Basic tests. [msabramo] - Added the functions ``runcall``, ``runeval`` and ``run``. [dimasad] 0.6.1 (2011-10-17) ------------------ - State dependency on IPython later or equal to 0.10. [gotcha] 0.6 (2011-09-01) ---------------- - Add setuptools ``console_scripts`` entry point. [akrito, gotcha] - Nose support. Closes https://github.com/gotcha/ipdb/issues/8 [akaihola, gotcha] 0.5 (2011-08-05) ---------------- - IPython 0.11 support. [lebedov] 0.4 (2011-06-13) ---------------- - When used from IPython, use its colors. Closes https://github.com/gotcha/ipdb/issues/1 [gotcha] - Fixed errors when exiting with "q". [gotcha] - Allow use of ``python -m ipdb mymodule.py``. Python 2.7 only. Closes https://github.com/gotcha/ipdb/issues/3 [gotcha] - Fixed post_mortem when the traceback is None. [maurits] 0.3 (2011-01-16) ---------------- - Add ``post_mortem()`` for ``Products.PDBDebugMode`` support. [Jean Jordaan] - Moved to github.com. 0.2 (2010-10-20) ---------------- - Added ``pm()``. [Paulo Benedict Ang] 0.1 (2010-04-26) ---------------- - First "non dev" release. Keywords: pdb ipython Platform: UNKNOWN Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Operating System :: MacOS :: MacOS X Classifier: Operating System :: POSIX :: Linux Classifier: Operating System :: Microsoft :: Windows Classifier: Topic :: Software Development :: Debuggers Classifier: License :: OSI Approved :: BSD License Requires-Python: >=2.7 ipdb-0.12.2/ipdb.egg-info/requires.txt0000644000076500000240000000015013520066043020105 0ustar gotchastaff00000000000000setuptools [:python_version == "2.7"] ipython<6.0.0,>=5.1.0 [:python_version >= "3.4"] ipython>=5.1.0 ipdb-0.12.2/ipdb.egg-info/SOURCES.txt0000644000076500000240000000056113520066043017377 0ustar gotchastaff00000000000000AUTHORS COPYING.txt HISTORY.txt MANIFEST.in README.rst manual_test.py setup.cfg setup.py ipdb/__init__.py ipdb/__main__.py ipdb/stdout.py ipdb.egg-info/PKG-INFO ipdb.egg-info/SOURCES.txt ipdb.egg-info/dependency_links.txt ipdb.egg-info/entry_points.txt ipdb.egg-info/requires.txt ipdb.egg-info/top_level.txt ipdb.egg-info/zip-safe tests/__init__.py tests/test_import.pyipdb-0.12.2/ipdb.egg-info/top_level.txt0000644000076500000240000000000513520066043020236 0ustar gotchastaff00000000000000ipdb ipdb-0.12.2/ipdb.egg-info/zip-safe0000644000076500000240000000000113520066043017141 0ustar gotchastaff00000000000000 ipdb-0.12.2/MANIFEST.in0000644000076500000240000000014513520066043014637 0ustar gotchastaff00000000000000include README.rst include manual_test.py include *.txt include AUTHORS recursive-include tests *.py ipdb-0.12.2/manual_test.py0000644000076500000240000000100113520066043015757 0ustar gotchastaff00000000000000# Copyright (c) 2011-2016 Godefroid Chapelle and ipdb development team # # This file is part of ipdb. # Redistributable under the revised BSD license # https://opensource.org/licenses/BSD-3-Clause def output(arg): print("MANUAL: arg=%s" % arg) def main(): for abc in range(10): import ipdb; ipdb.set_trace() output(abc) # code to test with nose import unittest class IpdbUsageTests(unittest.TestCase): def testMain(self): main() if __name__ == "__main__": main() ipdb-0.12.2/PKG-INFO0000644000076500000240000002733213520066043014205 0ustar gotchastaff00000000000000Metadata-Version: 1.2 Name: ipdb Version: 0.12.2 Summary: IPython-enabled pdb Home-page: https://github.com/gotcha/ipdb Author: Godefroid Chapelle Author-email: gotcha@bubblenet.be License: BSD Description: IPython `pdb` ============= .. image:: https://travis-ci.org/gotcha/ipdb.png?branch=master :target: https://travis-ci.org/gotcha/ipdb .. image:: https://codecov.io/gh/gotcha/ipdb/branch/master/graphs/badge.svg?style=flat :target: https://codecov.io/gh/gotcha/ipdb?branch=master Use --- ipdb exports functions to access the IPython_ debugger, which features tab completion, syntax highlighting, better tracebacks, better introspection with the same interface as the `pdb` module. Example usage: .. code-block:: python import ipdb ipdb.set_trace() ipdb.set_trace(context=5) # will show five lines of code # instead of the default three lines ipdb.pm() ipdb.run('x[0] = 3') result = ipdb.runcall(function, arg0, arg1, kwarg='foo') result = ipdb.runeval('f(1,2) - 3') The post-mortem function, ``ipdb.pm()``, is equivalent to the magic function ``%debug``. .. _IPython: http://ipython.org If you install ``ipdb`` with a tool which supports ``setuptools`` entry points, an ``ipdb`` script is made for you. You can use it to debug your python 2 scripts like :: $ bin/ipdb mymodule.py And for python 3 :: $ bin/ipdb3 mymodule.py Alternatively with Python 2.7 only, you can also use :: $ python -m ipdb mymodule.py You can also enclose code with the ``with`` statement to launch ipdb if an exception is raised: .. code-block:: python from ipdb import launch_ipdb_on_exception with launch_ipdb_on_exception(): [...] .. warning:: Context managers were introduced in Python 2.5. Adding a context manager implies dropping Python 2.4 support. Use ``ipdb==0.6`` with 2.4. .. warning:: Using ``from future import print_function`` for Python 3 compat implies dropping Python 2.5 support. Use ``ipdb<=0.8`` with 2.5. Issues with ``stdout`` ---------------------- Some tools, like ``nose`` fiddle with ``stdout``. Until ``ipdb==0.9.4``, we tried to guess when we should also fiddle with ``stdout`` to support those tools. However, all strategies tried until 0.9.4 have proven brittle. If you use ``nose`` or another tool that fiddles with ``stdout``, you should explicitely ask for ``stdout`` fiddling by using ``ipdb`` like this .. code-block:: python import ipdb ipdb.sset_trace() ipdb.spm() from ipdb import slaunch_ipdb_on_exception with slaunch_ipdb_on_exception(): [...] Development ----------- ``ipdb`` source code and tracker are at https://github.com/gotcha/ipdb. Pull requests should take care of updating the changelog ``HISTORY.txt``. Third-party support ------------------- Products.PDBDebugMode +++++++++++++++++++++ Zope2 Products.PDBDebugMode_ uses ``ipdb``, if available, in place of ``pdb``. .. _Products.PDBDebugMode: http://pypi.python.org/pypi/Products.PDBDebugMode iw.debug ++++++++ iw.debug_ allows you to trigger an ``ipdb`` debugger on any published object of a Zope2 application. .. _iw.debug: http://pypi.python.org/pypi/iw.debug ipdbplugin ++++++++++ ipdbplugin_ is a nose_ test runner plugin that also uses the IPython debugger instead of ``pdb``. (It does not depend on ``ipdb`` anymore). .. _ipdbplugin: http://pypi.python.org/pypi/ipdbplugin .. _nose: http://readthedocs.org/docs/nose Changelog ========= 0.12.2 (2019-07-30) ------------------- - Avoid emitting term-title bytes [steinnes] 0.12.1 (2019-07-26) ------------------- - Fix --help [native-api] 0.12 (2019-03-20) ----------------- - Drop support for Python 3.3.x [bmw] - Stop deprecation warnings from being raised when IPython >= 5.1 is used. Support for IPython < 5.1 has been dropped. [bmw] 0.11 (2018-02-15) ----------------- - Simplify loading IPython and getting information from it. Drop support for python 2.6 Drop support for IPython < 5.0.0 [takluyver] 0.10.3 (2017-04-22) ------------------- - For users using python 2.6, do not install IPython >= 2.0.0. And for users using python 2.7, do not install IPython >= 6.0.0. [vphilippon] - Drop support for python 3.2. [vphilippon] - Command line usage consistent with pdb - Add argument commands [zvodd] 0.10.2 (2017-01-25) ------------------- - Ask IPython which debugger class to use. Closes https://github.com/gotcha/ipdb/issues/105 [gnebehay, JBKahn] - ipdb.set_trace() does not ignore context arg anymore. Closes https://github.com/gotcha/ipdb/issues/93. [gnebehay, Garrett-R] 0.10.1 (2016-06-14) ------------------- - Support IPython 5.0. [ngoldbaum] 0.10.0 (2016-04-29) ------------------- - Stop trying to magically guess when stdout needs to be captured. Like needed by `nose`. Rather, provide a set of function that can be called explicitely when needed. [gotcha] - drop support of IPython before 0.10.2 0.9.4 (2016-04-29) ------------------ - Fix Restart error when using `python -m ipdb` Closes https://github.com/gotcha/ipdb/issues/93. [gotcha] 0.9.3 (2016-04-15) ------------------ - Don't require users to pass a traceback to post_mortem. [Wilfred] 0.9.2 (2016-04-15) ------------------ - Closes https://github.com/gotcha/ipdb/issues/93. [gotcha] 0.9.1 (2016-04-12) ------------------ - Reset ``sys.modules['__main__']`` to original value. Closes https://github.com/gotcha/ipdb/issues/85 [gotcha] - Fix support of IPython versions 0.x [asivokon] 0.9.0 (2016-02-22) ------------------ - Switch to revised BSD license (with approval of all contributors). Closes https://github.com/gotcha/ipdb/issues/68 [lebedov, gotcha] 0.8.3 (2016-02-17) ------------------ - Don't pass sys.argv to IPython for configuration. [emulbreh] 0.8.2 (2016-02-15) ------------------ - Fix lexical comparison for version numbers. [sas23] - Allow configuring how many lines of code context are displayed by `set_trace` [JamshedVesuna] - If an instance of IPython is already running its configuration will be loaded. [IxDay] 0.8.1 (2015-06-03) ------------------ - Make Nose support less invasive. Closes https://github.com/gotcha/ipdb/issues/52 Closes https://github.com/gotcha/ipdb/issues/31 [blink1073, gotcha] - Fix for post_mortem in context manager. Closes https://github.com/gotcha/ipdb/issues/20 [omergertel] 0.8 (2013-09-19) ---------------- - More Python 3 compatibility; implies dropping Python 2.5 support. Closes https://github.com/gotcha/ipdb/issues/37 [gotcha] 0.7.1 (2013-09-19) ------------------ - IPython 1.0 compatibility. Closes https://github.com/gotcha/ipdb/issues/44 [pgularski] - Index into version_info in setup.py for Python 2.6 compatibility. [kynan] - Add Travis CI configuration. [kynan] 0.7 (2012-07-06) ---------------- - Add ``launch_ipdb_on_exception`` context manager. Implies dropping Python 2.4 support. [Psycojoker] - Wrap sys.excepthook only once. [marciomazza] - Add GPL file and refer in headers. [stan3] - Python 3 support. [Piet Delport] - Basic tests. [msabramo] - Added the functions ``runcall``, ``runeval`` and ``run``. [dimasad] 0.6.1 (2011-10-17) ------------------ - State dependency on IPython later or equal to 0.10. [gotcha] 0.6 (2011-09-01) ---------------- - Add setuptools ``console_scripts`` entry point. [akrito, gotcha] - Nose support. Closes https://github.com/gotcha/ipdb/issues/8 [akaihola, gotcha] 0.5 (2011-08-05) ---------------- - IPython 0.11 support. [lebedov] 0.4 (2011-06-13) ---------------- - When used from IPython, use its colors. Closes https://github.com/gotcha/ipdb/issues/1 [gotcha] - Fixed errors when exiting with "q". [gotcha] - Allow use of ``python -m ipdb mymodule.py``. Python 2.7 only. Closes https://github.com/gotcha/ipdb/issues/3 [gotcha] - Fixed post_mortem when the traceback is None. [maurits] 0.3 (2011-01-16) ---------------- - Add ``post_mortem()`` for ``Products.PDBDebugMode`` support. [Jean Jordaan] - Moved to github.com. 0.2 (2010-10-20) ---------------- - Added ``pm()``. [Paulo Benedict Ang] 0.1 (2010-04-26) ---------------- - First "non dev" release. Keywords: pdb ipython Platform: UNKNOWN Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Operating System :: MacOS :: MacOS X Classifier: Operating System :: POSIX :: Linux Classifier: Operating System :: Microsoft :: Windows Classifier: Topic :: Software Development :: Debuggers Classifier: License :: OSI Approved :: BSD License Requires-Python: >=2.7 ipdb-0.12.2/README.rst0000644000076500000240000000643613520066043014601 0ustar gotchastaff00000000000000IPython `pdb` ============= .. image:: https://travis-ci.org/gotcha/ipdb.png?branch=master :target: https://travis-ci.org/gotcha/ipdb .. image:: https://codecov.io/gh/gotcha/ipdb/branch/master/graphs/badge.svg?style=flat :target: https://codecov.io/gh/gotcha/ipdb?branch=master Use --- ipdb exports functions to access the IPython_ debugger, which features tab completion, syntax highlighting, better tracebacks, better introspection with the same interface as the `pdb` module. Example usage: .. code-block:: python import ipdb ipdb.set_trace() ipdb.set_trace(context=5) # will show five lines of code # instead of the default three lines ipdb.pm() ipdb.run('x[0] = 3') result = ipdb.runcall(function, arg0, arg1, kwarg='foo') result = ipdb.runeval('f(1,2) - 3') The post-mortem function, ``ipdb.pm()``, is equivalent to the magic function ``%debug``. .. _IPython: http://ipython.org If you install ``ipdb`` with a tool which supports ``setuptools`` entry points, an ``ipdb`` script is made for you. You can use it to debug your python 2 scripts like :: $ bin/ipdb mymodule.py And for python 3 :: $ bin/ipdb3 mymodule.py Alternatively with Python 2.7 only, you can also use :: $ python -m ipdb mymodule.py You can also enclose code with the ``with`` statement to launch ipdb if an exception is raised: .. code-block:: python from ipdb import launch_ipdb_on_exception with launch_ipdb_on_exception(): [...] .. warning:: Context managers were introduced in Python 2.5. Adding a context manager implies dropping Python 2.4 support. Use ``ipdb==0.6`` with 2.4. .. warning:: Using ``from future import print_function`` for Python 3 compat implies dropping Python 2.5 support. Use ``ipdb<=0.8`` with 2.5. Issues with ``stdout`` ---------------------- Some tools, like ``nose`` fiddle with ``stdout``. Until ``ipdb==0.9.4``, we tried to guess when we should also fiddle with ``stdout`` to support those tools. However, all strategies tried until 0.9.4 have proven brittle. If you use ``nose`` or another tool that fiddles with ``stdout``, you should explicitely ask for ``stdout`` fiddling by using ``ipdb`` like this .. code-block:: python import ipdb ipdb.sset_trace() ipdb.spm() from ipdb import slaunch_ipdb_on_exception with slaunch_ipdb_on_exception(): [...] Development ----------- ``ipdb`` source code and tracker are at https://github.com/gotcha/ipdb. Pull requests should take care of updating the changelog ``HISTORY.txt``. Third-party support ------------------- Products.PDBDebugMode +++++++++++++++++++++ Zope2 Products.PDBDebugMode_ uses ``ipdb``, if available, in place of ``pdb``. .. _Products.PDBDebugMode: http://pypi.python.org/pypi/Products.PDBDebugMode iw.debug ++++++++ iw.debug_ allows you to trigger an ``ipdb`` debugger on any published object of a Zope2 application. .. _iw.debug: http://pypi.python.org/pypi/iw.debug ipdbplugin ++++++++++ ipdbplugin_ is a nose_ test runner plugin that also uses the IPython debugger instead of ``pdb``. (It does not depend on ``ipdb`` anymore). .. _ipdbplugin: http://pypi.python.org/pypi/ipdbplugin .. _nose: http://readthedocs.org/docs/nose ipdb-0.12.2/setup.cfg0000644000076500000240000000013013520066043014714 0ustar gotchastaff00000000000000[check-manifest] ignore = tox.ini .travis.yml [egg_info] tag_build = tag_date = 0 ipdb-0.12.2/setup.py0000644000076500000240000000346213520066043014620 0ustar gotchastaff00000000000000# Copyright (c) 2007-2016 Godefroid Chapelle and ipdb development team # # This file is part of ipdb. # Redistributable under the revised BSD license # https://opensource.org/licenses/BSD-3-Clause from setuptools import setup, find_packages from sys import version_info version = '0.12.2' long_description = (open('README.rst').read() + '\n\n' + open('HISTORY.txt').read()) if version_info[0] == 2: console_script = 'ipdb' else: console_script = 'ipdb%d' % version_info.major setup(name='ipdb', version=version, description="IPython-enabled pdb", long_description=long_description, classifiers=[ 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft :: Windows', 'Topic :: Software Development :: Debuggers', 'License :: OSI Approved :: BSD License', ], keywords='pdb ipython', author='Godefroid Chapelle', author_email='gotcha@bubblenet.be', url='https://github.com/gotcha/ipdb', license='BSD', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=True, test_suite='tests', python_requires=">=2.7", install_requires=[ 'setuptools' ], extras_require={ ':python_version == "2.7"': ['ipython >= 5.1.0, < 6.0.0'], # No support for python 3.0, 3.1, 3.2. ':python_version >= "3.4"': ['ipython >= 5.1.0'], }, entry_points={ 'console_scripts': ['%s = ipdb.__main__:main' % console_script] }, use_2to3=True, ) ipdb-0.12.2/tests/0000755000076500000240000000000013520066043014243 5ustar gotchastaff00000000000000ipdb-0.12.2/tests/__init__.py0000644000076500000240000000000013520066043016342 0ustar gotchastaff00000000000000ipdb-0.12.2/tests/test_import.py0000644000076500000240000000106013520066043017163 0ustar gotchastaff00000000000000# Copyright (c) 2012-2016 Marc Abramowitz and ipdb development team # # This file is part of ipdb. # Redistributable under the revised BSD license # https://opensource.org/licenses/BSD-3-Clause import unittest class ImportTest(unittest.TestCase): def test_import(self): from ipdb import set_trace, post_mortem, pm, run, runcall, runeval set_trace # please pyflakes post_mortem # please pyflakes pm # please pyflakes run # please pyflakes runcall # please pyflakes runeval # please pyflakes