gh-93096: Remove -t and -v flags from pickletools cli (#131039)

Remove `python -m pickletools -t`
This commit is contained in:
donBarbos 2025-03-11 15:06:26 +04:00 committed by GitHub
parent 3bb20d13a8
commit 3ddf983afd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 33 deletions

View file

@ -2838,9 +2838,6 @@ __test__ = {'disassembler_test': _dis_test,
'disassembler_memo_test': _memo_test,
}
def _test():
import doctest
return doctest.testmod()
if __name__ == "__main__":
import argparse
@ -2865,16 +2862,7 @@ if __name__ == "__main__":
'-p', '--preamble', default="==> {name} <==",
help='if more than one pickle file is specified, print this before'
' each disassembly')
parser.add_argument(
'-t', '--test', action='store_true',
help='run self-test suite')
parser.add_argument(
'-v', action='store_true',
help='run verbosely; only affects self-test run')
args = parser.parse_args()
if args.test:
_test()
else:
if not args.pickle_file:
parser.print_help()
else:

View file

@ -0,0 +1,3 @@
Removed undocumented ``-t`` and ``-v`` arguments of ``python -m
pickletools``. Use ``python -m doctest Lib/pickletools.py -v`` instead.
Patch by Semyon Moroz.