summaryrefslogtreecommitdiffstats
path: root/Doc/library/traceback.rst
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-101100: Fix Sphinx nitpicks in `library/traceback.rst` (GH-113106) ↵Miss Islington (bot)2023-12-141-36/+74
| | | | | | | | (#113111) gh-101100: Fix Sphinx nitpicks in `library/traceback.rst` (GH-113106) (cherry picked from commit d9e1b5794a8fade21773d18f91a07f80b55c839c) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-101100: Improve docs on exception attributes (GH-113057) (#113061)Miss Islington (bot)2023-12-131-12/+18
| | | | | | | gh-101100: Improve docs on exception attributes (GH-113057) (cherry picked from commit d05a180350fe20d5fde56c7e525e394a0b282703) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-101100: Improve documentation of `TracebackType` attributes ↵Miss Islington (bot)2023-12-091-2/+4
| | | | | | | | (GH-112884) (#112911) gh-101100: Improve documentation of `TracebackType` attributes (GH-112884) (cherry picked from commit 96f64a2b1b4e3d4902848c63e42717a9c5539e03) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-109184: update traceback module doc w.r.t notes (message is no ↵Irit Katriel2023-09-131-19/+21
| | | | | | | longer always at the end) (#109201) (#109334) gh-109184: update traceback module doc w.r.t notes (message is no longer always at the end) (#109201) (cherry picked from commit 0e76cc359ba5d5e29d7c75355d7c1bc7e817eecf)
* [3.12] gh-89412: Add missing attributes (added in 3.10) to traceback module ↵Miss Islington (bot)2023-06-051-0/+14
| | | | | | | docs (GH-105046) (#105327) (cherry picked from commit a4f72fa39a9d391c7b931ba1906d81da4ae01949) Co-authored-by: Jakub Kuczys <me@jacken.men>
* [3.12] gh-102778: update documentation of PyErr_PrintEx and ↵Miss Islington (bot)2023-06-021-4/+3
| | | | | | | | traceback.print_last() regarding sys.last_exc (GH-105190) (#105246) gh-102778: update documentation of PyErr_PrintEx and traceback.print_last() regarding sys.last_exc (GH-105190) (cherry picked from commit 0dafc785ee6629dbcb9bec6f7aee43a56cd0b26e) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] GH-89455: Add missing attributes (added in 3.11) to traceback module ↵Miss Islington (bot)2023-05-291-1/+18
| | | | | | | | docs (GH-105044) (#105066) GH-89455: Add missing attributes (added in 3.11) to traceback module docs (GH-105044) (cherry picked from commit 39f6a0489fcc815a578d27dfee2feea003c896f8) Co-authored-by: Jakub Kuczys <me@jacken.men>
* GH-97950: Use new-style index directive ('object') (#104158)Adam Turner2023-05-041-1/+1
| | | | | | | | | | | * Uncomment object removal in pairindextypes * Use new-style index directive ('object') - C API * Use new-style index directive ('object') - Library * Use new-style index directive ('object') - Reference * Use new-style index directive ('object') - Tutorial
* gh-102011: use sys.exception() instead of sys.exc_info() in docs where ↵Irit Katriel2023-02-201-11/+10
| | | | possible (#102012)
* GH-56426: Add cross-reference to the documentation for faulthandler, ↵Furkan Onder2023-02-041-1/+8
| | | | | traceback, and pdb. (#101157) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* [doc] Update example in traceback doc (GH-96600)Irit Katriel2022-09-051-15/+11
| | | | | This Monty Python reference is of-its-time. It could seem inappropriate in the context of today's sensibilities around mental health. Automerge-Triggered-By: GH:iritkatriel
* gh-87822: Make traceback module robust to exceptions from repr() of local ↵Simon-Martin Schröder2022-07-111-0/+4
| | | | values (GH-94691)
* gh-93883: elide traceback indicators when possible (#93994)John Belmonte2022-07-111-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gh-93883: elide traceback indicators when possible Elide traceback column indicators when the entire line of the frame is implicated. This reduces traceback length and draws even more attention to the remaining (very relevant) indicators. Example: ``` Traceback (most recent call last): File "query.py", line 99, in <module> bar() File "query.py", line 66, in bar foo() File "query.py", line 37, in foo magic_arithmetic('foo') File "query.py", line 18, in magic_arithmetic return add_counts(x) / 25 ^^^^^^^^^^^^^ File "query.py", line 24, in add_counts return 25 + query_user(user1) + query_user(user2) ^^^^^^^^^^^^^^^^^ File "query.py", line 32, in query_user return 1 + query_count(db, response['a']['b']['c']['user'], retry=True) ~~~~~~~~~~~~~~~~~~^^^^^ TypeError: 'NoneType' object is not subscriptable ``` Rather than going out of our way to provide indicator coverage in every traceback test suite, the indicator test suite should be responible for sufficient coverage (e.g. by adding a basic exception group test to ensure that margin strings are covered).
* gh-89770: [PEP-678] add exception notes to tutorial (GH-30441)Irit Katriel2022-04-201-0/+8
|
* bpo-45075: distinguish between frame and FrameSummary in traceback mo… ↵Irit Katriel2021-09-031-5/+5
| | | | (GH-28112)
* bpo-31299: make it possible to filter out frames from tracebacks (GH-28067)Irit Katriel2021-08-311-1/+2
|
* bpo-44569: Decouple frame formatting in traceback.py (GH-27038)Ammar Askar2021-07-161-0/+8
|
* bpo-43950: Specialize tracebacks for subscripts/binary ops (GH-27037)Batuhan Taskaya2021-07-121-2/+2
| | | | Co-authored-by: Ammar Askar <ammar@ammaraskar.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* bpo-43950: Print columns in tracebacks (PEP 657) (GH-26958)Ammar Askar2021-07-041-6/+11
| | | | | | | | The traceback.c and traceback.py mechanisms now utilize the newly added code.co_positions and PyCode_Addr2Location to print carets on the specific expressions involved in a traceback. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Ammar Askar <ammar@ammaraskar.com> Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
* bpo-33809: add the TracebackException.print() method (GH-24231)Irit Katriel2021-05-221-0/+7
|
* bpo-42877: add the 'compact' param to TracebackException's __init__ (#24179)Irit Katriel2021-01-151-1/+9
| | | Use it to reduce the time and memory taken up by several of traceback's module-level functions.
* bpo-26389: Allow passing an exception object in the traceback module (GH-22610)Zackery Spytz2020-11-051-11/+32
| | | | | | The format_exception(), format_exception_only(), and print_exception() functions can now take an exception object as a positional-only argument. Co-Authored-By: Matthias Bussonnier <bussonniermatthias@gmail.com>
* bpo-35054: Add yet more index entries for symbols. (GH-10121)Serhiy Storchaka2018-10-281-1/+1
|
* bpo-35054: Add more index entries for symbols. (GH-10064)Serhiy Storchaka2018-10-261-0/+4
|
* bpo-27910: Update documentation of traceback module (GH-6116)torsava2018-08-021-17/+19
| | | | | | | | | | In the documentation for the traceback module, the definitions of functions extract_tb(), format_list() and classmethod StackSummary.from_list() mention the old style 4-tuples that these functions used to return or accept. Since Python 3.5, however, they return or accept a FrameSummary object instead of a 4-tuple, or a StackSummary object instead of a list of 4-tuples. Co-Authored-By: Berker Peksag <berker.peksag@gmail.com>
* bpo-29660: traceback: Document that etype is ignored in some places. (GH-344)Matthias Bussonnier2017-06-011-3/+11
|
* Issue #26823: fix traceback abbreviation docsNick Coghlan2016-08-161-3/+2
| | | | | | - be clear builtin traceback display was also updated - show example output in What's New - fix versionadded markup
* Issue #26823: Abbreviate recursive tracebacksNick Coghlan2016-08-151-0/+15
| | | | | | | | Large sections of repeated lines in tracebacks are now abbreviated as "[Previous line repeated {count} more times]" by both the traceback module and the builtin traceback rendering. Patch by Emanuel Barry.
* Issue #27208: Fix doctest in Doc/library/traceback.rstZachary Ware2016-08-101-4/+4
| | | | Patch by Jelle Zijlstra.
* Issue #22558: Add remaining doc links to source code for Python-coded modules.Terry Jan Reedy2016-06-111-0/+3
| | | | | Reformat header above separator line (added if missing) to a common format. Patch by Yoni Lavi.
* Issue26035 - Correct the argument names used in the docs of the traceback ↵Senthil Kumaran2016-01-161-34/+35
| | | | | | module. Make it consistent with module args. Patch contributed by Upendra Kumar.
* Issue #22619: Added negative limit support in the traceback module.Serhiy Storchaka2015-05-031-19/+33
| | | | Based on patch by Dmitry Kazakov.
* Issue #17911: Tweak traceback documentation.Berker Peksag2015-03-061-71/+95
| | | | | | | | Changes: * Fixed reSt markup * Fixed cross references * Fixed a couple of typos
* Issue #22936: Make it possible to show local variables in tracebacks.Robert Collins2015-03-051-10/+18
|
* Issue #17911: traceback module overhaulRobert Collins2015-03-041-0/+124
| | | | | | | | | Provide a way to seed the linecache for a PEP-302 module without actually loading the code. Provide a new object API for traceback, including the ability to not lookup lines at all until the traceback is actually rendered, without any trace of the original objects being kept alive.
* Issue 21125: minor documentation tweak.Raymond Hettinger2014-04-021-1/+1
|
* #1565525: Add traceback.clear_frames() helper function to clear locals ref'd ↵Andrew Kuchling2013-09-151-0/+7
| | | | by a traceback
* Issue #16261: fix bare excepts in Doc/Andrew Svetlov2012-11-021-1/+1
|
* Merged revisions 78895 via svnmerge fromEzio Melotti2010-03-131-9/+9
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78895 | ezio.melotti | 2010-03-13 03:21:34 +0200 (Sat, 13 Mar 2010) | 1 line #8011: use exc.tb_lineno instead of traceback.tb_lineno() and pep8ify variable names. ........
* Last round of adapting style of documenting argument default values.Georg Brandl2009-09-161-11/+11
|
* Merged revisions ↵Benjamin Peterson2009-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 70768,71657,71721,71729,71794,71976,72036-72037,72079,72085,72131-72134,72191,72197-72198,72219,72221,72225,72303,72434,72467,72476 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70768 | andrew.kuchling | 2009-03-30 17:29:15 -0500 (Mon, 30 Mar 2009) | 1 line Typo fixes ........ r71657 | vinay.sajip | 2009-04-16 14:07:37 -0500 (Thu, 16 Apr 2009) | 1 line Issue #5768: Change to Unicode output logic and test case for same. ........ r71721 | benjamin.peterson | 2009-04-18 14:26:19 -0500 (Sat, 18 Apr 2009) | 1 line fix a few nits in unittest.py #5771 ........ r71729 | benjamin.peterson | 2009-04-18 16:03:10 -0500 (Sat, 18 Apr 2009) | 1 line move test to a more appropiate one ........ r71794 | vinay.sajip | 2009-04-22 07:10:47 -0500 (Wed, 22 Apr 2009) | 2 lines Issue #5170: Fixed regression caused when fixing #5768. ........ r71976 | mark.dickinson | 2009-04-26 14:54:55 -0500 (Sun, 26 Apr 2009) | 2 lines Fix typo in function name ........ r72036 | georg.brandl | 2009-04-27 12:04:23 -0500 (Mon, 27 Apr 2009) | 1 line #5848: small unittest doc patch. ........ r72037 | georg.brandl | 2009-04-27 12:09:53 -0500 (Mon, 27 Apr 2009) | 1 line #5840: dont claim we dont support TLS. ........ r72079 | r.david.murray | 2009-04-28 14:02:55 -0500 (Tue, 28 Apr 2009) | 2 lines Remove spurious 'u'. ........ r72085 | georg.brandl | 2009-04-28 16:48:35 -0500 (Tue, 28 Apr 2009) | 1 line Make the doctests in the docs pass, except for those in the turtle module. ........ r72131 | benjamin.peterson | 2009-04-29 17:43:35 -0500 (Wed, 29 Apr 2009) | 1 line fix test_shutil on ZFS #5676 ........ r72132 | georg.brandl | 2009-04-29 17:44:07 -0500 (Wed, 29 Apr 2009) | 1 line #5878: fix repr of re object. ........ r72133 | benjamin.peterson | 2009-04-29 17:44:15 -0500 (Wed, 29 Apr 2009) | 1 line make sure mode is removable while cleaning up test droppings ........ r72134 | benjamin.peterson | 2009-04-29 19:06:33 -0500 (Wed, 29 Apr 2009) | 1 line make sure to close file ........ r72191 | michael.foord | 2009-05-02 06:43:06 -0500 (Sat, 02 May 2009) | 9 lines Adds an exit parameter to unittest.main(). If False main no longer calls sys.exit. Closes issue 3379. Michael Foord ........ r72197 | benjamin.peterson | 2009-05-02 11:24:37 -0500 (Sat, 02 May 2009) | 1 line don't let sys.argv be used in the tests ........ r72198 | andrew.kuchling | 2009-05-02 12:12:15 -0500 (Sat, 02 May 2009) | 1 line Add items ........ r72219 | michael.foord | 2009-05-02 15:15:05 -0500 (Sat, 02 May 2009) | 8 lines Add addCleanup and doCleanups to unittest.TestCase. Closes issue 5679. Michael Foord ........ r72221 | benjamin.peterson | 2009-05-02 15:26:53 -0500 (Sat, 02 May 2009) | 1 line add myself ........ r72225 | michael.foord | 2009-05-02 17:43:34 -0500 (Sat, 02 May 2009) | 1 line ........ r72303 | benjamin.peterson | 2009-05-04 19:55:24 -0500 (Mon, 04 May 2009) | 1 line using sys._getframe(x), where x > 0 doesnt' work on IronPython ........ r72434 | r.david.murray | 2009-05-07 13:09:58 -0500 (Thu, 07 May 2009) | 2 lines Pre-opened test file needs to be opened in binary mode. ........ r72467 | georg.brandl | 2009-05-08 07:17:34 -0500 (Fri, 08 May 2009) | 1 line Fix name. ........ r72476 | thomas.heller | 2009-05-08 15:09:40 -0500 (Fri, 08 May 2009) | 4 lines Add a file that contains diffs between offical libffi files and the files in this repository. Should make it easier to merge new libffi versions. ........
* Third to last example is now marked as a test, but I can't actually testR. David Murray2009-04-271-29/+28
| | | | | | | | | | | | | | | | | | it yet since sphinx can't run the doctests using python3. Merged revisions 72038 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72038 | r.david.murray | 2009-04-27 13:22:36 -0400 (Mon, 27 Apr 2009) | 8 lines Make sys.xxx variable references into links, note that print_last only works when an exception gets to the interactive prompt, and update the examples after testing. The last one is now a valid Sphinx doctest, but of the preceding two one can't be made a doctest and the other one I'm postponing to 3.x because sphinx handles doctests as Unicode strings and that makes the 2.x output confusing. ........
* Merged revisions 72007 via svnmerge fromGeorg Brandl2009-04-271-4/+4
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72007 | georg.brandl | 2009-04-27 17:09:25 +0200 (Mo, 27 Apr 2009) | 1 line #5856: fix typo s in traceback example. ........
* Remove trailing whitespace.Georg Brandl2009-01-031-4/+4
|
* #3113: document exception chaining.Georg Brandl2008-07-191-16/+23
|
* Remove many "versionchanged" items that didn't use the official markup,Georg Brandl2008-05-121-8/+0
| | | | | | but just some text embedded in the docs. Also remove paragraph about implicit relative imports from tutorial.
* Update docs w.r.t. PEP 3100 changes -- patch for GHOP by Dan Finnie.Georg Brandl2008-02-011-20/+20
|
* Merged revisions 59333-59370 via svnmerge fromChristian Heimes2007-12-051-2/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r59343 | georg.brandl | 2007-12-05 08:02:47 +0100 (Wed, 05 Dec 2007) | 2 lines Fix typo. ........ r59347 | christian.heimes | 2007-12-05 13:31:44 +0100 (Wed, 05 Dec 2007) | 1 line Fixed quoting and paths in the sqlite project file ........ r59348 | christian.heimes | 2007-12-05 13:45:11 +0100 (Wed, 05 Dec 2007) | 1 line Fixed error in regrtest. I must have missed the spot. ........ r59350 | christian.heimes | 2007-12-05 13:49:14 +0100 (Wed, 05 Dec 2007) | 1 line merge -r59315:59316 from py3k: Fix issue #1553: An errornous __length_hint__ can make list() raise a SystemError ........ r59352 | christian.heimes | 2007-12-05 13:52:34 +0100 (Wed, 05 Dec 2007) | 1 line Added msg to Misc/NEWS ........ r59354 | andrew.kuchling | 2007-12-05 14:27:20 +0100 (Wed, 05 Dec 2007) | 1 line Spelling fix ........ r59356 | georg.brandl | 2007-12-05 18:56:50 +0100 (Wed, 05 Dec 2007) | 3 lines Add examples to csv, pprint and traceback docs. Written by Ross for GHOP. ........ r59358 | raymond.hettinger | 2007-12-05 19:11:08 +0100 (Wed, 05 Dec 2007) | 1 line Error checking was too aggressive (reported by Chris Tismer) ........ r59359 | georg.brandl | 2007-12-05 19:30:48 +0100 (Wed, 05 Dec 2007) | 2 lines Add examples to re docs. Written for GHOP by Dan Finnie. ........ r59366 | georg.brandl | 2007-12-05 20:49:21 +0100 (Wed, 05 Dec 2007) | 2 lines Fix markup. ........ r59367 | christian.heimes | 2007-12-05 20:57:54 +0100 (Wed, 05 Dec 2007) | 1 line Updated documentation and build_tkinter.py script ........ r59368 | georg.brandl | 2007-12-05 21:03:57 +0100 (Wed, 05 Dec 2007) | 2 lines Another markup fix. ........ r59369 | ronald.oussoren | 2007-12-05 21:07:36 +0100 (Wed, 05 Dec 2007) | 7 lines This "fixes" compilation issues for the Carbon._OSA module on OSX Leopard by purging bindings to OSA's debug API's. Those APIs we're completely unsupported on OSX 10.4 and are no longer available on OSX 10.5. Note that this patches a generated file. This is somewhat acceptable because regenerating the file is non-trivial and wouldn't use system headers anyway. ........ r59370 | christian.heimes | 2007-12-05 21:10:38 +0100 (Wed, 05 Dec 2007) | 1 line Fixed bug #1557 by using popen.communicate() before popen.wait() ........
* Remove all definitions of raw_input() that were still scattered throughout ↵Georg Brandl2007-12-021-1/+1
| | | | | | the docs from the time where there was neither input() nor raw_input().
* Partial py3k-ification of Doc/library/: convert has_key references into ↵Collin Winter2007-09-011-4/+4
| | | | either 'k in d' or __contains__; normalize raise statements; convert print statements into print function calls.