METADATA 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. Metadata-Version: 2.1
  2. Name: ipdb
  3. Version: 0.13.13
  4. Summary: IPython-enabled pdb
  5. Home-page: https://github.com/gotcha/ipdb
  6. Author: Godefroid Chapelle
  7. Author-email: gotcha@bubblenet.be
  8. License: BSD
  9. Keywords: pdb ipython
  10. Classifier: Programming Language :: Python :: 2.7
  11. Classifier: Programming Language :: Python :: 3
  12. Classifier: Programming Language :: Python :: 3.4
  13. Classifier: Programming Language :: Python :: 3.5
  14. Classifier: Programming Language :: Python :: 3.6
  15. Classifier: Programming Language :: Python :: 3.7
  16. Classifier: Programming Language :: Python :: 3.8
  17. Classifier: Programming Language :: Python :: 3.9
  18. Classifier: Programming Language :: Python :: 3.10
  19. Classifier: Programming Language :: Python :: 3.11
  20. Classifier: Operating System :: MacOS :: MacOS X
  21. Classifier: Operating System :: POSIX :: Linux
  22. Classifier: Operating System :: Microsoft :: Windows
  23. Classifier: Topic :: Software Development :: Debuggers
  24. Classifier: License :: OSI Approved :: BSD License
  25. Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
  26. License-File: COPYING.txt
  27. License-File: AUTHORS
  28. Requires-Dist: ipython (<6.0.0,>=5.1.0) ; python_version == "2.7"
  29. Requires-Dist: toml (>=0.10.2) ; python_version == "2.7"
  30. Requires-Dist: decorator (<5.0.0) ; python_version == "2.7"
  31. Requires-Dist: pathlib ; python_version == "2.7"
  32. Requires-Dist: ipython (<7.0.0,>=6.0.0) ; python_version == "3.4"
  33. Requires-Dist: toml (>=0.10.2) ; python_version == "3.4"
  34. Requires-Dist: decorator (<5.0.0) ; python_version == "3.4"
  35. Requires-Dist: ipython (<7.10.0,>=7.0.0) ; python_version == "3.5"
  36. Requires-Dist: toml (>=0.10.2) ; python_version == "3.5"
  37. Requires-Dist: decorator ; python_version == "3.5"
  38. Requires-Dist: ipython (<7.17.0,>=7.16.3) ; python_version == "3.6"
  39. Requires-Dist: tomli ; python_version == "3.6"
  40. Requires-Dist: decorator ; python_version == "3.6"
  41. Requires-Dist: ipython (>=7.31.1) ; python_version > "3.6" and python_version < "3.11"
  42. Requires-Dist: tomli ; python_version > "3.6" and python_version < "3.11"
  43. Requires-Dist: decorator ; python_version > "3.6" and python_version < "3.11"
  44. Requires-Dist: ipython (>=7.31.1) ; python_version >= "3.11"
  45. Requires-Dist: decorator ; python_version >= "3.11"
  46. IPython `pdb`
  47. =============
  48. .. image:: https://travis-ci.org/gotcha/ipdb.png?branch=master
  49. :target: https://travis-ci.org/gotcha/ipdb
  50. .. image:: https://codecov.io/gh/gotcha/ipdb/branch/master/graphs/badge.svg?style=flat
  51. :target: https://codecov.io/gh/gotcha/ipdb?branch=master
  52. Use
  53. ---
  54. ipdb exports functions to access the IPython_ debugger, which features
  55. tab completion, syntax highlighting, better tracebacks, better introspection
  56. with the same interface as the `pdb` module.
  57. Example usage:
  58. .. code-block:: python
  59. import ipdb
  60. ipdb.set_trace()
  61. ipdb.set_trace(context=5) # will show five lines of code
  62. # instead of the default three lines
  63. # or you can set it via IPDB_CONTEXT_SIZE env variable
  64. # or setup.cfg file
  65. ipdb.pm()
  66. ipdb.run('x[0] = 3')
  67. result = ipdb.runcall(function, arg0, arg1, kwarg='foo')
  68. result = ipdb.runeval('f(1,2) - 3')
  69. Arguments for `set_trace`
  70. +++++++++++++++++++++++++
  71. The `set_trace` function accepts `context` which will show as many lines of code as defined,
  72. and `cond`, which accepts boolean values (such as `abc == 17`) and will start ipdb's
  73. interface whenever `cond` equals to `True`.
  74. Using configuration file
  75. ++++++++++++++++++++++++
  76. It's possible to set up context using a `.ipdb` file on your home folder, `setup.cfg`
  77. or `pyproject.toml` on your project folder. You can also set your file location via
  78. env var `$IPDB_CONFIG`. Your environment variable has priority over the home
  79. configuration file, which in turn has priority over the setup config file.
  80. Currently, only context setting is available.
  81. A valid setup.cfg is as follows
  82. ::
  83. [ipdb]
  84. context=5
  85. A valid .ipdb is as follows
  86. ::
  87. context=5
  88. A valid pyproject.toml is as follows
  89. ::
  90. [tool.ipdb]
  91. context=5
  92. The post-mortem function, ``ipdb.pm()``, is equivalent to the magic function
  93. ``%debug``.
  94. .. _IPython: http://ipython.org
  95. If you install ``ipdb`` with a tool which supports ``setuptools`` entry points,
  96. an ``ipdb`` script is made for you. You can use it to debug your python 2 scripts like
  97. ::
  98. $ bin/ipdb mymodule.py
  99. And for python 3
  100. ::
  101. $ bin/ipdb3 mymodule.py
  102. Alternatively with Python 2.7 only, you can also use
  103. ::
  104. $ python -m ipdb mymodule.py
  105. You can also enclose code with the ``with`` statement to launch ipdb if an exception is raised:
  106. .. code-block:: python
  107. from ipdb import launch_ipdb_on_exception
  108. with launch_ipdb_on_exception():
  109. [...]
  110. .. warning::
  111. Context managers were introduced in Python 2.5.
  112. Adding a context manager implies dropping Python 2.4 support.
  113. Use ``ipdb==0.6`` with 2.4.
  114. Or you can use ``iex`` as a function decorator to launch ipdb if an exception is raised:
  115. .. code-block:: python
  116. from ipdb import iex
  117. @iex
  118. def main():
  119. [...]
  120. .. warning::
  121. Using ``from future import print_function`` for Python 3 compat implies dropping Python 2.5 support.
  122. Use ``ipdb<=0.8`` with 2.5.
  123. Issues with ``stdout``
  124. ----------------------
  125. Some tools, like ``nose`` fiddle with ``stdout``.
  126. Until ``ipdb==0.9.4``, we tried to guess when we should also
  127. fiddle with ``stdout`` to support those tools.
  128. However, all strategies tried until 0.9.4 have proven brittle.
  129. If you use ``nose`` or another tool that fiddles with ``stdout``, you should
  130. explicitly ask for ``stdout`` fiddling by using ``ipdb`` like this
  131. .. code-block:: python
  132. import ipdb
  133. ipdb.sset_trace()
  134. ipdb.spm()
  135. from ipdb import slaunch_ipdb_on_exception
  136. with slaunch_ipdb_on_exception():
  137. [...]
  138. Development
  139. -----------
  140. ``ipdb`` source code and tracker are at https://github.com/gotcha/ipdb.
  141. Pull requests should take care of updating the changelog ``HISTORY.txt``.
  142. Under the unreleased section, add your changes and your username.
  143. Manual testing
  144. ++++++++++++++
  145. To test your changes, make use of ``manual_test.py``. Create a virtual environment,
  146. install IPython and run ``python manual_test.py`` and check if your changes are in effect.
  147. If possible, create automated tests for better behaviour control.
  148. Automated testing
  149. +++++++++++++++++
  150. To run automated tests locally, create a virtual environment, install `coverage`
  151. and run `coverage run setup.py test`.
  152. Third-party support
  153. -------------------
  154. Products.PDBDebugMode
  155. +++++++++++++++++++++
  156. Zope2 Products.PDBDebugMode_ uses ``ipdb``, if available, in place of ``pdb``.
  157. .. _Products.PDBDebugMode: http://pypi.python.org/pypi/Products.PDBDebugMode
  158. iw.debug
  159. ++++++++
  160. iw.debug_ allows you to trigger an ``ipdb`` debugger on any published object
  161. of a Zope2 application.
  162. .. _iw.debug: http://pypi.python.org/pypi/iw.debug
  163. ipdbplugin
  164. ++++++++++
  165. ipdbplugin_ is a nose_ test runner plugin that also uses the IPython debugger
  166. instead of ``pdb``. (It does not depend on ``ipdb`` anymore).
  167. .. _ipdbplugin: http://pypi.python.org/pypi/ipdbplugin
  168. .. _nose: http://readthedocs.org/docs/nose
  169. Changelog
  170. =========
  171. 0.13.13 (2023-03-09)
  172. --------------------
  173. - Use context manager for opening toml config
  174. [andrewzwicky]
  175. 0.13.12 (2023-03-09)
  176. --------------------
  177. - Modify tests to test 3.11 separately from earlier python versions.
  178. [andrewzwicky]
  179. 0.13.11 (2022-12-13)
  180. --------------------
  181. - Better exception handling when looking for config.
  182. [bignose-debian]
  183. 0.13.10 (2022-12-13)
  184. --------------------
  185. - Better toml support (use tomlib for 3.11, tomli for 3.6 to 3.10).
  186. [salty-horse, mgorny]
  187. - Minimal PEP 517 support.
  188. [cpcloud]
  189. - 3.11 support for run as module and run as script.
  190. [nphilipp, gotcha]
  191. - Based on OSV:PYSEC-2022-12 change ipython dependencies,
  192. for users using python 3.6, install 7.16.3 <= IPython < 7.17.0,
  193. for users using python>3.6, install IPython >= 7.31.1.
  194. [malkstar]
  195. 0.13.9 (2021-06-02)
  196. -------------------
  197. - Fix again when `pyproject.toml` does not contain `tool` section.
  198. [markab108]
  199. 0.13.8 (2021-05-26)
  200. -------------------
  201. - Fix when `pyproject.toml` does not contain `tool` section.
  202. [anjos]
  203. - Add the convenience function ``iex()``.
  204. [alanbernstein]
  205. 0.13.7 (2021-03-16)
  206. -------------------
  207. - Do not instantiate IPython on import
  208. [adamchainz]
  209. 0.13.6 (2021-03-08)
  210. -------------------
  211. - Fix broken parsing of pyproject.toml
  212. [alexandrebarbaruiva]
  213. 0.13.5 (2021-03-02)
  214. -------------------
  215. - Add support for pyproject.toml as configuration file
  216. [alexandrebarbaruiva]
  217. - For users using python 3.4, install 6.0.0 <= IPython < 7.0.0,
  218. for users using python 3.5, install 7.0.0 <= IPython < 7.10.0,
  219. for users using python 3.6, install 7.10.0 <= IPython < 7.17.0,
  220. for users using python>3.6, install IPython >= 7.17.0.
  221. [d1618033]
  222. 0.13.4 (2020-10-01)
  223. -------------------
  224. - Add '-m' option
  225. [mrmino]
  226. 0.13.3 (2020-06-23)
  227. -------------------
  228. - Allow runcall, runeval to also use set context value
  229. [meowser]
  230. - Add condition argument to set_trace
  231. [alexandrebarbaruiva]
  232. 0.13.2 (2020-03-03)
  233. -------------------
  234. - Remove leftover debug code
  235. [gotcha]
  236. 0.13.1 (2020-02-28)
  237. -------------------
  238. - Fix when no configuration file
  239. [gotcha]
  240. 0.13.0 (2020-02-28)
  241. -------------------
  242. - Add option to set context via environment variable or configuration file
  243. [alexandrebarbaruiva]
  244. 0.12.3 (2019-12-03)
  245. -------------------
  246. - Fix version in usage
  247. [gotcha]
  248. 0.12.2 (2019-07-30)
  249. -------------------
  250. - Avoid emitting term-title bytes
  251. [steinnes]
  252. 0.12.1 (2019-07-26)
  253. -------------------
  254. - Fix --help
  255. [native-api]
  256. 0.12 (2019-03-20)
  257. -----------------
  258. - Drop support for Python 3.3.x
  259. [bmw]
  260. - Stop deprecation warnings from being raised when IPython >= 5.1 is used.
  261. Support for IPython < 5.1 has been dropped.
  262. [bmw]
  263. 0.11 (2018-02-15)
  264. -----------------
  265. - Simplify loading IPython and getting information from it.
  266. Drop support for python 2.6
  267. Drop support for IPython < 5.0.0
  268. [takluyver]
  269. 0.10.3 (2017-04-22)
  270. -------------------
  271. - For users using python 2.6, do not install IPython >= 2.0.0.
  272. And for users using python 2.7, do not install IPython >= 6.0.0.
  273. [vphilippon]
  274. - Drop support for python 3.2.
  275. [vphilippon]
  276. - Command line usage consistent with pdb - Add argument commands
  277. [zvodd]
  278. 0.10.2 (2017-01-25)
  279. -------------------
  280. - Ask IPython which debugger class to use.
  281. Closes https://github.com/gotcha/ipdb/issues/105
  282. [gnebehay, JBKahn]
  283. - ipdb.set_trace() does not ignore context arg anymore.
  284. Closes https://github.com/gotcha/ipdb/issues/93.
  285. [gnebehay, Garrett-R]
  286. 0.10.1 (2016-06-14)
  287. -------------------
  288. - Support IPython 5.0.
  289. [ngoldbaum]
  290. 0.10.0 (2016-04-29)
  291. -------------------
  292. - Stop trying to magically guess when stdout needs to be captured.
  293. Like needed by `nose`.
  294. Rather, provide a set of function that can be called explicitely when needed.
  295. [gotcha]
  296. - drop support of IPython before 0.10.2
  297. 0.9.4 (2016-04-29)
  298. ------------------
  299. - Fix Restart error when using `python -m ipdb`
  300. Closes https://github.com/gotcha/ipdb/issues/93.
  301. [gotcha]
  302. 0.9.3 (2016-04-15)
  303. ------------------
  304. - Don't require users to pass a traceback to post_mortem.
  305. [Wilfred]
  306. 0.9.2 (2016-04-15)
  307. ------------------
  308. - Closes https://github.com/gotcha/ipdb/issues/93.
  309. [gotcha]
  310. 0.9.1 (2016-04-12)
  311. ------------------
  312. - Reset ``sys.modules['__main__']`` to original value.
  313. Closes https://github.com/gotcha/ipdb/issues/85
  314. [gotcha]
  315. - Fix support of IPython versions 0.x
  316. [asivokon]
  317. 0.9.0 (2016-02-22)
  318. ------------------
  319. - Switch to revised BSD license (with approval of all contributors).
  320. Closes https://github.com/gotcha/ipdb/issues/68
  321. [lebedov, gotcha]
  322. 0.8.3 (2016-02-17)
  323. ------------------
  324. - Don't pass sys.argv to IPython for configuration.
  325. [emulbreh]
  326. 0.8.2 (2016-02-15)
  327. ------------------
  328. - Fix lexical comparison for version numbers.
  329. [sas23]
  330. - Allow configuring how many lines of code context are displayed
  331. by `set_trace`
  332. [JamshedVesuna]
  333. - If an instance of IPython is already running its configuration will be
  334. loaded.
  335. [IxDay]
  336. 0.8.1 (2015-06-03)
  337. ------------------
  338. - Make Nose support less invasive.
  339. Closes https://github.com/gotcha/ipdb/issues/52
  340. Closes https://github.com/gotcha/ipdb/issues/31
  341. [blink1073, gotcha]
  342. - Fix for post_mortem in context manager.
  343. Closes https://github.com/gotcha/ipdb/issues/20
  344. [omergertel]
  345. 0.8 (2013-09-19)
  346. ----------------
  347. - More Python 3 compatibility; implies dropping Python 2.5 support.
  348. Closes https://github.com/gotcha/ipdb/issues/37
  349. [gotcha]
  350. 0.7.1 (2013-09-19)
  351. ------------------
  352. - IPython 1.0 compatibility.
  353. Closes https://github.com/gotcha/ipdb/issues/44
  354. [pgularski]
  355. - Index into version_info in setup.py for Python 2.6 compatibility.
  356. [kynan]
  357. - Add Travis CI configuration.
  358. [kynan]
  359. 0.7 (2012-07-06)
  360. ----------------
  361. - Add ``launch_ipdb_on_exception`` context manager. Implies dropping Python 2.4 support.
  362. [Psycojoker]
  363. - Wrap sys.excepthook only once.
  364. [marciomazza]
  365. - Add GPL file and refer in headers.
  366. [stan3]
  367. - Python 3 support.
  368. [Piet Delport]
  369. - Basic tests.
  370. [msabramo]
  371. - Added the functions ``runcall``, ``runeval`` and ``run``.
  372. [dimasad]
  373. 0.6.1 (2011-10-17)
  374. ------------------
  375. - State dependency on IPython later or equal to 0.10.
  376. [gotcha]
  377. 0.6 (2011-09-01)
  378. ----------------
  379. - Add setuptools ``console_scripts`` entry point.
  380. [akrito, gotcha]
  381. - Nose support.
  382. Closes https://github.com/gotcha/ipdb/issues/8
  383. [akaihola, gotcha]
  384. 0.5 (2011-08-05)
  385. ----------------
  386. - IPython 0.11 support.
  387. [lebedov]
  388. 0.4 (2011-06-13)
  389. ----------------
  390. - When used from IPython, use its colors.
  391. Closes https://github.com/gotcha/ipdb/issues/1
  392. [gotcha]
  393. - Fixed errors when exiting with "q".
  394. [gotcha]
  395. - Allow use of ``python -m ipdb mymodule.py``.
  396. Python 2.7 only.
  397. Closes https://github.com/gotcha/ipdb/issues/3
  398. [gotcha]
  399. - Fixed post_mortem when the traceback is None.
  400. [maurits]
  401. 0.3 (2011-01-16)
  402. ----------------
  403. - Add ``post_mortem()`` for ``Products.PDBDebugMode`` support.
  404. [Jean Jordaan]
  405. - Moved to github.com.
  406. 0.2 (2010-10-20)
  407. ----------------
  408. - Added ``pm()``.
  409. [Paulo Benedict Ang]
  410. 0.1 (2010-04-26)
  411. ----------------
  412. - First "non dev" release.