Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into bpo-28974-simpler-object-__format__
  • Loading branch information
serhiy-storchaka authored Mar 19, 2017
commit 8e7f3fe1ac95d34f4761dbef3a21a8a9570228c3
11 changes: 11 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ Core and Builtins
- bpo-28974: `object.__format__(x, '')` is now equivalent to `str(x)` rather
than `format(str(self), '')`.

- bpo-28856: Fix an oversight that %b format for bytes should support objects
follow the buffer protocol.

- bpo-29723: The ``sys.path[0]`` initialization change for bpo-29139 caused a
regression by revealing an inconsistency in how sys.path is initialized when
executing ``__main__`` from a zipfile, directory, or other import location.
The interpreter now consistently avoids ever adding the import location's
parent directory to ``sys.path``, and ensures no other ``sys.path`` entries
are inadvertently modified when inserting the import location named on the
command line.

- bpo-29568: Escaped percent "%%" in the format string for classic string
formatting no longer allows any characters between two percents.

Expand Down
2 changes: 0 additions & 2 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -4496,8 +4496,6 @@ static PyObject *
object___format___impl(PyObject *self, PyObject *format_spec)
/*[clinic end generated code: output=34897efb543a974b input=7c3b3bc53a6fb7fa]*/
{
PyObject *format_spec;

/* Issue 7994: If we're converting to a string, we
should reject format specifications */
if (PyUnicode_GET_LENGTH(format_spec) > 0) {
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.