Commit Graph

59 Commits

Author SHA1 Message Date
Alex Hall 4ebbbf8226 BaseVariable is an ABC 2019-05-03 18:47:23 +03:00
Ram Rachum e3688e4b63 Prefer dotted import 2019-05-03 18:47:23 +03:00
Alex Hall 18e758b0f9 Handle missing frame.f_globals 2019-05-03 18:47:23 +03:00
Alex Hall 5f34219df7 A weird __eq__ method could raise an exception when using 'in' 2019-05-03 18:47:23 +03:00
Alex Hall e1bdbc0042 repr -> get_shortish_repr 2019-05-03 18:47:23 +03:00
Alex Hall d09b348d96 Use collections ABCs to be safe 2019-05-03 18:47:23 +03:00
Alex Hall 97dc802ee6 Add automatic exploded_variables 2019-05-03 18:47:23 +03:00
Alex Hall fb62a57a52 Enumerate is too risky - it exhausts iterators and will show changes when sets change order 2019-05-03 18:47:23 +03:00
Alex Hall 56d3389500 Add classes to automatically track attributes, keys, etc. of variables
# Conflicts:
#	pysnooper/tracer.py
2019-05-03 18:47:23 +03:00
Ram Rachum 5111a534d4 New release 2019-05-03 18:25:15 +03:00
Mike Bayer 20e746ac92 Allow a callable to be passed to snoop()
Fixes: #80
2019-05-03 18:24:05 +03:00
Ram Rachum b8dec67a4f Workaround for Unicode display on Py2.7, fix #67 2019-05-02 21:51:38 +03:00
Ram Rachum 59d3a9d178 Catch ValueError because IronPython raises it on bad filename #75 2019-04-30 20:29:23 +03:00
Ram Rachum fb5b7eabbc IronPython doesn't always have frame.f_globals, fix #75 2019-04-28 22:28:01 +03:00
Alex Hall 9a81a2e76c Fixes for Python 2 2019-04-28 14:29:11 +03:00
Alex Hall 0322982875 More informative repr for exceptions. Forgot to use repr_instance 2019-04-28 14:29:11 +03:00
Alex Hall 4ec976bd14 PR feedback:
Swap imports
Raise maxother locally
Demo long variable output
2019-04-28 14:29:11 +03:00
Alex Hall a5e420a3ab reprlib already handles both truncation and exceptions 2019-04-28 14:29:11 +03:00
Alex Hall 7de345f5cc Use reprlib 2019-04-28 14:29:11 +03:00
Ram Rachum fe3569bdd5 Bump version 2019-04-26 12:48:58 +03:00
Ram Rachum e21fc11352 Massaging some code 2019-04-26 12:48:58 +03:00
Alex Hall e97cdd2b6c Allow tracking arbitrary expressions in 'variables' using eval 2019-04-26 12:48:58 +03:00
Alex Hall 93edf6fced Remove more calls to decode using u prefix 2019-04-26 10:05:12 +03:00
Ram Rachum c9f1dab584 Bump version 2019-04-25 21:50:56 +03:00
Alex Hall 30e5789177 Basic fixes for linters: remove unused variables and imports, plus whitespace and other style improvements for PEP8
Edited by Ram.

# Conflicts:
#	pysnooper/pysnooper.py
#	tests/test_pysnooper.py
2019-04-25 21:49:44 +03:00
Ram Rachum 948fa7a312 Argument to overwrite file #5 2019-04-25 21:34:45 +03:00
Alex Hall 7894b55a7e Remove need for conditional .decode() call which gives warning 2019-04-25 18:13:41 +03:00
Ram Rachum cda2b254a1 Don't require setup.py to import pysnooper 2019-04-25 16:54:46 +03:00
Ram Rachum 748d01bd93 Bump version 2019-04-24 23:17:56 +03:00
Ram Rachum 4c0b64fd0b Bundling decorator and six, look ma no dependencies! 2019-04-24 23:16:59 +03:00
Ram Rachum 2d40225fcc Bump version 2019-04-24 22:28:54 +03:00
Ram Rachum 4d943e9dbb Implement IPython code fetching 2019-04-24 22:28:43 +03:00
Ram Rachum 61fd0a5262 Bump version 2019-04-24 22:14:36 +03:00
Ram Rachum 3a8c0c35a2 Fail gracefully when can't find code 2019-04-24 22:12:53 +03:00
Ram Rachum 5c31dfc28c Move version into __init__.py 2019-04-24 19:05:33 +03:00
Ram Rachum 64bc472b7c Canonicalize variable order #21 2019-04-24 15:57:20 +03:00
Ram Rachum efc7dd0a97 Remove any newlines from variables 2019-04-24 15:30:51 +03:00
Ram Rachum a8c6212e96 Refactor showing return values, repr, tests 2019-04-24 15:28:24 +03:00
Loukas Leontopoulos 9248c58ef4 Show function return value. Resolves #32 2019-04-24 15:27:41 +03:00
Ram Rachum 43af67b1d9 Refactor 2019-04-24 14:02:50 +03:00
Ram Rachum a90ee0d35a Remove dependency `future` 2019-04-24 13:57:22 +03:00
Binwei Hu 151949a2f0 python2 collections 2019-04-24 13:56:11 +03:00
Ram Rachum 9a73bdbcba Refactor detecting misplaced def lines 2019-04-24 12:36:37 +03:00
Christian Zietz 016f4b9976 Rework code to find a function definition in case of decorated source lines 2019-04-24 12:27:26 +03:00
Christian Zietz 45db942375 Be safe and check that a function definition is found 2019-04-24 12:27:26 +03:00
Christian Zietz 90951065d3 When tracing 'call' events, skip lines containing decorators to print actual function name.
Python syntax expects function decorators in a separate line so the all lines starting with '@' can be safely skipped.
2019-04-24 12:27:26 +03:00
Ram Rachum 1db07e4d66 Add "and collaborators" everywhere 2019-04-24 12:10:46 +03:00
Ram Rachum 4419548374 Add MAX_VARIABLE_LENGTH constant 2019-04-23 11:11:38 +03:00
Ram Rachum e4483bc310 Fix #14 2019-04-23 10:15:57 +03:00
wilfredinni 2c8c74903d small typo on pycompat.py 2019-04-22 23:43:32 +03:00