@@ -264,7 +264,9 @@ Some smaller changes made to the core Python language are:
264264 Windows, and on Unix platforms using the gcc, icc, or suncc
265265 compilers. There may be a small number of platforms where correct
266266 operation of this code cannot be guaranteed, so the code is not
267- used on such systems.
267+ used on such systems. You can find out which code is being used
268+ by checking :data: `sys.float_repr_style `, which will be ``short ``
269+ if the new code is in use and ``legacy `` if it isn't.
268270
269271 Implemented by Eric Smith and Mark Dickinson, using David Gay's
270272 :file: `dtoa.c ` library; :issue: `7117 `.
@@ -358,6 +360,11 @@ Some smaller changes made to the core Python language are:
358360 on the :exc: `IOError ` exception when trying to open a directory
359361 on POSIX platforms. (Noted by Jan Kaliszewski; :issue: `4764 `.)
360362
363+ * The Python tokenizer now translates line endings itself, so the
364+ :func: `compile ` built-in function can now accept code using any
365+ line-ending convention. Additionally, it no longer requires that the
366+ code end in a newline.
367+
361368* Extra parentheses in function definitions are illegal in Python 3.x,
362369 meaning that you get a syntax error from ``def f((x)): pass ``. In
363370 Python3-warning mode, Python 2.7 will now warn about this odd usage.
@@ -433,6 +440,8 @@ Several performance enhancements have been added:
433440 Various benchmarks show speedups of between 50% and 150% for long
434441 integer divisions and modulo operations.
435442 (Contributed by Mark Dickinson; :issue: `5512 `.)
443+ Bitwise operations are also significantly faster (initial patch by
444+ Gregory Smith; :issue: `1087418 `).
436445
437446* The implementation of ``% `` checks for the left-side operand being
438447 a Python string and special-cases it; this results in a 1-3%
@@ -444,6 +453,16 @@ Several performance enhancements have been added:
444453 faster bytecode. (Patch by Antoine Pitrou, back-ported to 2.7
445454 by Jeffrey Yasskin; :issue: `4715 `.)
446455
456+ * Converting an integer or long integer to a decimal string was made
457+ faster by special-casing base 10 instead of using a generalized
458+ conversion function that supports arbitrary bases.
459+ (Patch by Gawain Bolton; :issue: `6713 `.)
460+
461+ * The :meth: `rindex `, :meth: `rpartition `, and :meth: `rsplit ` methods
462+ of string objects now uses a fast reverse-search algorithm instead of
463+ a character-by-character scan. This is often faster by a factor of 10.
464+ (Added by Florent Xicluna; :issue: `7462 `.)
465+
447466* The :mod: `pickle ` and :mod: `cPickle ` modules now automatically
448467 intern the strings used for attribute names, reducing memory usage
449468 of the objects resulting from unpickling. (Contributed by Jake
@@ -453,11 +472,6 @@ Several performance enhancements have been added:
453472 nearly halving the time required to pickle them.
454473 (Contributed by Collin Winter; :issue: `5670 `.)
455474
456- * Converting an integer or long integer to a decimal string was made
457- faster by special-casing base 10 instead of using a generalized
458- conversion function that supports arbitrary bases.
459- (Patch by Gawain Bolton; :issue: `6713 `.)
460-
461475.. ======================================================================
462476
463477 New and Improved Modules
@@ -602,6 +616,10 @@ changes, or look through the Subversion logs for all the details.
602616 XXX link to file:///MacDev/svn.python.org/python-trunk/Doc/build/html/distutils/examples.html#reading-the-metadata
603617 (Contributed by Tarek Ziade; :issue: `7457 `.)
604618
619+ :file: `setup.py ` files will now accept a :option: `--no-user-cfg ` switch
620+ to skip reading the :file: `~/.pydistutils.cfg ` file. (Suggested by
621+ by Michael Hoffman, and implemented by Paul Winkler; :issue: `1180 `.)
622+
605623* The :class: `Fraction ` class now accepts two rational numbers
606624 as arguments to its constructor.
607625 (Implemented by Mark Dickinson; :issue: `5812 `.)
@@ -625,14 +643,6 @@ changes, or look through the Subversion logs for all the details.
625643 recorded in a gzipped file by providing an optional timestamp to
626644 the constructor. (Contributed by Jacques Frechet; :issue: `4272 `.)
627645
628- * The :mod: `hashlib ` module was inconsistent about accepting
629- input as a Unicode object or an object that doesn't support
630- the buffer protocol. The behavior was different depending on
631- whether :mod: `hashlib ` was using an external OpenSSL library
632- or its built-in implementations. Python 2.7 makes the
633- behavior consistent, always rejecting such objects by raising a
634- :exc: `TypeError `. (Fixed by Gregory P. Smith; :issue: `3745 `.)
635-
636646* The default :class: `HTTPResponse ` class used by the :mod: `httplib ` module now
637647 supports buffering, resulting in much faster reading of HTTP responses.
638648 (Contributed by Kristjan Valur Jonsson; :issue: `4879 `.)
@@ -745,6 +755,10 @@ changes, or look through the Subversion logs for all the details.
745755 to store data.
746756 (Contributed by Tarek Ziade; :issue: `6693 `.)
747757
758+ * The :mod: `socket ` module's :class: `SSL ` objects now support the
759+ buffer API, which fixed a test suite failure. (Fixed by Antoine Pitrou;
760+ :issue: `7133 `.)
761+
748762* The :mod: `SocketServer ` module's :class: `TCPServer ` class now
749763 has a :attr: `disable_nagle_algorithm ` class attribute.
750764 The default value is False; if overridden to be True,
@@ -858,6 +872,10 @@ GvR worked on merging them into Python's version of :mod:`unittest`.
858872 whether the two values evaluate to the same object or not.
859873 (Added by Michael Foord; :issue: `2578 `.)
860874
875+ * :meth: `assertIsInstance ` and :meth: `assertNotIsInstance ` check whether
876+ the resulting object is an instance of a particular class, or of
877+ one of a tuple of classes. (Added by Georg Brandl; :issue: `7031 `.)
878+
861879* :meth: `assertGreater `, :meth: `assertGreaterEqual `,
862880 :meth: `assertLess `, and :meth: `assertLessEqual ` compare
863881 two quantities.
@@ -1025,6 +1043,11 @@ Changes to Python's build process and to the C API include:
10251043 a :ctype: `long `, an *overflow * flag is set and returned to the caller.
10261044 (Contributed by Case Van Horsen; :issue: `7528 `.)
10271045
1046+ * New function: stemming from the rewrite of string-to-float conversion,
1047+ a new :cfunc: `PyOS_string_to_double ` function was added. The old
1048+ :cfunc: `PyOS_ascii_strtod ` and :cfunc: `PyOS_ascii_atof ` functions
1049+ are now deprecated.
1050+
10281051* New macros: the Python header files now define the following macros:
10291052 :cmacro: `Py_ISALNUM `,
10301053 :cmacro: `Py_ISALPHA `,
@@ -1067,10 +1090,30 @@ Changes to Python's build process and to the C API include:
10671090
10681091 (Fixed by Thomas Wouters; :issue: `1590864 `.)
10691092
1093+ * The :cfunc: `Py_Finalize ` function now calls the internal
1094+ :func: `threading._shutdown ` function; this prevents some exceptions from
1095+ being raised when an interpreter shuts down.
1096+ (Patch by Adam Olsen; :issue: `1722344 `.)
1097+
10701098* Global symbols defined by the :mod: `ctypes ` module are now prefixed
10711099 with ``Py ``, or with ``_ctypes ``. (Implemented by Thomas
10721100 Heller; :issue: `3102 `.)
10731101
1102+ * New configure option: the :option: `--with-system-expat ` switch allows
1103+ building the :mod: `pyexpat ` module to use the system Expat library.
1104+ (Contributed by Arfrever Frehtes Taifersar Arahesis; :issue: `7609 `.)
1105+
1106+ * New configure option: Compiling Python with the
1107+ :option: `--with-valgrind ` option will now disable the pymalloc
1108+ allocator, which is difficult for the Valgrind to analyze correctly.
1109+ Valgrind will therefore be better at detecting memory leaks and
1110+ overruns. (Contributed by James Henstridge; :issue: `2422 `.)
1111+
1112+ * New configure option: you can now supply no arguments to
1113+ :option: `--with-dbmliborder= ` in order to build none of the various
1114+ DBM modules. (Added by Arfrever Frehtes Taifersar Arahesis;
1115+ :issue: `6491 `.)
1116+
10741117* The :program: `configure ` script now checks for floating-point rounding bugs
10751118 on certain 32-bit Intel chips and defines a :cmacro: `X87_DOUBLE_ROUNDING `
10761119 preprocessor definition. No code currently uses this definition,
@@ -1083,11 +1126,6 @@ Changes to Python's build process and to the C API include:
10831126* The build process now supports Subversion 1.7. (Contributed by
10841127 Arfrever Frehtes Taifersar Arahesis; :issue: `6094 `.)
10851128
1086- * Compiling Python with the :option: `--with-valgrind ` option will now
1087- disable the pymalloc allocator, which is difficult for the Valgrind to
1088- analyze correctly. Valgrind will therefore be better at detecting
1089- memory leaks and overruns. (Contributed by James Henstridge; :issue: `2422 `.)
1090-
10911129
10921130.. ======================================================================
10931131
@@ -1139,12 +1177,14 @@ Other Changes and Fixes
11391177 The :option: `-r ` option also reports the seed that was used
11401178 (Added by Collin Winter.)
11411179
1142- * The :file: `regrtest.py ` script now takes a :option: `-j ` switch
1143- that takes an integer specifying how many tests run in parallel. This
1180+ * Another :file: `regrtest.py ` switch is :option: `-j `, which
1181+ takes an integer specifying how many tests run in parallel. This
11441182 allows reducing the total runtime on multi-core machines.
11451183 This option is compatible with several other options, including the
11461184 :option: `-R ` switch which is known to produce long runtimes.
1147- (Added by Antoine Pitrou, :issue: `6152 `.)
1185+ (Added by Antoine Pitrou, :issue: `6152 `.) This can also be used
1186+ with a new :option: `-F ` switch that runs selected tests in a loop
1187+ until they fail. (Added by Antoine Pitrou; :issue: `7312 `.)
11481188
11491189.. ======================================================================
11501190
@@ -1175,6 +1215,17 @@ that may require changes to your code:
11751215 nothing when a negative length is requested, as other file-like
11761216 objects do. (:issue: `7348 `).
11771217
1218+ For C extensions:
1219+
1220+ * C extensions that use integer format codes with the ``PyArg_Parse* ``
1221+ family of functions will now raise a :exc: `TypeError ` exception
1222+ instead of triggering a :exc: `DeprecationWarning ` (:issue: `5080 `).
1223+
1224+ * Use the new :cfunc: `PyOS_string_to_double ` function instead of the old
1225+ :cfunc: `PyOS_ascii_strtod ` and :cfunc: `PyOS_ascii_atof ` functions,
1226+ which are now deprecated.
1227+
1228+
11781229.. ======================================================================
11791230
11801231
0 commit comments