Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
994d3805
Commit
994d3805
authored
Jan 30, 2011
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add entry for the mailbox fixups.
parent
b7deff1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
Doc/whatsnew/3.2.rst
Doc/whatsnew/3.2.rst
+28
-0
No files found.
Doc/whatsnew/3.2.rst
View file @
994d3805
...
...
@@ -2144,6 +2144,34 @@ parameters, the return types will also be an ASCII-encoded byte strings:
(Work by Nick Coghlan, Dan Mahn, and Senthil Kumaran in :issue:`2987`,
:issue:`5468`, and :issue:`9873`.)
mailbox
-------
Thanks to a concerted effort by R. David Murray, the :mod:`mailbox` module has
been fixed for Python 3.2. The challenge was that mailbox had been originally
designed with a text interface, but email messages are best represented with
:class:`bytes` because various parts of a message may have different encodings.
The solution harnessed the :mod:`email` package's binary support for parsing
arbitrary email messages. In addition, the solution required a number of API
changes.
As expected, the :meth:`~mailbox.Mailbox.add` method for
:class:`mailbox.Mailbox` objects now accepts binary input.
:class:`~io.StringIO` and text file input are deprecated. Also, string input
will fail early if non-ASCII characters are used. Previously it would fail when
the email was processed in a later step.
There is also support for binary output. The :meth:`~mailbox.Mailbox.get_file`
method now returns a file in the binary mode (where it used to incorrectly set
the file to text-mode). There is also a new :meth:`~mailbox.Mailbox.get_bytes`
method that returns a :class:`bytes` representation of a message corresponding
to a given *key*.
(Contributed by R. David Murray with efforts from Steffen Daode Nurpmeso and
Victor Stinner in :issue:`9124`.)
turtledemo
----------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment