| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [3.8] bpo-34463: Make python tracebacks identical to C tracebacks for
SyntaxErrors without a lineno (GH-23427)
(cherry picked from commit 069560b1171eb6385121ff3b6331e8814a4e7454)
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
* 📜🤖 Added by blurb_it.
* added missing newline in test
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 427613f005f0f412d12f0d775d2b609bae0ae1ad)
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
|
|
|
|
|
|
| |
Typo fix: "emites" -> "emit".
(cherry picked from commit df8913f7c48d267efd662e8ffd9496595115eee8)
Co-authored-by: Galden <wudenggang0@163.com>
|
| |
|
|
|
|
|
|
|
|
| |
The recursive frame pruning code always undercounted the number of elided frames
by one. That is, in the "[Previous line repeated N more times]" message, N would
always be one too few. Near the recursive pruning cutoff, one frame could be
silently dropped. That situation is demonstrated in the OP of the bug report.
The fix is to start the identical frame counter at 1.
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
* Replaced list(<generator expression>) with list comprehension
* Replaced dict(<generator expression>) with dict comprehension
* Replaced set(<list literal>) with set literal
* Replaced builtin func(<list comprehension>) with func(<generator
expression>) when supported (e.g. any(), all(), tuple(), min(), &
max())
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes a regression caused by revision 73afda5a4e4c. Also reverts the
decimal test workaround added in revision 5f3dd0a2b1ab.
Remove test_without_exception(). According to revision ecaafc32c500, this was
added in Python 2 so that print_exc() would output “None” when called with no
exception set. However print_exc() never worked like this in Python 3, and
the use case is not documented.
Restore TracebackCases class name (instead of SyntaxTracebackCases), because
the class also tests other exceptions.
|
| |
| |
| |
| | |
but not in the expressions. Also, require expressions to begin and end with literal curly braces.
|
| |
| |
| |
| | |
before beta 2. I also need to look in to why test_tools/test_unparse fails with the files that are now being skipped.
|
| |
| |
| |
| | |
temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in the string parts of f-strings, but disallow them in the expression parts.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/
| |
| | |
format_stack(), and extract_stack() called without arguments.
|
| |
| |
| |
| | |
format_stack(), and extract_stack() called without arguments.
|
|/
|
|
| |
Minor cleanup patch from Berker Peksag.
|
|
|
|
|
| |
If exc_traceback is None we shouldn't print a traceback header
like described in the documentation.
|
|
|
|
| |
Based on patch by Dmitry Kazakov.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code module was using a private function from traceback in order to skip a
frame - used the direct interface to do that instead,
The decimal module suffered minor fallout from formatting changes ('None' as a
value is now not printed by traceback, the same as None was not before).
The cgitb module was passing a bogus exception type (type.__name__) into
format_exception, which uncovered that format_exception and print_exception had
been ignoring the etype for some time, so the compatibility thunk to the new
code now does the same thing.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
fully qualified class names of Python implemented classes.
|
|\
| |
| |
| | |
IndentationError.
|
| |
| |
| |
| | |
IndentationError.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
by a traceback
|
| |
| |
| |
| | |
Patch by Martin Morrison.
|
|/ |
|
|
|
|
|
|
| |
attribute
This replaces the original PEP 409 implementation. See #14133.
|
| |
|
|
|
|
| |
implicit context too.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r73186 | georg.brandl | 2009-06-03 23:21:09 +0200 (Mi, 03 Jun 2009) | 1 line
#6174: fix indentation in code example.
........
r73206 | georg.brandl | 2009-06-04 11:15:12 +0200 (Do, 04 Jun 2009) | 1 line
#3584: ignore trailing newlines when placing the caret for a SyntaxError location.
........
r73212 | georg.brandl | 2009-06-04 12:10:41 +0200 (Do, 04 Jun 2009) | 1 line
Better name for "Ctor".
........
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71237 | georg.brandl | 2009-04-05 16:24:52 +0200 (So, 05 Apr 2009) | 1 line
#1326077: fix traceback formatting of SyntaxErrors. This fixes two differences with formatting coming from Python: a) the reproduction of location details in the error message if no line text is given, b) the prefixing of the last line by one space.
........
r71238 | georg.brandl | 2009-04-05 16:25:41 +0200 (So, 05 Apr 2009) | 1 line
Add NEWS entry for r71237.
........
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
70554,70588-70589,70598,70605,70611-70621,70623-70624,70626-70627 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70554 | benjamin.peterson | 2009-03-23 16:25:15 -0500 (Mon, 23 Mar 2009) | 1 line
complain when there's no last exception
........
r70588 | benjamin.peterson | 2009-03-24 17:56:32 -0500 (Tue, 24 Mar 2009) | 1 line
fix newline issue in test summary
........
r70589 | benjamin.peterson | 2009-03-24 18:07:07 -0500 (Tue, 24 Mar 2009) | 1 line
another style nit
........
r70598 | benjamin.peterson | 2009-03-25 16:24:04 -0500 (Wed, 25 Mar 2009) | 1 line
add shorthands for expected failures and unexpected success
........
r70605 | benjamin.peterson | 2009-03-26 11:32:23 -0500 (Thu, 26 Mar 2009) | 1 line
remove uneeded function
........
r70611 | benjamin.peterson | 2009-03-26 13:35:37 -0500 (Thu, 26 Mar 2009) | 1 line
add much better tests for python version information parsing
........
r70612 | benjamin.peterson | 2009-03-26 13:55:48 -0500 (Thu, 26 Mar 2009) | 1 line
more and more implementations now support sys.subversion
........
r70613 | benjamin.peterson | 2009-03-26 13:58:30 -0500 (Thu, 26 Mar 2009) | 1 line
roll old test in with new one
........
r70614 | benjamin.peterson | 2009-03-26 14:09:21 -0500 (Thu, 26 Mar 2009) | 1 line
add support for PyPy
........
r70615 | benjamin.peterson | 2009-03-26 14:58:18 -0500 (Thu, 26 Mar 2009) | 5 lines
add some useful utilities for skipping tests with unittest's new skipping ability
most significantly apply a modified portion of the patch from #4242 with
patches for skipping implementation details
........
r70616 | benjamin.peterson | 2009-03-26 15:05:50 -0500 (Thu, 26 Mar 2009) | 1 line
rename TestCase.skip() to skipTest() because it causes annoying problems with trial #5571
........
r70617 | benjamin.peterson | 2009-03-26 15:17:27 -0500 (Thu, 26 Mar 2009) | 1 line
apply the second part of #4242's patch; classify all the implementation details in test_descr
........
r70618 | benjamin.peterson | 2009-03-26 15:48:25 -0500 (Thu, 26 Mar 2009) | 1 line
remove test_support.TestSkipped and just use unittest.SkipTest
........
r70619 | benjamin.peterson | 2009-03-26 15:49:40 -0500 (Thu, 26 Mar 2009) | 1 line
fix naming
........
r70620 | benjamin.peterson | 2009-03-26 16:10:30 -0500 (Thu, 26 Mar 2009) | 1 line
fix incorrect auto-translation of TestSkipped -> unittest.SkipTest
........
r70621 | benjamin.peterson | 2009-03-26 16:11:16 -0500 (Thu, 26 Mar 2009) | 1 line
must pass argument to get expected behavior ;)
........
r70623 | benjamin.peterson | 2009-03-26 16:30:10 -0500 (Thu, 26 Mar 2009) | 1 line
add missing import
........
r70624 | benjamin.peterson | 2009-03-26 16:30:54 -0500 (Thu, 26 Mar 2009) | 1 line
** is required here
........
r70626 | benjamin.peterson | 2009-03-26 16:40:29 -0500 (Thu, 26 Mar 2009) | 1 line
update email tests to use SkipTest
........
r70627 | benjamin.peterson | 2009-03-26 16:44:43 -0500 (Thu, 26 Mar 2009) | 1 line
fix another name
........
|
| |
|
|
|
|
|
|
|
|
| |
Removed itertools usage from Lib/traceback.py, because itertools
is extension module, so maybe unavailable on build process.
(Lib/_dummy_thread.py uses Lib/traceback.py)
Reviewed by Amaury Forgeot d'Arc.
|
|
|
|
| |
patch from Antoine Pitrou #3112
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/branches/p3yk
........
r56497 | kurt.kaiser | 2007-07-22 14:55:16 -0700 (Sun, 22 Jul 2007) | 4 lines
In the case of syntax errors, in py3k format_exception_only()
was including line number and position in the final line of the
exception notification, duplicating info in previous lines.
........
r56501 | kurt.kaiser | 2007-07-22 19:35:50 -0700 (Sun, 22 Jul 2007) | 2 lines
Hum, needed a newline in the last change.
........
r56536 | kurt.kaiser | 2007-07-24 19:06:48 -0700 (Tue, 24 Jul 2007) | 5 lines
Not all instantiations of SyntaxError set the args attribute.
e.g. symtable.c
Modify format_exception_only() to get SyntaxError attributes directly
instead of unpacking 'args'.
........
r56537 | kurt.kaiser | 2007-07-24 19:13:03 -0700 (Tue, 24 Jul 2007) | 3 lines
Update doctest strings: traceback.py no longer prints redundant location
information in the last line of the exception display.
........
r56627 | kurt.kaiser | 2007-07-29 21:06:57 -0700 (Sun, 29 Jul 2007) | 2 lines
Interactive interpreter emulator (code.py) failing to print exceptions.
........
r56628 | kurt.kaiser | 2007-07-29 21:41:02 -0700 (Sun, 29 Jul 2007) | 2 lines
Eliminate extra lines before and after tracebacks.
........
r56638 | kurt.kaiser | 2007-07-31 19:36:45 -0700 (Tue, 31 Jul 2007) | 3 lines
Refactor syntax error display in shell and edit windows; move
colorize_syntax_error() to EditorWindow; update to py3k.
........
r56685 | neal.norwitz | 2007-08-02 22:20:23 -0700 (Thu, 02 Aug 2007) | 10 lines
Remove several h/w and o/s specific modules that are undocumented, obsolete,
and/or not widely used:
linuxaudiodev.c, sunaudiodev.c Lib/plat-sunos5/SUNAUDIODEV.py
Lib/audiodev.py Tools/audiopy/audiopy
Move Lib/toaiff.py to Demo.
See PEP 3108 for most of the details.
........
r56686 | neal.norwitz | 2007-08-02 22:21:48 -0700 (Thu, 02 Aug 2007) | 4 lines
Missed one module that should have been removed since it relied
on audiodev which was removed.
........
r56748 | neal.norwitz | 2007-08-04 19:19:04 -0700 (Sat, 04 Aug 2007) | 1 line
Make from X import * outside module scope an error.
........
r56750 | neal.norwitz | 2007-08-04 19:35:01 -0700 (Sat, 04 Aug 2007) | 1 line
Use READONLY consistently instead of RO
........
|
| |
|