[issue34736] Confusing base64.b64decode output

2018-09-27 Thread Tal Einat
Tal Einat added the comment: Thanks, Mark! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue34736] Confusing base64.b64decode output

2018-09-27 Thread miss-islington
miss-islington added the comment: New changeset 7e35081bc828291da5793db49ab45dee4fda5043 by Miss Islington (bot) in branch '3.7': bpo-34736: improve error message for invalid length b64decode inputs (GH-9563) https://github.com/python/cpython/commit/7e35081bc828291da5793db49ab45dee4fda5043

[issue34736] Confusing base64.b64decode output

2018-09-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +9014 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34736] Confusing base64.b64decode output

2018-09-27 Thread miss-islington
miss-islington added the comment: New changeset 1fba2ffc37da52c08db51fe4360459990b0311c9 by Miss Islington (bot) (Tal Einat) in branch 'master': bpo-34736: improve error message for invalid length b64decode inputs (GH-9563) https://github.com/python/cpython/commit/1fba2ffc37da52c08db51fe43604

[issue34736] Confusing base64.b64decode output

2018-09-25 Thread Tal Einat
Change by Tal Einat : -- keywords: +patch pull_requests: +8965 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list m

[issue34736] Confusing base64.b64decode output

2018-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: > Do you mean you'd like to have this behavior by default? Ideally, yes, but I think that's out of scope for this bug report. > I don't believe it is inherently misleading, though. Yes, the "1 more than a multiple of 4" bit is clunky, but not misleading per

[issue34736] Confusing base64.b64decode output

2018-09-22 Thread Tal Einat
Tal Einat added the comment: > I think what I _really_ want as a user is for b64decode to reject strings > containing... Do you mean you'd like to have this behavior by default? One can already use validate=True to have invalid characters cause an exception. I too find it surprising the F

[issue34736] Confusing base64.b64decode output

2018-09-22 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, I'm having trouble thinking of an alternative message that's both accurate and helpful. I think what I _really_ want as a user is for b64decode to reject strings containing "_" and/or "-" as invalid (assuming altchars has been provided), but that would

[issue34736] Confusing base64.b64decode output

2018-09-22 Thread Tal Einat
Change by Tal Einat : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue34736] Confusing base64.b64decode output

2018-09-19 Thread Tal Einat
Tal Einat added the comment: Perhaps something such as "number of base64 data characters cannot be 1 more than a multiple of 4"? -- ___ Python tracker ___ ___

[issue34736] Confusing base64.b64decode output

2018-09-19 Thread Tal Einat
Tal Einat added the comment: I welcome suggestions for improvement! We could either find a better error message covering all cases, or emit a more specific message when non-base64 characters have been skipped. Unfortunately, skipping non-base64 characters is a basic assumption of a2b_base64

[issue34736] Confusing base64.b64decode output

2018-09-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Library (Lib) nosy: +taleinat ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34736] Confusing base64.b64decode output

2018-09-19 Thread Mark Dickinson
New submission from Mark Dickinson : The following error message in Python 3.7 is confusing and unhelpful: >>> s = "FS9qzW_oliGH_Yo=" >>> base64.b64decode(s) Traceback (most recent call last): File "", line 1, in File "/opt/local/Library/Frameworks/Python.framework/Ver