GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — gh-144001: Support ignorechars in binascii.a2b_base64() and base64.b64decode() by serhiy-storchaka · Pull Request #144024 · python/cpython Conversation
|
|
This is a draft because I am going to apply the error handling changes in a separate issue first. We can also apply some optimizations -- cache the ignored chars and returning on fast path after ignored characters. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
1b0bb87 to
192d535
Compare
|
Well, the issue with error handling was just that the error message could be more specific in some cases. It is not a bug. It can be included in this PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
192d535 to
4f3847e
Compare
There was an error while loading. Please reload this page.
|
No worries, that was the point I was just free on Sunday, so I push out a PR in case you haven't started on it. BTW your PR looks good, I am no maintainer but you just have to run |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I'm fine with changing validate default to True if ignorechars is specified. The change produces more precise error messages. It also adds a lot of tests which is always a good thing :-)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Taking a quick look: The docs in this PR changed the default for validate and strict_mode from False to True. But versionchanged does not mention that change and there was no deprecation period. Did this behavior change? The docs need fixing at a minimum but if the behavior changed we also need a deprecation cycle. What I understand @vstinner above to be saying is to change the default only in the case of the new parameter being supplied? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
that may just be a simple doc fix. the declaration lines need to not state a value for the parameters who's default behavior varies based on context: The text below describes a dynamic behavior on both, but people will absolutely misread the function signature and not read the text if we do not indicate it in the signature. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, I do not understand. How is it different from what is in the documentation now? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Deprecation period is needed if we want to change the existing behavior into error. But |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The default remains |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I like that. It's quick to read. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.