Commit Graph

97688 Commits

Author SHA1 Message Date
Raymond Hettinger c8d03187ff merge 2016-12-04 11:00:57 -08:00
Raymond Hettinger 71c62e14aa Neaten-up and extend the examples in the random module docs. 2016-12-04 11:00:34 -08:00
Serhiy Storchaka 8209cec0bd Fixed mismatching title overline. 2016-12-04 15:43:57 +02:00
Serhiy Storchaka 223813111e Fixed mismatching title overline. 2016-12-04 15:43:37 +02:00
Serhiy Storchaka 7bc01c32b1 Fixed mismatching title overline. 2016-12-04 15:42:13 +02:00
Serhiy Storchaka a8037db69d Fixed double hyphens that are rendered to literal en-dashes in the documenation. 2016-12-04 10:22:36 +02:00
Serhiy Storchaka e418432dfb Fixed double hyphens that are rendered to literal en-dashes in the documenation. 2016-12-04 10:22:09 +02:00
Serhiy Storchaka 29b0a26822 Fixed double hyphens that are rendered to literal en-dashes in the documenation. 2016-12-04 10:20:55 +02:00
Steve Dower ed04388328 Null merge with 3.6 2016-12-03 15:57:15 -08:00
Steve Dower 21cf577526 Revert unintended merge 2016-12-03 15:57:00 -08:00
Steve Dower 01a057aff4 Revert unintended merge 2016-12-03 12:12:23 -08:00
Steve Dower 9cc113a8f7 Issue #28846: Various installer fixes 2016-12-03 12:11:25 -08:00
Steve Dower f00ef72ee1 Ensures intermediate directory is created before using it 2016-12-03 11:56:44 -08:00
Steve Dower de6efdb772 Ensures intermediate directory is created before accessing it. 2016-12-03 11:56:20 -08:00
Steve Dower 1058109b31 Issue #28846: Various installer fixes 2016-12-03 11:24:02 -08:00
Steve Dower 190dbd9ba2 Issue #28846: Various installer fixes 2016-12-03 11:18:53 -08:00
Serhiy Storchaka 2d397dc44b Merge heads 2016-12-02 23:34:24 +02:00
Serhiy Storchaka 853ec5d408 Issue #21818: Fixed references to classes that have names matching with module
names.
2016-12-02 23:15:42 +02:00
Serhiy Storchaka b6a6b45458 Issue #21818: Fixed references to classes that have names matching with module
names.
2016-12-02 23:15:22 +02:00
Serhiy Storchaka ee1b01a41b Issue #21818: Fixed references to classes that have names matching with module
names.
2016-12-02 23:13:53 +02:00
Serhiy Storchaka 4700d86488 Merge from 3.6. 2016-12-02 21:38:46 +02:00
Serhiy Storchaka b93626404c Null merge 2016-12-02 21:33:05 +02:00
Nick Coghlan 3c35fdb8fb Issue #27172: Undeprecate inspect.getfullargspec()
This is still useful for single source Python 2/3 code
migrating away from inspect.getargspec(), but that wasn't
clear with the documented deprecation in place.
2016-12-02 20:29:57 +10:00
Benjamin Peterson 7cf9e13f25 fix _PyObject_CallArg1 compiler warnings (closes #28855) 2016-12-01 22:01:32 -08:00
Victor Stinner d6958ac6c0 Add sys.getandroidapilevel()
Issue #28740: Add sys.getandroidapilevel(): return the build time
API version of Android as an integer.

Function only available on Android.
2016-12-02 01:13:46 +01:00
doko@ubuntu.com 1177696b6b - Import latest config.sub config.guess files 2016-12-01 21:42:56 +01:00
Yury Selivanov edfe8869c8 Merge 3.6 (issue #28843) 2016-12-01 11:37:47 -05:00
Yury Selivanov c2c8fe1252 Issue #28843: Fix asyncio C Task to handle exceptions __traceback__. 2016-12-01 11:36:22 -05:00
Victor Stinner 4778eab1f2 Replace PyObject_CallFunction() with fastcall
Replace
    PyObject_CallFunction(func, "O", arg)
and
    PyObject_CallFunction(func, "O", arg, NULL)
with
    _PyObject_CallArg1(func, arg)

Replace
    PyObject_CallFunction(func, NULL)
with
    _PyObject_CallNoArg(func)

_PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate
memory on the C stack.
2016-12-01 14:51:04 +01:00
Victor Stinner 842cfff321 WITH_CLEANUP_START uses fastcall
Modify WITH_CLEANUP_START bytecode: replace PyObject_CallFunctionObjArgs() with
_PyObject_FastCall().
2016-12-01 14:45:31 +01:00
Victor Stinner 27580c1fb5 Replace PyObject_CallFunctionObjArgs() with fastcall
* PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func)
* PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg)

PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires
extra work to "parse" C arguments to build a C array of PyObject*.

_PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate
memory on the C stack.

This change is part of the fastcall project. The change on listsort() is
related to the issue #23507.
2016-12-01 14:43:22 +01:00
Victor Stinner 8be1c39eb3 Backed out changeset 7efddbf1aa70 2016-11-30 12:10:54 +01:00
Victor Stinner ebea9988e0 Uniformize argument names of "call" functions
* Callable object: callable, o, callable_object => func
* Object for method calls: o => obj
* Method name: name or nameid => method

Cleanup also the C code:

* Don't initialize variables to NULL if they are not used before their first
  assignement
* Add braces for readability
2016-11-29 18:47:56 +01:00
Guido van Rossum 356ae170ef Issue #28790: Fix error when using Generic and __slots__ (Ivan L) (3.6->3.7) 2016-11-29 09:46:29 -08:00
Guido van Rossum c349374ee6 Issue #28790: Fix error when using Generic and __slots__ (Ivan L) (3.5->3.6) 2016-11-29 09:46:26 -08:00
Guido van Rossum 61f0a0261f Issue #28790: Fix error when using Generic and __slots__ (Ivan L) 2016-11-29 09:46:21 -08:00
Victor Stinner f9c2405ff8 Null merge 3.6 2016-11-29 18:22:02 +01:00
Victor Stinner 11dd6048aa Add TCP_CONGESTION and TCP_USER_TIMEOUT
Issue #26273: Add new socket.TCP_CONGESTION (Linux 2.6.13) and
socket.TCP_USER_TIMEOUT (Linux 2.6.37) constants.

Patch written by Omar Sandoval.
2016-11-29 16:55:04 +01:00
Victor Stinner 4f8dc3d15c Add TCP_CONGESTION and TCP_USER_TIMEOUT
Issue #26273: Add new socket.TCP_CONGESTION (Linux 2.6.13) and
socket.TCP_USER_TIMEOUT (Linux 2.6.37) constants.

Patch written by Omar Sandoval.
2016-11-29 16:55:04 +01:00
Serhiy Storchaka baa7223bcd Issue #28797: Modifying the class __dict__ inside the __set_name__ method of
a descriptor that is used inside that class no longer prevents calling the
 __set_name__ method of other descriptors.
2016-11-29 09:56:07 +02:00
Serhiy Storchaka 9ec07721f4 Issue #28797: Modifying the class __dict__ inside the __set_name__ method of
a descriptor that is used inside that class no longer prevents calling the
 __set_name__ method of other descriptors.
2016-11-29 09:54:17 +02:00
Serhiy Storchaka 3d85fae91f Issue #28823: Simplified compiling with opcode BUILD_MAP_UNPACK. 2016-11-28 20:56:37 +02:00
Victor Stinner b69ee8c386 call_function(): document PyMethod optimization 2016-11-28 18:32:31 +01:00
Victor Stinner 213cc388c7 Reintroduce Python2 support in generate_opcode_h.py
Issue #28821.

Add also a message to show that the command did something :-)
2016-11-28 18:13:52 +01:00
Yury Selivanov 50c13f216e Merge 3.6 (issue #28635) 2016-11-28 11:45:58 -05:00
Yury Selivanov 27ec5bfdcb Issue #28635: Document Python 3.6 opcode changes
Thanks to Serhiy Storchaka for pointing out the missing notes.

Patch by Elvis Pranskevichus.
2016-11-28 11:45:36 -05:00
Victor Stinner a61a54b149 Issue #28799: Update Misc/SpecialBuilds.txt
Remove CALL_PROFILE.
2016-11-28 12:06:13 +01:00
Victor Stinner 048afd98b3 Remove CALL_PROFILE special build
Issue #28799:

* Remove the PyEval_GetCallStats() function.
* Deprecate the untested and undocumented sys.callstats() function.
* Remove the CALL_PROFILE special build

Use the sys.setprofile() function, cProfile or profile module to profile
function calls.
2016-11-28 11:59:04 +01:00
Serhiy Storchaka 214678e44b Issue #12844: More than 255 arguments can now be passed to a function. 2016-11-28 10:52:05 +02:00
Zachary Ware d070b2ddbb Merge with 3.6 2016-11-28 00:19:23 -06:00