Commit Graph

76 Commits

Author SHA1 Message Date
Delgan
04f7e97206
Add support for chained exceptions (#63) 2019-01-08 22:09:32 +01:00
Delgan
4d6a9daf6a
Fix unit tests failing on Python 3.7 (#62) 2019-01-07 20:59:59 +01:00
Josh Junon
0b13582973 0.2.1 2018-01-16 16:19:52 +01:00
Josh Junon
e8b38aae4b remove incorrect note about not working in interactive shell 2018-01-16 16:19:28 +01:00
Josh Junon
62a1690097 0.2.0 2018-01-16 16:17:20 +01:00
Josh Junon
9322966176 add note about interactive shells 2018-01-16 16:14:39 +01:00
Delgan
a257cbb0c1 Remove outdated module docstring 2017-10-19 12:28:24 +02:00
Delgan
3c5870cf0d Add tests for IndentationError and SyntaxError 2017-10-19 12:01:29 +02:00
paradoxxxzero
ab227a9d96 Fix SyntaxError missing exception part 2017-10-19 12:01:29 +02:00
Delgan
f926bcccc2 Add automatic hook based on an environment variable 2017-10-19 12:01:29 +02:00
Delgan
c9c2ce9d9c Add a way to use better_exceptions functions without side effects
Importing 'better_exceptions' automatically replaces the default sys.excepthook and
add an handler to the root logger.
This is very useful in most cases, but sometimes the user may want to use library
functions without any side effects.

Two packages can be published: the first contains all the functions of the library,
and the second uses these functions to automatically set up the better exception system.
The user can choose the package he wants to import, and there is no code repetition
in the repository

The core functions had to be encapsulated into a class so that user can still modify
global parameters to his convenience.
2017-09-13 09:06:45 +02:00
Delgan
35eaebff0b Fix raw codes appearing with Python 3 on Windows cmd
Colorama does not wrap the 'buffer' attributes of streams, so writing
to it would not convert ANSI codes on Windows.
The workaround is to use '.write()' without encoding the string,
and rather wrap the stream used by Colorama to encode substrings
which are sent once win32 call are made.
2017-09-11 09:59:20 +02:00
Delgan
9bd28c8b79 Add tests to check correctly truncated values 2017-09-10 22:27:51 +02:00
Delgan
712c2dbdfc Add __version__ to top level module 2017-09-10 22:25:43 +02:00
Delgan
f9e1dddc27 Fix uncaught error on some exotic environments 2017-09-10 22:25:01 +02:00
TaoBeier
821b9e4555 fix indentation and change nodes iterable 2017-09-10 22:11:09 +02:00
Josh Junon
8b020dde69 0.1.8 2017-05-12 00:12:44 -07:00
Josh Junon
a6b49d021f run PYTHONSTARTUP in better-exceptions REPL 2017-05-12 00:09:34 -07:00
Kevin Woldt
4ab6076c3e using relative imports to support sub packaging (#30) 2017-05-03 12:52:37 -07:00
Josh Junon
e1cf1ff35e 0.1.7 2017-04-24 15:51:36 -07:00
Josh Junon
d807d03afc use new PY3 variable instead of system check 2017-04-24 15:51:18 -07:00
cold
cd378ffe7d Fix Non-ASCII exceptions UnicodeDecodeError (#33)
* Fix Non-ASCII exceptions UnicodeDecodeError

Fix some code includes Non-ASCII characters will cause `UnicodeDecodeError`

* Add test encoding & regenerate test data
2017-04-24 15:48:26 -07:00
Josh Junon
74eb5373aa 0.1.6 2017-03-28 14:48:13 -07:00
Josh Junon
9a53e5ffa8 add isatty(2) check back in to color support detection 2017-03-28 14:16:31 -07:00
Josh Junon
c104693af9 updated test output for logging hooks 2017-03-28 14:13:27 -07:00
Josh Junon
f6f74b8ea7 add logger patching (closes #21) 2017-03-28 14:12:14 -07:00
Josh Junon
3c51839251 allow for either dict or module __builtins__ (fixes #26) 2017-03-28 12:56:32 -07:00
Josh Junon
096281cbae clarify usage message when default interpreter is used 2017-03-26 09:23:30 -07:00
Josh
096e70d921 Add Travis testing (#20)
* add .travis

* don't add TERM as test case (duh)

* update tests (TERM -> xterm)

* remove support for 2.6

* don't test on 3.3 (has weird ANSI bug)

* add travis badge
2017-03-24 01:56:12 -07:00
Josh Junon
0d600e9c88 pull out interactive raw test (for now) 2017-03-24 01:30:02 -07:00
Josh Junon
f548b84f21 add special case to remove runcode() calls 2017-03-24 01:18:39 -07:00
Josh Junon
6db81f32c6 omit last frame if we created it 2017-03-24 01:14:15 -07:00
Josh Junon
bcac52d39b define final_source in case there isn't a frame 2017-03-24 01:05:49 -07:00
Josh Junon
2a9b86d8d3 ignore dummy exception frame if tb not present 2017-03-24 00:58:00 -07:00
Josh Junon
db4dc3f378 update tests 2017-03-24 00:47:01 -07:00
Josh Junon
9024677a77 allow for non-whitespace characters to surround strings 2017-03-24 00:46:15 -07:00
Josh Junon
64f01e0d65 update test output for -c fixes 2017-03-24 00:37:58 -07:00
Josh Junon
7fabe8725f fix encoding issues and accidental skipping when compact -c is used 2017-03-24 00:35:28 -07:00
Josh Junon
0d28697d31 add test case for strange -c configurations 2017-03-24 00:32:32 -07:00
Josh Junon
c7e306d309 fix -c parsing when code is the last program argument 2017-03-24 00:06:18 -07:00
Josh Junon
aa2cf4eca7 update test output 2017-03-23 23:58:27 -07:00
Josh Junon
f1ba394557 decode output from spawn() prior to shlex.split-ting it 2017-03-23 23:58:18 -07:00
Josh Junon
525012db05 add comment to test_string 2017-03-23 23:46:57 -07:00
Josh Junon
df512de997 sort colored ast nodes based on their col_offset (fixes #18) 2017-03-23 23:46:46 -07:00
Josh Junon
46363e1061 read command line from system if using -c 2017-03-23 23:31:11 -07:00
Josh Junon
be3b5b38f4 default to 'python' when not running test suite 2017-03-23 22:20:46 -07:00
Josh Junon
8e1040c20a add more sophisticated tests 2017-03-23 22:10:14 -07:00
Josh Junon
e359b7dbb4 add ability to silence the banner 2017-03-23 22:09:56 -07:00
Josh Junon
2d0978b0f1 add interactive mode 2017-03-23 21:04:03 -07:00
Josh Junon
2d87e3e090 0.1.5 2017-03-23 11:43:35 -07:00