Skip to content

Commit 4fcba5b

Browse files
committed
prepare release
1 parent f8cd750 commit 4fcba5b

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Upcoming
22

3-
-
3+
4+
# 0.2.5 - Oct 31, 2020
5+
6+
## Fixed
7+
- Allows passing `(None, None, None)` to `format_exception`
8+
- Fixed a crashing type error that could occur in longer code scopes (e.g. in the repl)
49

510
# 0.2.4 - June 17, 2020
611

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
# Better tracebacks
66

7-
This is a more helpful version of Python's built-in exception message: It shows more code context and the current values of nearby variables. That answers many of the questions I'd ask an interactive debugger: Where in the code was the crash, what's in the relevant local variables, and why was _that_ function called with _those_ arguments. It either prints to the console or gives you a string for logging. [It's for Python 3.](https://github.com/cknd/stackprinter/issues/2#issuecomment-489458606)
7+
This is a more helpful version of Python's built-in exception message: It shows more code context and the current values of nearby variables. That answers many of the questions I'd ask an interactive debugger: Where in the code was the crash, what's in the relevant variables, and why was _that_ function called with _those_ arguments. It either prints to the console or gives you a string for logging.
8+
9+
I sometimes use this locally instead of a real debugger, but mostly it helps me sleep when my code runs somewhere where the only debug tool is a log file (though it's not a fully-grown [error monitoring system](https://sentry.io/welcome/)).
810

911
```bash
10-
pip install stackprinter
12+
pip3 install stackprinter
1113
```
1214
### Before
1315
```
@@ -60,8 +62,6 @@ By default, it tries to be somewhat polite about screen space (showing only a ha
6062

6163
It outputs plain text normally, which is good for log files. There's also a color mode for some reason 🌈, with a few different color schemes for light and dark backgrounds. (The colors [track different variables](https://medium.com/@brianwill/making-semantic-highlighting-useful-9aeac92411df) instead of the language syntax.)
6264

63-
I occasionally use this locally instead of a real debugger, but mostly it helps me sleep when my code runs somewhere where the only debug tool is a log file (though it's not a fully-grown [error monitoring system](https://sentry.io/welcome/)).
64-
6565
<img src="https://raw.githubusercontent.com/cknd/stackprinter/master/notebook.png" width="500">
6666

6767
# Usage
@@ -95,8 +95,6 @@ except RuntimeError as exc:
9595
logger.error('The front fell off.\n' + tb)
9696
```
9797

98-
For all the config options, for now, [see the docstring of `format()`](https://github.com/cknd/stackprinter/blob/master/stackprinter/__init__.py#L28-L137).
99-
10098
It's also possible to integrate this neatly with standard logging calls [through a bit of extra plumbing](https://github.com/cknd/stackprinter/blob/master/demo_logging.py).
10199

102100
```python
@@ -105,9 +103,11 @@ configure_logging() # adds a custom log formatter, see link above
105103
try:
106104
something()
107105
except:
108-
logger.exception('The front fell off.') # Logs a traceback along with the given message
106+
logger.exception('The front fell off.') # Logs a rich traceback along with the given message
109107
```
110108

109+
For all the config options [see the docstring of `format()`](https://github.com/cknd/stackprinter/blob/master/stackprinter/__init__.py#L28-L137).
110+
111111
## Printing the current call stack
112112
To see your own thread's current call stack, call `show` or `format` anywhere outside of exception handling.
113113

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
setuptools.setup(
77
python_requires=">=3.4",
88
name="stackprinter",
9-
version="0.2.4",
9+
version="0.2.5",
1010
author="cknd",
1111
author_email="[email protected]",
1212
description="Debug-friendly stack traces, with variable values and semantic highlighting",

0 commit comments

Comments
 (0)