4646 when researching a change.
4747
4848 This article explains the new features in Python 3.3, compared to 3.2.
49- Python 3.3 was released on September 29, 2012.
49+ Python 3.3 was released on September 29, 2012. For full details,
50+ see the :source: `Misc/NEWS ` file.
51+
52+ .. seealso ::
53+
54+ :pep: `398 ` - Python 3.2 Release Schedule
5055
5156
5257Summary -- Release highlights
@@ -79,6 +84,12 @@ Implementation improvements:
7984* More compact :ref: `unicode strings <pep-393 >`.
8085* More compact :ref: `attribute dictionaries <pep-412 >`.
8186
87+ Significantly Improved Library Modules:
88+
89+ * C Accelerator for the :ref: `decimal <new-decimal >` module.
90+ * Better unicode handling in the :ref: `email <new-email >` module
91+ (:term: `provisional <provisional package> `).
92+
8293Security improvements:
8394
8495* Hash randomization is switched on by default.
@@ -91,9 +102,6 @@ Please read on for a comprehensive list of user-facing changes.
91102PEP 405: Virtual Environments
92103=============================
93104
94- :pep: `405 ` - Python Virtual Environments
95- PEP written by Carl Meyer, implemented by Carl Meyer and Vinay Sajip.
96-
97105Virtual environments help create separate Python setups while sharing a
98106system-wide base install, for ease of maintenance. Virtual environments
99107have their own set of private site packages (i.e. locally-installed
@@ -104,10 +112,17 @@ with the interpreter core.
104112
105113This PEP adds the :mod: `venv ` module for programmatic access, and the
106114:ref: `pyvenv <scripts-pyvenv >` script for command-line access and
107- administration. The Python interpreter becomes aware of a ``pvenv.cfg ``
115+ administration. The Python interpreter checks for a ``pvenv.cfg ``,
108116file whose existence signals the base of a virtual environment's directory
109117tree.
110118
119+ (Implemented by Carl Meyer and Vinay Sajip.)
120+
121+ .. seealso ::
122+
123+ :pep: `405 ` - Python Virtual Environments
124+ PEP written by Carl Meyer
125+
111126
112127PEP 420: Namespace Packages
113128===========================
@@ -117,14 +132,19 @@ marker files and can automatically span multiple path segments (inspired by
117132various third party approaches to namespace packages, as described in
118133:pep: `420 `)
119134
135+ .. seealso ::
136+
137+ :pep: `420 ` - Namespace packages
138+ PEP written by Eric V. Smith; implementation by Eric V. Smith
139+ and Barry Warsaw
140+
120141
121142.. _pep-3118-update :
122143
123144PEP 3118: New memoryview implementation and buffer protocol documentation
124145=========================================================================
125146
126- :issue: `10181 ` - memoryview bug fixes and features.
127- Written by Stefan Krah.
147+ The implementation of :pep: `3118 ` has been significantly improved.
128148
129149The new memoryview implementation comprehensively fixes all ownership and
130150lifetime issues of dynamically allocated fields in the Py_buffer struct
@@ -181,6 +201,13 @@ API changes
181201
182202* For further changes see `Build and C API Changes `_ and `Porting C code `_ .
183203
204+ (Contributed by Stefan Krah in :issue: `10181 `)
205+
206+ .. seealso ::
207+
208+ :pep: `3118 ` - Revising the Buffer Protocol
209+
210+
184211.. _pep-393 :
185212
186213PEP 393: Flexible String Representation
@@ -255,15 +282,18 @@ Python 3.3 is two to three times smaller than Python 3.2, and a little
255282bit better than Python 2.7, on a Django benchmark (see the PEP for
256283details).
257284
285+ .. seealso ::
286+
287+ :pep: `393 ` - Flexible String Representation
288+ PEP written by Martin von Löwis; implementation by Torsten Becker
289+ and Martin von Löwis.
290+
258291
259292.. _pep-3151 :
260293
261294PEP 3151: Reworking the OS and IO exception hierarchy
262295=====================================================
263296
264- :pep: `3151 ` - Reworking the OS and IO exception hierarchy
265- PEP written and implemented by Antoine Pitrou.
266-
267297The hierarchy of exceptions raised by operating system errors is now both
268298simplified and finer-grained.
269299
@@ -325,15 +355,17 @@ inspection of exception attributes::
325355 except PermissionError:
326356 print("You are not allowed to read document.txt")
327357
358+ .. seealso ::
359+
360+ :pep: `3151 ` - Reworking the OS and IO Exception Hierarchy
361+ PEP written and implemented by Antoine Pitrou
362+
328363
329364.. _pep-380 :
330365
331366PEP 380: Syntax for Delegating to a Subgenerator
332367================================================
333368
334- :pep: `380 ` - Syntax for Delegating to a Subgenerator
335- PEP written by Greg Ewing.
336-
337369PEP 380 adds the ``yield from `` expression, allowing a generator to delegate
338370part of its operations to another generator. This allows a section of code
339371containing 'yield' to be factored out and placed in another generator.
@@ -389,17 +421,17 @@ designed to be used with the ``send`` and ``throw`` methods to be split into
389421multiple subgenerators as easily as a single large function can be split into
390422multiple subfunctions.
391423
392- (Implementation by Greg Ewing, integrated into 3.3 by Renaud Blanch, Ryan
393- Kelly and Nick Coghlan, documentation by Zbigniew Jędrzejewski-Szmek and
394- Nick Coghlan)
424+ .. seealso ::
425+
426+ :pep: `380 ` - Syntax for Delegating to a Subgenerator
427+ PEP written by Greg Ewing; implementation by Greg Ewing, integrated into
428+ 3.3 by Renaud Blanch, Ryan Kelly and Nick Coghlan, documentation by
429+ Zbigniew Jędrzejewski-Szmek and Nick Coghlan)
395430
396431
397432PEP 409: Suppressing exception context
398433======================================
399434
400- :pep: `409 ` - Suppressing exception context
401- PEP written by Ethan Furman, implemented by Ethan Furman and Nick Coghlan.
402-
403435PEP 409 introduces new syntax that allows the display of the chained
404436exception context to be disabled. This allows cleaner error messages in
405437applications that convert between exception types::
@@ -454,13 +486,16 @@ suppressed valuable underlying details)::
454486 ...
455487 KeyError('x',)
456488
489+ .. seealso ::
490+
491+ :pep: `409 ` - Suppressing exception context
492+ PEP written by Ethan Furman; implemented by Ethan Furman and Nick
493+ Coghlan.
494+
457495
458496PEP 414: Explicit Unicode literals
459497======================================
460498
461- :pep: `414 ` - Explicit Unicode literals
462- PEP written by Armin Ronacher.
463-
464499To ease the transition from Python 2 for Unicode aware Python applications
465500that make heavy use of Unicode literals, Python 3.3 once again supports the
466501"``u ``" prefix for string literals. This prefix has no semantic significance
@@ -469,13 +504,15 @@ changes in migrating to Python 3, making it easier for developers to focus on
469504the more significant semantic changes (such as the stricter default
470505separation of binary and text data).
471506
507+ .. seealso ::
508+
509+ :pep: `414 ` - Explicit Unicode literals
510+ PEP written by Armin Ronacher.
511+
472512
473513PEP 3155: Qualified name for classes and functions
474514==================================================
475515
476- :pep: `3155 ` - Qualified name for classes and functions
477- PEP written and implemented by Antoine Pitrou.
478-
479516Functions and class objects have a new ``__qualname__ `` attribute representing
480517the "path" from the module top-level to their definition. For global functions
481518and classes, this is the same as ``__name__ ``. For other functions and classes,
@@ -528,28 +565,31 @@ new, more precise information::
528565 >>> str(C.D.meth)
529566 '<function C.D.meth at 0x7f46b9fe31e0>'
530567
568+ .. seealso ::
569+
570+ :pep: `3155 ` - Qualified name for classes and functions
571+ PEP written and implemented by Antoine Pitrou.
572+
531573
532574.. _pep-412 :
533575
534576PEP 412: Key-Sharing Dictionary
535577===============================
536578
537- :pep: `412 ` - Key-Sharing Dictionary
538- PEP written and implemented by Mark Shannon.
539-
540579Dictionaries used for the storage of objects' attributes are now able to
541580share part of their internal storage between each other (namely, the part
542581which stores the keys and their respective hashes). This reduces the memory
543582consumption of programs creating many instances of non-builtin types.
544583
584+ .. seealso ::
585+
586+ :pep: `412 ` - Key-Sharing Dictionary
587+ PEP written and implemented by Mark Shannon.
588+
545589
546590PEP 362: Function Signature Object
547591==================================
548592
549- :pep: `362 `: - Function Signature Object
550- PEP written by Brett Cannon, Yury Selivanov, Larry Hastings, Jiwon Seo.
551- Implemented by Yury Selivanov.
552-
553593A new function :func: `inspect.signature ` makes introspection of python
554594callables easy and straightforward. A broad range of callables is supported:
555595python functions, decorated or not, classes, and :func: `functools.partial `
@@ -559,13 +599,16 @@ such as, annotations, default values, parameters kinds, and bound arguments,
559599which considerably simplifies writing decorators and any code that validates
560600or amends calling signatures or arguments.
561601
602+ .. seealso ::
603+
604+ :pep: `362 `: - Function Signature Object
605+ PEP written by Brett Cannon, Yury Selivanov, Larry Hastings, Jiwon Seo;
606+ implemented by Yury Selivanov.
607+
562608
563609PEP 421: Adding sys.implementation
564610==================================
565611
566- :pep: `421 ` - Adding sys.implementation
567- PEP written and implemented by Eric Snow.
568-
569612A new attribute on the :mod: `sys ` module exposes details specific to the
570613implementation of the currently running interpreter. The initial set of
571614attributes on :attr: `sys.implementation ` are ``name ``, ``version ``,
@@ -594,6 +637,11 @@ namespace, like :class:`dict`, ``SimpleNamespace`` is attribute-based, like
594637are writable. This means that you can add, remove, and modify the namespace
595638through normal attribute access.
596639
640+ .. seealso ::
641+
642+ :pep: `421 ` - Adding sys.implementation
643+ PEP written and implemented by Eric Snow.
644+
597645
598646.. _importlib :
599647
@@ -604,8 +652,6 @@ Using importlib as the Implementation of Import
604652:issue: `14605 ` - Make import machinery explicit
605653:issue: `14646 ` - Require loaders set __loader__ and __package__
606654
607- (Written by Brett Cannon)
608-
609655The :func: `__import__ ` function is now powered by :func: `importlib.__import__ `.
610656This work leads to the completion of "phase 2" of :pep: `302 `. There are
611657multiple benefits to this change. First, it has allowed for more of the
@@ -657,8 +703,9 @@ clean up any stored state as necessary.
657703
658704Visible Changes
659705---------------
660- [For potential required changes to code, see the `Porting Python code `_
661- section]
706+
707+ For potential required changes to code, see the `Porting Python code `_
708+ section.
662709
663710Beyond the expanse of what :mod: `importlib ` now exposes, there are other
664711visible changes to import. The biggest is that :attr: `sys.meta_path ` and
@@ -686,6 +733,8 @@ All other changes relate to semantic changes which should be taken into
686733consideration when updating code for Python 3.3, and thus should be read about
687734in the `Porting Python code `_ section of this document.
688735
736+ (Implementation by Brett Cannon)
737+
689738
690739Other Language Changes
691740======================
@@ -702,7 +751,6 @@ Some smaller changes made to the core Python language are:
702751
703752* Equality comparisons on :func: `range ` objects now return a result reflecting
704753 the equality of the underlying sequences generated by those range objects.
705-
706754 (:issue: `13201 `)
707755
708756* The ``count() ``, ``find() ``, ``rfind() ``, ``index() `` and ``rindex() ``
@@ -712,19 +760,21 @@ Some smaller changes made to the core Python language are:
712760 (Contributed by Petri Lehtinen in :issue: `12170 `)
713761
714762* New methods have been added to :class: `list ` and :class: `bytearray `:
715- ``copy() `` and ``clear() ``.
716-
717- (:issue: `10516 `)
763+ ``copy() `` and ``clear() ``. (:issue: `10516 `)
718764
719765* Raw bytes literals can now be written ``rb"..." `` as well as ``br"..." ``.
766+
720767 (Contributed by Antoine Pitrou in :issue: `13748 `.)
721768
722769* :meth: `dict.setdefault ` now does only one lookup for the given key, making
723770 it atomic when used with built-in types.
771+
724772 (Contributed by Filip Gruszczyński in :issue: `13521 `.)
725773
774+ * The error messages produced when a function call does not match the function
775+ signature have been significantly improved.
726776
727- .. XXX mention new error messages for passing wrong number of arguments to functions
777+ (Contributed by Benjamin Peterson.)
728778
729779
730780A Finer-Grained Import Lock
@@ -741,7 +791,7 @@ serializes importation of a given module from multiple threads (preventing
741791the exposure of incompletely initialized modules), while eliminating the
742792aforementioned annoyances.
743793
744- (contributed by Antoine Pitrou in :issue: `9260 `.)
794+ (Contributed by Antoine Pitrou in :issue: `9260 `.)
745795
746796
747797Builtin functions and types
@@ -764,6 +814,7 @@ Builtin functions and types
764814 documentation sections for the individual builtin sequence types
765815 (:issue: `4966 `)
766816
817+
767818New Modules
768819===========
769820
@@ -978,6 +1029,9 @@ datetime
9781029 called without arguments to convert datetime instance to the system
9791030 timezone.
9801031
1032+
1033+ .. _new-decimal :
1034+
9811035decimal
9821036-------
9831037
@@ -1075,6 +1129,8 @@ API changes
10751129 is deprecated.
10761130
10771131
1132+ .. _new-email :
1133+
10781134email
10791135-----
10801136
0 commit comments