Giampaolo Rodolà | 3108f98 | 2011-02-24 20:59:48 +0000 | [diff] [blame] | 1 | **************************** |
| 2 | What's New In Python 3.3 |
| 3 | **************************** |
| 4 | |
| 5 | :Author: Raymond Hettinger |
| 6 | :Release: |release| |
| 7 | :Date: |today| |
| 8 | |
| 9 | .. $Id$ |
| 10 | Rules for maintenance: |
| 11 | |
| 12 | * Anyone can add text to this document. Do not spend very much time |
| 13 | on the wording of your changes, because your text will probably |
| 14 | get rewritten to some degree. |
| 15 | |
| 16 | * The maintainer will go through Misc/NEWS periodically and add |
| 17 | changes; it's therefore more important to add your changes to |
| 18 | Misc/NEWS than to this file. |
| 19 | |
| 20 | * This is not a complete list of every single change; completeness |
| 21 | is the purpose of Misc/NEWS. Some changes I consider too small |
| 22 | or esoteric to include. If such a change is added to the text, |
| 23 | I'll just remove it. (This is another reason you shouldn't spend |
| 24 | too much time on writing your addition.) |
| 25 | |
| 26 | * If you want to draw your new text to the attention of the |
| 27 | maintainer, add 'XXX' to the beginning of the paragraph or |
| 28 | section. |
| 29 | |
| 30 | * It's OK to just add a fragmentary note about a change. For |
| 31 | example: "XXX Describe the transmogrify() function added to the |
| 32 | socket module." The maintainer will research the change and |
| 33 | write the necessary text. |
| 34 | |
| 35 | * You can comment out your additions if you like, but it's not |
| 36 | necessary (especially when a final release is some months away). |
| 37 | |
| 38 | * Credit the author of a patch or bugfix. Just the name is |
| 39 | sufficient; the e-mail address isn't necessary. |
| 40 | |
| 41 | * It's helpful to add the bug/patch number as a comment: |
| 42 | |
| 43 | % Patch 12345 |
| 44 | XXX Describe the transmogrify() function added to the socket |
| 45 | module. |
| 46 | (Contributed by P.Y. Developer.) |
| 47 | |
| 48 | This saves the maintainer the effort of going through the SVN log |
| 49 | when researching a change. |
| 50 | |
| 51 | This article explains the new features in Python 3.3, compared to 3.2. |
| 52 | |
| 53 | |
| 54 | PEP XXX: Stub |
| 55 | ============= |
| 56 | |
| 57 | |
| 58 | Other Language Changes |
| 59 | ====================== |
| 60 | |
| 61 | Some smaller changes made to the core Python language are: |
| 62 | |
| 63 | * Stub |
| 64 | |
| 65 | |
| 66 | New, Improved, and Deprecated Modules |
| 67 | ===================================== |
| 68 | |
| 69 | * Stub |
| 70 | |
Giampaolo Rodolà | c9c2c8b | 2011-02-25 14:39:16 +0000 | [diff] [blame] | 71 | os |
| 72 | -- |
| 73 | |
Giampaolo Rodolà | 18e8bcb | 2011-02-25 20:57:54 +0000 | [diff] [blame] | 74 | * The :mod:`os` module has a new :func:`~os.sendfile` function which provides |
| 75 | an efficent "zero-copy" way for copying data from one file (or socket) |
| 76 | descriptor to another. The phrase "zero-copy" refers to the fact that all of |
| 77 | the copying of data between the two descriptors is done entirely by the |
| 78 | kernel, with no copying of data into userspace buffers. :func:`~os.sendfile` |
| 79 | can be used to efficiently copy data from a file on disk to a network socket, |
| 80 | e.g. for downloading a file. |
Giampaolo Rodolà | c9c2c8b | 2011-02-25 14:39:16 +0000 | [diff] [blame] | 81 | |
Giampaolo Rodolà | 18e8bcb | 2011-02-25 20:57:54 +0000 | [diff] [blame] | 82 | (Patch submitted by Ross Lagerwall and Giampaolo Rodolà in :issue:`10882`.) |
| 83 | |
| 84 | * The :mod:`os` module has two new functions: :func:`~os.getpriority` and |
| 85 | :func:`~os.setpriority`. They can be used to get or set process |
| 86 | niceness/priority in a fashion similar to :func:`os.nice` but extended to all |
| 87 | processes instead of just the current one. |
| 88 | |
| 89 | (Patch submitted by Giampaolo Rodolà in :issue:`10784`.) |
Giampaolo Rodolà | 3108f98 | 2011-02-24 20:59:48 +0000 | [diff] [blame] | 90 | |
Giampaolo Rodolà | 424298a | 2011-03-03 18:34:06 +0000 | [diff] [blame] | 91 | nntplib |
| 92 | ------- |
| 93 | |
| 94 | The :class:`nntplib.NNTP` class now supports the context manager protocol to |
| 95 | unconditionally consume :exc:`socket.error` exceptions and to close the NNTP |
| 96 | connection when done:: |
| 97 | |
| 98 | >>> from nntplib import NNTP |
| 99 | >>> with nntplib.NNTP('news.gmane.org') as n: |
| 100 | ... n.group('gmane.comp.python.committers') |
| 101 | ... |
| 102 | ('211 1454 1 1454 gmane.comp.python.committers', '1454', '1', '1454', 'gmane.comp.python.committers') |
| 103 | >>> |
| 104 | |
| 105 | (Contributed by Giampaolo Rodolà in :issue:`9795`) |
| 106 | |
Giampaolo Rodolà | 3108f98 | 2011-02-24 20:59:48 +0000 | [diff] [blame] | 107 | Optimizations |
| 108 | ============= |
| 109 | |
| 110 | Major performance enhancements have been added: |
| 111 | |
| 112 | * Stub |
| 113 | |
| 114 | |
| 115 | Build and C API Changes |
| 116 | ======================= |
| 117 | |
| 118 | Changes to Python's build process and to the C API include: |
| 119 | |
| 120 | * Stub |
| 121 | |
| 122 | |
| 123 | Porting to Python 3.3 |
| 124 | ===================== |
| 125 | |
| 126 | This section lists previously described changes and other bugfixes |
| 127 | that may require changes to your code: |
| 128 | |
| 129 | * Stub |
| 130 | |
Éric Araujo | c09fca6 | 2011-03-23 02:06:24 +0100 | [diff] [blame^] | 131 | |
| 132 | .. Issue #11591: When :program:`python` was started with :option:`-S`, |
| 133 | ``import site`` will not add site-specific paths to the module search |
| 134 | paths. In previous versions, it did. See changeset for doc changes in |
| 135 | various files. Contributed by Carl Meyer with editions by Éric Araujo. |