Skip to content

Commit c8e0320

Browse files
committed
Merge 3.2
2 parents aa35b00 + a74f8ef commit c8e0320

11 files changed

Lines changed: 37 additions & 16 deletions

File tree

Doc/library/socket.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,20 @@ Socket addresses are represented as follows:
6464
tuple, and the fields depend on the address type. The general tuple form is
6565
``(addr_type, v1, v2, v3 [, scope])``, where:
6666

67-
- *addr_type* is one of TIPC_ADDR_NAMESEQ, TIPC_ADDR_NAME, or
68-
TIPC_ADDR_ID.
69-
- *scope* is one of TIPC_ZONE_SCOPE, TIPC_CLUSTER_SCOPE, and
70-
TIPC_NODE_SCOPE.
71-
- If *addr_type* is TIPC_ADDR_NAME, then *v1* is the server type, *v2* is
67+
- *addr_type* is one of :const:`TIPC_ADDR_NAMESEQ`, :const:`TIPC_ADDR_NAME`,
68+
or :const:`TIPC_ADDR_ID`.
69+
- *scope* is one of :const:`TIPC_ZONE_SCOPE`, :const:`TIPC_CLUSTER_SCOPE`, and
70+
:const:`TIPC_NODE_SCOPE`.
71+
- If *addr_type* is :const:`TIPC_ADDR_NAME`, then *v1* is the server type, *v2* is
7272
the port identifier, and *v3* should be 0.
7373

74-
If *addr_type* is TIPC_ADDR_NAMESEQ, then *v1* is the server type, *v2*
74+
If *addr_type* is :const:`TIPC_ADDR_NAMESEQ`, then *v1* is the server type, *v2*
7575
is the lower port number, and *v3* is the upper port number.
7676

77-
If *addr_type* is TIPC_ADDR_ID, then *v1* is the node, *v2* is the
77+
If *addr_type* is :const:`TIPC_ADDR_ID`, then *v1* is the node, *v2* is the
7878
reference, and *v3* should be set to 0.
7979

80-
If *addr_type* is TIPC_ADDR_ID, then *v1* is the node, *v2* is the
80+
If *addr_type* is :const:`TIPC_ADDR_ID`, then *v1* is the node, *v2* is the
8181
reference, and *v3* should be set to 0.
8282

8383
- A tuple ``(interface, )`` is used for the :const:`AF_CAN` address family,

Doc/library/sysconfig.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ identifier. Python currently uses eight paths:
130130
one may call this function and get the default value.
131131

132132
If *scheme* is provided, it must be a value from the list returned by
133-
:func:`get_path_names`. Otherwise, the default scheme for the current
133+
:func:`get_scheme_names`. Otherwise, the default scheme for the current
134134
platform is used.
135135

136136
If *vars* is provided, it must be a dictionary of variables that will update

Lib/inspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ def getmodule(object, _filename=None):
482482
return sys.modules.get(modulesbyfile[file])
483483
# Update the filename to module name cache and check yet again
484484
# Copy sys.modules in order to cope with changes while iterating
485-
for modname, module in sys.modules.items():
485+
for modname, module in list(sys.modules.items()):
486486
if ismodule(module) and hasattr(module, '__file__'):
487487
f = module.__file__
488488
if f == _filesbymodname.get(modname, None):

Lib/keyword.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
To update the symbols in this file, 'cd' to the top directory of
88
the python source tree after building the interpreter and run:
99
10-
python Lib/keyword.py
10+
./python Lib/keyword.py
1111
"""
1212

1313
__all__ = ["iskeyword", "kwlist"]

Lib/locale.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,8 +1598,7 @@ def getpreferredencoding(do_setlocale = True):
15981598
# to include every locale up to Windows Vista.
15991599
#
16001600
# NOTE: this mapping is incomplete. If your language is missing, please
1601-
# submit a bug report to Python bug manager, which you can find via:
1602-
# http://www.python.org/dev/
1601+
# submit a bug report to the Python bug tracker at http://bugs.python.org/
16031602
# Make sure you include the missing language identifier and the suggested
16041603
# locale code.
16051604
#

Lib/symbol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# To update the symbols in this file, 'cd' to the top directory of
88
# the python source tree after building the interpreter and run:
99
#
10-
# python Lib/symbol.py
10+
# ./python Lib/symbol.py
1111

1212
#--start constants--
1313
single_input = 256

Lib/test/regrtest.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@
177177
import platform
178178
import random
179179
import re
180+
import shutil
180181
import signal
181182
import sys
182183
import sysconfig
@@ -1042,6 +1043,23 @@ def restore_asyncore_socket_map(self, saved_map):
10421043
asyncore.close_all(ignore_all=True)
10431044
asyncore.socket_map.update(saved_map)
10441045

1046+
def get_shutil_archive_formats(self):
1047+
# we could call get_archives_formats() but that only returns the
1048+
# registry keys; we want to check the values too (the functions that
1049+
# are registered)
1050+
return shutil._ARCHIVE_FORMATS, shutil._ARCHIVE_FORMATS.copy()
1051+
def restore_shutil_archive_formats(self, saved):
1052+
shutil._ARCHIVE_FORMATS = saved[0]
1053+
shutil._ARCHIVE_FORMATS.clear()
1054+
shutil._ARCHIVE_FORMATS.update(saved[1])
1055+
1056+
def get_shutil_unpack_formats(self):
1057+
return shutil._UNPACK_FORMATS, shutil._UNPACK_FORMATS.copy()
1058+
def restore_shutil_unpack_formats(self, saved):
1059+
shutil._UNPACK_FORMATS = saved[0]
1060+
shutil._UNPACK_FORMATS.clear()
1061+
shutil._UNPACK_FORMATS.update(saved[1])
1062+
10451063
def get_logging__handlers(self):
10461064
# _handlers is a WeakValueDictionary
10471065
return id(logging._handlers), logging._handlers, logging._handlers.copy()

Lib/token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# To update the symbols in this file, 'cd' to the top directory of
88
# the python source tree after building the interpreter and run:
99
#
10-
# python Lib/token.py
10+
# ./python Lib/token.py
1111

1212
#--start constants--
1313
ENDMARKER = 0

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,7 @@ Frank J. Tobin
978978
Bennett Todd
979979
R Lindsay Todd
980980
Eugene Toder
981+
Erik Tollerud
981982
Matias Torchinsky
982983
Sandro Tosi
983984
Richard Townsend

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,9 @@ Core and Builtins
399399
Library
400400
-------
401401

402+
- Issue #13487: Make inspect.getmodule robust against changes done to
403+
sys.modules while it is iterating over it.
404+
402405
- Issue #12618: Fix a bug that prevented py_compile from creating byte
403406
compiled files in the current directory. Initial patch by Sjoerd de Vries.
404407

0 commit comments

Comments
 (0)