Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.3k
gh-93096: Removepython -m base64 -t
#94230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from5 commits
1fbaa63
5c6ff7c
cc58d75
0174f60
16d3dcc
28eb678
63ad2a7
43a4474
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -570,8 +570,7 @@ def main(): | ||
usage = """usage: %s [-h|-d|-e|-u|-t] [file|-] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. nit: Can we update There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Done. Should I go further and convert it to argparse? | ||
-h: print this help message and exit | ||
-d, -u: decode | ||
-e: encode (default)"""%sys.argv[0] | ||
try: | ||
opts, args = getopt.getopt(sys.argv[1:], 'hdeut') | ||
except getopt.error as msg: | ||
@@ -584,7 +583,6 @@ def main(): | ||
if o == '-e': func = encode | ||
if o == '-d': func = decode | ||
if o == '-u': func = decode | ||
if o == '-h': print(usage); return | ||
if args and args[0] != '-': | ||
with open(args[0], 'rb') as f: | ||
@@ -593,15 +591,5 @@ def main(): | ||
func(sys.stdin.buffer, sys.stdout.buffer) | ||
if __name__ == '__main__': | ||
main() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -762,14 +762,6 @@ def tearDown(self): | ||
def get_output(self, *args): | ||
return script_helper.assert_python_ok('-m', 'base64', *args).out | ||
arhadthedev marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
def test_encode_file(self): | ||
with open(os_helper.TESTFN, 'wb') as fp: | ||
fp.write(b'a\xffb\n') | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Removed undocumented ``-t`` argument of ``python -m base64``. Use | ||
``python -m unittest test.test_base64.LegacyBase64TestCase.test_encodebytes`` | ||
instead. |