| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Patch by Cory Benfield.
|
| |
|
|
|
|
|
|
|
|
|
| |
It is unlikely anyone is using the fact that the dictionary returned
by the 'params' attribute was previously writable, but even if someone
is the API is provisional so this kind of change is acceptable (and
needed, to get the API "right" before it becomes official).
Patch by Stéphane Wirtel.
|
| |
|
|
|
|
|
|
| |
Since EmailMessage is a provisional API we can fix API bugs in a
maintenance release, but I used a trick suggested by Serhiy to
maintain backward compatibility with 3.4.0/1.
|
| |
|
|
|
|
|
|
| |
long line.
Original patch by Raymond Hettinger.
|
| |
|
|
|
|
| |
This makes the behavior match that of Parser. Patch by Vajrasky Kok.
|
| |
|
| |
|
| |
|
|
|
|
| |
Original patch by Varun Sharma.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is more RFC compliant (see issue) and fixes a problem with
signature verifiers rejecting the part when signed. There is some
amount of backward compatibility concern here since it changes
the output, but the RFC issue coupled with fixing the problem
with signature verifiers seems worth the small risk of breaking
code that depends on the current incorrect output.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This applies only to the new parser. The old parser decodes encoded words
inside quoted strings already, although it gets the whitespace wrong
when it does so.
This version of the patch only handles the most common case (a single encoded
word surrounded by quotes), but I haven't seen any other variations of this in
the wild yet, so its good enough for now.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a bit of an ugly hack because of the way generator pieces together the
output message. The deepcopys aren't too expensive, though, because we know it
is only called on messages that are not multiparts, and the payload (the thing
that could be large) is an immutable object.
Test and preliminary work on patch by Vajrasky Kok.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
This fixes a regression relative to python2.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| | |
So passing unicode to set_payload works again (but still doesn't
do what you want when the message is serialized).
|
| | |
|
| |
| |
| |
| |
| | |
In 3.5 I will fix this right by adding a message_factory attribute
to the policy.
|
|\ \
| |/
| |
| | |
(No idea why test_tarfile is listed as changed...it isn't.)
|
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes an edge case (20206) where if the input ended in a character
needing encoding but there was no newline on the string, the last byte
of the encoded character would be dropped. The fix is to use a more
efficient algorithm, provided by Serhiy Storchaka (5803), that does not
have the bug.
|
| |
| |
| |
| |
| |
| | |
This is a backward compatible partial fix, the complete fix requires raising
an error instead of accepting the invalid input, so the real fix is only
suitable for 3.4.
|
| |
| |
| |
| | |
Patch by Vajrasky Kok, test enhancement by me.
|
| |
| |
| |
| |
| | |
This version of the fix raises an error instead of accepting the invalid
input (ie: if a non-ASCII string is used but no charset is specified).
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Patch by Vajrasky Kok.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds EmailMessage and, MIMEPart subclasses of Message
with new API methods, and a ContentManager class used by
the new methods. Also a new policy setting, content_manager.
Patch was reviewed by Stephen J. Turnbull and Serhiy Storchaka,
and reflects their feedback.
I will ideally add some examples of using the new API to the
documentation before the final release.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This also backs out the previous fixes for for #14360, #1717, and #16564.
Those bugs were actually caused by the fact that set_payload didn't decode to
str, thus rendering the model inconsistent. This fix does mean the data
processed by the encoder functions goes through an extra encode/decode cycle,
but it means the model is always consistent. Future API updates will provide
a better way to encode payloads, which will bypass this minor de-optimization.
Tests by Vajrasky Kok.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This was triggered by wanting to make the doctest in email.policy.rst pass;
as_bytes and __bytes__ are clearly useful now that we have BytesGenerator.
Also updated the Message docs to document the policy keyword that was
added in 3.3.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| | |
There is more to be done here in terms of accepting RFC invalid
input that some mailers accept, but this covers the valid
RFC places where encoded words can occur in structured headers.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The problem was I was only checking for decimal digits after the third '?',
not for *hex* digits :(.
This changeset also fixes a couple of comment typos, deletes an unused
function relating to encoded word parsing, and removed an invalid
'if' test from the folding function that was revealed by the tests
written to validate this issue.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Mukhamedzhanova.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There were no tests for the encoders module. encode_base64 worked
because it is the default and so got tested implicitly elsewhere, and
we use encode_7or8bit internally, so that worked, too. I previously
fixed encode_noop, so this fix means that everythign in the encoders
module now works, hopefully correctly. Also added an explicit test
for encode_base64.
|
| |
| |
| |
| |
| |
| |
| | |
The new _has_surrogates code was suggested by Serhiy Storchaka. See
the issue for timings, but it is far faster than any other alternative,
and also removes the load time that we previously incurred from compiling
the complex regex this replaces.
|