summaryrefslogtreecommitdiffstats
path: root/Lib/email/charset.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.9] gh-77630: Change Charset to charset (GH-92439) (GH-92477)Miss Islington (bot)2022-05-081-5/+5
| | | | | | | | (cherry picked from commit 8f293180791f2836570bdfc29aadba04a538d435) Co-authored-by: slateny <46876382+slateny@users.noreply.github.com> Automerge-Triggered-By: GH:serhiy-storchaka
* bpo-36793: Remove unneeded __str__ definitions. (GH-13081)Serhiy Storchaka2019-05-061-3/+1
| | | | Classes that define __str__ the same as __repr__ can just inherit it from object.
* Issue #23326: Removed __ne__ implementations. Since fixing default __ne__Serhiy Storchaka2015-01-311-3/+0
| | | | implementation in issue #21408 they are redundant.
* #20531: Apply the 3.3 version of the #19063 fix.R David Murray2014-02-071-7/+4
| | | | | So passing unicode to set_payload works again (but still doesn't do what you want when the message is serialized).
* #20531: Revert e20f98a8ed71, the 3.4 version of the #19063 fix.R David Murray2014-02-071-11/+18
|
* #19063: fix set_payload handling of non-ASCII string input.R David Murray2013-12-111-18/+11
| | | | | 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).
* #18437: fix comment typo.R David Murray2013-07-131-1/+1
|
* #16948: Fix quopri encoding of non-latin1 character sets.R David Murray2013-02-051-0/+13
|
* #11554: reactivate test_email_codecs, and make it pass.R David Murray2011-03-151-2/+7
| | | | | | | | | The fix is to charset.py, which was not doing the encoding to the correct output character set when doing a body_encode for either the shift-jis or euc-jp charsets. There's also a fix for handling a bytes input in encoders.py. Patch by Michael Henry, comment changes by me.
* Fix header encoding of long headers when using euc-jp and shift_jis.R David Murray2011-03-151-1/+1
| | | | | | | When a header was long enough to need to be split across lines, the input charset name was used instead of the output charset name in the encoded words. This make a difference only for the two charsets above.
* #10686: recode non-ASCII headers to 'unknown-8bit' instead of ?s.R. David Murray2011-01-071-6/+16
| | | | | | This applies only when generating strings from non-RFC compliant binary input; it makes the existing recoding behavior more consistent (ie: now no data is lost when recoding).
* Remove doc for nonexisting parameter.Georg Brandl2011-01-061-3/+1
|
* Fix Charset.body_encode to encode to output_charset before calling base64mime.R. David Murray2010-06-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This means that what gets encoded in base64 is the encoded version of the unicode payload. This bug was revealed by a forward port of the tests from Issue 1368247, but the fix was completely different. Note that the merge is only of the tests, the doc changes were inappropriate since email5 expects unicode, not bytes. I'm also not convinced that quopri works correctly in email5, but that's a different issue. Merged revisions 81658 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81658 | r.david.murray | 2010-06-02 18:03:15 -0400 (Wed, 02 Jun 2010) | 9 lines #1368247: make set_charset/MIMEText automatically encode unicode _payload. Fixes (mysterious, to the end user) UnicodeErrors when using utf-8 as the charset and unicode as the _text argument. Also makes the way in which unicode gets encoded to quoted printable for other charsets more sane (it only worked by accident previously). The _payload now is encoded to the charset.output_charset if it is unicode. ........
* Oops. I copied a slightly older version of the email package from the sandbox.Guido van Rossum2007-08-301-97/+92
| | | | | | | This should restore the email package in the py3k branch to exactly what's in the sandbox. This wipes out 1-2 fixes made post-copy, which I'll re-apply shortly.
* Copying the email package back, despite its failings.Guido van Rossum2007-08-301-0/+389
|
* Remove the email package for now.Guido van Rossum2007-08-251-391/+0
| | | | | | Once Barry and the email-sig have a working new version we'll add it back. If it doesn't make the 3.0a deadline (release August 31), too bad.
* Rip out all the u"..." literals and calls to unicode().Guido van Rossum2007-05-021-6/+6
|
* Merged revisions 53538-53622 via svnmerge fromThomas Wouters2007-02-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r53545 | andrew.kuchling | 2007-01-24 21:06:41 +0100 (Wed, 24 Jan 2007) | 1 line Strengthen warning about using lock() ........ r53556 | thomas.heller | 2007-01-25 19:34:14 +0100 (Thu, 25 Jan 2007) | 3 lines Fix for #1643874: When calling SysAllocString, create a PyCObject which will eventually call SysFreeString to free the BSTR resource. ........ r53563 | andrew.kuchling | 2007-01-25 21:02:13 +0100 (Thu, 25 Jan 2007) | 1 line Add item ........ r53564 | brett.cannon | 2007-01-25 21:22:02 +0100 (Thu, 25 Jan 2007) | 8 lines Fix time.strptime's %U support. Basically rewrote the algorithm to be more generic so that one only has to shift certain values based on whether the week was specified to start on Monday or Sunday. Cut out a lot of edge case code compared to the previous version. Also broke algorithm out into its own function (that is private to the module). Fixes bug #1643943 (thanks Biran Nahas for the report). ........ r53570 | brett.cannon | 2007-01-26 00:30:39 +0100 (Fri, 26 Jan 2007) | 4 lines Remove specific mention of my name and email address from modules. Not really needed and all bug reports should go to the bug tracker, not directly to me. Plus I am not the only person to have edited these files at this point. ........ r53573 | fred.drake | 2007-01-26 17:28:44 +0100 (Fri, 26 Jan 2007) | 1 line fix typo (extraneous ")") ........ r53575 | georg.brandl | 2007-01-27 18:43:02 +0100 (Sat, 27 Jan 2007) | 4 lines Patch #1638243: the compiler package is now able to correctly compile a with statement; previously, executing code containing a with statement compiled by the compiler package crashed the interpreter. ........ r53578 | georg.brandl | 2007-01-27 18:59:42 +0100 (Sat, 27 Jan 2007) | 3 lines Patch #1634778: add missing encoding aliases for iso8859_15 and iso8859_16. ........ r53579 | georg.brandl | 2007-01-27 20:38:50 +0100 (Sat, 27 Jan 2007) | 2 lines Bug #1645944: os.access now returns bool but docstring is not updated ........ r53590 | brett.cannon | 2007-01-28 21:58:00 +0100 (Sun, 28 Jan 2007) | 2 lines Use the thread lock's context manager instead of a try/finally statement. ........ r53591 | brett.cannon | 2007-01-29 05:41:44 +0100 (Mon, 29 Jan 2007) | 2 lines Add a test for slicing an exception. ........ r53594 | andrew.kuchling | 2007-01-29 21:21:43 +0100 (Mon, 29 Jan 2007) | 1 line Minor edits to the curses HOWTO ........ r53596 | andrew.kuchling | 2007-01-29 21:55:40 +0100 (Mon, 29 Jan 2007) | 1 line Various minor edits ........ r53597 | andrew.kuchling | 2007-01-29 22:28:48 +0100 (Mon, 29 Jan 2007) | 1 line More edits ........ r53601 | tim.peters | 2007-01-30 04:03:46 +0100 (Tue, 30 Jan 2007) | 2 lines Whitespace normalization. ........ r53603 | georg.brandl | 2007-01-30 21:21:30 +0100 (Tue, 30 Jan 2007) | 2 lines Bug #1648191: typo in docs. ........ r53605 | brett.cannon | 2007-01-30 22:34:36 +0100 (Tue, 30 Jan 2007) | 8 lines No more raising of string exceptions! The next step of PEP 352 (for 2.6) causes raising a string exception to trigger a TypeError. Trying to catch a string exception raises a DeprecationWarning. References to string exceptions has been removed from the docs since they are now just an error. ........ r53618 | raymond.hettinger | 2007-02-01 22:02:59 +0100 (Thu, 01 Feb 2007) | 1 line Bug #1648179: set.update() not recognizing __iter__ overrides in dict subclasses. ........
* Killed the <> operator. You must now use !=.Guido van Rossum2006-08-241-2/+2
| | | | | Opportunistically also fixed one or two places where '<> None' should be 'is not None' and where 'type(x) <> y' should be 'not isinstance(x, y)'.
* Merge p3yk branch with the trunk up to revision 45595. This breaks a fairThomas Wouters2006-04-211-0/+388
number of tests, all because of the codecs/_multibytecodecs issue described here (it's not a Py3K issue, just something Py3K discovers): http://mail.python.org/pipermail/python-dev/2006-April/064051.html Hye-Shik Chang promised to look for a fix, so no need to fix it here. The tests that are expected to break are: test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecs test_multibytecodec This merge fixes an actual test failure (test_weakref) in this branch, though, so I believe merging is the right thing to do anyway.