Commit Graph

30 Commits

Author SHA1 Message Date
Berker Peksag 36d6f8b755 Add LICENSE
Closes #8
2016-02-23 21:41:44 +02:00
Berker Peksag 42852af25d Revert "Skip execution of filename encoding test on Py3"
This reverts commit 26c730fc7e.
2015-08-08 08:17:41 +03:00
James Page 26c730fc7e Skip execution of filename encoding test on Py3 2015-08-05 08:01:50 +03:00
Berker Peksag 8a7ab86ecf Try to run tests in Python 2.6 2015-08-05 07:54:31 +03:00
Berker Peksag f5ded2c2ea Add unittest.main() call to test_traceback.py 2015-08-05 07:47:33 +03:00
Berker Peksag 4f3a27e642 Add .travis.yml 2015-08-05 07:40:46 +03:00
Robert Collins 9a27457e31 Issue #24710: Use cls in TracebackException.from_exception.
Minor cleanup patch from Berker Peksag.
2015-08-05 07:34:25 +03:00
Berker Peksag 2218e9cf14 Issue #24695: Fix a regression in traceback.print_exception()
If exc_traceback is None we shouldn't print a traceback header
like described in the documentation.
2015-08-05 07:29:34 +03:00
Robert Collins 37c5f154f0 Handle unicode paths more thoroughly.
Further testing exposed that we weren't decoding where we could, and
the SyntaxError special case needed to be updated too.
2015-03-09 19:56:36 +13:00
Robert Collins ffe9882743 Try harder to show unicode lines in SyntaxErrors
If the interpreter doesn't decode the line for us, do so ourselves
using the linecache module.
2015-03-09 17:14:26 +13:00
Robert Collins 70a91e4398 Unbreak handling of syntax errors with no line.
This was broken in the port back to 2.x.
2015-03-09 14:48:43 +13:00
Robert Collins 9df5538af8 Handle filenames that can't be decoded to unicode.
Another Python2 specific case to handle.
2015-03-09 14:03:57 +13:00
Robert Collins 652c95d267 Handle objects with broken __unicode__
Because Python 2 objects may have __unicode__ broken, and we need
unicode output to avoid implicit decodes, explicitly handle
__unicode__.
2015-03-09 13:31:29 +13:00
Robert Collins 7ec70e3de3 Time for 1.0.0. 2015-03-06 16:18:39 +13:00
Robert Collins b37c13c8af Fixe test when running with .pyc files. 2015-03-06 16:18:22 +13:00
Robert Collins a11cd2be1f Issue #22936: Make it possible to show local variables in tracebacks. 2015-03-06 16:12:58 +13:00
Robert Collins 65e62e6fe7 Remaining fallout from 17911
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.
2015-03-06 16:01:39 +13:00
Robert Collins 4330215880 Fix brownbag in issue 17911 commit 2015-03-06 15:59:48 +13:00
Robert Collins 1f22df9651 Issue #17911: traceback module overhaul
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.
2015-03-06 15:57:28 +13:00
Robert Collins 3becd28042 Supporting boilerplate. 2015-03-06 14:43:28 +13:00
Robert Collins 6adffbf614 Fixes for the test suite on PyPy.
PyPy includes app_main in its tracebacks. For now, remove that in test
(but in future perhaps we should remove that in formatting code)?

PyPy also has a different position in its parser for errors, so allow
for that in tests.
2014-11-24 22:26:32 +13:00
Robert Collins 9a9a29e95f Python2.xify the code base.
Skip a few tests that test the core interpreter and don't work on <3.
Unicodify the core.
Fix tests to deal with Python 2's behaviour (stdout not encoded at
all) when stdout is a pipe.
2014-11-24 21:54:53 +13:00
Robert Collins 43118d83bc Handle missing __traceback__ in tests for < 3.x 2014-11-24 21:54:53 +13:00
Robert Collins 5ec8d62e4b Handle absence of __context__ and __cause__ on < 3.x 2014-11-24 21:54:53 +13:00
Robert Collins 5ac32f61d7 Handle different type repr in < 3.2. 2014-11-24 21:54:43 +13:00
Robert Collins 87b74c133b Fixes for 3.2 - qualname and exception suppressing.
Python 3.2 doesn't have __qualname__ nor does it have exception chain
suppressing, so make sure tb walking doesn't crash, and fallback to
__name__ when __qualname__ is missing.
2014-11-21 11:00:22 +13:00
Robert Collins cae3cb83fb Fixes for 3.3.
Handle frame.clear being absent (and accept it won't be cleared in < 3.4).
Don't try to check coding: behaviour which was fixed in 3.4.
2014-11-21 10:19:02 +13:00
Robert Collins f187c1fbb0 Port trunk traceback module to standalone w/3.5. 2014-11-21 09:58:04 +13:00
Robert Collins 8748ce221c Ignore .eggs as well. 2014-11-21 09:57:36 +13:00
Robert Collins b1fc79570b Basic boilerplate. 2014-11-21 07:50:36 +13:00