diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-08-08 03:21:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-08 03:21:33 (GMT) |
commit | 66c899661902edc18df96a5c3f22639310700491 (patch) | |
tree | fc63ed7b8cf6fcbb61f2a65504649f7e35d59881 | |
parent | de5de413e7f03e9cdcaf0cf96b13f4fe6bd5ccb6 (diff) | |
download | cpython-66c899661902edc18df96a5c3f22639310700491.zip cpython-66c899661902edc18df96a5c3f22639310700491.tar.gz cpython-66c899661902edc18df96a5c3f22639310700491.tar.bz2 |
bpo-41497: Fix potential UnicodeDecodeError in dis CLI (GH-21757)
(cherry picked from commit a4084b9d1e40c1c9259372263d1fe8c8a562b093)
Co-authored-by: Konge <zkonge@outlook.com>
-rw-r--r-- | Lib/dis.py | 2 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2020-08-07-06-06-29.bpo-41497.aBtsWz.rst | 1 |
2 files changed, 2 insertions, 1 deletions
@@ -542,7 +542,7 @@ def _test(): import argparse parser = argparse.ArgumentParser() - parser.add_argument('infile', type=argparse.FileType(), nargs='?', default='-') + parser.add_argument('infile', type=argparse.FileType('rb'), nargs='?', default='-') args = parser.parse_args() with args.infile as infile: source = infile.read() diff --git a/Misc/NEWS.d/next/Library/2020-08-07-06-06-29.bpo-41497.aBtsWz.rst b/Misc/NEWS.d/next/Library/2020-08-07-06-06-29.bpo-41497.aBtsWz.rst new file mode 100644 index 0000000..2c863ed --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-07-06-06-29.bpo-41497.aBtsWz.rst @@ -0,0 +1 @@ +Fix potential UnicodeDecodeError in dis module.
\ No newline at end of file |