mirror of https://github.com/python/cpython
Add several items and placeholders
This commit is contained in:
parent
b585255f02
commit
71d5c28d97
|
@ -6,7 +6,8 @@
|
|||
:Release: |release|
|
||||
:Date: |today|
|
||||
|
||||
.. Fix accents on Kristjan Valur Jonsson, Fuerstenau.
|
||||
.. Fix accents on Kristjan Valur Jonsson, Fuerstenau, Tarek Ziade.
|
||||
.. OrderedDict
|
||||
|
||||
.. $Id$
|
||||
Rules for maintenance:
|
||||
|
@ -57,10 +58,18 @@ No release schedule has been decided yet for 2.7.
|
|||
|
||||
.. ========================================================================
|
||||
.. Large, PEP-level features and changes should be described here.
|
||||
.. Should there be a new section here for 3k migration?
|
||||
.. Or perhaps a more general section describing module changes/deprecation?
|
||||
.. ========================================================================
|
||||
|
||||
PEP 372: Adding an ordered dictionary to collections
|
||||
=============================
|
||||
|
||||
XXX write this
|
||||
|
||||
Several modules will now use :class:`OrderedDict` by default. The
|
||||
:mod:`ConfigParser` module uses :class:`OrderedDict` for the list
|
||||
of sections and the options within a section.
|
||||
The :method:`namedtuple._asdict` method returns an :class:`OrderedDict`
|
||||
as well.
|
||||
|
||||
|
||||
Other Language Changes
|
||||
|
@ -86,30 +95,6 @@ Some smaller changes made to the core Python language are:
|
|||
(Contributed by Fredrik Johansson and Victor Stinner; :issue:`3439`.)
|
||||
|
||||
|
||||
* Integers are now stored internally either in base 2**15 or in base
|
||||
2**30, the base being determined at build time. Previously, they
|
||||
were always stored in base 2**15. Using base 2**30 gives
|
||||
significant performance improvements on 64-bit machines, but
|
||||
benchmark results on 32-bit machines have been mixed. Therefore,
|
||||
the default is to use base 2**30 on 64-bit machines and base 2**15
|
||||
on 32-bit machines; on Unix, there's a new configure option
|
||||
--enable-big-digits that can be used to override this default.
|
||||
|
||||
Apart from the performance improvements this change should be
|
||||
invisible to end users, with one exception: for testing and
|
||||
debugging purposes there's a new structseq ``sys.long_info`` that
|
||||
provides information about the internal format, giving the number of
|
||||
bits per digit and the size in bytes of the C type used to store
|
||||
each digit::
|
||||
|
||||
>>> import sys
|
||||
>>> sys.long_info
|
||||
sys.long_info(bits_per_digit=30, sizeof_digit=4)
|
||||
|
||||
|
||||
(Contributed by Mark Dickinson; :issue:`4258`.)
|
||||
|
||||
|
||||
.. ======================================================================
|
||||
|
||||
|
||||
|
@ -129,18 +114,44 @@ A few performance enhancements have been added:
|
|||
(Suggested by Martin von Loewis and implemented by Antoine Pitrou;
|
||||
:issue:`4074`.)
|
||||
|
||||
* The garbage collector tries to avoid tracking simple containers which
|
||||
can't be part of a cycle. As of now, this is true for tuples and dicts
|
||||
containing atomic types (such as ints, strings, etc.). Transitively, a dict
|
||||
containing tuples of atomic types won't be tracked either. This helps bring
|
||||
down the individual cost of each garbage collection, since it decreases the
|
||||
number of objects to be considered and traversed by the collector.
|
||||
|
||||
To help diagnosing this optimization, a new function in the :mod:`gc`
|
||||
module, :func:`is_tracked`, returns True if a given instance is tracked
|
||||
by the garbage collector, False otherwise.
|
||||
* The garbage collector tries to avoid tracking simple containers
|
||||
which can't be part of a cycle. In Python 2.7, this is now true for
|
||||
tuples and dicts containing atomic types (such as ints, strings,
|
||||
etc.). Transitively, a dict containing tuples of atomic types won't
|
||||
be tracked either. This helps reduce the cost of each
|
||||
garbage collection by decreasing the number of objects to be
|
||||
considered and traversed by the collector.
|
||||
(Contributed by Antoine Pitrou; :issue:`4688`.)
|
||||
|
||||
* Integers are now stored internally either in base 2**15 or in base
|
||||
2**30, the base being determined at build time. Previously, they
|
||||
were always stored in base 2**15. Using base 2**30 gives
|
||||
significant performance improvements on 64-bit machines, but
|
||||
benchmark results on 32-bit machines have been mixed. Therefore,
|
||||
the default is to use base 2**30 on 64-bit machines and base 2**15
|
||||
on 32-bit machines; on Unix, there's a new configure option
|
||||
:option:`--enable-big-digits` that can be used to override this default.
|
||||
|
||||
Apart from the performance improvements this change should be
|
||||
invisible to end users, with one exception: for testing and
|
||||
debugging purposes there's a new structseq ``sys.long_info`` that
|
||||
provides information about the internal format, giving the number of
|
||||
bits per digit and the size in bytes of the C type used to store
|
||||
each digit::
|
||||
|
||||
>>> import sys
|
||||
>>> sys.long_info
|
||||
sys.long_info(bits_per_digit=30, sizeof_digit=4)
|
||||
|
||||
|
||||
(Contributed by Mark Dickinson; :issue:`4258`.)
|
||||
|
||||
* The division algorithm for long integers has been made faster
|
||||
by tightening the inner loop, doing shifts instead of multiplications,
|
||||
and fixing an unnecessary extra iteration.
|
||||
Various benchmarks show speedups of between 50% and 150% for long
|
||||
integer divisions and modulo operations.
|
||||
(Contributed by Mark Dickinson; :issue:`5512`.)
|
||||
|
||||
.. ======================================================================
|
||||
|
||||
|
@ -153,14 +164,11 @@ changes, sorted alphabetically by module name. Consult the
|
|||
:file:`Misc/NEWS` file in the source tree for a more complete list of
|
||||
changes, or look through the Subversion logs for all the details.
|
||||
|
||||
* In Distutils, distutils.sdist.add_defaults now uses package_dir and data_files
|
||||
to feed MANIFEST.
|
||||
|
||||
* It is not mandatory anymore to store clear text passwords in the
|
||||
* It is no longer mandatory to store clear-text passwords in the
|
||||
:file:`.pypirc` file when registering and uploading packages to PyPI. As long
|
||||
as the username is present in that file, the :mod:`distutils` package will
|
||||
prompt for the password if not present. (Added by tarek, with the initial
|
||||
contribution of Nathan Van Gheem; :issue:`4394`.)
|
||||
prompt for the password if not present. (Added by Tarek Ziade,
|
||||
with the initial contribution by Nathan Van Gheem; :issue:`4394`.)
|
||||
|
||||
* The :mod:`bz2` module's :class:`BZ2File` now supports the context
|
||||
management protocol, so you can write ``with bz2.BZ2File(...) as f: ...``.
|
||||
|
@ -200,6 +208,13 @@ changes, or look through the Subversion logs for all the details.
|
|||
|
||||
Contributed by Raymond Hettinger; :issue:`1696199`.
|
||||
|
||||
* In Distutils, :func:`distutils.sdist.add_defaults` now uses
|
||||
*package_dir* and *data_files* to feed MANIFEST.
|
||||
|
||||
* A new function in the :mod:`gc` module, :func:`is_tracked`, returns
|
||||
True if a given instance is tracked by the garbage collector, False
|
||||
otherwise. (Contributed by Antoine Pitrou; :issue:`4688`.)
|
||||
|
||||
* The :mod:`gzip` module's :class:`GzipFile` now supports the context
|
||||
management protocol, so you can write ``with gzip.GzipFile(...) as f: ...``.
|
||||
(Contributed by Hagen Fuerstenau; :issue:`3860`.)
|
||||
|
@ -208,6 +223,17 @@ changes, or look through the Subversion logs for all the details.
|
|||
an invalid file descriptor. (Implemented by Benjamin Peterson;
|
||||
:issue:`4991`.)
|
||||
|
||||
* The :class:`itertools`
|
||||
* The :mod:`json` module was upgraded to version 2.0.9 of the
|
||||
simplejson package, which includes a C extension that makes
|
||||
encoding and decoding faster.
|
||||
(Contributed by Bob Ippolito; :issue:`4136`.)
|
||||
|
||||
To support the new :class:`OrderedDict` type, :func:`json.load`
|
||||
now has an optional *object_pairs_hook* parameter that will be called
|
||||
with any object literal that decodes to a list of pairs.
|
||||
(Contributed by Raymond Hettinger; :issue:`5381`.)
|
||||
|
||||
* The :mod:`pydoc` module now has help for the various symbols that Python
|
||||
uses. You can now do ``help('<<')`` or ``help('@')``, for example.
|
||||
(Contributed by David Laban; :issue:`4739`.)
|
||||
|
@ -229,6 +255,13 @@ changes, or look through the Subversion logs for all the details.
|
|||
|
||||
(Contributed by Gregory P. Smith.)
|
||||
|
||||
* The :mod:`unittest` module was enhanced in several ways.
|
||||
Test cases can raise the :exc:`SkipTest` exception to skip a test.
|
||||
(:issue:`1034053`.)
|
||||
It will now use 'x' for expected failures
|
||||
and 'u' for unexpected successes when run in its verbose mode.
|
||||
(Contributed by Benjamin Peterson.)
|
||||
|
||||
* The :func:`is_zipfile` function in the :mod:`zipfile` module will now
|
||||
accept a file object, in addition to the path names accepted in earlier
|
||||
versions. (Contributed by Gabriel Genellina; :issue:`4756`.)
|
||||
|
@ -236,6 +269,11 @@ changes, or look through the Subversion logs for all the details.
|
|||
.. ======================================================================
|
||||
.. whole new modules get described in subsections here
|
||||
|
||||
importlib: Importing Modules
|
||||
------------------------------
|
||||
|
||||
XXX write this
|
||||
|
||||
ttk: Themed Widgets for Tk
|
||||
--------------------------
|
||||
|
||||
|
@ -294,6 +332,16 @@ Port-Specific Changes: Mac OS X
|
|||
-----------------------------------
|
||||
|
||||
|
||||
Other Changes and Fixes
|
||||
=======================
|
||||
|
||||
* The :file:`regrtest.py` script now takes a :option:`--randseed=`
|
||||
switch that takes an integer that will be used as the random seed
|
||||
for the :option:`-r` option that executes tests in random order.
|
||||
The :option:`-r` option also now reports the seed that was used
|
||||
(Added by Collin Winter.)
|
||||
|
||||
|
||||
.. ======================================================================
|
||||
|
||||
Porting to Python 2.7
|
||||
|
|
Loading…
Reference in New Issue