Skip to content

Commit f78d77c

Browse files
author
Anselm Kruis
committed
Merge v3.6.1 into 3.6-slp.
2 parents fe9f081 + 69c0db5 commit f78d77c

Some content is hidden

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

57 files changed

+818
-424
lines changed

Doc/library/base64.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,18 @@ The legacy interface:
237237

238238

239239
.. function:: decodebytes(s)
240-
decodestring(s)
241240

242241
Decode the :term:`bytes-like object` *s*, which must contain one or more
243242
lines of base64 encoded data, and return the decoded :class:`bytes`.
244-
``decodestring`` is a deprecated alias.
245243

246244
.. versionadded:: 3.1
247245

246+
.. function:: decodestring(s)
247+
248+
Deprecated alias of :func:`decodebytes`.
249+
250+
.. deprecated:: 3.1
251+
248252

249253
.. function:: encode(input, output)
250254

@@ -257,14 +261,19 @@ The legacy interface:
257261

258262

259263
.. function:: encodebytes(s)
260-
encodestring(s)
261264

262265
Encode the :term:`bytes-like object` *s*, which can contain arbitrary binary
263266
data, and return :class:`bytes` containing the base64-encoded data, with newlines
264267
(``b'\n'``) inserted after every 76 bytes of output, and ensuring that
265268
there is a trailing newline, as per :rfc:`2045` (MIME).
266269

267-
``encodestring`` is a deprecated alias.
270+
.. versionadded:: 3.1
271+
272+
.. function:: encodestring(s)
273+
274+
Deprecated alias of :func:`encodebytes`.
275+
276+
.. deprecated:: 3.1
268277

269278

270279
An example usage of the module:

Doc/library/configparser.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -983,13 +983,16 @@ ConfigParser Objects
983983
.. method:: read(filenames, encoding=None)
984984

985985
Attempt to read and parse a list of filenames, returning a list of
986-
filenames which were successfully parsed. If *filenames* is a string, it
987-
is treated as a single filename. If a file named in *filenames* cannot
988-
be opened, that file will be ignored. This is designed so that you can
989-
specify a list of potential configuration file locations (for example,
990-
the current directory, the user's home directory, and some system-wide
991-
directory), and all existing configuration files in the list will be
992-
read. If none of the named files exist, the :class:`ConfigParser`
986+
filenames which were successfully parsed.
987+
988+
If *filenames* is a string or :term:`path-like object`, it is treated as
989+
a single filename. If a file named in *filenames* cannot be opened, that
990+
file will be ignored. This is designed so that you can specify a list of
991+
potential configuration file locations (for example, the current
992+
directory, the user's home directory, and some system-wide directory),
993+
and all existing configuration files in the list will be read.
994+
995+
If none of the named files exist, the :class:`ConfigParser`
993996
instance will contain an empty dataset. An application which requires
994997
initial values to be loaded from a file should load the required file or
995998
files using :meth:`read_file` before calling :meth:`read` for any
@@ -1006,6 +1009,9 @@ ConfigParser Objects
10061009
The *encoding* parameter. Previously, all files were read using the
10071010
default encoding for :func:`open`.
10081011

1012+
.. versionadded:: 3.6.1
1013+
The *filenames* parameter accepts a :term:`path-like object`.
1014+
10091015

10101016
.. method:: read_file(f, source=None)
10111017

Doc/library/dis.rst

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,8 +772,13 @@ All of the following opcodes use their arguments.
772772

773773
.. opcode:: BUILD_MAP (count)
774774

775-
Pushes a new dictionary object onto the stack. The dictionary is pre-sized
776-
to hold *count* entries.
775+
Pushes a new dictionary object onto the stack. Pops ``2 * count`` items
776+
so that the dictionary holds *count* entries:
777+
``{..., TOS3: TOS2, TOS1: TOS}``.
778+
779+
.. versionchanged:: 3.5
780+
The dictionary is created from stack items instead of creating an
781+
empty dictionary pre-sized to hold *count* items.
777782

778783

779784
.. opcode:: BUILD_CONST_KEY_MAP (count)
@@ -793,6 +798,52 @@ All of the following opcodes use their arguments.
793798
.. versionadded:: 3.6
794799

795800

801+
.. opcode:: BUILD_TUPLE_UNPACK (count)
802+
803+
Pops *count* iterables from the stack, joins them in a single tuple,
804+
and pushes the result. Implements iterable unpacking in tuple
805+
displays ``(*x, *y, *z)``.
806+
807+
.. versionadded:: 3.5
808+
809+
810+
.. opcode:: BUILD_LIST_UNPACK (count)
811+
812+
This is similar to :opcode:`BUILD_TUPLE_UNPACK`, but pushes a list
813+
instead of tuple. Implements iterable unpacking in list
814+
displays ``[*x, *y, *z]``.
815+
816+
.. versionadded:: 3.5
817+
818+
819+
.. opcode:: BUILD_SET_UNPACK (count)
820+
821+
This is similar to :opcode:`BUILD_TUPLE_UNPACK`, but pushes a set
822+
instead of tuple. Implements iterable unpacking in set
823+
displays ``{*x, *y, *z}``.
824+
825+
.. versionadded:: 3.5
826+
827+
828+
.. opcode:: BUILD_MAP_UNPACK (count)
829+
830+
Pops *count* mappings from the stack, merges them into a single dictionary,
831+
and pushes the result. Implements dictionary unpacking in dictionary
832+
displays ``{**x, **y, **z}``.
833+
834+
.. versionadded:: 3.5
835+
836+
837+
.. opcode:: BUILD_MAP_UNPACK_WITH_CALL (oparg)
838+
839+
This is similar to :opcode:`BUILD_MAP_UNPACK`,
840+
but is used for ``f(**x, **y, **z)`` call syntax. The lowest byte of
841+
*oparg* is the count of mappings, the relative position of the
842+
corresponding callable ``f`` is encoded in the second byte of *oparg*.
843+
844+
.. versionadded:: 3.5
845+
846+
796847
.. opcode:: LOAD_ATTR (namei)
797848

798849
Replaces TOS with ``getattr(TOS, co_names[namei])``.

Doc/library/email.compat32-message.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ having a MIME type such as :mimetype:`multipart/\*` or
3333
The conceptual model provided by a :class:`Message` object is that of an
3434
ordered dictionary of headers with additional methods for accessing both
3535
specialized information from the headers, for accessing the payload, for
36-
generating a serialized version of the mssage, and for recursively walking over
37-
the object tree. Note that duplicate headers are supported but special methods
38-
must be used to access them.
36+
generating a serialized version of the message, and for recursively walking
37+
over the object tree. Note that duplicate headers are supported but special
38+
methods must be used to access them.
3939

4040
The :class:`Message` pseudo-dictionary is indexed by the header names, which
4141
must be ASCII values. The values of the dictionary are strings that are

Doc/library/ssl.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ Constants
846846
The version string of the OpenSSL library loaded by the interpreter::
847847

848848
>>> ssl.OPENSSL_VERSION
849-
'OpenSSL 0.9.8k 25 Mar 2009'
849+
'OpenSSL 1.0.2k 26 Jan 2017'
850850

851851
.. versionadded:: 3.2
852852

@@ -856,7 +856,7 @@ Constants
856856
OpenSSL library::
857857

858858
>>> ssl.OPENSSL_VERSION_INFO
859-
(0, 9, 8, 11, 15)
859+
(1, 0, 2, 11, 15)
860860

861861
.. versionadded:: 3.2
862862

@@ -865,9 +865,9 @@ Constants
865865
The raw version number of the OpenSSL library, as a single integer::
866866

867867
>>> ssl.OPENSSL_VERSION_NUMBER
868-
9470143
868+
268443839
869869
>>> hex(ssl.OPENSSL_VERSION_NUMBER)
870-
'0x9080bf'
870+
'0x100020bf'
871871

872872
.. versionadded:: 3.2
873873

Doc/library/stdtypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ Notes:
108108

109109
(1)
110110
This is a short-circuit operator, so it only evaluates the second
111-
argument if the first one is :const:`False`.
111+
argument if the first one is false.
112112

113113
(2)
114114
This is a short-circuit operator, so it only evaluates the second
115-
argument if the first one is :const:`True`.
115+
argument if the first one is true.
116116

117117
(3)
118118
``not`` has a lower priority than non-Boolean operators, so ``not a == b`` is

Doc/library/time.rst

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,23 @@ semantics of these functions varies among platforms.
1717

1818
An explanation of some terminology and conventions is in order.
1919

20+
.. _epoch:
21+
2022
.. index:: single: epoch
2123

22-
* The :dfn:`epoch` is the point where the time starts. On January 1st of that
23-
year, at 0 hours, the "time since the epoch" is zero. For Unix, the epoch is
24-
1970. To find out what the epoch is, look at ``gmtime(0)``.
24+
* The :dfn:`epoch` is the point where the time starts, and is platform
25+
dependent. For Unix, the epoch is January 1, 1970, 00:00:00 (UTC).
26+
To find out what the epoch is on a given platform, look at
27+
``time.gmtime(0)``.
28+
29+
.. _leap seconds: https://en.wikipedia.org/wiki/Leap_second
30+
31+
.. index:: seconds since the epoch
32+
33+
* The term :dfn:`seconds since the epoch` refers to the total number
34+
of elapsed seconds since the epoch, typically excluding
35+
`leap seconds`_. Leap seconds are excluded from this total on all
36+
POSIX-compliant platforms.
2537

2638
.. index:: single: Year 2038
2739

@@ -467,7 +479,7 @@ The module defines the following functions and data items:
467479

468480
(2)
469481
The range really is ``0`` to ``61``; value ``60`` is valid in
470-
timestamps representing leap seconds and value ``61`` is supported
482+
timestamps representing `leap seconds`_ and value ``61`` is supported
471483
for historical reasons.
472484

473485
(3)
@@ -572,12 +584,28 @@ The module defines the following functions and data items:
572584

573585
.. function:: time()
574586

575-
Return the time in seconds since the epoch as a floating point number.
587+
Return the time in seconds since the epoch_ as a floating point
588+
number. The specific date of the epoch and the handling of
589+
`leap seconds`_ is platform dependent.
590+
On Windows and most Unix systems, the epoch is January 1, 1970,
591+
00:00:00 (UTC) and leap seconds are not counted towards the time
592+
in seconds since the epoch. This is commonly referred to as
593+
`Unix time <https://en.wikipedia.org/wiki/Unix_time>`_.
594+
To find out what the epoch is on a given platform, look at
595+
``gmtime(0)``.
596+
576597
Note that even though the time is always returned as a floating point
577598
number, not all systems provide time with a better precision than 1 second.
578599
While this function normally returns non-decreasing values, it can return a
579-
lower value than a previous call if the system clock has been set back between
580-
the two calls.
600+
lower value than a previous call if the system clock has been set back
601+
between the two calls.
602+
603+
The number returned by :func:`.time` may be converted into a more common
604+
time format (i.e. year, month, day, hour, etc...) in UTC by passing it to
605+
:func:`gmtime` function or in local time by passing it to the
606+
:func:`localtime` function. In both cases a
607+
:class:`struct_time` object is returned, from which the components
608+
of the calendar date may be accessed as attributes.
581609

582610
.. data:: timezone
583611

Doc/library/trace.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ annotated statement coverage listings, print caller/callee relationships and
1313
list functions executed during a program run. It can be used in another program
1414
or from the command line.
1515

16+
.. seealso::
17+
18+
`Coverage.py <https://coverage.readthedocs.io/>`_
19+
A popular third-party coverage tool that provides HTML
20+
output along with advanced features such as branch coverage.
21+
1622
.. _trace-cli:
1723

1824
Command-Line Usage

Doc/whatsnew/3.6.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
What's New In Python 3.6
33
****************************
44

5-
:Release: |release|
6-
:Date: |today|
75
:Editors: Elvis Pranskevichus <[email protected]>, Yury Selivanov <[email protected]>
86

97
.. Rules for maintenance:

Include/patchlevel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
/*--start constants--*/
1919
#define PY_MAJOR_VERSION 3
2020
#define PY_MINOR_VERSION 6
21-
#define PY_MICRO_VERSION 0
21+
#define PY_MICRO_VERSION 1
2222
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
2323
#define PY_RELEASE_SERIAL 0
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.6.0+"
26+
#define PY_VERSION "3.6.1"
2727
/*--end constants--*/
2828

2929
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.

0 commit comments

Comments
 (0)