cpython: 6f05f83c7010 (original) (raw)

--- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -221,12 +221,13 @@ def _write_atomic(path, data, mode=0o666

Python 3.4rc2 3310 (alter qualname computation)

Python 3.5a0 3320 (matrix multiplication operator)

Python 3.5b1 3330 (PEP 448: Additional Unpacking Generalizations)

+# Python 3.5b2 3340 (fix dictionary display evaluation order #11205) #

MAGIC must change whenever the bytecode emitted by the compiler may no

longer be understood by older implementations of the eval loop (usually

due to the addition of new opcodes).

-MAGIC_NUMBER = (3330).to_bytes(2, 'little') + b'\r\n' +MAGIC_NUMBER = (3340).to_bytes(2, 'little') + b'\r\n' _RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c _PYCACHE = 'pycache'

--- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -461,6 +461,17 @@ if 1: ast.body = [_ast.BoolOp()] self.assertRaises(TypeError, compile, ast, '', 'exec')

+

+

+ @support.cpython_only def test_same_filename_used(self): s = """def f(): pass\ndef g(): pass"""

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,8 @@ Release date: 2015-07-05 Core and Builtins ----------------- +- Issue #11205: In dictionary displays, evaluate the key before the value. +

--- a/Python/ceval.c +++ b/Python/ceval.c @@ -2584,8 +2584,8 @@ PyEval_EvalFrameEx(PyFrameObject *f, int goto error; while (--oparg >= 0) { int err;

--- a/Python/compile.c +++ b/Python/compile.c @@ -3138,8 +3138,8 @@ compiler_dict(struct compiler *c, expr_t containers++; } else {

--- a/Python/importlib_external.h +++ b/Python/importlib_external.h @@ -259,7 +259,7 @@ const unsigned char _Py_M__importlib_ext 0,0,114,5,0,0,0,218,13,95,119,114,105,116,101,95, 97,116,111,109,105,99,99,0,0,0,115,26,0,0,0,0, 5,24,1,9,1,33,1,3,3,21,1,20,1,20,1,13,