Skip to content

Commit 60aee01

Browse files
Merge branch 'master' into cgi-max-num-fields
2 parents 7668322 + fc8205c commit 60aee01

57 files changed

Lines changed: 155 additions & 110 deletions

Some content is hidden

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

.azure-pipelines/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
117117

118118
pool:
119-
vmImage: vs2017-win2017
119+
vmImage: vs2017-win2016
120120

121121
strategy:
122122
matrix:

.azure-pipelines/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
6565

6666
pool:
67-
vmImage: vs2017-win2017
67+
vmImage: vs2017-win2016
6868

6969
strategy:
7070
matrix:

Doc/library/datetime.rst

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ Other constructors, all class methods:
841841
Return a :class:`datetime` corresponding to a *date_string* in one of the
842842
formats emitted by :meth:`date.isoformat` and :meth:`datetime.isoformat`.
843843
Specifically, this function supports strings in the format(s)
844-
``YYYY-MM-DD[*HH[:MM[:SS[.mmm[mmm]]]][+HH:MM[:SS[.ffffff]]]]``,
844+
``YYYY-MM-DD[*HH[:MM[:SS[.fff[fff]]]][+HH:MM[:SS[.ffffff]]]]``,
845845
where ``*`` can match any single character.
846846

847847
.. caution::
@@ -1215,13 +1215,13 @@ Instance methods:
12151215
.. method:: datetime.isoformat(sep='T', timespec='auto')
12161216

12171217
Return a string representing the date and time in ISO 8601 format,
1218-
YYYY-MM-DDTHH:MM:SS.mmmmmm or, if :attr:`microsecond` is 0,
1218+
YYYY-MM-DDTHH:MM:SS.ffffff or, if :attr:`microsecond` is 0,
12191219
YYYY-MM-DDTHH:MM:SS
12201220

1221-
If :meth:`utcoffset` does not return ``None``, a 6-character string is
1222-
appended, giving the UTC offset in (signed) hours and minutes:
1223-
YYYY-MM-DDTHH:MM:SS.mmmmmm+HH:MM or, if :attr:`microsecond` is 0
1224-
YYYY-MM-DDTHH:MM:SS+HH:MM
1221+
If :meth:`utcoffset` does not return ``None``, a string is
1222+
appended, giving the UTC offset:
1223+
YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]] or, if :attr:`microsecond`
1224+
is 0 YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]].
12251225

12261226
The optional argument *sep* (default ``'T'``) is a one-character separator,
12271227
placed between the date and time portions of the result. For example,
@@ -1245,7 +1245,7 @@ Instance methods:
12451245
in HH:MM:SS format.
12461246
- ``'milliseconds'``: Include full time, but truncate fractional second
12471247
part to milliseconds. HH:MM:SS.sss format.
1248-
- ``'microseconds'``: Include full time in HH:MM:SS.mmmmmm format.
1248+
- ``'microseconds'``: Include full time in HH:MM:SS.ffffff format.
12491249

12501250
.. note::
12511251

@@ -1522,7 +1522,7 @@ Other constructor:
15221522

15231523
Return a :class:`time` corresponding to a *time_string* in one of the
15241524
formats emitted by :meth:`time.isoformat`. Specifically, this function supports
1525-
strings in the format(s) ``HH[:MM[:SS[.mmm[mmm]]]][+HH:MM[:SS[.ffffff]]]``.
1525+
strings in the format(s) ``HH[:MM[:SS[.fff[fff]]]][+HH:MM[:SS[.ffffff]]]``.
15261526

15271527
.. caution::
15281528

@@ -1548,10 +1548,10 @@ Instance methods:
15481548

15491549
.. method:: time.isoformat(timespec='auto')
15501550

1551-
Return a string representing the time in ISO 8601 format, HH:MM:SS.mmmmmm or, if
1551+
Return a string representing the time in ISO 8601 format, HH:MM:SS.ffffff or, if
15521552
:attr:`microsecond` is 0, HH:MM:SS If :meth:`utcoffset` does not return ``None``, a
1553-
6-character string is appended, giving the UTC offset in (signed) hours and
1554-
minutes: HH:MM:SS.mmmmmm+HH:MM or, if self.microsecond is 0, HH:MM:SS+HH:MM
1553+
string is appended, giving the UTC offset: HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]
1554+
or, if self.microsecond is 0, HH:MM:SS+HH:MM[:SS[.ffffff]].
15551555

15561556
The optional argument *timespec* specifies the number of additional
15571557
components of the time to include (the default is ``'auto'``).
@@ -1565,7 +1565,7 @@ Instance methods:
15651565
in HH:MM:SS format.
15661566
- ``'milliseconds'``: Include full time, but truncate fractional second
15671567
part to milliseconds. HH:MM:SS.sss format.
1568-
- ``'microseconds'``: Include full time in HH:MM:SS.mmmmmm format.
1568+
- ``'microseconds'``: Include full time in HH:MM:SS.ffffff format.
15691569

15701570
.. note::
15711571

@@ -2091,9 +2091,10 @@ format codes.
20912091
| | number, zero-padded on the | 999999 | |
20922092
| | left. | | |
20932093
+-----------+--------------------------------+------------------------+-------+
2094-
| ``%z`` | UTC offset in the form | (empty), +0000, -0400, | \(6) |
2095-
| | ±HHMM[SS] (empty string if the | +1030 | |
2096-
| | object is naive). | | |
2094+
| ``%z`` | UTC offset in the form | (empty), +0000, | \(6) |
2095+
| | ±HHMM[SS[.ffffff]] (empty | -0400, +1030, | |
2096+
| | string if the object is | +063415, | |
2097+
| | naive). | -030712.345216 | |
20972098
+-----------+--------------------------------+------------------------+-------+
20982099
| ``%Z`` | Time zone name (empty string | (empty), UTC, EST, CST | |
20992100
| | if the object is naive). | | |
@@ -2206,12 +2207,12 @@ Notes:
22062207

22072208
``%z``
22082209
:meth:`utcoffset` is transformed into a string of the form
2209-
±HHMM[SS[.uuuuuu]], where HH is a 2-digit string giving the number of UTC
2210-
offset hours, and MM is a 2-digit string giving the number of UTC offset
2210+
±HHMM[SS[.ffffff]], where HH is a 2-digit string giving the number of UTC
2211+
offset hours, MM is a 2-digit string giving the number of UTC offset
22112212
minutes, SS is a 2-digit string giving the number of UTC offset
2212-
seconds and uuuuuu is a 2-digit string giving the number of UTC
2213-
offset microseconds. The uuuuuu part is omitted when the offset is a
2214-
whole number of minutes and both the uuuuuu and the SS parts are omitted
2213+
seconds and ffffff is a 6-digit string giving the number of UTC
2214+
offset microseconds. The ffffff part is omitted when the offset is a
2215+
whole number of seconds and both the ffffff and the SS part is omitted
22152216
when the offset is a whole number of minutes. For example, if
22162217
:meth:`utcoffset` returns ``timedelta(hours=-3, minutes=-30)``, ``%z`` is
22172218
replaced with the string ``'-0330'``.

Doc/library/re.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ The special characters are:
204204
Standard #18`_ might be added in the future. This would change the
205205
syntax, so to facilitate this change a :exc:`FutureWarning` will be raised
206206
in ambiguous cases for the time being.
207-
That include sets starting with a literal ``'['`` or containing literal
207+
That includes sets starting with a literal ``'['`` or containing literal
208208
character sequences ``'--'``, ``'&&'``, ``'~~'``, and ``'||'``. To
209209
avoid a warning escape them with a backslash.
210210

Doc/library/stdtypes.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,8 +1700,19 @@ expression support in the :mod:`re` module).
17001700
Return true if the string is a valid identifier according to the language
17011701
definition, section :ref:`identifiers`.
17021702

1703-
Use :func:`keyword.iskeyword` to test for reserved identifiers such as
1704-
:keyword:`def` and :keyword:`class`.
1703+
Call :func:`keyword.iskeyword` to test whether string ``s`` is a reserved
1704+
identifier, such as :keyword:`def` and :keyword:`class`.
1705+
1706+
Example:
1707+
::
1708+
1709+
>>> from keyword import iskeyword
1710+
1711+
>>> 'hello'.isidentifier(), iskeyword('hello')
1712+
True, False
1713+
>>> 'def'.isidentifier(), iskeyword('def')
1714+
True, True
1715+
17051716

17061717
.. method:: str.islower()
17071718

Doc/library/sys.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ always available.
345345
:const:`debug` :option:`-d`
346346
:const:`inspect` :option:`-i`
347347
:const:`interactive` :option:`-i`
348+
:const:`isolated` :option:`-I`
348349
:const:`optimize` :option:`-O` or :option:`-OO`
349350
:const:`dont_write_bytecode` :option:`-B`
350351
:const:`no_user_site` :option:`-s`
@@ -367,6 +368,9 @@ always available.
367368
.. versionchanged:: 3.3
368369
Removed obsolete ``division_warning`` attribute.
369370

371+
.. versionchanged:: 3.4
372+
Added ``isolated`` attribute for :option:`-I` ``isolated`` flag.
373+
370374
.. versionchanged:: 3.7
371375
Added ``dev_mode`` attribute for the new :option:`-X` ``dev`` flag
372376
and ``utf8_mode`` attribute for the new :option:`-X` ``utf8`` flag.

Doc/whatsnew/3.3.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ The launcher can also be used explicitly from the command line as the ``py``
303303
application. Running ``py`` follows the same version selection rules as
304304
implicitly launching scripts, but a more specific version can be selected
305305
by passing appropriate arguments (such as ``-3`` to request Python 3 when
306-
Python 2 is also installed, or ``-2.6`` to specifclly request an earlier
306+
Python 2 is also installed, or ``-2.6`` to specifically request an earlier
307307
Python version when a more recent version is installed).
308308

309309
In addition to the launcher, the Windows installer now includes an
@@ -2386,7 +2386,7 @@ Porting Python code
23862386
finder, you will need to remove keys paired with values of ``None`` **and**
23872387
:class:`imp.NullImporter` to be backwards-compatible. This will lead to extra
23882388
overhead on older versions of Python that re-insert ``None`` into
2389-
:attr:`sys.path_importer_cache` where it repesents the use of implicit
2389+
:attr:`sys.path_importer_cache` where it represents the use of implicit
23902390
finders, but semantically it should not change anything.
23912391

23922392
* :class:`importlib.abc.Finder` no longer specifies a `find_module()` abstract

Doc/whatsnew/3.5.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2471,7 +2471,7 @@ Changes in the Python API
24712471
parameter to help control the ``opt-`` tag. Because of this, the
24722472
*debug_override* parameter of the function is now deprecated. `.pyo` files
24732473
are also no longer supported as a file argument to the Python interpreter and
2474-
thus serve no purpose when distributed on their own (i.e. sourcless code
2474+
thus serve no purpose when distributed on their own (i.e. sourceless code
24752475
distribution). Due to the fact that the magic number for bytecode has changed
24762476
in Python 3.5, all old `.pyo` files from previous versions of Python are
24772477
invalid regardless of this PEP.

Doc/whatsnew/3.7.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ feature. Instances must be created with :class:`~ssl.SSLContext` methods
13551355
OpenSSL 1.1 APIs for setting the minimum and maximum TLS protocol version are
13561356
available as :attr:`SSLContext.minimum_version <ssl.SSLContext.minimum_version>`
13571357
and :attr:`SSLContext.maximum_version <ssl.SSLContext.maximum_version>`.
1358-
Supported protocols are indicated by serveral new flags, such as
1358+
Supported protocols are indicated by several new flags, such as
13591359
:data:`~ssl.HAS_TLSv1_1`.
13601360
(Contributed by Christian Heimes in :issue:`32609`.)
13611361

@@ -2023,7 +2023,7 @@ Use :mod:`threading` instead.
20232023
socket
20242024
------
20252025

2026-
The silent argument value trunctation in :func:`socket.htons` and
2026+
The silent argument value truncation in :func:`socket.htons` and
20272027
:func:`socket.ntohs` has been deprecated. In future versions of Python,
20282028
if the passed argument is larger than 16 bits, an exception will be raised.
20292029
(Contributed by Oren Milman in :issue:`28332`.)

Lib/ctypes/test/test_win32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class S(Structure):
6868
for i, f in enumerate(fields):
6969
value = getattr(res, f[0])
7070
expected = bytes([ord('a') + i])
71-
self.assertEquals(value, expected)
71+
self.assertEqual(value, expected)
7272

7373

7474

0 commit comments

Comments
 (0)