Commit graph

20634 commits

Author SHA1 Message Date
Berker Peksag
d93c4de522 Fix usage of data directive 2017-02-06 13:37:19 +03:00
Berker Peksag
09f939d2c4 Issue #29198: Merge from 3.6 2017-02-04 09:35:10 +03:00
Berker Peksag
5a001eea5b Issue #29198: Merge from 3.5 2017-02-04 09:34:48 +03:00
Berker Peksag
5702fb7b4d Issue #29198: Fix indentation and markup in typing.rst
Patch by Jelle Zijlstra.
2017-02-04 09:34:16 +03:00
Berker Peksag
b1d3f661d7 Issue #29198: Merge from 3.6 2017-02-04 09:19:04 +03:00
Berker Peksag
14169b2a89 Issue #29198: Merge from 3.5 2017-02-04 09:18:42 +03:00
Berker Peksag
38962a6fe2 Issue #29198: Document typing.AsyncGenerator
Patch by Jelle Zijlstra.
2017-02-04 09:18:11 +03:00
Victor Stinner
3f2d10132d Issue #29300: Convert _struct module to Argument Clinic
* The struct module now requires contiguous buffers.
* Convert most functions and methods of the _struct module to Argument Clinic
* Use "Py_buffer" type for the "buffer" argument. Argument Clinic is
  responsible to create and release the Py_buffer object.
* Use "PyStructObject *" type for self to avoid explicit conversions.
* Add an unit test on the _struct.Struct.unpack_from() method to test passing
  arguments as keywords.
* Rephrase docstrings.
* Rename "fmt" argument to "format" in docstrings and the documentation.

As a side effect, functions and methods which used METH_VARARGS calling
convention like struct.pack() now use the METH_FASTCALL calling convention
which avoids the creation of temporary tuple to pass positional arguments and
so is faster. For example, struct.pack("i", 1) becomes 1.56x faster (-36%)::

    $ ./python -m perf timeit \
        -s 'import struct; pack=struct.pack' 'pack("i", 1)' \
        --compare-to=../default-ref/python
    Median +- std dev: 119 ns +- 1 ns -> 76.8 ns +- 0.4 ns: 1.56x faster (-36%)
    Significant (t=295.91)

Patch co-written with Serhiy Storchaka.
2017-02-02 12:09:30 +01:00
Mariatta Wijaya
bb19bf275b Issue #29381: merge with 3.6 2017-02-01 21:03:48 -08:00
Mariatta Wijaya
23dcccb75b Issue #29381: Clarify ordering of UNIX shebang line as source encoding line 2017-02-01 20:55:47 -08:00
Mariatta Wijaya
77bb0f4900 Backed out changeset 3d712292f2fa 2017-02-01 20:38:55 -08:00
Mariatta Wijaya
e2d8bc52c4 Issue #29381: Clarify ordering of UNIX shebang line as source encoding line 2017-02-01 20:21:22 -08:00
Berker Peksag
ebf8a6d9b0 Issue #29407: Merge from 3.6 2017-02-01 22:38:12 +03:00
Berker Peksag
c6fe419d1b Issue #29407: Merge from 3.5 2017-02-01 22:37:49 +03:00
Berker Peksag
d5adb63673 Issue #29407: Remove redundant ensure_future() calls in factorial example 2017-02-01 22:37:16 +03:00
Guido van Rossum
934aba66ef Issue #29377: Add three new wrappers to types.py (Manuel Krebber). 2017-02-01 10:55:58 -08:00
Martin Panter
f24bcccefd Issue #28822: Add susp-ignored entry for NEWS; fix grammar 2017-01-29 23:37:56 +00:00
Martin Panter
d5feb49711 Issues #11670: Merge configparser doc from 3.6 2017-01-29 23:37:50 +00:00
Martin Panter
ba964cc5f7 Issues #29349: Merge Py 2.6+ compatibility from 3.6 2017-01-29 23:37:24 +00:00
Martin Panter
e334a53343 Issues #11670: Merge configparser doc from 3.5 2017-01-29 23:36:39 +00:00
Martin Panter
b154113251 Issues #29349: Merge Py 2.6+ compatibility from 3.5 2017-01-29 23:34:52 +00:00
Martin Panter
1f10671fc8 Issue #11670: readfp(fp) parameter name is different to read_file(f) 2017-01-29 23:33:27 +00:00
Martin Panter
9a454021a4 Issue #29349: Use __future__ print_function; Sphinx may use Python 2.6+ 2017-01-29 23:33:13 +00:00
Martin Panter
c654f0acf9 Issues #29349: Add NEWS for 3.7; use “with” statement 2017-01-29 10:17:17 +00:00
Martin Panter
3a6dc19f6e Issues #29349: Merge Py 2 fix 3.6 2017-01-29 10:16:28 +00:00
Martin Panter
af4e5d9ded Issues #12067: Merge hash recommendation from 3.6 2017-01-29 10:10:30 +00:00
Martin Panter
e61592e7e1 Issues #29349: Merge Py 2 fix 3.5 2017-01-29 10:09:43 +00:00
Martin Panter
2be9889405 Issues #12067: Merge hash recommendation from 3.5 2017-01-29 10:07:26 +00:00
Martin Panter
8f3fb72309 Issue #29349: Fix Python 2 syntax in documentation build code 2017-01-29 10:05:02 +00:00
Martin Panter
8dbb0ca573 Issue #12067: Recommend that hash and equality be consistent 2017-01-29 10:00:23 +00:00
Raymond Hettinger
bea12f4ef3 merge 2017-01-28 20:17:07 -08:00
Raymond Hettinger
e53bd8e2d0 Issue 29310: Document typing.NamedTuple default argument syntax 2017-01-28 20:16:40 -08:00
Vinay Sajip
49688cdaa2 Closes #28784: Merged update from 3.6. 2017-01-27 13:05:09 +00:00
Vinay Sajip
dc4ce0e013 Fixes #28784: Clarified use of shlex.shlex with punctuation_chars. 2017-01-27 13:04:33 +00:00
Serhiy Storchaka
6e08baf12d Issue #27867: Function PySlice_GetIndicesEx() is deprecated and replaced with
a macro if Py_LIMITED_API is not set or set to the value between 0x03050400
and 0x03060000 (not including) or 0x03060100 or higher.  Added functions
PySlice_Unpack() and PySlice_AdjustIndices().
2017-01-25 13:27:44 +02:00
Senthil Kumaran
a8df8471d2 [merge 3.6] - issue26149 - Point to Wiki for Editors and Python IDEs on Unix.
Patch contributed by Mariatta Wijaya.
2017-01-25 01:48:41 -08:00
Senthil Kumaran
b0d0e19dd5 issue26149 - Point to Wiki for Editors and Python IDEs on Unix.
Patch contributed by Mariatta Wijaya.
2017-01-25 01:47:49 -08:00
Martin Panter
91a8866dc1 Fix grammar in doc string, RST markup 2017-01-24 00:30:06 +00:00
Martin Panter
8c79c70554 Issues #29189: Merge indentation fixes from 3.6 2017-01-24 00:30:00 +00:00
Martin Panter
574ff0680f Issues #29189: Merge indentation fixes from 3.5 2017-01-24 00:29:11 +00:00
Martin Panter
ef107ee7a0 Issue #29189: Fix indentation in RST markup 2017-01-24 00:26:56 +00:00
Victor Stinner
0e830455cb Merge 3.6 2017-01-23 12:34:00 +01:00
Victor Stinner
01f5ae7b76 Issue #26273: Document TCP_USER_TIMEOUT and TCP_CONGESTION 2017-01-23 12:30:00 +01:00
Serhiy Storchaka
2a404b63d4 Issue #28769: The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8()
is now of type "const char *" rather of "char *".
2017-01-22 23:07:07 +02:00
Xiang Zhang
1dfaa6c38a Issue #29092: Merge 3.6. 2017-01-22 13:10:12 +08:00
Xiang Zhang
4459e009ed Issue #29092: Sync os.stat's doc and docstring on path type. 2017-01-22 13:04:17 +08:00
Xiang Zhang
d7d87ca9b0 Issue #29092: Sync os.stat's doc and docstring on path type. 2017-01-22 12:54:44 +08:00
Mark Dickinson
5e65cd39df Issue #29282: Backed out changeset b33012ef1417 2017-01-21 13:10:52 +00:00
Mark Dickinson
d1b230e48b Issue #29282: add fused multiply-add function, math.fma. 2017-01-21 12:35:30 +00:00
Ned Deily
88f5746c22 Issue #29316: merge 3.6 2017-01-20 10:17:11 -05:00