-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed as not planned
Closed as not planned
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
This was detected here: https://github.com/python/cpython/actions/runs/12200589926/job/34037087571#step:22:214
>>> import binascii
>>> x = b'\n\r\n'
>>> y = binascii.b2a_qp(x, quotetabs=False, istext=True, header=False)
>>> z = binascii.a2b_qp(y, header=False)
>>> x
b'\n\r\n'
>>> y
'\n\n'
>>> z
b'\n\n'
I think the issue should only concern new lines characters like that but I honestly don't know whether this is the expected result or not. Note that the docs say:
If the optional argument header is present and false, newline characters will be encoded as well; otherwise linefeed conversion might corrupt the binary data stream.
So it appears that '\r\n' is not correctly encoded as such. I'll investigate.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Related
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done