Merge from Python 3.5.0 (rc2) to Python 3.5.1.

This commit is contained in:
Larry Hastings 2015-08-25 14:13:55 -07:00
commit 06a7d611da
9 changed files with 132 additions and 86 deletions

View file

@ -153,3 +153,4 @@ b4cbecbc0781e89a309d03b60a1f75f8499250e6 v3.4.3
0035fcd9b9243ae52c2e830204fd9c1f7d528534 v3.5.0b3 0035fcd9b9243ae52c2e830204fd9c1f7d528534 v3.5.0b3
c0d64105463581f85d0e368e8d6e59b7fd8f12b1 v3.5.0b4 c0d64105463581f85d0e368e8d6e59b7fd8f12b1 v3.5.0b4
1a58b1227501e046eee13d90f113417b60843301 v3.5.0rc1 1a58b1227501e046eee13d90f113417b60843301 v3.5.0rc1
cc15d736d860303b9da90d43cd32db39bab048df v3.5.0rc2

View file

@ -20,10 +20,10 @@
#define PY_MINOR_VERSION 5 #define PY_MINOR_VERSION 5
#define PY_MICRO_VERSION 0 #define PY_MICRO_VERSION 0
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA
#define PY_RELEASE_SERIAL 1 #define PY_RELEASE_SERIAL 2
/* Version as a string */ /* Version as a string */
#define PY_VERSION "3.5.0rc1+" #define PY_VERSION "3.5.0rc2+"
/*--end constants--*/ /*--end constants--*/
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.

View file

@ -745,7 +745,7 @@ class BuiltinImporter:
@classmethod @classmethod
def exec_module(self, module): def exec_module(self, module):
"""Exec a built-in module""" """Exec a built-in module"""
_call_with_frames_removed(_imp.exec_dynamic, module) _call_with_frames_removed(_imp.exec_builtin, module)
@classmethod @classmethod
@_requires_builtin @_requires_builtin

File diff suppressed because one or more lines are too long

107
Misc/NEWS
View file

@ -6,47 +6,11 @@ Python News
What's New in Python 3.5.1 What's New in Python 3.5.1
========================== ==========================
Release date: TBA Release date: TBA
Core and Builtins Core and Builtins
----------------- -----------------
Library
-------
- Issue #20362: Honour TestCase.longMessage correctly in assertRegex.
Patch from Ilia Kurenkov.
- Issue #24847: Removes vcruntime140.dll dependency from Tcl/Tk.
- Issue #23572: Fixed functools.singledispatch on classes with falsy
metaclasses. Patch by Ethan Furman.
Documentation
-------------
- Issue #24808: Update the types of some PyTypeObject fields. Patch by
Joseph Weston.
- Issue #22812: Fix unittest discovery examples.
Patch from Pam McA'Nulty.
What's New in Python 3.5.0 release candidate 2?
===============================================
Release date: 2015-08-23
Core and Builtins
-----------------
- Issue #21167: NAN operations are now handled correctly when python is
compiled with ICC even if -fp-model strict is not specified.
Library Library
------- -------
@ -59,11 +23,11 @@ Library
- Issue #21159: Improve message in configparser.InterpolationMissingOptionError. - Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
Patch from Łukasz Langa. Patch from Łukasz Langa.
- Issue #24847: Fixes tcltk installer layout of VC runtime DLL - Issue #20362: Honour TestCase.longMessage correctly in assertRegex.
Patch from Ilia Kurenkov.
- Issue #24839: platform._syscmd_ver raises DeprecationWarning - Issue #23572: Fixed functools.singledispatch on classes with falsy
metaclasses. Patch by Ethan Furman.
- Issue #24867: Fix Task.get_stack() for 'async def' coroutines
Documentation Documentation
------------- -------------
@ -71,6 +35,41 @@ Documentation
- Issue #23725: Overhaul tempfile docs. Note deprecated status of mktemp. - Issue #23725: Overhaul tempfile docs. Note deprecated status of mktemp.
Patch from Zbigniew Jędrzejewski-Szmek. Patch from Zbigniew Jędrzejewski-Szmek.
- Issue #24808: Update the types of some PyTypeObject fields. Patch by
Joseph Weston.
- Issue #22812: Fix unittest discovery examples.
Patch from Pam McA'Nulty.
What's New in Python 3.5.0 release candidate 2?
===============================================
Release date: 2015-08-25
Core and Builtins
-----------------
- Issue #24769: Interpreter now starts properly when dynamic loading
is disabled. Patch by Petr Viktorin.
- Issue #21167: NAN operations are now handled correctly when python is
compiled with ICC even if -fp-model strict is not specified.
- Issue #24492: A "package" lacking a __name__ attribute when trying to perform
a ``from .. import ...`` statement will trigger an ImportError instead of an
AttributeError.
Library
-------
- Issue #24847: Removes vcruntime140.dll dependency from Tcl/Tk.
- Issue #24839: platform._syscmd_ver raises DeprecationWarning
- Issue #24867: Fix Task.get_stack() for 'async def' coroutines
What's New in Python 3.5.0 release candidate 1? What's New in Python 3.5.0 release candidate 1?
=============================================== ===============================================
@ -79,10 +78,6 @@ Release date: 2015-08-09
Core and Builtins Core and Builtins
----------------- -----------------
- Issue #24492: A "package" lacking a __name__ attribute when trying to perform
a ``from .. import ...`` statement will trigger an ImportError instead of an
AttributeError.
- Issue #24667: Resize odict in all cases that the underlying dict resizes. - Issue #24667: Resize odict in all cases that the underlying dict resizes.
Library Library
@ -136,7 +131,7 @@ IDLE
- Issue #23672: Allow Idle to edit and run files with astral chars in name. - Issue #23672: Allow Idle to edit and run files with astral chars in name.
Patch by Mohd Sanad Zaki Rizvi. Patch by Mohd Sanad Zaki Rizvi.
- Issue 24745: Idle editor default font. Switch from Courier to - Issue #24745: Idle editor default font. Switch from Courier to
platform-sensitive TkFixedFont. This should not affect current customized platform-sensitive TkFixedFont. This should not affect current customized
font selections. If there is a problem, edit $HOME/.idlerc/config-main.cfg font selections. If there is a problem, edit $HOME/.idlerc/config-main.cfg
and remove 'fontxxx' entries from [Editor Window]. Patch by Mark Roseman. and remove 'fontxxx' entries from [Editor Window]. Patch by Mark Roseman.
@ -467,14 +462,14 @@ Library
- Issue #14373: Added C implementation of functools.lru_cache(). Based on - Issue #14373: Added C implementation of functools.lru_cache(). Based on
patches by Matt Joiner and Alexey Kachayev. patches by Matt Joiner and Alexey Kachayev.
- Issue 24230: The tempfile module now accepts bytes for prefix, suffix and dir - Issue #24230: The tempfile module now accepts bytes for prefix, suffix and dir
parameters and returns bytes in such situations (matching the os module APIs). parameters and returns bytes in such situations (matching the os module APIs).
- Issue #22189: collections.UserString now supports __getnewargs__(), - Issue #22189: collections.UserString now supports __getnewargs__(),
__rmod__(), casefold(), format_map(), isprintable(), and maketrans(). __rmod__(), casefold(), format_map(), isprintable(), and maketrans().
Patch by Joe Jevnik. Patch by Joe Jevnik.
- Issue 24244: Prevents termination when an invalid format string is - Issue #24244: Prevents termination when an invalid format string is
encountered on Windows in strftime. encountered on Windows in strftime.
- Issue #23973: PEP 484: Add the typing module. - Issue #23973: PEP 484: Add the typing module.
@ -612,26 +607,26 @@ Library
- asyncio: async() function is deprecated in favour of ensure_future(). - asyncio: async() function is deprecated in favour of ensure_future().
- Issue 24178: asyncio.Lock, Condition, Semaphore, and BoundedSemaphore - Issue #24178: asyncio.Lock, Condition, Semaphore, and BoundedSemaphore
support new 'async with' syntax. Contributed by Yury Selivanov. support new 'async with' syntax. Contributed by Yury Selivanov.
- Issue 24179: Support 'async for' for asyncio.StreamReader. - Issue #24179: Support 'async for' for asyncio.StreamReader.
Contributed by Yury Selivanov. Contributed by Yury Selivanov.
- Issue 24184: Add AsyncIterator and AsyncIterable ABCs to - Issue #24184: Add AsyncIterator and AsyncIterable ABCs to
collections.abc. Contributed by Yury Selivanov. collections.abc. Contributed by Yury Selivanov.
- Issue 22547: Implement informative __repr__ for inspect.BoundArguments. - Issue #22547: Implement informative __repr__ for inspect.BoundArguments.
Contributed by Yury Selivanov. Contributed by Yury Selivanov.
- Issue 24190: Implement inspect.BoundArgument.apply_defaults() method. - Issue #24190: Implement inspect.BoundArgument.apply_defaults() method.
Contributed by Yury Selivanov. Contributed by Yury Selivanov.
- Issue 20691: Add 'follow_wrapped' argument to - Issue #20691: Add 'follow_wrapped' argument to
inspect.Signature.from_callable() and inspect.signature(). inspect.Signature.from_callable() and inspect.signature().
Contributed by Yury Selivanov. Contributed by Yury Selivanov.
- Issue 24248: Deprecate inspect.Signature.from_function() and - Issue #24248: Deprecate inspect.Signature.from_function() and
inspect.Signature.from_builtin(). inspect.Signature.from_builtin().
- Issue #23898: Fix inspect.classify_class_attrs() to support attributes - Issue #23898: Fix inspect.classify_class_attrs() to support attributes
@ -733,7 +728,7 @@ Library
- Issue #4254: Adds _curses.update_lines_cols() Patch by Arnon Yaari - Issue #4254: Adds _curses.update_lines_cols() Patch by Arnon Yaari
- Issue 19933: Provide default argument for ndigits in round. Patch by - Issue #19933: Provide default argument for ndigits in round. Patch by
Vajrasky Kok. Vajrasky Kok.
- Issue #23193: Add a numeric_owner parameter to - Issue #23193: Add a numeric_owner parameter to
@ -2549,7 +2544,7 @@ Library
- Issue #13936: Remove the ability of datetime.time instances to be considered - Issue #13936: Remove the ability of datetime.time instances to be considered
false in boolean contexts. false in boolean contexts.
- Issue 18931: selectors module now supports /dev/poll on Solaris. - Issue #18931: selectors module now supports /dev/poll on Solaris.
Patch by Giampaolo Rodola'. Patch by Giampaolo Rodola'.
- Issue #19977: When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale), - Issue #19977: When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale),

View file

@ -318,6 +318,33 @@ exit:
#endif /* defined(HAVE_DYNAMIC_LOADING) */ #endif /* defined(HAVE_DYNAMIC_LOADING) */
PyDoc_STRVAR(_imp_exec_builtin__doc__,
"exec_builtin($module, mod, /)\n"
"--\n"
"\n"
"Initialize a built-in module.");
#define _IMP_EXEC_BUILTIN_METHODDEF \
{"exec_builtin", (PyCFunction)_imp_exec_builtin, METH_O, _imp_exec_builtin__doc__},
static int
_imp_exec_builtin_impl(PyModuleDef *module, PyObject *mod);
static PyObject *
_imp_exec_builtin(PyModuleDef *module, PyObject *mod)
{
PyObject *return_value = NULL;
int _return_value;
_return_value = _imp_exec_builtin_impl(module, mod);
if ((_return_value == -1) && PyErr_Occurred())
goto exit;
return_value = PyLong_FromLong((long)_return_value);
exit:
return return_value;
}
#ifndef _IMP_CREATE_DYNAMIC_METHODDEF #ifndef _IMP_CREATE_DYNAMIC_METHODDEF
#define _IMP_CREATE_DYNAMIC_METHODDEF #define _IMP_CREATE_DYNAMIC_METHODDEF
#endif /* !defined(_IMP_CREATE_DYNAMIC_METHODDEF) */ #endif /* !defined(_IMP_CREATE_DYNAMIC_METHODDEF) */
@ -325,4 +352,4 @@ exit:
#ifndef _IMP_EXEC_DYNAMIC_METHODDEF #ifndef _IMP_EXEC_DYNAMIC_METHODDEF
#define _IMP_EXEC_DYNAMIC_METHODDEF #define _IMP_EXEC_DYNAMIC_METHODDEF
#endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */ #endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */
/*[clinic end generated code: output=0f1059766dd58f88 input=a9049054013a1b77]*/ /*[clinic end generated code: output=32324a5e46cdfc4b input=a9049054013a1b77]*/

View file

@ -1943,6 +1943,34 @@ _imp_is_frozen_impl(PyModuleDef *module, PyObject *name)
return PyBool_FromLong((long) (p == NULL ? 0 : p->size)); return PyBool_FromLong((long) (p == NULL ? 0 : p->size));
} }
/* Common implementation for _imp.exec_dynamic and _imp.exec_builtin */
static int
exec_builtin_or_dynamic(PyObject *mod) {
PyModuleDef *def;
void *state;
if (!PyModule_Check(mod)) {
return 0;
}
def = PyModule_GetDef(mod);
if (def == NULL) {
if (PyErr_Occurred()) {
return -1;
}
return 0;
}
state = PyModule_GetState(mod);
if (PyErr_Occurred()) {
return -1;
}
if (state) {
/* Already initialized; skip reload */
return 0;
}
return PyModule_ExecDef(mod, def);
}
#ifdef HAVE_DYNAMIC_LOADING #ifdef HAVE_DYNAMIC_LOADING
/*[clinic input] /*[clinic input]
@ -2014,34 +2042,28 @@ static int
_imp_exec_dynamic_impl(PyModuleDef *module, PyObject *mod) _imp_exec_dynamic_impl(PyModuleDef *module, PyObject *mod)
/*[clinic end generated code: output=4b84f1301b22d4bd input=9fdbfcb250280d3a]*/ /*[clinic end generated code: output=4b84f1301b22d4bd input=9fdbfcb250280d3a]*/
{ {
PyModuleDef *def; return exec_builtin_or_dynamic(mod);
void *state;
if (!PyModule_Check(mod)) {
return 0;
}
def = PyModule_GetDef(mod);
if (def == NULL) {
if (PyErr_Occurred()) {
return -1;
}
return 0;
}
state = PyModule_GetState(mod);
if (PyErr_Occurred()) {
return -1;
}
if (state) {
/* Already initialized; skip reload */
return 0;
}
return PyModule_ExecDef(mod, def);
} }
#endif /* HAVE_DYNAMIC_LOADING */ #endif /* HAVE_DYNAMIC_LOADING */
/*[clinic input]
_imp.exec_builtin -> int
mod: object
/
Initialize a built-in module.
[clinic start generated code]*/
static int
_imp_exec_builtin_impl(PyModuleDef *module, PyObject *mod)
/*[clinic end generated code: output=215e99876a27e284 input=7beed5a2f12a60ca]*/
{
return exec_builtin_or_dynamic(mod);
}
/*[clinic input] /*[clinic input]
dump buffer dump buffer
[clinic start generated code]*/ [clinic start generated code]*/
@ -2064,6 +2086,7 @@ static PyMethodDef imp_methods[] = {
_IMP_IS_FROZEN_METHODDEF _IMP_IS_FROZEN_METHODDEF
_IMP_CREATE_DYNAMIC_METHODDEF _IMP_CREATE_DYNAMIC_METHODDEF
_IMP_EXEC_DYNAMIC_METHODDEF _IMP_EXEC_DYNAMIC_METHODDEF
_IMP_EXEC_BUILTIN_METHODDEF
_IMP__FIX_CO_FILENAME_METHODDEF _IMP__FIX_CO_FILENAME_METHODDEF
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };

View file

@ -1304,7 +1304,7 @@ const unsigned char _Py_M__importlib[] = {
0,1,100,1,0,83,41,2,122,22,69,120,101,99,32,97, 0,1,100,1,0,83,41,2,122,22,69,120,101,99,32,97,
32,98,117,105,108,116,45,105,110,32,109,111,100,117,108,101, 32,98,117,105,108,116,45,105,110,32,109,111,100,117,108,101,
78,41,3,114,65,0,0,0,114,57,0,0,0,90,12,101, 78,41,3,114,65,0,0,0,114,57,0,0,0,90,12,101,
120,101,99,95,100,121,110,97,109,105,99,41,2,114,19,0, 120,101,99,95,98,117,105,108,116,105,110,41,2,114,19,0,
0,0,114,89,0,0,0,114,10,0,0,0,114,10,0,0, 0,0,114,89,0,0,0,114,10,0,0,0,114,10,0,0,
0,114,11,0,0,0,114,139,0,0,0,233,2,0,0,115, 0,114,11,0,0,0,114,139,0,0,0,233,2,0,0,115,
2,0,0,0,0,3,122,27,66,117,105,108,116,105,110,73, 2,0,0,0,0,3,122,27,66,117,105,108,116,105,110,73,

2
README
View file

@ -1,4 +1,4 @@
This is Python version 3.5.0 release candidate 1 This is Python version 3.5.0 release candidate 2
================================================ ================================================
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,