Skip to content

Commit 41e8d07

Browse files
committed
merge 3.2
2 parents 077e17c + 9fb550e commit 41e8d07

1,661 files changed

Lines changed: 333874 additions & 79098 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bzrignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Modules/Setup.local
3333
Modules/config.c
3434
Modules/ld_so_aix
3535
Parser/pgen
36-
Parser/pgen.stamp
3736
Lib/test/data/*
3837
Lib/lib2to3/Grammar*.pickle
3938
Lib/lib2to3/PatternGrammar*.pickle

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Doc/tools/jinja2/
1515
Doc/tools/pygments/
1616
Doc/tools/sphinx/
1717
Lib/lib2to3/*.pickle
18+
Lib/_sysconfigdata.py
1819
Lib/plat-mac/errors.rsrc.df.rsrc
1920
Makefile
2021
Makefile.pre
@@ -37,7 +38,6 @@ PCbuild/Win32-temp-*
3738
PCbuild/amd64/
3839
.purify
3940
Parser/pgen
40-
Parser/pgen.stamp
4141
__pycache__
4242
autom4te.cache
4343
build/

.hgeol

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@
2828

2929
Lib/email/test/data/msg_26.txt = BIN
3030
Lib/test/cjkencodings/* = BIN
31-
Lib/test/sndhdrdata/sndhdr.* = BIN
3231
Lib/test/decimaltestdata/*.decTest = BIN
32+
Lib/test/sndhdrdata/sndhdr.* = BIN
33+
Lib/test/test_email/data/msg_26.txt = BIN
34+
35+
Lib/venv/scripts/nt/* = BIN
3336

3437
# All other files (which presumably are human-editable) are "native".
3538
# This must be the last rule!

.hgignore

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Makefile$
55
Makefile.pre$
66
TAGS$
77
autom4te.cache$
8-
build/
8+
^build/
9+
^Doc/build/
910
buildno$
1011
config.cache
1112
config.log
@@ -31,7 +32,6 @@ Modules/Setup.local
3132
Modules/config.c
3233
Modules/ld_so_aix$
3334
Parser/pgen$
34-
Parser/pgen.stamp$
3535
^core
3636
^python-gdb.py
3737
^python.exe-gdb.py
@@ -47,13 +47,26 @@ libpython*.so*
4747
*.pyd
4848
*.cover
4949
*~
50+
Lib/_sysconfigdata.py
5051
Lib/lib2to3/*.pickle
5152
Lib/test/data/*
5253
Misc/*.wpu
5354
PC/python_nt*.h
5455
PC/pythonnt_rc*.h
5556
PC/*.obj
5657
PC/*.exe
58+
PC/*/*.exe
59+
PC/*/*.exp
60+
PC/*/*.lib
61+
PC/*/*.bsc
62+
PC/*/*.dll
63+
PC/*/*.pdb
64+
PC/*/*.user
65+
PC/*/*.ncb
66+
PC/*/*.suo
67+
PC/*/Win32-temp-*
68+
PC/*/x64-temp-*
69+
PC/*/amd64
5770
PCbuild/*.exe
5871
PCbuild/*.dll
5972
PCbuild/*.pdb
@@ -62,8 +75,15 @@ PCbuild/*.exp
6275
PCbuild/*.o
6376
PCbuild/*.ncb
6477
PCbuild/*.bsc
78+
PCbuild/*.user
79+
PCbuild/*.suo
80+
PCbuild/*.*sdf
6581
PCbuild/Win32-temp-*
82+
PCbuild/x64-temp-*
83+
PCbuild/amd64
84+
BuildLog.htm
6685
__pycache__
86+
Modules/_freeze_importlib
6787
Modules/_testembed
6888
.coverage
6989
coverage/

.hgtouch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# -*- Makefile -*-
2+
# Define dependencies of generated files that are checked into hg.
3+
# The syntax of this file uses make rule dependencies, without actions
4+
5+
Python/importlib.h: Lib/importlib/_bootstrap.py Python/freeze_importlib.py
6+
7+
Include/ast.h: Parser/Python.asdl Parser/asdl.py Parser/asdl_c.py
8+
Python/Python-ast.c: Include/ast.h
9+
10+
Python/opcode_targets.h: Python/makeopcodetargets.py Lib/opcode.py
11+
12+
Objects/typeslots.inc: Include/typeslots.h Objects/typeslots.py

Doc/ACKS.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ docs@python.org), and we'll be glad to correct the problem.
6262
* Stefan Franke
6363
* Jim Fulton
6464
* Peter Funk
65+
* Ethan Furman
6566
* Lele Gaifax
6667
* Matthew Gallagher
6768
* Gabriel Genellina
@@ -212,6 +213,7 @@ docs@python.org), and we'll be glad to correct the problem.
212213
* David Turner
213214
* Sandro Tosi
214215
* Ville Vainio
216+
* Nadeem Vawda
215217
* Martijn Vries
216218
* Charles G. Waldman
217219
* Greg Ward

Doc/c-api/arg.rst

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Unless otherwise stated, buffers are not NUL-terminated.
146146
Like ``u#``, but the Python object may also be ``None``, in which case the
147147
:c:type:`Py_UNICODE` pointer is set to *NULL*.
148148

149-
``U`` (:class:`str`) [PyUnicodeObject \*]
149+
``U`` (:class:`str`) [PyObject \*]
150150
Requires that the Python object is a Unicode object, without attempting
151151
any conversion. Raises :exc:`TypeError` if the object is not a Unicode
152152
object. The C variable may also be declared as :c:type:`PyObject\*`.
@@ -260,9 +260,12 @@ Numbers
260260
``n`` (:class:`int`) [Py_ssize_t]
261261
Convert a Python integer to a C :c:type:`Py_ssize_t`.
262262

263-
``c`` (:class:`bytes` of length 1) [char]
264-
Convert a Python byte, represented as a :class:`bytes` object of length 1,
265-
to a C :c:type:`char`.
263+
``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]
264+
Convert a Python byte, represented as a :class:`bytes` or
265+
:class:`bytearray` object of length 1, to a C :c:type:`char`.
266+
267+
.. versionchanged:: 3.3
268+
Allow :class:`bytearray` objects.
266269

267270
``C`` (:class:`str` of length 1) [int]
268271
Convert a Python character, represented as a :class:`str` object of
@@ -315,6 +318,15 @@ Other objects
315318
.. versionchanged:: 3.1
316319
``Py_CLEANUP_SUPPORTED`` was added.
317320

321+
``p`` (:class:`bool`) [int]
322+
Tests the value passed in for truth (a boolean **p**\redicate) and converts
323+
the result to its equivalent C true/false integer value.
324+
Sets the int to 1 if the expression was true and 0 if it was false.
325+
This accepts any valid Python value. See :ref:`truth` for more
326+
information about how Python tests values for truth.
327+
328+
.. versionadded:: 3.3
329+
318330
``(items)`` (:class:`tuple`) [*matching-items*]
319331
The object must be a Python sequence whose length is the number of format units
320332
in *items*. The C arguments must correspond to the individual format units in
@@ -336,6 +348,15 @@ inside nested parentheses. They are:
336348
:c:func:`PyArg_ParseTuple` does not touch the contents of the corresponding C
337349
variable(s).
338350

351+
``$``
352+
:c:func:`PyArg_ParseTupleAndKeywords` only:
353+
Indicates that the remaining arguments in the Python argument list are
354+
keyword-only. Currently, all keyword-only arguments must also be optional
355+
arguments, so ``|`` must always be specified before ``$`` in the format
356+
string.
357+
358+
.. versionadded:: 3.3
359+
339360
``:``
340361
The list of format units ends here; the string after the colon is used as the
341362
function name in error messages (the "associated value" of the exception that

0 commit comments

Comments
 (0)