Issue 9094: Make python-m pickletools do something useful (original) (raw)

Issue9094

Created on 2010-06-27 23:12 by belopolsky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pickletools.diff belopolsky,2010-06-27 23:12
issue9094.diff belopolsky,2010-06-29 01:01
Messages (8)
msg108807 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-06-27 23:12
Attached patch makes python -m pickletools print symbolic disassembly of a pickle to stdout. If the idea is well received, I will add help option, usage string and possibly -o option to redirect output to a file. I am not sure that current "run doctest" behavior is worth preserving given that one can always do python -m doctest Lib/pickletools.py instead.
msg108858 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2010-06-28 20:28
Good idea! You can remove the doctest behavior. I don't think it is useful. But if you remove it, make sure you add an usage message when no argument is given.
msg108878 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-06-28 23:14
Well, assuming you want to make it useful, I'd make that behaviour depend on a command-line option, such that other actions can be added later.
msg108884 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-06-29 01:01
> Well, assuming you want to make it useful, I'd make that > behaviour depend on a command-line option, .. OK, Antoine, you asked for it. :-) .diff
msg109189 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-03 19:18
I would like to commit this. Any objections? Changes only affect running pickletools as __main__. Does this need to be documented in pickletools.rst? I noticed that dis.rst does not describe running dis.py from command line. Similarly, I cannot find tests for any module's command line behavior to base -m pickletools testing on.
msg109190 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-07-03 20:03
In 'run self-test suit', I suppose you mean 'suite'. Otherwise, looks ok.
msg109191 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-03 20:38
Committed in r82514. I don't think this appropriate for 3.1, but will not block it yet if someone thinks it should be merged.
msg109415 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-06 18:31
On the second thought, this is clearly not a bug fix. Not a backport candidate.
History
Date User Action Args
2022-04-11 14:57:02 admin set github: 53340
2010-07-06 18:31:21 belopolsky set status: pending -> closedmessages: +
2010-07-03 20:38:41 belopolsky set status: open -> pendingmessages: + stage: patch review -> resolved
2010-07-03 20:03:20 pitrou set messages: +
2010-07-03 19🔞48 belopolsky set nosy: + mark.dickinsonresolution: acceptedmessages: +
2010-06-29 01:01:17 belopolsky set files: + issue9094.diffmessages: +
2010-06-28 23:14:21 pitrou set nosy: + pitroumessages: +
2010-06-28 20:28:08 alexandre.vassalotti set messages: +
2010-06-27 23:12:13 belopolsky create