@@ -361,46 +361,6 @@ module::
361361 PEP written by Barry Warsaw.
362362
363363
364- Email
365- =====
366-
367- The usability of the :mod: `email ` package in Python 3 has been mostly fixed by
368- the extensive efforts of R. David Murray. The problem was that emails are
369- typically read and stored in the form of :class: `bytes ` rather than :class: `str `
370- text, and they may contain multiple encodings within a single email. So, the
371- email package had to be extended to parse and generate email messages in bytes
372- format.
373-
374- * New functions :func: `~email.message_from_bytes ` and
375- :func: `~email.message_from_binary_file `, and new classes
376- :class: `~email.parser.BytesFeedParser ` and :class: `~email.parser.BytesParser `
377- allow binary message data to be parsed into model objects.
378-
379- * Given bytes input to the model, :meth: `~email.message.Message.get_payload `
380- will by default decode a message body that has a
381- :mailheader: `Content-Transfer-Encoding ` of *8bit * using the charset
382- specified in the MIME headers and return the resulting string.
383-
384- * Given bytes input to the model, :class: `~email.generator.Generator ` will
385- convert message bodies that have a :mailheader: `Content-Transfer-Encoding ` of
386- *8bit * to instead have a *7bit * :mailheader: `Content-Transfer-Encoding `.
387-
388- * A new class :class: `~email.generator.BytesGenerator ` produces bytes as output,
389- preserving any unchanged non-ASCII data that was present in the input used to
390- build the model, including message bodies with a
391- :mailheader: `Content-Transfer-Encoding ` of *8bit *.
392-
393- * The :mod: `smtplib ` :class: `~smtplib.SMTP ` class now accepts a byte string
394- for the *msg * argument to the :meth: `~smtplib.SMTP.sendmail ` method,
395- and a new method, :meth: `~smtplib.SMTP.send_message ` accepts a
396- :class: `~email.message.Message ` object and can optionally obtain the
397- *from_addr * and *to_addrs * addresses directly from the object.
398-
399- .. XXX Update before 3.2rc1 to reflect all of the latest work and add examples.
400-
401- (Proposed and implemented by R. David Murray, :issue:`4661` and :issue:`10321`.)
402-
403-
404364Other Language Changes
405365======================
406366
@@ -555,6 +515,46 @@ Some smaller changes made to the core Python language are:
555515New, Improved, and Deprecated Modules
556516=====================================
557517
518+ email
519+ -----
520+
521+ The usability of the :mod: `email ` package in Python 3 has been mostly fixed by
522+ the extensive efforts of R. David Murray. The problem was that emails are
523+ typically read and stored in the form of :class: `bytes ` rather than :class: `str `
524+ text, and they may contain multiple encodings within a single email. So, the
525+ email package had to be extended to parse and generate email messages in bytes
526+ format.
527+
528+ * New functions :func: `~email.message_from_bytes ` and
529+ :func: `~email.message_from_binary_file `, and new classes
530+ :class: `~email.parser.BytesFeedParser ` and :class: `~email.parser.BytesParser `
531+ allow binary message data to be parsed into model objects.
532+
533+ * Given bytes input to the model, :meth: `~email.message.Message.get_payload `
534+ will by default decode a message body that has a
535+ :mailheader: `Content-Transfer-Encoding ` of *8bit * using the charset
536+ specified in the MIME headers and return the resulting string.
537+
538+ * Given bytes input to the model, :class: `~email.generator.Generator ` will
539+ convert message bodies that have a :mailheader: `Content-Transfer-Encoding ` of
540+ *8bit * to instead have a *7bit * :mailheader: `Content-Transfer-Encoding `.
541+
542+ * A new class :class: `~email.generator.BytesGenerator ` produces bytes as output,
543+ preserving any unchanged non-ASCII data that was present in the input used to
544+ build the model, including message bodies with a
545+ :mailheader: `Content-Transfer-Encoding ` of *8bit *.
546+
547+ * The :mod: `smtplib ` :class: `~smtplib.SMTP ` class now accepts a byte string
548+ for the *msg * argument to the :meth: `~smtplib.SMTP.sendmail ` method,
549+ and a new method, :meth: `~smtplib.SMTP.send_message ` accepts a
550+ :class: `~email.message.Message ` object and can optionally obtain the
551+ *from_addr * and *to_addrs * addresses directly from the object.
552+
553+ .. XXX Update before 3.2rc1 to reflect all of the latest work and add examples.
554+
555+ (Proposed and implemented by R. David Murray, :issue: `4661 ` and :issue: `10321 `.)
556+
557+
558558functools
559559---------
560560
@@ -715,7 +715,7 @@ also grew auto-closing context managers::
715715(Contributed by Tarek Ziadé and Giampaolo Rodolà in :issue: `4972 `, and
716716by Georg Brandl in :issue: `8046 ` and :issue: `1286 `.)
717717
718- .. mention os.popen and subprocess.Popen auto-closing of fds
718+ .. XXX mention os.popen and subprocess.Popen auto-closing of fds
719719
720720 gzip
721721----
@@ -764,13 +764,13 @@ sqlite3
764764
765765The :mod: `sqlite3 ` module has two new capabilities.
766766
767- * The :attr: `Connection.in_transit ` attribute is true if there is an active
768- transaction for uncommitted changes.
767+ * The :attr: `sqlite3. Connection.in_transit ` attribute is true if there is an
768+ active transaction for uncommitted changes.
769769
770- * The :meth: `Connection.enable_load_extension ` and
771- :meth: `Connection.load_extension ` methods allows you to load SQLite extensions
772- from ".so" files. One well-known extension is the fulltext-search extension
773- distributed with SQLite.
770+ * The :meth: `sqlite3. Connection.enable_load_extension ` and
771+ :meth: `sqlite3. Connection.load_extension ` methods allows you to load SQLite
772+ extensions from ".so" files. One well-known extension is the fulltext-search
773+ extension distributed with SQLite.
774774
775775(Contributed by R. David Murray and Shashwat Anand; :issue: `8845 `.)
776776
@@ -915,12 +915,11 @@ unittest
915915random
916916------
917917
918- The integer methods in the :mod: `random ` module now do a better job of
919- producing uniform distributions. Previously, they used ``int(n*random()) ``
920- which had a slight bias whenever *n * was not a power of two. The methods
921- affected are :meth: `~random.Random.randrange `, :meth: `~random.Random.randint `,
922- :meth: `~random.Random.choice `, :meth: `~random.Random.shuffle ` and
923- :meth: `~random.Random.sample `.
918+ The integer methods in the :mod: `random ` module now do a better job of producing
919+ uniform distributions. Previously, they used ``int(n*random()) `` which had a
920+ slight bias whenever *n * was not a power of two. The functions and methods
921+ affected are :func: `~random.randrange `, :func: `~random.randint `,
922+ :func: `~random.choice `, :func: `~random.shuffle ` and :func: `~random.sample `.
924923
925924(Contributed by Raymond Hettinger; :issue: `9025 `.)
926925
@@ -958,10 +957,11 @@ cleanup of temporary directories:
958957inspect
959958-------
960959
961- * The :mod: `inspect ` module has a new function :func: `getgenatorstate ` to easily
962- identify the current state of a generator as one of ``GEN_CREATED ``,
963- ``GEN_RUNNING ``, ``GEN_SUSPENDED `` or ``GEN_CLOSED ``. (Contributed by Rodolpho
964- Eckhardt and Nick Coghlan, :issue: `10220 `.)
960+ * The :mod: `inspect ` module has a new function
961+ :func: `~inspect.getgeneratorstate ` to easily identify the current state of a
962+ generator as one of ``GEN_CREATED ``, ``GEN_RUNNING ``, ``GEN_SUSPENDED `` or
963+ ``GEN_CLOSED ``. (Contributed by Rodolpho Eckhardt and Nick Coghlan,
964+ :issue: `10220 `.)
965965
966966* To support lookups without the possibility of activating a dynamic attribute,
967967 the :mod: `inspect ` module has a new function, :func: `~inspect.getattr_static `.
0 commit comments